aboutsummaryrefslogtreecommitdiff
path: root/contrib/one-true-awk/lib.c
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2002-12-13 04:59:48 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2002-12-13 04:59:48 +0000
commit813da98d0ef12035f0e781a4b3d4f67dcfa2a4d1 (patch)
tree59f89c7c67df8769e65e35d1054fb5407fb18d12 /contrib/one-true-awk/lib.c
parent146a1e500c39a13a97488953ffff162abe15d6f3 (diff)
downloadsrc-813da98d0ef12035f0e781a4b3d4f67dcfa2a4d1.tar.gz
src-813da98d0ef12035f0e781a4b3d4f67dcfa2a4d1.zip
Vendor import of bwk's 29-Nov-2002 release.
Most significant update is the inclusion of our port's locale patches.
Notes
Notes: svn path=/vendor/one-true-awk/dist/; revision=107806
Diffstat (limited to 'contrib/one-true-awk/lib.c')
-rw-r--r--contrib/one-true-awk/lib.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/one-true-awk/lib.c b/contrib/one-true-awk/lib.c
index a44466f10add..630bbceb7dad 100644
--- a/contrib/one-true-awk/lib.c
+++ b/contrib/one-true-awk/lib.c
@@ -390,7 +390,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 */
@@ -475,12 +475,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;
@@ -535,7 +535,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;
@@ -551,7 +551,7 @@ void FATAL(char *fmt, ...)
exit(2);
}
-void WARNING(char *fmt, ...)
+void WARNING(const char *fmt, ...)
{
extern char *cmdname;
va_list varg;
@@ -633,7 +633,7 @@ void bclass(int c)
}
}
-double errcheck(double x, char *s)
+double errcheck(double x, const char *s)
{
if (errno == EDOM) {
@@ -648,9 +648,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;
@@ -665,7 +665,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;