summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-11-11 11:40:10 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-11-11 11:40:10 +0000
commit43d7ae5708e1bec7e6339f73784b471d2d2c0215 (patch)
tree732e8e0be7047e19d383f0fd6587551de6e2cad8 /usr.bin/make
parent6bbddc87206dc710e0a1eed2c5a5860575a4c099 (diff)
Lineno as unsigned long. Slightly easier for printf, and more sensible.
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/parse.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index ebeb71ab6da..b606991f309 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.22 1999/11/10 14:00:54 espie Exp $ */
+/* $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,7 +43,7 @@
#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 $";
+static char rcsid[] = "$OpenBSD: parse.c,v 1.23 1999/11/11 11:40:09 espie Exp $";
#endif
#endif /* not lint */
@@ -123,7 +123,7 @@ typedef struct {
} PTR;
static char *fname; /* name of current file (for errors) */
-static int lineno; /* line number in current file */
+static unsigned long lineno; /* line number in current file */
static FILE *curFILE = NULL; /* current makefile */
static PTR *curPTR = NULL; /* current makefile */
@@ -138,9 +138,9 @@ static GNode *mainNode; /* The main target to create. This is the
*/
typedef struct IFile {
char *fname; /* name of previous file */
- int lineno; /* saved line number */
- FILE * F; /* the open stream */
- PTR * p; /* the char pointer */
+ 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,8 +241,8 @@ static struct {
{ ".WAIT", Wait, 0 },
};
-static void ParseErrorInternal __P((char *, size_t, int, char *, ...));
-static void ParseVErrorInternal __P((char *, size_t, int, char *, va_list));
+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,14 +319,14 @@ ParseFindKeyword (str)
/* VARARGS */
static void
#ifdef __STDC__
-ParseVErrorInternal(char *cfname, size_t clineno, int type, char *fmt,
+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 %d: ", cfname, (int) clineno);
+ (void)fprintf(stderr, "\"%s\", line %lu: ", cfname, clineno);
if (type == PARSE_WARNING)
(void)fprintf(stderr, "warning: ");
(void)vfprintf(stderr, fmt, ap);
@@ -350,7 +350,7 @@ ParseVErrorInternal(va_alist)
/* VARARGS */
static void
#ifdef __STDC__
-ParseErrorInternal(char *cfname, size_t clineno, int type, char *fmt, ...)
+ParseErrorInternal(char *cfname, unsigned long clineno, int type, char *fmt, ...)
#else
ParseErrorInternal(va_alist)
va_dcl
@@ -363,11 +363,11 @@ ParseErrorInternal(va_alist)
int type; /* Error type (PARSE_WARNING, PARSE_FATAL) */
char *fmt;
char *cfname;
- size_t clineno;
+ unsigned long clineno;
va_start(ap);
cfname = va_arg(ap, char *);
- clineno = va_arg(ap, size_t);
+ clineno = va_arg(ap, unsigned long);
type = va_arg(ap, int);
fmt = va_arg(ap, char *);
#endif