Fixed a bug with line-directives, added copyright notice

This commit is contained in:
ceriel
1987-03-10 17:51:10 +00:00
parent 94ff96cf1f
commit 07f5d3cce4
60 changed files with 269 additions and 23 deletions

View File

@@ -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();
}