summaryrefslogtreecommitdiff
path: root/usr.bin/awk/lib.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-12-19 21:24:29 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-12-19 21:24:29 +0000
commit20b6afc1f6af7b8cf2bd8b9933ac91afb729859f (patch)
treee04b12a8a0d5797db48a995c61a36154409c9fb7 /usr.bin/awk/lib.c
parent74f6d0d46c772481e8721cc054dcf4d4815852f6 (diff)
Update to the One True Awk version 20021213
Diffstat (limited to 'usr.bin/awk/lib.c')
-rw-r--r--usr.bin/awk/lib.c20
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;