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: input.c,v 1.14 1995/03/24 13:56:20 ceriel Exp $ */
11 #define INP_PUSHBACK 3
12 #define INP_TYPE struct file_info
14 struct file_info finfo;
16 #include <inp_pkg.body>
25 extern int IncludeLevel;
26 extern char options[];
36 p = strrindex(fn, '/');
37 while (p && *(p + 1) == '\0') { /* remove trailing /'s */
39 p = strrindex(fn, '/');
42 if (fn[0] == '\0' || (fn[0] == '/' && p == &fn[0])) /* absolute path */
46 fn = Salloc(fn,(unsigned) (p - &fn[0] + 1));
73 if (nestlevel != nestlow) lexwarning("missing #endif");
76 if (NoUnstack) lexerror("unexpected EOF");
80 if (options['g'] && IncludeLevel > 0) {
81 C_ms_stb_cst(FileName, N_EINCL, 0, (arith) 0);
85 if (WorkingDir[0] != '\0') free(WorkingDir);
88 if (FileName != source) free(FileName);