adjusted sources for NOPP
authoreck <none@none>
Mon, 16 Oct 1989 12:38:25 +0000 (12:38 +0000)
committereck <none@none>
Mon, 16 Oct 1989 12:38:25 +0000 (12:38 +0000)
lang/cem/cemcom.ansi/domacro.c
lang/cem/cemcom.ansi/error.c

index 70f1da5..cec6df1 100644 (file)
@@ -691,6 +691,28 @@ macroeq(s, t)
        }
 }
 #else NOPP
+
+struct idf *
+GetIdentifier(skiponerr)
+       int skiponerr;          /* skip the rest of the line on error */
+{
+       /*      returns a pointer to the descriptor of the identifier that is
+               read from the input stream. When the input doe not contain
+               an identifier, the rest of the line is skipped when
+               skiponerr is on, and a null-pointer is returned.
+               The substitution of macros is disabled.
+       */
+       int tok;
+       struct token tk;
+
+       tok = GetToken(&tk);
+       if (tok != IDENTIFIER) {
+               if (skiponerr && tok != EOI) SkipToNewLine(0);
+               return (struct idf *)0;
+       }
+       return tk.tk_idf;
+}
+
 domacro()
 {
        int tok;
index 846f23a..131d24c 100644 (file)
@@ -211,7 +211,6 @@ lexerror(va_alist)                  /* fmt, args */
        va_end(ap);
 }
 
-#ifndef        NOPP
 /*VARARGS*/
 lexwarning(va_alist)                   /* fmt, args */
        va_dcl
@@ -224,7 +223,6 @@ lexwarning(va_alist)                        /* fmt, args */
        }
        va_end(ap);
 }
-#endif NOPP
 
 /*VARARGS*/
 crash(va_alist)                                /* fmt, args */