=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/parse.c,v retrieving revision 1.22 retrieving revision 1.23 diff -c -r1.22 -r1.23 *** src/usr.bin/make/parse.c 1999/11/10 14:00:54 1.22 --- src/usr.bin/make/parse.c 1999/11/11 11:40:09 1.23 *************** *** 1,4 **** ! /* $OpenBSD: parse.c,v 1.22 1999/11/10 14:00:54 espie Exp $ */ /* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: parse.c,v 1.23 1999/11/11 11:40:09 espie Exp $ */ /* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */ /* *************** *** 43,49 **** #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else ! static char rcsid[] = "$OpenBSD: parse.c,v 1.22 1999/11/10 14:00:54 espie Exp $"; #endif #endif /* not lint */ --- 43,49 ---- #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else ! static char rcsid[] = "$OpenBSD: parse.c,v 1.23 1999/11/11 11:40:09 espie Exp $"; #endif #endif /* not lint */ *************** *** 123,129 **** } PTR; static char *fname; /* name of current file (for errors) */ ! static int lineno; /* line number in current file */ static FILE *curFILE = NULL; /* current makefile */ static PTR *curPTR = NULL; /* current makefile */ --- 123,129 ---- } PTR; static char *fname; /* name of current file (for errors) */ ! static unsigned long lineno; /* line number in current file */ static FILE *curFILE = NULL; /* current makefile */ static PTR *curPTR = NULL; /* current makefile */ *************** *** 138,146 **** */ typedef struct IFile { char *fname; /* name of previous file */ ! int lineno; /* saved line number */ ! FILE * F; /* the open stream */ ! PTR * p; /* the char pointer */ } IFile; static Lst includes; /* stack of IFiles generated by --- 138,146 ---- */ typedef struct IFile { char *fname; /* name of previous file */ ! unsigned long lineno; /* saved line number */ ! FILE *F; /* the open stream */ ! PTR *p; /* the char pointer */ } IFile; static Lst includes; /* stack of IFiles generated by *************** *** 241,248 **** { ".WAIT", Wait, 0 }, }; ! static void ParseErrorInternal __P((char *, size_t, int, char *, ...)); ! static void ParseVErrorInternal __P((char *, size_t, int, char *, va_list)); static int ParseFindKeyword __P((char *)); static int ParseLinkSrc __P((ClientData, ClientData)); static int ParseDoOp __P((ClientData, ClientData)); --- 241,248 ---- { ".WAIT", Wait, 0 }, }; ! static void ParseErrorInternal __P((char *, unsigned long, int, char *, ...)); ! static void ParseVErrorInternal __P((char *, unsigned long, int, char *, va_list)); static int ParseFindKeyword __P((char *)); static int ParseLinkSrc __P((ClientData, ClientData)); static int ParseDoOp __P((ClientData, ClientData)); *************** *** 319,332 **** /* VARARGS */ static void #ifdef __STDC__ ! ParseVErrorInternal(char *cfname, size_t clineno, int type, char *fmt, va_list ap) #else ParseVErrorInternal(va_alist) va_dcl #endif { ! (void)fprintf(stderr, "\"%s\", line %d: ", cfname, (int) clineno); if (type == PARSE_WARNING) (void)fprintf(stderr, "warning: "); (void)vfprintf(stderr, fmt, ap); --- 319,332 ---- /* VARARGS */ static void #ifdef __STDC__ ! ParseVErrorInternal(char *cfname, unsigned long clineno, int type, char *fmt, va_list ap) #else ParseVErrorInternal(va_alist) va_dcl #endif { ! (void)fprintf(stderr, "\"%s\", line %lu: ", cfname, clineno); if (type == PARSE_WARNING) (void)fprintf(stderr, "warning: "); (void)vfprintf(stderr, fmt, ap); *************** *** 350,356 **** /* VARARGS */ static void #ifdef __STDC__ ! ParseErrorInternal(char *cfname, size_t clineno, int type, char *fmt, ...) #else ParseErrorInternal(va_alist) va_dcl --- 350,356 ---- /* VARARGS */ static void #ifdef __STDC__ ! ParseErrorInternal(char *cfname, unsigned long clineno, int type, char *fmt, ...) #else ParseErrorInternal(va_alist) va_dcl *************** *** 363,373 **** int type; /* Error type (PARSE_WARNING, PARSE_FATAL) */ char *fmt; char *cfname; ! size_t clineno; va_start(ap); cfname = va_arg(ap, char *); ! clineno = va_arg(ap, size_t); type = va_arg(ap, int); fmt = va_arg(ap, char *); #endif --- 363,373 ---- int type; /* Error type (PARSE_WARNING, PARSE_FATAL) */ char *fmt; char *cfname; ! unsigned long clineno; va_start(ap); cfname = va_arg(ap, char *); ! clineno = va_arg(ap, unsigned long); type = va_arg(ap, int); fmt = va_arg(ap, char *); #endif