1 /* $Id: init.c,v 1.5 1994/06/24 10:18:27 ceriel Exp $ */
3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
6 /* PREPROCESSOR: INITIALIZATION ROUTINES */
13 #include "interface.h"
26 {"include", K_INCLUDE},
38 long clock, sys_time();
42 /* Initialise the control line keywords (if, include, define, etc)
43 Although the lexical analyzer treats them as identifiers, the
44 control line handler can recognize them as keywords by the
45 id_resmac field of the identifier.
48 register struct mkey *mk = &mkey[0];
50 while (mk->mk_reserved) {
51 struct idf *idf = str2idf(mk->mk_reserved, 0);
54 fatal("maximum identifier length insufficient");
55 idf->id_resmac = mk->mk_key;
60 /* Initialize __DATE__, __FILE__ and __LINE__ macro
65 strcpy(&date[1], ctime(&clock));
66 date[26] = '\0'; /* zap nl */
67 date[0] = date[25] = '"';
68 macro_def(str2idf("__DATE__", 0), date, -1, 26, NOFLAG);
71 macro_def(str2idf("__LINE__", 0), "0", -1, 1, FUNC);
74 macro_def(str2idf("__FILE__", 0), "", -1, 1, FUNC);
77 macro_def(str2idf("defined", 0), "", 1, 1, FUNC);