=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/awk/lib.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- src/usr.bin/awk/lib.c 2002/07/04 02:38:58 1.10 +++ src/usr.bin/awk/lib.c 2002/12/19 21:24:28 1.11 @@ -1,4 +1,4 @@ -/* $OpenBSD: lib.c,v 1.10 2002/07/04 02:38:58 deraadt Exp $ */ +/* $OpenBSD: lib.c,v 1.11 2002/12/19 21:24:28 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -394,7 +394,7 @@ nfields = nf; } -int refldbld(char *rec, char *fs) /* build fields from reg expr in FS */ +int refldbld(const char *rec, const char *fs) /* build fields from reg expr in FS */ { /* this relies on having fields[] the same length as $0 */ /* the fields are all stored in this one array with \0's */ @@ -479,12 +479,12 @@ int errorflag = 0; -void yyerror(char *s) +void yyerror(const char *s) { SYNTAX(s); } -void SYNTAX(char *fmt, ...) +void SYNTAX(const char *fmt, ...) { extern char *cmdname, *curfname; static int been_here = 0; @@ -569,7 +569,7 @@ fprintf(stderr, "\t%d extra %c's\n", -n, c2); } -void FATAL(char *fmt, ...) +void FATAL(const char *fmt, ...) { extern char *cmdname; va_list varg; @@ -585,7 +585,7 @@ exit(2); } -void WARNING(char *fmt, ...) +void WARNING(const char *fmt, ...) { extern char *cmdname; va_list varg; @@ -667,7 +667,7 @@ } } -double errcheck(double x, char *s) +double errcheck(double x, const char *s) { if (errno == EDOM) { @@ -682,9 +682,9 @@ return x; } -int isclvar(char *s) /* is s of form var=something ? */ +int isclvar(const char *s) /* is s of form var=something ? */ { - char *os = s; + const char *os = s; if (!isalpha((uschar) *s) && *s != '_') return 0; @@ -699,7 +699,7 @@ /* wrong: violates 4.10.1.4 of ansi C standard */ #include -int is_number(char *s) +int is_number(const char *s) { double r; char *ep;