From aa2bfa7738e08f633e2be40fe762552fbebaa786 Mon Sep 17 00:00:00 2001 From: eck Date: Mon, 16 Oct 1989 12:38:25 +0000 Subject: [PATCH] adjusted sources for NOPP --- lang/cem/cemcom.ansi/domacro.c | 22 ++++++++++++++++++++++ lang/cem/cemcom.ansi/error.c | 2 -- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/lang/cem/cemcom.ansi/domacro.c b/lang/cem/cemcom.ansi/domacro.c index 70f1da547..cec6df18e 100644 --- a/lang/cem/cemcom.ansi/domacro.c +++ b/lang/cem/cemcom.ansi/domacro.c @@ -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; diff --git a/lang/cem/cemcom.ansi/error.c b/lang/cem/cemcom.ansi/error.c index 846f23ae4..131d24c16 100644 --- a/lang/cem/cemcom.ansi/error.c +++ b/lang/cem/cemcom.ansi/error.c @@ -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 */ -- 2.34.1