=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/m4/main.c,v retrieving revision 1.16 retrieving revision 1.17 diff -c -r1.16 -r1.17 *** src/usr.bin/m4/main.c 1999/09/14 08:30:20 1.16 --- src/usr.bin/m4/main.c 1999/09/14 08:35:16 1.17 *************** *** 1,4 **** ! /* $OpenBSD: main.c,v 1.16 1999/09/14 08:30:20 espie Exp $ */ /* $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: main.c,v 1.17 1999/09/14 08:35:16 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.16 1999/09/14 08:30:20 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.17 1999/09/14 08:35:16 espie Exp $"; #endif #endif /* not lint */ *************** *** 146,155 **** int argc; char *argv[]; { ! register int c; ! register int n; char *p; ! register FILE *ifp; if (signal(SIGINT, SIG_IGN) != SIG_IGN) signal(SIGINT, onintr); --- 146,155 ---- int argc; char *argv[]; { ! int c; ! int n; char *p; ! FILE *ifp; if (signal(SIGINT, SIG_IGN) != SIG_IGN) signal(SIGINT, onintr); *************** *** 263,274 **** * macro - the work horse.. */ void ! macro() { char token[MAXTOK], chars[2]; ! register char *s; ! register int t, l; ! register ndptr p; ! register int nlpar; cycle { t = gpbc(); --- 263,275 ---- * macro - the work horse.. */ void ! macro() ! { char token[MAXTOK], chars[2]; ! char *s; ! int t, l; ! ndptr p; ! int nlpar; cycle { t = gpbc(); *************** *** 330,338 **** } else if (LOOK_AHEAD(l,lquote)) { nlpar++; s = lquote; ! } else if (l == EOF) ! errx(1, "missing right quote"); ! else { chars[0] = l; chars[1] = EOS; s = chars; --- 331,342 ---- } else if (LOOK_AHEAD(l,lquote)) { nlpar++; s = lquote; ! } else if (l == EOF) { ! if (nlpar == 1) ! errx(1, "missing right quote."); ! else ! errx(1, "missing %d right quotes.", nlpar); ! } else { chars[0] = l; chars[1] = EOS; s = chars; *************** *** 428,440 **** */ ndptr inspect(tp) ! register char *tp; { ! register char c; ! register char *name = tp; ! register char *etp = tp+MAXTOK; ! register ndptr p; ! register unsigned long h = 0; while ((isalnum(c = gpbc()) || c == '_') && tp < etp) h = (h << 5) + h + (*tp++ = c); --- 432,444 ---- */ ndptr inspect(tp) ! char *tp; { ! char c; ! char *name = tp; ! char *etp = tp+MAXTOK; ! ndptr p; ! unsigned long h = 0; while ((isalnum(c = gpbc()) || c == '_') && tp < etp) h = (h << 5) + h + (*tp++ = c); *************** *** 454,467 **** * initkwds - initialise m4 keywords as fast as possible. * This very similar to install, but without certain overheads, * such as calling lookup. Malloc is not used for storing the ! * keyword strings, since we simply use the static pointers * within keywrds block. */ void ! initkwds() { ! register int i; ! register int h; ! register ndptr p; for (i = 0; i < MAXKEYS; i++) { h = hash(keywrds[i].knam); --- 458,472 ---- * initkwds - initialise m4 keywords as fast as possible. * This very similar to install, but without certain overheads, * such as calling lookup. Malloc is not used for storing the ! * keyword strings, since we simply use the static pointers * within keywrds block. */ void ! initkwds() ! { ! size_t i; ! int h; ! ndptr p; for (i = 0; i < MAXKEYS; i++) { h = hash(keywrds[i].knam); *************** *** 473,475 **** --- 478,481 ---- p->type = keywrds[i].ktyp | STATIC; } } +