From 07f5d3cce42f3a9539b113ef3af7f13971841dae Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 10 Mar 1987 17:51:10 +0000 Subject: [PATCH] Fixed a bug with line-directives, added copyright notice --- lang/cem/cemcom/LLlex.c | 15 ++++++++++++-- lang/cem/cemcom/LLlex.h | 5 +++++ lang/cem/cemcom/LLmessage.c | 4 ++++ lang/cem/cemcom/Version.c | 5 +++++ lang/cem/cemcom/align.h | 4 ++++ lang/cem/cemcom/arith.c | 4 ++++ lang/cem/cemcom/arith.h | 4 ++++ lang/cem/cemcom/asm.c | 4 ++++ lang/cem/cemcom/assert.h | 4 ++++ lang/cem/cemcom/atw.h | 4 ++++ lang/cem/cemcom/blocks.c | 4 ++++ lang/cem/cemcom/cem.c | 4 ++++ lang/cem/cemcom/ch7.c | 4 ++++ lang/cem/cemcom/ch7bin.c | 4 ++++ lang/cem/cemcom/ch7mon.c | 4 ++++ lang/cem/cemcom/class.h | 4 ++++ lang/cem/cemcom/code.c | 4 ++++ lang/cem/cemcom/conversion.c | 4 ++++ lang/cem/cemcom/cstoper.c | 4 ++++ lang/cem/cemcom/dataflow.c | 4 ++++ lang/cem/cemcom/declar.g | 4 ++++ lang/cem/cemcom/declarator.c | 4 ++++ lang/cem/cemcom/decspecs.c | 4 ++++ lang/cem/cemcom/domacro.c | 38 +++++++++++++++++------------------- lang/cem/cemcom/dumpidf.c | 4 ++++ lang/cem/cemcom/error.c | 4 ++++ lang/cem/cemcom/eval.c | 4 ++++ lang/cem/cemcom/expr.c | 4 ++++ lang/cem/cemcom/expression.g | 4 ++++ lang/cem/cemcom/faulty.h | 4 ++++ lang/cem/cemcom/field.c | 4 ++++ lang/cem/cemcom/file_info.h | 4 ++++ lang/cem/cemcom/idf.c | 4 ++++ lang/cem/cemcom/init.c | 4 ++++ lang/cem/cemcom/input.c | 4 ++++ lang/cem/cemcom/input.h | 4 ++++ lang/cem/cemcom/interface.h | 5 +++++ lang/cem/cemcom/ival.c | 4 ++++ lang/cem/cemcom/label.c | 4 ++++ lang/cem/cemcom/label.h | 4 ++++ lang/cem/cemcom/level.h | 4 ++++ lang/cem/cemcom/main.c | 5 +++++ lang/cem/cemcom/mcomm.c | 5 +++++ lang/cem/cemcom/mes.h | 4 ++++ lang/cem/cemcom/options.c | 4 ++++ lang/cem/cemcom/program.g | 4 ++++ lang/cem/cemcom/replace.c | 4 ++++ lang/cem/cemcom/scan.c | 4 ++++ lang/cem/cemcom/sizes.h | 4 ++++ lang/cem/cemcom/skip.c | 4 ++++ lang/cem/cemcom/specials.h | 4 ++++ lang/cem/cemcom/stack.c | 4 ++++ lang/cem/cemcom/statement.g | 4 ++++ lang/cem/cemcom/stb.c | 4 ++++ lang/cem/cemcom/struct.c | 4 ++++ lang/cem/cemcom/switch.c | 4 ++++ lang/cem/cemcom/tab.c | 4 ++++ lang/cem/cemcom/tokenname.c | 4 ++++ lang/cem/cemcom/tokenname.h | 4 ++++ lang/cem/cemcom/type.c | 6 +++++- 60 files changed, 269 insertions(+), 23 deletions(-) diff --git a/lang/cem/cemcom/LLlex.c b/lang/cem/cemcom/LLlex.c index 08032df1d..86e7e5823 100644 --- a/lang/cem/cemcom/LLlex.c +++ b/lang/cem/cemcom/LLlex.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* L E X I C A L A N A L Y Z E R */ @@ -29,6 +33,7 @@ int AccDefined = 0; /* accept "defined(...)" */ int UnknownIdIsZero = 0; /* interpret unknown id as integer 0 */ int SkipEscNewline = 0; /* how to interpret backslash-newline */ int Unstacked = 0; /* an unstack is done */ +int File_Inserted = 0; /* a file has just been inserted */ #define MAX_LL_DEPTH 2 @@ -100,7 +105,10 @@ GetToken(ptok) char buf[(IDFSIZE > NUMSIZE ? IDFSIZE : NUMSIZE) + 1]; register int ch, nch; - if (! LineNumber) goto firstline; + if (File_Inserted) { + File_Inserted = 0; + goto firstline; + } again: /* rescan the input after an error or replacement */ #ifndef NOPP if (Unstacked) EnableMacros(); @@ -120,7 +128,10 @@ firstline: return ptok->tk_symb = EOI; while (LoadChar(ch), ch == '#') { /* a control line follows */ domacro(); - if (!LineNumber) goto firstline; + if (File_Inserted) { + File_Inserted = 0; + goto firstline; + } } /* We have to loop here, because in `domacro' the nl, vt or ff is read. The diff --git a/lang/cem/cemcom/LLlex.h b/lang/cem/cemcom/LLlex.h index c01aaf46d..c4e085ead 100644 --- a/lang/cem/cemcom/LLlex.h +++ b/lang/cem/cemcom/LLlex.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* D E F I N I T I O N S F O R T H E L E X I C A L A N A L Y Z E R */ @@ -52,6 +56,7 @@ extern int AccDefined; /* "LLlex.c" */ extern int UnknownIdIsZero; /* "LLlex.c" */ extern int SkipEscNewline; /* "LLlex.c" */ extern int Unstacked; /* "LLlex.c" */ +extern int File_Inserted; /* "LLlex.c" */ extern int NoUnstack; /* buffer.c */ diff --git a/lang/cem/cemcom/LLmessage.c b/lang/cem/cemcom/LLmessage.c index cefa9d56f..23005c910 100644 --- a/lang/cem/cemcom/LLmessage.c +++ b/lang/cem/cemcom/LLmessage.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* PARSER ERROR ADMINISTRATION */ diff --git a/lang/cem/cemcom/Version.c b/lang/cem/cemcom/Version.c index 45b43e4c4..da755b0d9 100644 --- a/lang/cem/cemcom/Version.c +++ b/lang/cem/cemcom/Version.c @@ -1 +1,6 @@ +/* $Header$ */ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ static char Version[] = "ACK CEM compiler Version 3.1"; diff --git a/lang/cem/cemcom/align.h b/lang/cem/cemcom/align.h index a49ad946f..77c189985 100644 --- a/lang/cem/cemcom/align.h +++ b/lang/cem/cemcom/align.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* A L I G N M E N T D E F I N I T I O N S */ diff --git a/lang/cem/cemcom/arith.c b/lang/cem/cemcom/arith.c index a7304e383..b3bf9761f 100644 --- a/lang/cem/cemcom/arith.c +++ b/lang/cem/cemcom/arith.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* A R I T H M E T I C C O N V E R S I O N S */ diff --git a/lang/cem/cemcom/arith.h b/lang/cem/cemcom/arith.h index 2e94f70b3..483da5b98 100644 --- a/lang/cem/cemcom/arith.h +++ b/lang/cem/cemcom/arith.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* COMPILER ARITHMETIC */ diff --git a/lang/cem/cemcom/asm.c b/lang/cem/cemcom/asm.c index 8f872f869..4900ea909 100644 --- a/lang/cem/cemcom/asm.c +++ b/lang/cem/cemcom/asm.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* A S M */ diff --git a/lang/cem/cemcom/assert.h b/lang/cem/cemcom/assert.h index 6afd202f3..1161523aa 100644 --- a/lang/cem/cemcom/assert.h +++ b/lang/cem/cemcom/assert.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* A S S E R T I O N M A C R O D E F I N I T I O N */ diff --git a/lang/cem/cemcom/atw.h b/lang/cem/cemcom/atw.h index 6dc02ee5a..1ebb24236 100644 --- a/lang/cem/cemcom/atw.h +++ b/lang/cem/cemcom/atw.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* Align To Word boundary Definition */ diff --git a/lang/cem/cemcom/blocks.c b/lang/cem/cemcom/blocks.c index 1d769939e..531b59715 100644 --- a/lang/cem/cemcom/blocks.c +++ b/lang/cem/cemcom/blocks.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* B L O C K S T O R I N G A N D L O A D I N G */ diff --git a/lang/cem/cemcom/cem.c b/lang/cem/cemcom/cem.c index 172c52e69..220953018 100644 --- a/lang/cem/cemcom/cem.c +++ b/lang/cem/cemcom/cem.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* Driver for the CEMCOM compiler: works like /bin/cc and accepts diff --git a/lang/cem/cemcom/ch7.c b/lang/cem/cemcom/ch7.c index d88852b2c..7d95b3452 100644 --- a/lang/cem/cemcom/ch7.c +++ b/lang/cem/cemcom/ch7.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* S E M A N T I C A N A L Y S I S -- C H A P T E R 7 RM */ diff --git a/lang/cem/cemcom/ch7bin.c b/lang/cem/cemcom/ch7bin.c index aaddacc65..f65f910bf 100644 --- a/lang/cem/cemcom/ch7bin.c +++ b/lang/cem/cemcom/ch7bin.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* SEMANTIC ANALYSIS (CHAPTER 7RM) -- BINARY OPERATORS */ diff --git a/lang/cem/cemcom/ch7mon.c b/lang/cem/cemcom/ch7mon.c index 1bc3090fd..8ca6fcb0e 100644 --- a/lang/cem/cemcom/ch7mon.c +++ b/lang/cem/cemcom/ch7mon.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* SEMANTIC ANALYSIS (CHAPTER 7RM) -- MONADIC OPERATORS */ diff --git a/lang/cem/cemcom/class.h b/lang/cem/cemcom/class.h index faaff2346..56ba25de8 100644 --- a/lang/cem/cemcom/class.h +++ b/lang/cem/cemcom/class.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* U S E O F C H A R A C T E R C L A S S E S */ diff --git a/lang/cem/cemcom/code.c b/lang/cem/cemcom/code.c index dc5dc0eaa..85591a780 100644 --- a/lang/cem/cemcom/code.c +++ b/lang/cem/cemcom/code.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* C O D E - G E N E R A T I N G R O U T I N E S */ diff --git a/lang/cem/cemcom/conversion.c b/lang/cem/cemcom/conversion.c index decd7ab6d..d0c7a912a 100644 --- a/lang/cem/cemcom/conversion.c +++ b/lang/cem/cemcom/conversion.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* C O N V E R S I O N - C O D E G E N E R A T O R */ diff --git a/lang/cem/cemcom/cstoper.c b/lang/cem/cemcom/cstoper.c index dabd2d91b..b33863b1b 100644 --- a/lang/cem/cemcom/cstoper.c +++ b/lang/cem/cemcom/cstoper.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* 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 */ diff --git a/lang/cem/cemcom/dataflow.c b/lang/cem/cemcom/dataflow.c index 92fe14243..0056121de 100644 --- a/lang/cem/cemcom/dataflow.c +++ b/lang/cem/cemcom/dataflow.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* DATAFLOW ANALYSIS ON C PROGRAMS */ diff --git a/lang/cem/cemcom/declar.g b/lang/cem/cemcom/declar.g index a2524cc8f..f5db91b51 100644 --- a/lang/cem/cemcom/declar.g +++ b/lang/cem/cemcom/declar.g @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* DECLARATION SYNTAX PARSER */ diff --git a/lang/cem/cemcom/declarator.c b/lang/cem/cemcom/declarator.c index 934f1b3f3..2ee03aa3a 100644 --- a/lang/cem/cemcom/declarator.c +++ b/lang/cem/cemcom/declarator.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* D E C L A R A T O R M A N I P U L A T I O N */ diff --git a/lang/cem/cemcom/decspecs.c b/lang/cem/cemcom/decspecs.c index 235fb1ae5..d7651e048 100644 --- a/lang/cem/cemcom/decspecs.c +++ b/lang/cem/cemcom/decspecs.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* D E C L A R A T I O N S P E C I F I E R C H E C K I N G */ diff --git a/lang/cem/cemcom/domacro.c b/lang/cem/cemcom/domacro.c index abf248193..208e5b49d 100644 --- a/lang/cem/cemcom/domacro.c +++ b/lang/cem/cemcom/domacro.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* PREPROCESSOR: CONTROLLINE INTERPRETER */ @@ -243,6 +247,7 @@ do_include() } else { WorkingDir = getwdir(result); + File_Inserted = 1; FileName = result; LineNumber = 0; } @@ -387,18 +392,6 @@ do_undef() SkipRestOfLine(); } -PRIVATE -do_line(l) - unsigned int l; -{ - struct token tk; - - LineNumber = l - 1; /* the number of the next input line */ - if (GetToken(&tk) == STRING) /* is there a filespecifier? */ - FileName = tk.tk_bts; - SkipRestOfLine(); -} - PRIVATE int getparams(buf, parbuf) char *buf[]; @@ -663,14 +656,7 @@ domacro() SkipRestOfLine(); return; } - LineNumber = tk.tk_ival - 1; /* number of the next line */ - if ((tok = GetToken(&tk)) == STRING) - FileName = tk.tk_bts; - else - if (tok != EOI) { - error("illegal # line"); - SkipRestOfLine(); - } + do_line(tk.tk_ival); EoiForNewline = 0; SkipEscNewline = 0; } @@ -685,3 +671,15 @@ SkipRestOfLine() PushBack(); skipline(); } + +PRIVATE +do_line(l) + unsigned int l; +{ + struct token tk; + + LineNumber = l - 1; /* the number of the next input line */ + if (GetToken(&tk) == STRING) /* is there a filespecifier? */ + FileName = tk.tk_bts; + SkipRestOfLine(); +} diff --git a/lang/cem/cemcom/dumpidf.c b/lang/cem/cemcom/dumpidf.c index 4e5e41e9a..ad99909cc 100644 --- a/lang/cem/cemcom/dumpidf.c +++ b/lang/cem/cemcom/dumpidf.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* DUMP ROUTINES */ diff --git a/lang/cem/cemcom/error.c b/lang/cem/cemcom/error.c index 6ada030ec..94227a71e 100644 --- a/lang/cem/cemcom/error.c +++ b/lang/cem/cemcom/error.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* 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 */ diff --git a/lang/cem/cemcom/eval.c b/lang/cem/cemcom/eval.c index 32b3f5b01..cd8668ef4 100644 --- a/lang/cem/cemcom/eval.c +++ b/lang/cem/cemcom/eval.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* EXPRESSION-CODE GENERATOR */ diff --git a/lang/cem/cemcom/expr.c b/lang/cem/cemcom/expr.c index 2991feadc..b746f9423 100644 --- a/lang/cem/cemcom/expr.c +++ b/lang/cem/cemcom/expr.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* EXPRESSION TREE HANDLING */ diff --git a/lang/cem/cemcom/expression.g b/lang/cem/cemcom/expression.g index 2536b152f..55a0976f9 100644 --- a/lang/cem/cemcom/expression.g +++ b/lang/cem/cemcom/expression.g @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* EXPRESSION SYNTAX PARSER */ diff --git a/lang/cem/cemcom/faulty.h b/lang/cem/cemcom/faulty.h index 8b1a754a0..9b3b13d75 100644 --- a/lang/cem/cemcom/faulty.h +++ b/lang/cem/cemcom/faulty.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* FAULTY DEFINITIONS */ diff --git a/lang/cem/cemcom/field.c b/lang/cem/cemcom/field.c index 0a34db008..021196d20 100644 --- a/lang/cem/cemcom/field.c +++ b/lang/cem/cemcom/field.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* BITFIELD EXPRESSION EVALUATOR */ diff --git a/lang/cem/cemcom/file_info.h b/lang/cem/cemcom/file_info.h index 1cb1db035..740e27b5c 100644 --- a/lang/cem/cemcom/file_info.h +++ b/lang/cem/cemcom/file_info.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* F I L E I N F O R M A T I O N S T R U C T U R E */ diff --git a/lang/cem/cemcom/idf.c b/lang/cem/cemcom/idf.c index 252587d82..78dd898b8 100644 --- a/lang/cem/cemcom/idf.c +++ b/lang/cem/cemcom/idf.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* IDENTIFIER FIDDLING & SYMBOL TABLE HANDLING */ diff --git a/lang/cem/cemcom/init.c b/lang/cem/cemcom/init.c index 21a3d7cb4..df86c5d0f 100644 --- a/lang/cem/cemcom/init.c +++ b/lang/cem/cemcom/init.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* PREPROCESSOR: INITIALIZATION ROUTINES */ diff --git a/lang/cem/cemcom/input.c b/lang/cem/cemcom/input.c index 30ea84f28..f208d00f8 100644 --- a/lang/cem/cemcom/input.c +++ b/lang/cem/cemcom/input.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ #include "inputtype.h" diff --git a/lang/cem/cemcom/input.h b/lang/cem/cemcom/input.h index aa22fff0b..0b2bdf823 100644 --- a/lang/cem/cemcom/input.h +++ b/lang/cem/cemcom/input.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ #include diff --git a/lang/cem/cemcom/interface.h b/lang/cem/cemcom/interface.h index d4a8c6518..6c9037991 100644 --- a/lang/cem/cemcom/interface.h +++ b/lang/cem/cemcom/interface.h @@ -1,3 +1,8 @@ +/* $Header$ */ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ #define PRIVATE #define IMPORT extern #define EXPORT diff --git a/lang/cem/cemcom/ival.c b/lang/cem/cemcom/ival.c index 87a4a71c5..655ade29f 100644 --- a/lang/cem/cemcom/ival.c +++ b/lang/cem/cemcom/ival.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* CODE FOR THE INITIALISATION OF GLOBAL VARIABLES */ diff --git a/lang/cem/cemcom/label.c b/lang/cem/cemcom/label.c index 391fa87ca..fff44425c 100644 --- a/lang/cem/cemcom/label.c +++ b/lang/cem/cemcom/label.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* L A B E L H A N D L I N G */ diff --git a/lang/cem/cemcom/label.h b/lang/cem/cemcom/label.h index 27a1e768b..ec4a973ee 100644 --- a/lang/cem/cemcom/label.h +++ b/lang/cem/cemcom/label.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* L A B E L D E F I N I T I O N */ diff --git a/lang/cem/cemcom/level.h b/lang/cem/cemcom/level.h index f4ee61661..ac3907d2b 100644 --- a/lang/cem/cemcom/level.h +++ b/lang/cem/cemcom/level.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* LEVEL DEFINITIONS */ diff --git a/lang/cem/cemcom/main.c b/lang/cem/cemcom/main.c index 02d409847..b9dc93659 100644 --- a/lang/cem/cemcom/main.c +++ b/lang/cem/cemcom/main.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* MAIN PROGRAM */ @@ -169,6 +173,7 @@ compile(argc, argv) if (!InsertFile(source, (char **) 0, &result)) /* read the source file */ fatal("%s: no source file %s\n", prog_name, source ? source : "stdin"); + File_Inserted = 1; init(); FileName = source; LineNumber = 0; diff --git a/lang/cem/cemcom/mcomm.c b/lang/cem/cemcom/mcomm.c index ea133d531..c811685c4 100644 --- a/lang/cem/cemcom/mcomm.c +++ b/lang/cem/cemcom/mcomm.c @@ -1,3 +1,8 @@ +/* $Header$ */ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* mcomm.c -- change ".lcomm name" into ".comm name" where "name" is specified in a list. */ diff --git a/lang/cem/cemcom/mes.h b/lang/cem/cemcom/mes.h index f5e3c4031..49b856b3a 100644 --- a/lang/cem/cemcom/mes.h +++ b/lang/cem/cemcom/mes.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* MESSAGE ADMINISTRATION */ diff --git a/lang/cem/cemcom/options.c b/lang/cem/cemcom/options.c index 66cf9eb54..5c6515b3a 100644 --- a/lang/cem/cemcom/options.c +++ b/lang/cem/cemcom/options.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* U S E R O P T I O N - H A N D L I N G */ diff --git a/lang/cem/cemcom/program.g b/lang/cem/cemcom/program.g index f0e575796..3f476756a 100644 --- a/lang/cem/cemcom/program.g +++ b/lang/cem/cemcom/program.g @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* PROGRAM PARSER */ diff --git a/lang/cem/cemcom/replace.c b/lang/cem/cemcom/replace.c index d4f0dc133..f7cdd472e 100644 --- a/lang/cem/cemcom/replace.c +++ b/lang/cem/cemcom/replace.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* PREPROCESSOR: MACRO-TEXT REPLACEMENT ROUTINES */ diff --git a/lang/cem/cemcom/scan.c b/lang/cem/cemcom/scan.c index f8ec10af0..98f96e4b9 100644 --- a/lang/cem/cemcom/scan.c +++ b/lang/cem/cemcom/scan.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* PREPROCESSOR: SCANNER FOR THE ACTUAL PARAMETERS OF MACROS */ diff --git a/lang/cem/cemcom/sizes.h b/lang/cem/cemcom/sizes.h index f3685d1c2..f9d8bb78c 100644 --- a/lang/cem/cemcom/sizes.h +++ b/lang/cem/cemcom/sizes.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* VARIOUS TARGET MACHINE SIZE DESCRIPTORS */ diff --git a/lang/cem/cemcom/skip.c b/lang/cem/cemcom/skip.c index 64b8e137f..cac355383 100644 --- a/lang/cem/cemcom/skip.c +++ b/lang/cem/cemcom/skip.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* PREPROCESSOR: INPUT SKIP FUNCTIONS */ diff --git a/lang/cem/cemcom/specials.h b/lang/cem/cemcom/specials.h index 33896b9aa..f086845bd 100644 --- a/lang/cem/cemcom/specials.h +++ b/lang/cem/cemcom/specials.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* OCCURANCES OF SPECIAL IDENTIFIERS */ diff --git a/lang/cem/cemcom/stack.c b/lang/cem/cemcom/stack.c index bdb80208f..9c1e9272e 100644 --- a/lang/cem/cemcom/stack.c +++ b/lang/cem/cemcom/stack.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* S T A C K / U N S T A C K R O U T I N E S */ diff --git a/lang/cem/cemcom/statement.g b/lang/cem/cemcom/statement.g index 8a210b0c2..ef244dd18 100644 --- a/lang/cem/cemcom/statement.g +++ b/lang/cem/cemcom/statement.g @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* STATEMENT SYNTAX PARSER */ diff --git a/lang/cem/cemcom/stb.c b/lang/cem/cemcom/stb.c index 23ba9d945..ca20cfd76 100644 --- a/lang/cem/cemcom/stb.c +++ b/lang/cem/cemcom/stb.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* library routine for copying structs */ diff --git a/lang/cem/cemcom/struct.c b/lang/cem/cemcom/struct.c index 37471cb3f..fc881816b 100644 --- a/lang/cem/cemcom/struct.c +++ b/lang/cem/cemcom/struct.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* ADMINISTRATION OF STRUCT AND UNION DECLARATIONS */ diff --git a/lang/cem/cemcom/switch.c b/lang/cem/cemcom/switch.c index b3f853056..9b58fbf41 100644 --- a/lang/cem/cemcom/switch.c +++ b/lang/cem/cemcom/switch.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* 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 */ diff --git a/lang/cem/cemcom/tab.c b/lang/cem/cemcom/tab.c index b1e23caee..1881d087e 100644 --- a/lang/cem/cemcom/tab.c +++ b/lang/cem/cemcom/tab.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* @cc tab.c -o $INSTALLDIR/tab@ tab - table generator diff --git a/lang/cem/cemcom/tokenname.c b/lang/cem/cemcom/tokenname.c index d66ff723e..f2699ae51 100644 --- a/lang/cem/cemcom/tokenname.c +++ b/lang/cem/cemcom/tokenname.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* TOKEN NAME DEFINITIONS */ diff --git a/lang/cem/cemcom/tokenname.h b/lang/cem/cemcom/tokenname.h index 7e5ea386d..bd883f1bc 100644 --- a/lang/cem/cemcom/tokenname.h +++ b/lang/cem/cemcom/tokenname.h @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* TOKENNAME DEFINITION */ diff --git a/lang/cem/cemcom/type.c b/lang/cem/cemcom/type.c index 5461d19cc..5d12d3f41 100644 --- a/lang/cem/cemcom/type.c +++ b/lang/cem/cemcom/type.c @@ -1,3 +1,7 @@ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ /* $Header$ */ /* T Y P E D E F I N I T I O N M E C H A N I S M */ @@ -83,7 +87,7 @@ construct_type(fund, tp, count) dtp = pointer_to(tp); break; case ARRAY: - if (tp->tp_size < 0) { + if (count >= 0 && tp->tp_size < 0) { error("cannot construct array of unknown type"); count = (arith)-1; } -- 2.34.1