diff options
Diffstat (limited to 'usr.bin/awk/lib.c')
-rw-r--r-- | usr.bin/awk/lib.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/awk/lib.c b/usr.bin/awk/lib.c index 2e2ec08b547..27c6175232c 100644 --- a/usr.bin/awk/lib.c +++ b/usr.bin/awk/lib.c @@ -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 @@ void growfldtab(int n) /* make new fields up to at least $n */ 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 @@ void recbld(void) /* create $0 from $1..$NF if necessary */ 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 @@ void bcheck2(int n, int c1, int c2) 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 @@ void FATAL(char *fmt, ...) exit(2); } -void WARNING(char *fmt, ...) +void WARNING(const char *fmt, ...) { extern char *cmdname; va_list varg; @@ -667,7 +667,7 @@ void bclass(int c) } } -double errcheck(double x, char *s) +double errcheck(double x, const char *s) { if (errno == EDOM) { @@ -682,9 +682,9 @@ double errcheck(double x, char *s) 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 @@ int isclvar(char *s) /* is s of form var=something ? */ /* wrong: violates 4.10.1.4 of ansi C standard */ #include <math.h> -int is_number(char *s) +int is_number(const char *s) { double r; char *ep; |