2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
5 /* $Id: init.c,v 3.12 1994/06/24 12:04:06 ceriel Exp $ */
6 /* PREPROCESSOR: INITIALIZATION ROUTINES */
16 #include "interface.h"
29 {"include", K_INCLUDE},
41 long clock, sys_time();
45 /* Initialise the control line keywords (if, include, define, etc)
46 Although the lexical analyzer treats them as identifiers, the
47 control line handler can recognize them as keywords by the
48 id_resmac field of the identifier.
51 register struct mkey *mk = &mkey[0];
53 while (mk->mk_reserved) {
54 register struct idf *idf = str2idf(mk->mk_reserved);
57 fatal("maximum identifier length insufficient");
58 idf->id_resmac = mk->mk_key;
63 /* Initialize __DATE__, __FILE__ and __LINE__ macro
68 strcpy(&date[1], ctime(&clock));
69 date[26] = '\0'; /* zap nl */
70 date[0] = date[25] = '"';
71 macro_def(str2idf("__DATE__"), date, -1, 26, NOFLAG);
74 macro_def(str2idf("__LINE__"), "0", -1, 1, FUNC);
77 macro_def(str2idf("__FILE__"), "", -1, 1, FUNC);
80 macro_def(str2idf("defined"), "", 1, 1, FUNC);