=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/m4/main.c,v retrieving revision 1.17 retrieving revision 1.18 diff -c -r1.17 -r1.18 *** src/usr.bin/m4/main.c 1999/09/14 08:35:16 1.17 --- src/usr.bin/m4/main.c 1999/11/17 15:34:13 1.18 *************** *** 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 $ */ /*- --- 1,4 ---- ! /* $OpenBSD: main.c,v 1.18 1999/11/17 15:34:13 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.17 1999/09/14 08:35:16 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.18 1999/11/17 15:34:13 espie Exp $"; #endif #endif /* not lint */ *************** *** 138,146 **** extern int optind; extern char *optarg; ! void macro(); ! void initkwds(); int main(argc,argv) int argc; --- 138,150 ---- extern int optind; extern char *optarg; ! static void macro __P((void)); ! static void initkwds __P((void)); ! static ndptr inspect __P((char *)); ! static int do_look_ahead __P((int, const char *)); + int main __P((int, char *[])); + int main(argc,argv) int argc; *************** *** 225,232 **** return 0; } - ndptr inspect(); - /* * Look ahead (at most MAXCCHARS characters) for `token'. * (on input `t == token[0]') --- 229,234 ---- *************** *** 234,243 **** * Returns 1 if `token' present; copied to output. * 0 if `token' not found; all characters pushed back */ ! int do_look_ahead(t, token) int t; ! char *token; { int i; --- 236,245 ---- * Returns 1 if `token' present; copied to output. * 0 if `token' not found; all characters pushed back */ ! static int do_look_ahead(t, token) int t; ! const char *token; { int i; *************** *** 262,268 **** /* * macro - the work horse.. */ ! void macro() { char token[MAXTOK], chars[2]; --- 264,270 ---- /* * macro - the work horse.. */ ! static void macro() { char token[MAXTOK], chars[2]; *************** *** 397,405 **** errx(1, "internal stack overflow"); if (CALTYP == MACRTYPE) ! expand((char **) mstack+fp+1, sp-fp); else ! eval((char **) mstack+fp+1, sp-fp, CALTYP); ep = PREVEP; /* flush strspace */ sp = PREVSP; /* previous sp.. */ --- 399,407 ---- errx(1, "internal stack overflow"); if (CALTYP == MACRTYPE) ! expand((const char **) mstack+fp+1, sp-fp); else ! eval((const char **) mstack+fp+1, sp-fp, CALTYP); ep = PREVEP; /* flush strspace */ sp = PREVSP; /* previous sp.. */ *************** *** 430,436 **** * consider only those starting with _ or A-Za-z. This is a * combo with lookup to speed things up. */ ! ndptr inspect(tp) char *tp; { --- 432,438 ---- * consider only those starting with _ or A-Za-z. This is a * combo with lookup to speed things up. */ ! static ndptr inspect(tp) char *tp; { *************** *** 461,467 **** * keyword strings, since we simply use the static pointers * within keywrds block. */ ! void initkwds() { size_t i; --- 463,469 ---- * keyword strings, since we simply use the static pointers * within keywrds block. */ ! static void initkwds() { size_t i;