summaryrefslogtreecommitdiff
path: root/usr.bin/error/subr.c
diff options
context:
space:
mode:
authorwiz <wiz@NetBSD.org>2002-05-26 22:41:20 +0000
committerwiz <wiz@NetBSD.org>2002-05-26 22:41:20 +0000
commiteaf8f8a4e5ffaa13e17c81e9c980cb8ebc0b78a9 (patch)
tree4f60bc604a8635cad15a9c35cf45854e3a0b5357 /usr.bin/error/subr.c
parent774f88b197bc10ce9c66c17890a716aff1f0f1df (diff)
Remove #ifndef'd __STDC__ code. ANSIfy.
Diffstat (limited to 'usr.bin/error/subr.c')
-rw-r--r--usr.bin/error/subr.c75
1 files changed, 20 insertions, 55 deletions
diff --git a/usr.bin/error/subr.c b/usr.bin/error/subr.c
index 13ff900fbce..79e7ec8ccdd 100644
--- a/usr.bin/error/subr.c
+++ b/usr.bin/error/subr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: subr.c,v 1.10 2000/11/15 19:54:12 christos Exp $ */
+/* $NetBSD: subr.c,v 1.11 2002/05/26 22:41:21 wiz Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)subr.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: subr.c,v 1.10 2000/11/15 19:54:12 christos Exp $");
+__RCSID("$NetBSD: subr.c,v 1.11 2002/05/26 22:41:21 wiz Exp $");
#endif /* not lint */
#include <ctype.h>
@@ -51,10 +51,7 @@ __RCSID("$NetBSD: subr.c,v 1.10 2000/11/15 19:54:12 christos Exp $");
* Arrayify a list of rules
*/
void
-arrayify(e_length, e_array, header)
- int *e_length;
- Eptr **e_array;
- Eptr header;
+arrayify(int *e_length, Eptr **e_array, Eptr header)
{
Eptr errorp;
Eptr *array;
@@ -77,9 +74,7 @@ arrayify(e_length, e_array, header)
}
char *
-Calloc(nelements, size)
- int nelements;
- int size;
+Calloc(int nelements, int size)
{
char *back;
if ( (back = (char *)calloc(nelements, size)) == NULL)
@@ -88,8 +83,7 @@ Calloc(nelements, size)
}
char *
-strsave(instring)
- char *instring;
+strsave(char *instring)
{
char *outstring;
(void)strcpy(outstring = (char *)Calloc(1, strlen(instring) + 1),
@@ -102,9 +96,7 @@ strsave(instring)
* (one based)
*/
int
-position(string, ch)
- char *string;
- char ch;
+position(char *string, char ch)
{
int i;
if (string)
@@ -119,9 +111,7 @@ position(string, ch)
* clobber the first occurance of ch in string by the new character
*/
char *
-substitute(string, chold, chnew)
- char *string;
- char chold, chnew;
+substitute(char *string, char chold, char chnew)
{
char *cp = string;
@@ -137,8 +127,7 @@ substitute(string, chold, chnew)
}
char
-lastchar(string)
- char *string;
+lastchar(char *string)
{
int length;
if (string == NULL) return('\0');
@@ -150,8 +139,7 @@ lastchar(string)
}
char
-firstchar(string)
- char *string;
+firstchar(char *string)
{
if (string)
return(string[0]);
@@ -160,8 +148,7 @@ firstchar(string)
}
char
-next_lastchar(string)
- char *string;
+next_lastchar(char *string)
{
int length;
if (string == NULL) return('\0');
@@ -173,8 +160,7 @@ next_lastchar(string)
}
void
-clob_last(string, newstuff)
- char *string, newstuff;
+clob_last(char *string, char newstuff)
{
int length = 0;
if (string)
@@ -188,9 +174,7 @@ clob_last(string, newstuff)
* return TRUE if this is of the proper format
*/
boolean
-persperdexplode(string, r_perd, r_pers)
- char *string;
- char **r_perd, **r_pers;
+persperdexplode(char *string, char **r_perd, char **r_pers)
{
char *cp;
int length = 0;
@@ -221,9 +205,7 @@ persperdexplode(string, r_perd, r_pers)
* return TRUE if this is of the proper format
*/
boolean
-qpersperdexplode(string, r_perd, r_pers)
- char *string;
- char **r_perd, **r_pers;
+qpersperdexplode(char *string, char **r_perd, char **r_pers)
{
char *cp;
int length = 0;
@@ -289,10 +271,7 @@ struct lang_desc lang_table[] = {
};
void
-printerrors(look_at_subclass, errorc, errorv)
- boolean look_at_subclass;
- int errorc;
- Eptr errorv[];
+printerrors(boolean look_at_subclass, int errorc, Eptr errorv[])
{
int i;
Eptr errorp;
@@ -312,10 +291,7 @@ printerrors(look_at_subclass, errorc, errorv)
}
void
-wordvprint(fyle, wordc, wordv)
- FILE *fyle;
- int wordc;
- char *wordv[];
+wordvprint(FILE *fyle, int wordc, char **wordv)
{
int i;
char *sep = "";
@@ -332,10 +308,7 @@ wordvprint(fyle, wordc, wordv)
* a wordc wordv combination pointing into it.
*/
void
-wordvbuild(string, r_wordc, r_wordv)
- char *string;
- int *r_wordc;
- char ***r_wordv;
+wordvbuild(char *string, int *r_wordc, char ***r_wordv)
{
char *cp;
char **wordv;
@@ -377,10 +350,7 @@ wordvbuild(string, r_wordc, r_wordv)
* Compare two 0 based wordvectors
*/
int
-wordvcmp(wordv1, wordc, wordv2)
- char **wordv1;
- int wordc;
- char **wordv2;
+wordvcmp(char **wordv1, int wordc, char **wordv2)
{
int i;
int back;
@@ -399,10 +369,7 @@ wordvcmp(wordv1, wordc, wordv2)
* new wordv, allowing the first emptyhead slots to be empty
*/
char **
-wordvsplice(emptyhead, wordc, wordv)
- int emptyhead;
- int wordc;
- char **wordv;
+wordvsplice(int emptyhead, int wordc, char **wordv)
{
char **nwordv;
int nwordc = emptyhead + wordc;
@@ -424,15 +391,13 @@ static char *S = "s";
static char *N = "";
char *
-plural(n)
- int n;
+plural(int n)
{
return( n > 1 ? S : N);
}
char *
-verbform(n)
- int n;
+verbform(int n)
{
return( n > 1 ? N : S);
}