summaryrefslogtreecommitdiffstats
path: root/usr.bin/m4/mdef.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/m4/mdef.h')
-rw-r--r--usr.bin/m4/mdef.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/m4/mdef.h b/usr.bin/m4/mdef.h
index dd23bde..604833f 100644
--- a/usr.bin/m4/mdef.h
+++ b/usr.bin/m4/mdef.h
@@ -34,6 +34,7 @@
* SUCH DAMAGE.
*
* @(#)mdef.h 8.1 (Berkeley) 6/6/93
+ * $FreeBSD$
*/
#define MACRTYPE 1
@@ -142,7 +143,9 @@ typedef union { /* stack structure */
* pushf() - push a call frame entry onto stack
* pushs() - push a string pointer onto stack
*/
-#define gpbc() (bp > bufbase) ? (*--bp ? *bp : EOF) : getc(infile[ilevel])
+#define gpbc() (bp > bufbase) ? (*--bp ? *bp : EOF) : \
+ ((chscratch = getc(infile[ilevel])) == '\n' && ++inlineno[ilevel], \
+ chscratch)
#define pushf(x) if (sp < STACKMAX) mstack[++sp].sfra = (x)
#define pushs(x) if (sp < STACKMAX) mstack[++sp].sstr = (x)
OpenPOWER on IntegriCloud