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: skip.c,v 1.6 1994/10/28 15:23:55 ceriel Exp $ */
6 /* PREPROCESSOR: INPUT SKIP FUNCTIONS */
13 extern int InputLevel;
16 skipspaces(ch, skipnl)
19 /* skipspaces() skips any white space and returns the first
22 register int nlseen = 0;
25 while (class(ch) == STSKIP)
27 if (skipnl && class(ch) == STNL) {
33 if (ch == TOKSEP && InputLevel) {
38 /* \\\n are handled by trigraph */
42 if (ch == '*' && !InputLevel) {
51 else if (nlseen && ch == '#') {
62 register int garbage = 0;
63 register int delim = 0;
65 while ((ch = GetChar()) != '\n') {
68 if (GetChar() == '\n') break;
69 } else if (ch == delim) {
73 } else if (ch == '\'' || ch == '\"') {
76 } else if (ch == '/') {
77 if (GetChar() == '*' && !InputLevel) {
83 else if (ch == TOKSEP && InputLevel) {
89 if (delim) strict("unclosed opening %c", delim);