=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/m4/main.c,v retrieving revision 1.28 retrieving revision 1.29 diff -c -r1.28 -r1.29 *** src/usr.bin/m4/main.c 2000/01/15 14:26:00 1.28 --- src/usr.bin/m4/main.c 2000/02/02 14:00:12 1.29 *************** *** 1,4 **** ! /* $OpenBSD: main.c,v 1.28 2000/01/15 14:26:00 espie Exp $ */ /* $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: main.c,v 1.29 2000/02/02 14:00:12 espie Exp $ */ /* $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $ */ /*- *************** *** 47,53 **** #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: main.c,v 1.28 2000/01/15 14:26:00 espie Exp $"; #endif #endif /* not lint */ --- 47,53 ---- #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: main.c,v 1.29 2000/02/02 14:00:12 espie Exp $"; #endif #endif /* not lint */ *************** *** 273,280 **** static void macro() { ! char token[MAXTOK], chars[2]; ! char *s; int t, l; ndptr p; int nlpar; --- 273,279 ---- static void macro() { ! char token[MAXTOK]; int t, l; ndptr p; int nlpar; *************** *** 282,294 **** cycle { t = gpbc(); if (t == '_' || isalpha(t)) { ! s = token; ! p = inspect(t, s); if (p != nil) putback(l = gpbc()); if (p == nil || (l != LPAREN && (p->type & NEEDARGS) != 0)) ! outputstr(s); else { /* * real thing.. First build a call frame: --- 281,292 ---- cycle { t = gpbc(); if (t == '_' || isalpha(t)) { ! p = inspect(t, token); if (p != nil) putback(l = gpbc()); if (p == nil || (l != LPAREN && (p->type & NEEDARGS) != 0)) ! outputstr(token); else { /* * real thing.. First build a call frame: *************** *** 333,343 **** l = gpbc(); if (LOOK_AHEAD(l,rquote)) { ! nlpar--; ! s = rquote; } else if (LOOK_AHEAD(l,lquote)) { record(quotes, nlpar++); ! s = lquote; } else if (l == EOF) { if (nlpar == 1) warnx("unclosed quote:"); --- 331,341 ---- l = gpbc(); if (LOOK_AHEAD(l,rquote)) { ! if (--nlpar > 0) ! outputstr(rquote); } else if (LOOK_AHEAD(l,lquote)) { record(quotes, nlpar++); ! outputstr(lquote); } else if (l == EOF) { if (nlpar == 1) warnx("unclosed quote:"); *************** *** 346,357 **** dump_stack(quotes, nlpar); exit(1); } else { ! chars[0] = l; ! chars[1] = EOS; ! s = chars; } - if (nlpar > 0) - outputstr(s); } while (nlpar != 0); } --- 344,356 ---- dump_stack(quotes, nlpar); exit(1); } else { ! if (nlpar > 0) { ! if (sp < 0) ! putc(l, active); ! else ! chrsave(l); ! } } } while (nlpar != 0); }