diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2002-04-28 14:37:13 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2002-04-28 14:37:13 +0000 |
commit | 2f15e29fadc2bc35285820205ae7ff94f2d19be8 (patch) | |
tree | 77ba7576a9503cf0fede4d33937d28f1badeb600 /usr.bin/m4/mdef.h | |
parent | 46b4ea21951a8b60d15104c3a547e37ce9d1ad07 (diff) |
Implement -s.
Triggered by recent FreeBSD changes.
- emits #line directives at every file change (like FreeBSD)
- maintains a synch_lineno variable to verify when the output gets out
of synch with the input, so that it can emit #line to re-synch as well
(unlike FreeBSD)
To do: either handle \end-of-line, or recognize when a macro expansion
is in progress, so that line synch don't perturb cpp on multi-line
expansions.
With this, we should have a fully POSIX-compliant m4.
ok miod@
Diffstat (limited to 'usr.bin/m4/mdef.h')
-rw-r--r-- | usr.bin/m4/mdef.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/m4/mdef.h b/usr.bin/m4/mdef.h index 4a10500be28..c387e088fd3 100644 --- a/usr.bin/m4/mdef.h +++ b/usr.bin/m4/mdef.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mdef.h,v 1.21 2001/09/27 11:40:33 espie Exp $ */ +/* $OpenBSD: mdef.h,v 1.22 2002/04/28 14:37:12 espie Exp $ */ /* $NetBSD: mdef.h,v 1.7 1996/01/13 23:25:27 pk Exp $ */ /* @@ -157,6 +157,7 @@ struct input_file { FILE *file; char *name; unsigned long lineno; + unsigned long synch_lineno; /* used for -s */ int c; }; |