1. George Koehler
  2. ack-fix

Commits

dtrg  committed 7f0b1e3

First milestone of replacing the build system.

  • Participants
  • Parent commits 82c3c3c
  • Branches dtrg-buildsystem

Comments (0)

Files changed (120)

File Makefile

View file
  • Ignore whitespace
+BUILDDIR = /tmp/obj
+OBJDIR = $(BUILDDIR)/obj
+BINDIR = $(BUILDDIR)/bin
+LIBDIR = $(BUILDDIR)/lib
+INCDIR = $(BUILDDIR)/include
+INSDIR = $(BUILDDIR)/staging
+
+PLATIND = $(INSDIR)/share/ack
+PLATDEP = $(INSDIR)/lib/ack
+
+CC = gcc
+AR = ar
+RM = rm -f
+CP = cp
+
+hide = @
+
+CFLAGS = \
+	-g \
+	-I$(INCDIR) \
+	-Imodules/h \
+	-Ih
+
+LDFLAGS =
+
+all: installables
+
+.DELETE_ON_ERROR:
+
+include first/core.mk
+
+include modules/src/object/build.mk
+include modules/src/alloc/build.mk
+include modules/src/input/build.mk
+include modules/src/idf/build.mk
+include modules/src/system/build.mk
+include modules/src/string/build.mk
+include modules/src/print/build.mk
+include modules/src/flt_arith/build.mk
+include modules/src/em_code/build.mk
+include modules/src/em_mes/build.mk
+
+include util/amisc/build.mk
+include util/cmisc/build.mk
+include util/ack/build.mk
+include util/LLgen/build.mk
+include util/data/build.mk
+include util/opt/build.mk
+include util/ncgg/build.mk
+include util/arch/build.mk
+
+include lang/cem/build.mk
+
+include mach/proto/as/build.mk
+include mach/proto/ncg/build.mk
+
+include plat/build.mk
+include plat/pc86/build.mk
+include plat/cpm/build.mk
+
+.PHONY: installables
+installables: $(INSTALLABLES)
+
+.PHONY: clean
+clean:
+	@echo CLEAN
+	$(hide) $(RM) $(CLEANABLES)
+
+$(INCDIR)/local.h:
+	@echo LOCAL
+	@mkdir -p $(dir $@)
+	$(hide) echo '#define VERSION 3' > $@
+	$(hide) echo '#define ACKM "pc86"' >> $@
+	$(hide) echo '#define BIGMACHINE 1' >> $@
+	$(hide) echo '#define SYS_5' >> $@
+
+$(INCDIR)/em_path.h:
+	@echo EM_PATH
+	@mkdir -p $(dir $@)
+	$(hide) echo '#define TMP_DIR "/tmp"' > $@
+	$(hide) echo '#define EM_DIR "/tmp/obj/staging"' >> $@
+	$(hide) echo '#define ACK_PATH "share/ack/descr"' >> $@
+
+-include $(DEPENDS)

File first/core.mk

View file
  • Ignore whitespace
+define reset
+	$(eval q :=)
+	$(eval o :=)
+	$(eval s :=)
+	$(eval cflags :=)
+	$(eval ldflags :=)
+	$(eval objdir :=)
+endef
+
+# --- Host compiler
+
+define cfile-rule
+$o: $s
+	@echo CC $o
+	@mkdir -p $(dir $o)
+	@$(CC) $(CFLAGS) $(cflags) -MM -MQ $d -o $d $s
+	$(hide) $(CC) $(CFLAGS) $(cflags) -c -o $o $s
+endef
+
+define cfile
+	$(eval s := $1)
+	$(eval o := $(OBJDIR)/$(objdir)/$(1:.c=.o))
+	$(eval d := $(OBJDIR)/$(objdir)/$(1:.c=.d))
+	$(eval DEPENDS += $d)
+	$(eval CLEANABLES += $o $d)
+	$(eval q += $o)
+	$(eval $(cfile-rule))
+endef
+
+# --- ACK compiler
+
+define ackfile-rule
+$o: $s $(ACK) \
+		$(PLATIND)/descr/$(PLATFORM) \
+		$(PLATDEP)/$(PLATFORM)/as \
+		$(CCOMPILER) \
+		$(PLATFORM_$(PLATFORM))
+	@echo ACK $o
+	@mkdir -p $(dir $o)
+	$(hide) ACKDIR=$(INSDIR) $(ACK) $(ACKFLAGS) $(ackflags) -m$(PLATFORM) -c -o $o $s
+endef
+
+define ackfile
+	$(eval s := $1)
+	$(eval o := $(OBJDIR)/$(basename $1).o)
+	$(eval d := $(OBJDIR)/$(basename $1).d)
+	$(eval DEPENDS += $d)
+	$(eval CLEANABLES += $o $d)
+	$(eval q += $o)
+	$(eval $(ackfile-rule))
+endef
+
+# --- Add a raw to the queue
+
+define file
+	$(eval q += $1)
+endef
+
+# --- Host compiler linking
+
+define cprogram-rule
+$o: $s
+	@echo CPROGRAM $o
+	@mkdir -p $(dir $o)
+	$(hide) $(CC) $(CFLAGS) $(cflags) $(LDFLAGS) $(ldflags) -o $o $s
+endef
+
+define cprogram
+	$(eval o := $1)
+	$(eval s := $q)
+	$(eval CLEANABLES += $o)
+	$(eval q := $o)
+	$(eval $(cprogram-rule))
+endef
+
+# --- Host library linking
+
+define clibrary-rule
+$o: $s
+	@echo CLIBRARY $o
+	@mkdir -p $(dir $o)
+	@$(RM) $o
+	$(hide) $(AR) qsc $o $s
+endef
+
+define clibrary
+	$(eval o := $1)
+	$(eval s := $q)
+	$(eval CLEANABLES += $o)
+	$(eval q := $o)
+	$(eval $(clibrary-rule))
+endef
+
+# --- ACK library linking
+
+define acklibrary-rule
+$o: $s $(ACKAR)
+	@echo ACKLIBRARY $o
+	@mkdir -p $(dir $o)
+	@$(RM) $o
+	$(hide) $(AAL) q $o $s
+endef
+
+define acklibrary
+	$(eval o := $1)
+	$(eval s := $q)
+	$(eval CLEANABLES += $o)
+	$(eval q := $o)
+	$(eval $(acklibrary-rule))
+endef
+
+# --- Copies a file.
+
+define copyto-rule
+$o: $s
+	@echo CP $o
+	@mkdir -p $(dir $o)
+	$(hide) $(CP) $s $o
+endef
+
+define copyto
+	$(eval o := $1)
+	$(eval s := $q)
+	$(eval CLEANABLES += $o)
+	$(eval q := $o)
+	$(eval $(copyto-rule))
+endef
+
+# --- Installs a file (copies it and adds it to INSTALLABLES).
+
+define installto-rule
+$o: $s
+	@echo INSTALL $o
+	@mkdir -p $(dir $o)
+	$(hide) $(CP) $s $o
+endef
+
+define installto
+	$(eval o := $1)
+	$(eval s := $q)
+	$(eval CLEANABLES += $o)
+	$(eval INSTALLABLES += $o)
+	$(eval q := $o)
+	$(eval $(installto-rule))
+endef
+
+# --- Adds a dependency for the last object file
+
+define dependson
+	$(eval $o: $1)
+endef
+
+# --- Runs yacc.
+
+#  $1: directory to put output files
+#  $2: input files
+#
+# Output files are compiled via cfile and queued.
+
+define yacc-impl
+	$(eval o := $1/y.tab.c)
+	$(eval CLEANABLES += $o $1/y.tab.h)
+
+$o: $2
+	@echo YACC $o
+	@mkdir -p $(dir $o)
+	$(hide) yacc -t -b $1/y -d $2
+
+	$(call cfile, $o)
+
+$1/y.tab.h: $o
+
+endef
+
+yacc = $(eval $(call yacc-impl,$1,$2))
+
+# --- Runs flex.
+
+#  $1: directory to put output files
+#  $2: input files
+#
+# Output files are compiled via cfile and queued.
+
+define flex-impl
+
+$(eval o := $1/lex.yy.c)
+$(eval CLEANABLES += $o)
+
+$o: $2
+	@echo FLEX $o
+	@mkdir -p $(dir $o)
+	$(hide) flex -s -t $2 > $o
+
+$(call cfile, $o)
+
+endef
+
+flex = $(eval $(call flex-impl,$1,$2))
+

File lang/cem/build.mk

View file
  • Ignore whitespace
+include lang/cem/cpp.ansi/build.mk
+include lang/cem/cemcom.ansi/build.mk
+include lang/cem/libcc.ansi/build.mk
+
+$(eval CCOMPILER := $(CPPANSI) $(CEMCOMANSI) $(LIBCCANSIHEADERS))
+

File lang/cem/cemcom.ansi/LLlex.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*		    L E X I C A L   A N A L Y Z E R			*/
 
-#include	"debug.h"
-#include	"lint.h"
 #include	<alloc.h>
-#include	"idfsize.h"
-#include	"numsize.h"
-#include	"strsize.h"
-#include	"nopp.h"
+#include    "parameters.h"
 #include	"input.h"
 #include	"arith.h"
 #include	"def.h"

File lang/cem/cemcom.ansi/LLlex.h

View file
  • Ignore whitespace
 */
 
 #include "file_info.h"
-#include "nopp.h"
 
 /* the structure of a token:	*/
 struct token	{

File lang/cem/cemcom.ansi/LLmessage.c

View file
  • Ignore whitespace
 /*		PARSER ERROR ADMINISTRATION		*/
 
 #include	<alloc.h>
-#include	"idf.h"
 #include	"arith.h"
 #include	"LLlex.h"
 #include	"Lpars.h"

File lang/cem/cemcom.ansi/align.h

View file
  • Ignore whitespace
 /* $Id$ */
 /*	 A L I G N M E N T   D E F I N I T I O N S	*/
 
-#include "nocross.h"
-#include "trgt_sizes.h"
+#include "parameters.h"
 
 #ifndef NOCROSS
 extern int

File lang/cem/cemcom.ansi/arith.c

View file
  • Ignore whitespace
 	semantics of C is a mess.
 */
 
+#include    "parameters.h"
 #include	<alloc.h>
-#include	"debug.h"
-#include	"lint.h"
-#include	"nobitfield.h"
-#include	"idf.h"
 #include	<flt_arith.h>
 #include	"arith.h"
 #include	"sizes.h"

File lang/cem/cemcom.ansi/arith.h

View file
  • Ignore whitespace
 	be handy.
 */
 
-#include	"spec_arith.h"
+#include	"parameters.h"
 
 #ifndef	SPECIAL_ARITHMETICS
 

File lang/cem/cemcom.ansi/assert.h

View file
  • Ignore whitespace
 /*
  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
+
  * See the copyright notice in the ACK home directory, in the file "Copyright".
  */
 /* $Id$ */
 	there is no reasonable method to prove that a program is 100%
 	correct, these assertions are needed in some places.
 */
-#include	"debug.h"	/* UF */
+
+#include	"parameters.h"
 
 #ifdef	DEBUG
 /*	Note: this macro uses parameter substitution inside strings */

File lang/cem/cemcom.ansi/blocks.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	B L O C K   S T O R I N G   A N D   L O A D I N G	*/
 
-#include	"lint.h"
+#include	"parameters.h"
 #ifndef	LINT
 
 #include <em.h>

File lang/cem/cemcom.ansi/build.mk

View file
  • Ignore whitespace
+D := lang/cem/cemcom.ansi
+
+define build-cemcom-ansi-allocd-header
+$(eval g := $(OBJDIR)/$D/$(strip $1).h)
+$g: $D/$(strip $1).str $D/make.allocd
+	@echo ALLOCD $$@
+	@mkdir -p $$(dir $$@)
+	$(hide) $D/make.allocd < $$^ > $$@
+
+$(eval CLEANABLES += $g)
+$(eval $q: $g)
+endef
+
+define build-cemcom-ansi-next
+$(eval CLEANABLES += $(OBJDIR)/$D/next.c)
+$(OBJDIR)/$D/next.c: $D/make.next $1
+	@echo NEXT $$@
+	@mkdir -p $$(dir $$@)
+	$(hide) $$^ > $$@
+$(call cfile, $(OBJDIR)/$D/next.c)
+
+$(foreach f, $1, $(call build-cemcom-ansi-allocd-header, \
+	$(basename $(notdir $f))))
+endef
+
+define build-cemcom-ansi-impl
+
+$(call reset)
+$(eval cflags += -I$(OBJDIR)/$D -I$D)
+
+$(call cfile, $D/arith.c)
+$(call dependson, $(INCDIR)/flt_arith.h)
+
+$(call cfile, $D/blocks.c)
+$(call dependson, $(INCDIR)/em_codeEK.h)
+
+$(call cfile, $D/LLlex.c)
+$(call cfile, $D/LLmessage.c)
+
+$(call cfile, $D/ch3.c)
+$(call cfile, $D/ch3bin.c)
+$(call cfile, $D/ch3mon.c)
+$(call cfile, $D/code.c)
+$(call cfile, $D/conversion.c)
+$(call cfile, $D/cstoper.c)
+$(call cfile, $D/dataflow.c)
+$(call cfile, $D/declarator.c)
+$(call cfile, $D/decspecs.c)
+$(call cfile, $D/domacro.c)
+$(call cfile, $D/dumpidf.c)
+$(call cfile, $D/error.c)
+$(call cfile, $D/eval.c)
+$(call cfile, $D/expr.c)
+$(call cfile, $D/field.c)
+$(call cfile, $D/fltcstoper.c)
+$(call cfile, $D/idf.c)
+$(call cfile, $D/init.c)
+$(call cfile, $D/input.c)
+$(call cfile, $D/l_comment.c)
+$(call cfile, $D/l_ev_ord.c)
+$(call cfile, $D/l_lint.c)
+$(call cfile, $D/l_misc.c)
+$(call cfile, $D/l_outdef.c)
+$(call cfile, $D/l_states.c)
+$(call cfile, $D/label.c)
+$(call cfile, $D/main.c)
+$(call cfile, $D/options.c)
+$(call cfile, $D/pragma.c)
+$(call cfile, $D/proto.c)
+$(call cfile, $D/replace.c)
+$(call cfile, $D/skip.c)
+$(call cfile, $D/stab.c)
+$(call cfile, $D/stack.c)
+$(call cfile, $D/struct.c)
+$(call cfile, $D/switch.c)
+$(call cfile, $D/tokenname.c)
+$(call cfile, $D/type.c)
+$(call cfile, $D/util.c)
+
+$(call llgen, $(OBJDIR)/$D, \
+	$(OBJDIR)/$D/tokenfile.g \
+	$D/program.g \
+	$D/declar.g \
+	$D/expression.g \
+	$D/statement.g \
+	$D/ival.g)
+
+$(eval CLEANABLES += $(OBJDIR)/$D/tokenfile.g)
+$(OBJDIR)/$D/tokenfile.g: $D/make.tokfile $D/tokenname.c
+	@echo TOKENFILE $$@
+	@mkdir -p $$(dir $$@)
+	$(hide) sh $D/make.tokfile < $D/tokenname.c > $$@
+
+$(call tabgen, $D/char.tab)
+
+$(eval $q: $(OBJDIR)/$D/parameters.h)
+
+$(eval CLEANABLES += $(OBJDIR)/$D/parameters.h)
+$(OBJDIR)/$D/parameters.h: $D/BigPars
+	@echo PARAMETERS $$@
+	@mkdir -p $$(dir $$@)
+	$(hide) echo '#ifndef PARAMETERS_H' > $$@
+	$(hide) echo '#define PARAMETERS_H' >> $$@
+	$(hide) grep -v '^!' < $D/BigPars >> $$@
+	$(hide) echo '#endif' >> $$@
+
+$(eval CLEANABLES += $(OBJDIR)/$D/symbol2str.c)
+$(OBJDIR)/$D/symbol2str.c: $D/make.tokcase $D/tokenname.c
+	@echo TOKCASE $$@
+	@mkdir -p $$(dir $$@)
+	$(hide) $D/make.tokcase < $D/tokenname.c > $$@
+$(call cfile, $(OBJDIR)/$D/symbol2str.c)
+
+$(call build-cemcom-ansi-next, \
+		$D/code.str \
+		$D/declar.str \
+		$D/def.str \
+		$D/expr.str \
+		$D/field.str \
+		$D/estack.str \
+		$D/util.str \
+		$D/proto.str \
+		$D/replace.str \
+		$D/idf.str \
+		$D/macro.str \
+		$D/stack.str \
+		$D/stmt.str \
+		$D/struct.str \
+		$D/switch.str \
+		$D/type.str \
+		$D/l_brace.str \
+		$D/l_state.str \
+		$D/l_outdef.str)
+
+$(eval $q: $(OBJDIR)/$D/Lpars.h)
+
+$(call file, $(LIBEM_MES))
+$(call file, $(LIBEMK))
+$(call file, $(LIBEM_DATA))
+$(call file, $(LIBINPUT))
+$(call file, $(LIBASSERT))
+$(call file, $(LIBALLOC))
+$(call file, $(LIBFLT_ARITH))
+$(call file, $(LIBPRINT))
+$(call file, $(LIBSYSTEM))
+$(call file, $(LIBSTRING))
+$(call cprogram, $(BINDIR)/cemcom.ansi)
+$(call installto, $(PLATDEP)/em_cemcom.ansi)
+$(eval CEMCOMANSI := $o)
+
+$(call reset)
+$(eval q := $D/cemcom.1)
+$(call installto, $(INSDIR)/share/man/man1/cemcom.6)
+endef
+
+$(eval $(build-cemcom-ansi-impl))

File lang/cem/cemcom.ansi/ch3.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	S E M A N T I C   A N A L Y S I S -- C H A P T E R  3.3		*/
 
-#include	"debug.h"
-#include	"lint.h"
-#include	"nobitfield.h"
-#include	"idf.h"
+#include	"parameters.h"
 #include	<flt_arith.h>
 #include	"arith.h"
+#include    "idf.h"
 #include	"proto.h"
 #include	"type.h"
 #include	"struct.h"

File lang/cem/cemcom.ansi/ch3bin.c

View file
  • Ignore whitespace
 /* $Id$ */
 /* SEMANTIC ANALYSIS (CHAPTER 3.3)  --  BINARY OPERATORS */
 
-#include	"botch_free.h"
-#include	"debug.h"
+#include	"parameters.h"
 #include	<alloc.h>
-#include	"lint.h"
-#include	"idf.h"
 #include	<flt_arith.h>
 #include	"arith.h"
 #include	"type.h"

File lang/cem/cemcom.ansi/ch3mon.c

View file
  • Ignore whitespace
 /* $Id$ */
 /* SEMANTIC ANALYSIS (CHAPTER 3.3) -- MONADIC OPERATORS */
 
-#include	"botch_free.h"
-#include	"debug.h"
+#include	"parameters.h"
 #include	<alloc.h>
-#include	"nobitfield.h"
 #include	"Lpars.h"
 #include	<flt_arith.h>
+#include    "idf.h"
 #include	"arith.h"
 #include	"type.h"
 #include	"label.h"
 #include	"expr.h"
-#include	"idf.h"
 #include	"def.h"
 #include	"sizes.h"
 

File lang/cem/cemcom.ansi/code.c

View file
  • Ignore whitespace
 
 #include	<stdlib.h>
 #include	<string.h>
-#include	"lint.h"
-#include	"debug.h"
-#include	"dbsymtab.h"
+#include	"parameters.h"
 #ifndef	LINT
 #include	<em.h>
 #else
 #include	"l_em.h"
 #include	"l_lint.h"
 #endif	/* LINT */
-#include	"botch_free.h"
 #include	<alloc.h>
-#include	"dataflow.h"
-#include	"use_tmp.h"
 #include	<flt_arith.h>
+#include    "idf.h"
 #include	"arith.h"
 #include	"type.h"
-#include	"idf.h"
 #include	"label.h"
 #include	"code.h"
 #include	"stmt.h"

File lang/cem/cemcom.ansi/conversion.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	C O N V E R S I O N - C O D E  G E N E R A T O R	*/
 
-#include	"lint.h"
+#include	"parameters.h"
 #ifndef	LINT
 
 #include	<em.h>

File lang/cem/cemcom.ansi/cstoper.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	C O N S T A N T   E X P R E S S I O N   H A N D L I N G		*/
 
-#include	"trgt_sizes.h"
-#include	"idf.h"
+#include    "parameters.h"
 #include	<flt_arith.h>
 #include	"arith.h"
 #include	"type.h"

File lang/cem/cemcom.ansi/dataflow.c

View file
  • Ignore whitespace
 	Use the compiler option --d.
 */
 
-#include	"dataflow.h"	/* UF */
+#include	"parameters.h"	/* UF */
 
 #ifdef	DATAFLOW
 char *CurrentFunction = 0;

File lang/cem/cemcom.ansi/declar.g

View file
  • Ignore whitespace
 /*	DECLARATION SYNTAX PARSER	*/
 
 {
-#include	"lint.h"
-#include	"dbsymtab.h"
+#include	"parameters.h"
 #include	<alloc.h>
-#include	"nobitfield.h"
-#include	"debug.h"
 #include	<flt_arith.h>
+#include    "idf.h"
 #include	"arith.h"
 #include	"LLlex.h"
 #include	"label.h"
 #include	"code.h"
-#include	"idf.h"
 #include	"type.h"
 #include	"proto.h"
 #include	"struct.h"

File lang/cem/cemcom.ansi/declarator.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	D E C L A R A T O R   M A N I P U L A T I O N		*/
 
-#include	"debug.h"
-#include	"botch_free.h"
+#include	"parameters.h"
 #include	<alloc.h>
 #include	<flt_arith.h>
 #include	"arith.h"
 #include	"Lpars.h"
 #include	"declar.h"
 #include	"def.h"
-#include	"idf.h"
 #include	"label.h"
 #include	"expr.h"
 #include	"sizes.h"

File lang/cem/cemcom.ansi/def.str

View file
  • Ignore whitespace
 /* $Id$ */
 /* IDENTIFIER DEFINITION DESCRIPTOR */
 
-#include	"lint.h"
+#include	"parameters.h"
 
 struct def	{		/* for ordinary tags */
 	struct def *next;

File lang/cem/cemcom.ansi/domacro.c

View file
  • Ignore whitespace
 /* $Id$ */
 /* PREPROCESSOR: CONTROLLINE INTERPRETER */
 
-#include	"debug.h"
+#include    <stdlib.h>
+#include	"parameters.h"
+#include    "idf.h"
 #include	"arith.h"
 #include	"LLlex.h"
 #include	"Lpars.h"
-#include	"idf.h"
 #include	"input.h"
-#include	"nopp.h"
-#include	"lint.h"
+#include    "replace.h"
 
 #ifndef NOPP
-#include	"ifdepth.h"
-#include	"botch_free.h"
-#include	"nparams.h"
-#include	"parbufsize.h"
-#include	"textsize.h"
-#include	"idfsize.h"	
 #include	"assert.h"
 #include	<alloc.h>
 #include	"class.h"
 #include	"macro.h"
-#include	"macbuf.h"
-#include	"replace.h"
-#include	"dbsymtab.h"
 #ifdef DBSYMTAB
 #include	<stb.h>
 #include	<em.h>

File lang/cem/cemcom.ansi/dumpidf.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	DUMP ROUTINES	*/
 
-#include	"debug.h"
 
 #ifdef	DEBUG
+#include	"parameters.h"
 #include	<alloc.h>
-#include	"nopp.h"
-#include	"nobitfield.h"
 #include	<flt_arith.h>
 #include	"arith.h"
 #include	"stack.h"
-#include	"idf.h"
 #include	"def.h"
 #include	"type.h"
 #include	"proto.h"

File lang/cem/cemcom.ansi/error.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	E R R O R   A N D  D I A G N O S T I C   R O U T I N E S	*/
 
-#include	"lint.h"
+#include	"parameters.h"
 #if __STDC__
 #include	<stdarg.h>
 #else
 #include	"l_em.h"
 #endif	/* LINT */
 
-#include	"debug.h"
-#include	"lint.h"
-#include	"nopp.h"
-#include	"errout.h"
-
 #include	"tokenname.h"
 #include	<flt_arith.h>
 #include	"arith.h"

File lang/cem/cemcom.ansi/eval.c

View file
  • Ignore whitespace
 /* $Id$ */
 /* EXPRESSION-CODE GENERATOR */
 
-#include	"lint.h"
+#include	"parameters.h"
 #ifndef	LINT
 
 #include	<em.h>
 #include	<em_reg.h>
 #include	<alloc.h>
-#include	"debug.h"
-#include	"nobitfield.h"
-#include	"dataflow.h"
 #include	<flt_arith.h>
+#include    "idf.h"
 #include	"arith.h"
 #include	"type.h"
-#include	"idf.h"
 #include	"label.h"
 #include	"code.h"
 #include	"assert.h"
 extern int	err_occurred; /* error.c */
 
 /*	EVAL() is the main expression-tree evaluator, which turns
-	any legal expression tree into EM code. Parameters:
+	any legal expression tree into EM code. parameters.h:
 
 	struct expr *expr
 		pointer to root of the expression tree to be evaluated

File lang/cem/cemcom.ansi/expr.c

View file
  • Ignore whitespace
 /* $Id$ */
 /* EXPRESSION TREE HANDLING */
 
-#include	"lint.h"
-#include	"debug.h"
+#include    <stdlib.h>
+#include	"parameters.h"
 #include	"assert.h"
-#include	"botch_free.h"
 #include	<alloc.h>
-#include	"idf.h"
 #include	<flt_arith.h>
+#include    "idf.h"
 #include	"arith.h"
 #include	"def.h"
 #include	"type.h"
 #include	"declar.h"
 #include	"sizes.h"
 #include	"level.h"
-#include	"use_tmp.h"
 
 extern char *symbol2str();
 extern char options[];

File lang/cem/cemcom.ansi/expression.g

View file
  • Ignore whitespace
 
 {
 #include	<alloc.h>
-#include	"lint.h"
-#include	"debug.h"
+#include	"parameters.h"
 #include	<flt_arith.h>
 #include	"arith.h"
 #include	"LLlex.h"
 #include	"type.h"
-#include	"idf.h"
 #include	"label.h"
 #include	"expr.h"
 #include	"code.h"

File lang/cem/cemcom.ansi/field.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	BITFIELD EXPRESSION EVALUATOR	*/
 
-#include	"lint.h"
+#include	"parameters.h"
 #ifndef	LINT
 
-#include	"nobitfield.h"
 
 #ifndef NOBITFIELD
 #include	<em.h>
 #include	<em_reg.h>
-#include	"debug.h"
 #include	<flt_arith.h>
 #include	"arith.h"
 #include	"type.h"
-#include	"idf.h"
 #include	"label.h"
 #include	"code.h"
 #include	"assert.h"

File lang/cem/cemcom.ansi/fltcstoper.c

View file
  • Ignore whitespace
 /*	C O N S T A N T   E X P R E S S I O N   H A N D L I N G		*/
 /*	  F O R   F L O A T I N G   P O I N T   N U M B E R S		*/
 
-#include	"debug.h"
+#include	"parameters.h"
 #include	"assert.h"
 #include	<alloc.h>
-#include	"trgt_sizes.h"
-#include	"idf.h"
 #include	<flt_arith.h>
 #include	"arith.h"
 #include	"type.h"

File lang/cem/cemcom.ansi/idf.c

View file
  • Ignore whitespace
 
 #include	<stdlib.h>
 #include	<string.h>
-#include	"lint.h"
+#include	"parameters.h"
 #include	<em_reg.h>
-#include	"debug.h"
-#include	"idfsize.h"
-#include	"botch_free.h"
-#include	"nopp.h"
-#include	"nparams.h"
 #include	<alloc.h>
+#include    "idf.h"
 #include	"arith.h"
 #include	"align.h"
 #include	"LLlex.h"
 #include	"level.h"
 #include	"stack.h"
-#include	"idf.h"
 #include	"label.h"
 #include	"def.h"
 #include	"type.h"

File lang/cem/cemcom.ansi/idf.str

View file
  • Ignore whitespace
 /* $Id$ */
 /* IDENTIFIER DESCRIPTOR */
 
-#include	"nopp.h"
+#include	"parameters.h"
 
 struct id_u {
 #ifndef NOPP

File lang/cem/cemcom.ansi/init.c

View file
  • Ignore whitespace
 
 #include	<stdlib.h>
 #include	<string.h>
-#include	"nopp.h"
+#include	"parameters.h"
 
 #ifndef NOPP
 #include	<system.h>
 #include	<alloc.h>
 #include	<time.h>
+#include    "idf.h"
 #include	"class.h"
 #include	"macro.h"
-#include	"idf.h"
 
 extern char *sprint();
 

File lang/cem/cemcom.ansi/input.c

View file
  • Ignore whitespace
  */
 /* $Id$ */
 
+#include "parameters.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include "inputtype.h"
 #include "file_info.h"
 #include "input.h"
 
 #define INP_TYPE	struct file_info
 #define INP_VAR		finfo
 struct file_info	finfo;
-#include "nopp.h"
 #include <inp_pkg.body>
 #include <alloc.h>
 
-#include        "dbsymtab.h"
-#include	"lint.h"
 #ifndef NOPP
 #ifdef DBSYMTAB
 #include <stb.h>

File lang/cem/cemcom.ansi/ival.g

View file
  • Ignore whitespace
 /* CODE FOR THE INITIALISATION OF GLOBAL VARIABLES */
 
 {
-#include	"lint.h"
+#include    <stdlib.h>
+#include	"parameters.h"
 #ifndef	LINT
 #include	<em.h>
 #else
 #include	"l_em.h"
 #include	"l_lint.h"
 #endif	/* LINT */
-#include	"debug.h"
 #include	<alloc.h>
 #include	<assert.h>
-#include	"nobitfield.h"
 #include	<flt_arith.h>
+#include    "idf.h"
 #include	"arith.h"
 #include	"label.h"
 #include	"expr.h"
 #include	"Lpars.h"
 #include	"sizes.h"
 #include	"align.h"
-#include	"idf.h"
 #include	"level.h"
 #include	"def.h"
 #include	"LLlex.h"
 #include	"estack.h"
+#include    "stack.h"
 
 #define con_nullbyte()	C_con_ucon("0", (arith)1)
 #define aggregate_type(tp) ((tp)->tp_fund == ARRAY || (tp)->tp_fund == STRUCT)

File lang/cem/cemcom.ansi/l_comment.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	Lint-specific comment handling	*/
 
+#include	"parameters.h"
 #include	<ctype.h>
 
-#include	"lint.h"
-
 #ifdef	LINT
 
 #include	<alloc.h>

File lang/cem/cemcom.ansi/l_ev_ord.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	Lint evaluation order checking	*/
 
-#include	"lint.h"
+#include	"parameters.h"
 
 #ifdef	LINT
 
 #include	"arith.h"	/* definition arith */
 #include	"label.h"	/* definition label */
 #include	"expr.h"
-#include	"idf.h"
 #include	"def.h"
 #include	"code.h"	/* RVAL etc */
 #include	"LLlex.h"

File lang/cem/cemcom.ansi/l_lint.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	Lint main routines	*/
 
-#include	"lint.h"
+#include	"parameters.h"
 
 #ifdef	LINT
 
 #include	<alloc.h>	/* for st_free */
-#include	"debug.h"
 #include	"interface.h"
 #include	"assert.h"
 #ifdef ANSI
 #include	"arith.h"	/* definition arith */
 #include	"label.h"	/* definition label */
 #include	"expr.h"
-#include	"idf.h"
 #include	"def.h"
 #include	"code.h"	/* RVAL etc */
 #include	"LLlex.h"

File lang/cem/cemcom.ansi/l_misc.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	Lint miscellaneous routines	*/
 
-#include	"lint.h"
+#include	"parameters.h"
 
 #ifdef	LINT
 
 #include	"arith.h"	/* definition arith */
 #include	"label.h"	/* definition label */
 #include	"expr.h"
-#include	"idf.h"
 #include	"def.h"
 #include	"code.h"	/* RVAL etc */
 #include	"LLlex.h"

File lang/cem/cemcom.ansi/l_outdef.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	Lint outdef construction	*/
 
-#include	"lint.h"
+#include	"parameters.h"
 
 #ifdef	LINT
 
 #include	"def.h"
 #include	"struct.h"
 #include	"field.h"
-#include	"idf.h"
 #include	"level.h"
 #include	"label.h"
 #include	"code.h"

File lang/cem/cemcom.ansi/l_states.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	Lint status checking	*/
 
-#include	"lint.h"
+#include	"parameters.h"
 
 #ifdef	LINT
 
 #include	<alloc.h>	/* for st_free */
 #include	"interface.h"
 #include	"assert.h"
-#include	"debug.h"
 #ifdef ANSI
 #include	<flt_arith.h>
 #endif /* ANSI */
 #include	"arith.h"
 #include	"label.h"
 #include	"expr.h"
-#include	"idf.h"
 #include	"def.h"
 #include	"code.h"	/* RVAL etc */
 #include	"LLlex.h"

File lang/cem/cemcom.ansi/label.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*		L A B E L   H A N D L I N G		*/
 
+#include    "parameters.h"
+#include    "idf.h"
 #include	"Lpars.h"
 #include	"level.h"
-#include	"idf.h"
 #include	"label.h"
 #include	"arith.h"
 #include	"def.h"

File lang/cem/cemcom.ansi/macro.str

View file
  • Ignore whitespace
 /* $Id$ */
 /* PREPROCESSOR: DEFINITION OF MACRO DESCRIPTOR */
 
-#include	"nopp.h"
+#include	"parameters.h"
 
 #ifndef NOPP
 /*	The flags of the mc_flag field of the macro structure. Note that

File lang/cem/cemcom.ansi/main.c

View file
  • Ignore whitespace
 /* $Id$ */
 /* MAIN PROGRAM */
 
-#include	"lint.h"
+#include	"parameters.h"
 #include	<system.h>
-#include	"debug.h"
-#include	"nopp.h"
-#include	"trgt_sizes.h"
-#include	"use_tmp.h"
-#include	"inputtype.h"
+#include    "idf.h"
 #include	"input.h"
 #include	"level.h"
-#include	"idf.h"
 #include	"arith.h"
 #include	"type.h"
 #include	"proto.h"
 #include	"LLlex.h"
 #include	<alloc.h>
 #include	"specials.h"
-#include	"nocross.h"
 #include	"sizes.h"
 #include	"align.h"
 #include	"macro.h"

File lang/cem/cemcom.ansi/make.next

View file
  • Ignore whitespace
 #!/bin/sh
 
-echo '#include "debug.h"'
+echo '#include "parameters.h"'
 sed -n '
 s:^.*ALLOCDEF.*"\(.*\)".*$:struct \1 *h_\1 = 0;\
 #ifdef DEBUG\

File lang/cem/cemcom.ansi/options.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	U S E R   O P T I O N - H A N D L I N G		*/
 
+#include	"parameters.h"
 #include	<stdlib.h>
 #include	<string.h>
-#include	"lint.h"
-#include	"botch_free.h"
 #include	<alloc.h>
-#include	"nopp.h"
-#include	"idfsize.h"
-#include	"nobitfield.h"
 #include	"class.h"
 #include	"macro.h"
-#include	"idf.h"
 #include	"arith.h"
 #include	"sizes.h"
 #include	"align.h"
-#include	"use_tmp.h"
-#include	"dataflow.h"
-#include	"dbsymtab.h"
 
 #ifndef NOPP
 extern char **inctable;

File lang/cem/cemcom.ansi/pragma.c

View file
  • Ignore whitespace
 /* $Id$ */
 /* PREPROCESSOR: PRAGMA INTERPRETER */
 
-#include	"debug.h"
-#include	"idf.h"
+#include	"parameters.h"
 
 #define P_UNKNOWN	0
 #define NR_PRAGMAS	0

File lang/cem/cemcom.ansi/program.g

View file
  • Ignore whitespace
 %start		If_expr, control_if_expression;
 
 {
-#include	"lint.h"
-#include	"nopp.h"
-#include	"debug.h"
+#include	"parameters.h"
 #include	<flt_arith.h>
 #include	"arith.h"
 #include	"LLlex.h"
-#include	"idf.h"
 #include	"label.h"
 #include	"type.h"
 #include	"declar.h"
 #include	"code.h"
 #include	"expr.h"
 #include	"def.h"
+#include    "stack.h"
 #ifdef	LINT
 #include	"l_lint.h"
 #endif	/* LINT */

File lang/cem/cemcom.ansi/proto.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*  P R O T O T Y P E   F I D D L I N G  */
 
-#include	"lint.h"
-#include	"debug.h"
-#include	"idfsize.h"
-#include	"nparams.h"
-#include	"botch_free.h"
+#include	"parameters.h"
 #include	<alloc.h>
+#include    "idf.h"
 #include	"Lpars.h"
 #include	"level.h"
 #include	<flt_arith.h>
 #include	"arith.h"
 #include	"align.h"
 #include	"stack.h"
-#include	"idf.h"
 #include	"def.h"
 #include	"type.h"
 #include	"struct.h"

File lang/cem/cemcom.ansi/replace.c

View file
  • Ignore whitespace
 
 #include	<stdlib.h>
 #include	<string.h>
-#include	"nopp.h"
+#include	"parameters.h"
 
 #ifndef NOPP
 
-#include	"debug.h"
-#include	"pathlength.h"
-#include	"strsize.h"
-#include	"nparams.h"
-#include	"idfsize.h"
-#include	"numsize.h"
 #include	<alloc.h>
-#include	"idf.h"
+#include    "idf.h"
 #include	"input.h"
 #include	"macro.h"
 #include	"arith.h"
 #include	"LLlex.h"
 #include	"class.h"
 #include	"assert.h"
-#include	"static.h"
-#include	"macbuf.h"
 #include	"replace.h"
 
 extern struct idf *GetIdentifier();

File lang/cem/cemcom.ansi/sizes.h

View file
  • Ignore whitespace
 /* $Id$ */
 /* VARIOUS TARGET MACHINE SIZE DESCRIPTORS */
 
-#include "nocross.h"
-#include "trgt_sizes.h"
+#include "parameters.h"
 
 #ifndef NOCROSS
 extern arith

File lang/cem/cemcom.ansi/skip.c

View file
  • Ignore whitespace
 /* $Id$ */
 /* PREPROCESSOR: INPUT SKIP FUNCTIONS */
 
-#include	"nopp.h"
+#include	"parameters.h"
 #include	"arith.h"
 #include	"LLlex.h"
 #include	"class.h"

File lang/cem/cemcom.ansi/stab.c

View file
  • Ignore whitespace
 
 /* $Id$ */
 
-#include	"dbsymtab.h"
+#include	"parameters.h"
 
 #ifdef	DBSYMTAB
 
 #include	<flt_arith.h>
 #include	<stb.h>
 
+#include    "idf.h"
 #include	"LLlex.h"
 #include	"stack.h"
 #include	"def.h"
 #include	"type.h"
 #include	"struct.h"
 #include	"field.h"
-#include	"idf.h"
 #include	"Lpars.h"
 #include	"level.h"
 

File lang/cem/cemcom.ansi/stack.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	S T A C K / U N S T A C K  R O U T I N E S	*/
 
-#include	"lint.h"
+#include	"parameters.h"
 #include	<system.h>
 #ifndef	LINT
 #include	<em.h>
 #else
 #include	"l_em.h"
 #endif	/* LINT */
-#include	"debug.h"
-#include	"botch_free.h"
 #include	<alloc.h>
+#include    "idf.h"
 #include	"Lpars.h"
 #include	"arith.h"
 #include	"stack.h"
 #include	"type.h"
-#include	"idf.h"
 #include	"def.h"
 #include	"struct.h"
 #include	"level.h"

File lang/cem/cemcom.ansi/statement.g

View file
  • Ignore whitespace
 /*	STATEMENT SYNTAX PARSER	*/
 
 {
-#include	"lint.h"
+#include	"parameters.h"
 #ifndef	LINT
 #include	<em.h>
 #else
 #include	"l_lint.h"
 #endif	/* LINT */
 
-#include	"debug.h"
-#include	"botch_free.h"
-#include	"dbsymtab.h"
-
 #include	<flt_arith.h>
+#include    "idf.h"
 #include	"arith.h"
 #include	"LLlex.h"
 #include	"type.h"
-#include	"idf.h"
 #include	"label.h"
 #include	"expr.h"
 #include	"code.h"

File lang/cem/cemcom.ansi/struct.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	ADMINISTRATION OF STRUCT AND UNION DECLARATIONS	*/
 
-#include	"nobitfield.h"
-#include	"debug.h"
-#include	"botch_free.h"
+#include	"parameters.h"
 #include	<alloc.h>
+#include    "idf.h"
 #include	"arith.h"
 #include	"stack.h"
-#include	"idf.h"
 #include	"def.h"
 #include	"type.h"
 #include	"proto.h"

File lang/cem/cemcom.ansi/switch.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	S W I T C H - S T A T E M E N T  A D M I N I S T R A T I O N	*/
 
-#include	"lint.h"
+#include	"parameters.h"
 #ifndef	LINT
 #include	<em.h>
 #else
 #include	"l_em.h"
 #endif	/* LINT */
-#include	"debug.h"
-#include	"botch_free.h"
 #include	<alloc.h>
-#include	"density.h"
 #include	"Lpars.h"
-#include	"idf.h"
 #include	"label.h"
 #include	<flt_arith.h>
 #include	"arith.h"

File lang/cem/cemcom.ansi/tokenname.c

View file
  • Ignore whitespace
 /* $Id$ */
 /* TOKEN NAME DEFINITIONS */
 
-#include	"idf.h"
+#include	"parameters.h"
+#include    "idf.h"
 #include	"arith.h"
 #include	"LLlex.h"
 #include	"tokenname.h"

File lang/cem/cemcom.ansi/type.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*	T Y P E   D E F I N I T I O N   M E C H A N I S M	 */
 
-#include	"nobitfield.h"
-#include	"debug.h"
-#include	"botch_free.h"
+#include	"parameters.h"
 #include	<alloc.h>
+#include    "idf.h"
 #include	"Lpars.h"
 #include	"arith.h"
 #include	"type.h"
-#include	"idf.h"
 #include	"def.h"
 #include	"proto.h"
 #include	"sizes.h"

File lang/cem/cemcom.ansi/type.str

View file
  • Ignore whitespace
 /* $Id$ */
 /* TYPE DESCRIPTOR */
 
-#include	"nobitfield.h"
-#include	"dbsymtab.h"
+#include	"parameters.h"
 
 struct type	{
 	struct type *next;	/* used for ARRAY and for qualifiers */

File lang/cem/cemcom.ansi/util.c

View file
  • Ignore whitespace
 	allowing re-use.
 */
 
-#include	"lint.h"
+#include	"parameters.h"
 #ifndef	LINT
 #include	<em.h>
 #else
 #include	<alloc.h>
 #include	<em_mes.h>
 
-#include	"debug.h"
 #include	"util.h"
-#include	"use_tmp.h"
-#include	"regcount.h"
 #include	"sizes.h"
 #include	"align.h"
 #include	"stack.h"

File lang/cem/cemcom/eval.c

View file
  • Ignore whitespace
 #define LocalPtrVar()	NewLocal(pointer_size, pointer_align, reg_pointer, REGISTER)
 
 /*	EVAL() is the main expression-tree evaluator, which turns
-	any legal expression tree into EM code. Parameters:
+	any legal expression tree into EM code. parameters.h:
 
 	struct expr *expr
 		pointer to root of the expression tree to be evaluated

File lang/cem/cemcom/replace.c

View file
  • Ignore whitespace
 				return 0;
 		}
 		if (++mac->mc_count > 100) {
-			/* 100 must be some number in Parameters */
+			/* 100 must be some number in parameters.h */
 			lexwarning("macro %s is assumed recursive",
 				    idef->id_text);
 			return 0;

File lang/cem/cpp.ansi/LLlex.c

View file
  • Ignore whitespace
 /* $Id$ */
 /*		    L E X I C A L   A N A L Y Z E R			*/
 
-#include	"idfsize.h"
-#include	"numsize.h"
-#include	"strsize.h"
+#include	"parameters.h"
 
 #include	<alloc.h>
 #include	"input.h"

File lang/cem/cpp.ansi/Parameters

  • Ignore whitespace
-!File: pathlength.h
-#define PATHLENGTH	1024	/* max. length of path to file		*/
-
-
-!File: errout.h
-#define	ERROUT		STDERR	/* file pointer for writing messages	*/
-#define	MAXERR_LINE	5	/* maximum number of error messages given
-					on the same input line.		*/
-
-
-!File: idfsize.h
-#define	IDFSIZE	64	/* maximum significant length of an identifier	*/
-
-
-!File: numsize.h
-#define	NUMSIZE	256	/* maximum length of a numeric constant		*/
-
-
-!File: nparams.h
-#define	NPARAMS 32	/* maximum number of parameters of macros	*/
-#define	STDC_NPARAMS 31	/* ANSI limit on number of parameters		*/
-
-
-!File: ifdepth.h
-#define	IFDEPTH	256	/* maximum number of nested if-constructions	*/
-
-
-!File: macbuf.h
-#define	LAPBUF	128	/* initial size of macro replacement buffer	*/
-#define	ARGBUF	128	/* initial size of macro parameter buffer(s)	*/
-
-
-!File: strsize.h
-#define ISTRSIZE	16	/* minimum number of bytes allocated for
-					storing a string		*/
-
-
-!File: botch_free.h
-/*#define BOTCH_FREE	1	/* botch freed memory, as a check	*/
-
-
-!File: debug.h
-/*#define DEBUG		1	/* perform various self-tests		*/
-#define NDEBUG		1	/* disable assertions			*/
-
-
-!File: parbufsize.h
-#define PARBUFSIZE	1024
-
-
-!File: textsize.h
-#define ITEXTSIZE	16	/* 1st piece of memory for repl. text	*/
-
-
-!File: inputtype.h
-/*#define INP_READ_IN_ONE	1	/* read input file in one.  */
-				/* If defined, we cannot read from a pipe */
-
-
-!File: obufsize.h
-#define OBUFSIZE	8192	/* output buffer size */
-
-
-!File: dobits.h
-#define DOBITS		1	/* use trick to reduce symboltable accesses */
-
-
-!File: ln_prefix.h
-#define LINE_PREFIX	"#"	/* prefix for generated line directives,
-				   eith