Parcourir la source

simplification of e.out.h

dick il y a 36 ans
Parent
commit
5578d004bc
4 fichiers modifiés avec 13 ajouts et 12 suppressions
  1. 4 0
      util/int/ChangeLog
  2. 5 2
      util/int/Makefile
  3. 0 8
      util/int/e.out.h
  4. 4 2
      util/int/read.c

+ 4 - 0
util/int/ChangeLog

@@ -1,3 +1,7 @@
+ 3-Oct-88  Dick Grune (dick) at dick
+	Since the definitions of VERSION and MAGIC are now available from
+	standard include files, e.out.h can be simplified.
+
 27-May-88  Dick Grune (dick) at dick
 	Testing with the UNIX system call tester by Leonie van der Voort
 	revealed a few errors: when length was negative in a call of read

+ 5 - 2
util/int/Makefile

@@ -8,6 +8,9 @@ LFLAGS =	#		# passed to loader
 
 IDIRS =		-I$(EM)/h#	# passed to C compiler and lint
 
+LINT =		lint#		# lint to be used
+LINTFLAGS =	-h#		# passed to lint
+
 INT =		./int#		# name of resulting interpreter
 
 IP_SPEC =	$(EM)/etc/ip_spec.t
@@ -92,8 +95,8 @@ test/awa.em44:
 
 
 # Auxiliary entries
-lint:
-	lint $(IDIRS) $(SRC) -lc
+lint:	$(SRC) trap_msg warn_msg warn.h switch/DoCases switch/PrCases
+	$(LINT) $(LINTFLAGS) $(IDIRS) $(SRC) -lc
 
 tags:	$(HDR) $(SRC)
 	ctags $(HDR) $(SRC)

+ 0 - 8
util/int/e.out.h

@@ -1,13 +1,5 @@
 /* $Header$ */
 
-/* get version number from ... */
-#include	<local.h>
-
-/* get magic number from ... */
-#include	<em_spec.h>
-#include	<as_spec.h>
-#define	MAGIC		as_magic
-
 #define	FB_TEST		001
 #define	FB_PROFILE	002
 #define	FB_FLOW		004

+ 4 - 2
util/int/read.c

@@ -5,8 +5,10 @@
 /* $Header$ */
 
 #include	<stdio.h>
+#include	<local.h>		/* for VERSION */
+#include	<em_spec.h>
+#include	<as_spec.h>		/* for as_magic */
 
-#include	"e.out.h"
 #include	"logging.h"
 #include	"nofloat.h"
 #include	"global.h"
@@ -65,7 +67,7 @@ rd_open(fname)
 rd_header()
 {
 	/* Part 1 */
-	if (rd_int(2L) != MAGIC)
+	if (rd_int(2L) != as_magic)
 		fatal("Bad magic number in loadfile");
 
 	FLAGS = rd_int(2L);