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.11 1994/10/28 15:26:36 ceriel Exp $ */
6 /* PREPROCESSOR: INPUT SKIP FUNCTIONS */
15 extern int InputLevel;
18 skipspaces(ch, skipnl)
21 /* skipspaces() skips any white space and returns the first
24 register int nlseen = 0;
27 while (class(ch) == STSKIP)
29 if (skipnl && class(ch) == STNL) {
35 if (ch == TOKSEP && InputLevel) {
40 /* \\\n are handled by trigraph */
44 if (ch == '*' && !InputLevel) {
53 else if (nlseen && ch == '#') {
65 register int garbage = 0;
67 register int delim = 0;
70 while ((ch = GetChar()) != '\n') {
74 if (GetChar() == '\n') break;
75 } else if (ch == delim) {
80 else if (ch == '\'' || ch == '\"') {
83 } else if (ch == '/') {
92 else if (ch == TOKSEP && InputLevel) {
100 if (delim) strict("unclosed opening %c", delim);