summaryrefslogtreecommitdiff
path: root/lib/libc/string
diff options
context:
space:
mode:
authorabs <abs@NetBSD.org>2012-06-25 22:32:43 +0000
committerabs <abs@NetBSD.org>2012-06-25 22:32:43 +0000
commit90275da60e3dbd2069f6af836ba5f640aa00e757 (patch)
tree9f59e4c6412fa900de49acc62ab8397fcca25838 /lib/libc/string
parent29d2b928d7a13aad9b5e6dd87e50a7b82f1f9569 (diff)
Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
Diffstat (limited to 'lib/libc/string')
-rw-r--r--lib/libc/string/bm.c17
-rw-r--r--lib/libc/string/memccpy.c10
-rw-r--r--lib/libc/string/strcoll.c7
-rw-r--r--lib/libc/string/strdup.c7
-rw-r--r--lib/libc/string/strmode.c8
-rw-r--r--lib/libc/string/strncat.c9
-rw-r--r--lib/libc/string/strsignal.c7
-rw-r--r--lib/libc/string/strtok_r.c9
-rw-r--r--lib/libc/string/strxfrm.c9
-rw-r--r--lib/libc/string/wcscat.c8
-rw-r--r--lib/libc/string/wcscmp.c7
-rw-r--r--lib/libc/string/wcscpy.c8
-rw-r--r--lib/libc/string/wcslcat.c9
-rw-r--r--lib/libc/string/wcslcpy.c9
-rw-r--r--lib/libc/string/wcslen.c7
-rw-r--r--lib/libc/string/wcsncat.c9
-rw-r--r--lib/libc/string/wcsncmp.c8
-rw-r--r--lib/libc/string/wcsncpy.c9
-rw-r--r--lib/libc/string/wcsrchr.c8
-rw-r--r--lib/libc/string/wcsstr.c10
-rw-r--r--lib/libc/string/wcstok.c10
-rw-r--r--lib/libc/string/wmemchr.c9
-rw-r--r--lib/libc/string/wmemcmp.c9
-rw-r--r--lib/libc/string/wmemcpy.c9
-rw-r--r--lib/libc/string/wmemmove.c9
-rw-r--r--lib/libc/string/wmemset.c9
26 files changed, 82 insertions, 148 deletions
diff --git a/lib/libc/string/bm.c b/lib/libc/string/bm.c
index e38fe7db6c5..aa60bead7b1 100644
--- a/lib/libc/string/bm.c
+++ b/lib/libc/string/bm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bm.c,v 1.11 2003/08/07 16:43:47 agc Exp $ */
+/* $NetBSD: bm.c,v 1.12 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c) 1994
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)bm.c 8.7 (Berkeley) 6/21/94";
#else
-__RCSID("$NetBSD: bm.c,v 1.11 2003/08/07 16:43:47 agc Exp $");
+__RCSID("$NetBSD: bm.c,v 1.12 2012/06/25 22:32:46 abs Exp $");
#endif
#endif /* LIBC_SCCS && not lint */
@@ -100,10 +100,7 @@ static u_char const freq_def[256] = {
};
bm_pat *
-bm_comp(pb, len, freq)
- u_char const *pb;
- size_t len;
- u_char const *freq;
+bm_comp(u_char const *pb, size_t len, u_char const *freq)
{
u_char const *pe, *p;
size_t *d, r;
@@ -160,8 +157,7 @@ mem: sv_errno = errno;
}
void
-bm_free(pat)
- bm_pat *pat;
+bm_free(bm_pat *pat)
{
_DIAGASSERT(pat != NULL);
@@ -174,10 +170,7 @@ bm_free(pat)
}
u_char *
-bm_exec(pat, base, n)
- bm_pat *pat;
- u_char *base;
- size_t n;
+bm_exec(bm_pat *pat, u_char *base, size_t n)
{
u_char *e, *ep, *p, *q, *s;
size_t *d0, k, md2, n1, ro;
diff --git a/lib/libc/string/memccpy.c b/lib/libc/string/memccpy.c
index 55696920026..c0862416110 100644
--- a/lib/libc/string/memccpy.c
+++ b/lib/libc/string/memccpy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: memccpy.c,v 1.12 2003/08/07 16:43:48 agc Exp $ */
+/* $NetBSD: memccpy.c,v 1.13 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)memccpy.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: memccpy.c,v 1.12 2003/08/07 16:43:48 agc Exp $");
+__RCSID("$NetBSD: memccpy.c,v 1.13 2012/06/25 22:32:46 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -42,11 +42,7 @@ __RCSID("$NetBSD: memccpy.c,v 1.12 2003/08/07 16:43:48 agc Exp $");
#include <string.h>
void *
-memccpy(t, f, c, n)
- void *t;
- const void *f;
- int c;
- size_t n;
+memccpy(void *t, const void *f, int c, size_t n)
{
_DIAGASSERT(t != 0);
diff --git a/lib/libc/string/strcoll.c b/lib/libc/string/strcoll.c
index 1feda446a5a..77a09425042 100644
--- a/lib/libc/string/strcoll.c
+++ b/lib/libc/string/strcoll.c
@@ -1,4 +1,4 @@
-/* $NetBSD: strcoll.c,v 1.9 2003/08/07 16:43:50 agc Exp $ */
+/* $NetBSD: strcoll.c,v 1.10 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)strcoll.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: strcoll.c,v 1.9 2003/08/07 16:43:50 agc Exp $");
+__RCSID("$NetBSD: strcoll.c,v 1.10 2012/06/25 22:32:46 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -48,8 +48,7 @@ __RCSID("$NetBSD: strcoll.c,v 1.9 2003/08/07 16:43:50 agc Exp $");
* Compare strings according to LC_COLLATE category of current locale.
*/
int
-strcoll(s1, s2)
- const char *s1, *s2;
+strcoll(const char *s1, const char *s2)
{
_DIAGASSERT(s1 != NULL);
diff --git a/lib/libc/string/strdup.c b/lib/libc/string/strdup.c
index b56e2724426..d07d876ad9f 100644
--- a/lib/libc/string/strdup.c
+++ b/lib/libc/string/strdup.c
@@ -1,4 +1,4 @@
-/* $NetBSD: strdup.c,v 1.13 2003/08/07 16:43:50 agc Exp $ */
+/* $NetBSD: strdup.c,v 1.14 2012/06/25 22:32:46 abs Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)strdup.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: strdup.c,v 1.13 2003/08/07 16:43:50 agc Exp $");
+__RCSID("$NetBSD: strdup.c,v 1.14 2012/06/25 22:32:46 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -50,8 +50,7 @@ __weak_alias(strdup,_strdup)
#endif
char *
-strdup(str)
- const char *str;
+strdup(const char *str)
{
size_t len;
char *copy;
diff --git a/lib/libc/string/strmode.c b/lib/libc/string/strmode.c
index 6d7bd1f529d..e7335c86220 100644
--- a/lib/libc/string/strmode.c
+++ b/lib/libc/string/strmode.c
@@ -1,4 +1,4 @@
-/* $NetBSD: strmode.c,v 1.18 2006/10/07 22:04:18 apb Exp $ */
+/* $NetBSD: strmode.c,v 1.19 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)strmode.c 8.3 (Berkeley) 8/15/94";
#else
-__RCSID("$NetBSD: strmode.c,v 1.18 2006/10/07 22:04:18 apb Exp $");
+__RCSID("$NetBSD: strmode.c,v 1.19 2012/06/25 22:32:46 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -51,9 +51,7 @@ __RCSID("$NetBSD: strmode.c,v 1.18 2006/10/07 22:04:18 apb Exp $");
#if !HAVE_STRMODE
void
-strmode(mode, p)
- mode_t mode;
- char *p;
+strmode(mode_t mode, char *p)
{
_DIAGASSERT(p != NULL);
diff --git a/lib/libc/string/strncat.c b/lib/libc/string/strncat.c
index 709fa3074ab..6023d60afbd 100644
--- a/lib/libc/string/strncat.c
+++ b/lib/libc/string/strncat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: strncat.c,v 1.11 2007/06/03 17:39:27 christos Exp $ */
+/* $NetBSD: strncat.c,v 1.12 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)strncat.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: strncat.c,v 1.11 2007/06/03 17:39:27 christos Exp $");
+__RCSID("$NetBSD: strncat.c,v 1.12 2012/06/25 22:32:46 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -53,10 +53,7 @@ __RCSID("$NetBSD: strncat.c,v 1.11 2007/06/03 17:39:27 christos Exp $");
* are written at dst (at most n+1 bytes being appended). Return dst.
*/
char *
-strncat(dst, src, n)
- char *dst;
- const char *src;
- size_t n;
+strncat(char *dst, const char *src, size_t n)
{
_DIAGASSERT(dst != NULL);
diff --git a/lib/libc/string/strsignal.c b/lib/libc/string/strsignal.c
index c0a95cef25e..1bc7b9f0a15 100644
--- a/lib/libc/string/strsignal.c
+++ b/lib/libc/string/strsignal.c
@@ -1,4 +1,4 @@
-/* $NetBSD: strsignal.c,v 1.14 2009/07/22 19:48:27 kleink Exp $ */
+/* $NetBSD: strsignal.c,v 1.15 2012/06/25 22:32:46 abs Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
@@ -34,7 +34,7 @@
#if 0
static char *sccsid = "@(#)strerror.c 5.6 (Berkeley) 5/4/91";
#else
-__RCSID("$NetBSD: strsignal.c,v 1.14 2009/07/22 19:48:27 kleink Exp $");
+__RCSID("$NetBSD: strsignal.c,v 1.15 2012/06/25 22:32:46 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -48,8 +48,7 @@ __weak_alias(strsignal,_strsignal)
#endif
__aconst char *
-strsignal(sig)
- int sig;
+strsignal(int sig)
{
static char buf[NL_TEXTMAX];
diff --git a/lib/libc/string/strtok_r.c b/lib/libc/string/strtok_r.c
index 88065f2d840..9ed168b5ca0 100644
--- a/lib/libc/string/strtok_r.c
+++ b/lib/libc/string/strtok_r.c
@@ -1,4 +1,4 @@
-/* $NetBSD: strtok_r.c,v 1.9 2003/08/07 16:43:53 agc Exp $ */
+/* $NetBSD: strtok_r.c,v 1.10 2012/06/25 22:32:46 abs Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
@@ -34,7 +34,7 @@
#if 0
static char *sccsid = "@(#)strtok.c 5.8 (Berkeley) 2/24/91";
#else
-__RCSID("$NetBSD: strtok_r.c,v 1.9 2003/08/07 16:43:53 agc Exp $");
+__RCSID("$NetBSD: strtok_r.c,v 1.10 2012/06/25 22:32:46 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -48,10 +48,7 @@ __weak_alias(strtok_r,_strtok_r)
#endif
char *
-strtok_r(s, delim, lasts)
- char *s;
- const char *delim;
- char **lasts;
+strtok_r(char *s, const char *delim, char **lasts)
{
const char *spanp;
int c, sc;
diff --git a/lib/libc/string/strxfrm.c b/lib/libc/string/strxfrm.c
index 4e25cf81037..42c2a244b90 100644
--- a/lib/libc/string/strxfrm.c
+++ b/lib/libc/string/strxfrm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: strxfrm.c,v 1.11 2003/08/07 16:43:53 agc Exp $ */
+/* $NetBSD: strxfrm.c,v 1.12 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)strxfrm.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: strxfrm.c,v 1.11 2003/08/07 16:43:53 agc Exp $");
+__RCSID("$NetBSD: strxfrm.c,v 1.12 2012/06/25 22:32:46 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -50,10 +50,7 @@ __RCSID("$NetBSD: strxfrm.c,v 1.11 2003/08/07 16:43:53 agc Exp $");
* on the original untransformed strings would return.
*/
size_t
-strxfrm(dst, src, n)
- char *dst;
- const char *src;
- size_t n;
+strxfrm(char *dst, const char *src, size_t n)
{
size_t srclen, copysize;
diff --git a/lib/libc/string/wcscat.c b/lib/libc/string/wcscat.c
index d3e6eb8f250..61ad4ea3cc0 100644
--- a/lib/libc/string/wcscat.c
+++ b/lib/libc/string/wcscat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wcscat.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */
+/* $NetBSD: wcscat.c,v 1.3 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -30,16 +30,14 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wcscat.c,v 1.2 2001/01/03 14:29:36 lukem Exp $");
+__RCSID("$NetBSD: wcscat.c,v 1.3 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
#include <wchar.h>
wchar_t *
-wcscat(s1, s2)
- wchar_t *s1;
- const wchar_t *s2;
+wcscat(wchar_t *s1, const wchar_t *s2)
{
wchar_t *p;
wchar_t *q;
diff --git a/lib/libc/string/wcscmp.c b/lib/libc/string/wcscmp.c
index deb870dbe68..5cd31b0658d 100644
--- a/lib/libc/string/wcscmp.c
+++ b/lib/libc/string/wcscmp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wcscmp.c,v 1.8 2009/01/11 02:46:30 christos Exp $ */
+/* $NetBSD: wcscmp.c,v 1.9 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)strcmp.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: wcscmp.c,v 1.8 2009/01/11 02:46:30 christos Exp $");
+__RCSID("$NetBSD: wcscmp.c,v 1.9 2012/06/25 22:32:46 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -49,8 +49,7 @@ __RCSID("$NetBSD: wcscmp.c,v 1.8 2009/01/11 02:46:30 christos Exp $");
* Compare strings.
*/
int
-wcscmp(s1, s2)
- const wchar_t *s1, *s2;
+wcscmp(const wchar_t *s1, const wchar_t *s2)
{
_DIAGASSERT(s1 != NULL);
diff --git a/lib/libc/string/wcscpy.c b/lib/libc/string/wcscpy.c
index aabb6d667c1..292554da996 100644
--- a/lib/libc/string/wcscpy.c
+++ b/lib/libc/string/wcscpy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wcscpy.c,v 1.3 2005/10/13 21:13:05 tnozaki Exp $ */
+/* $NetBSD: wcscpy.c,v 1.4 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -30,16 +30,14 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wcscpy.c,v 1.3 2005/10/13 21:13:05 tnozaki Exp $");
+__RCSID("$NetBSD: wcscpy.c,v 1.4 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
#include <wchar.h>
wchar_t *
-wcscpy(s1, s2)
- wchar_t *s1;
- const wchar_t *s2;
+wcscpy(wchar_t *s1, const wchar_t *s2)
{
wchar_t *p;
diff --git a/lib/libc/string/wcslcat.c b/lib/libc/string/wcslcat.c
index a6d05e747b2..a62a9c17ada 100644
--- a/lib/libc/string/wcslcat.c
+++ b/lib/libc/string/wcslcat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wcslcat.c,v 1.2 2001/01/03 14:33:02 lukem Exp $ */
+/* $NetBSD: wcslcat.c,v 1.3 2012/06/25 22:32:46 abs Exp $ */
/* from OpenBSD: strlcat.c,v 1.3 2000/11/24 11:10:02 itojun Exp */
/*
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wcslcat.c,v 1.2 2001/01/03 14:33:02 lukem Exp $");
+__RCSID("$NetBSD: wcslcat.c,v 1.3 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -45,10 +45,7 @@ __RCSID("$NetBSD: wcslcat.c,v 1.2 2001/01/03 14:33:02 lukem Exp $");
* truncation occurred.
*/
size_t
-wcslcat(dst, src, siz)
- wchar_t *dst;
- const wchar_t *src;
- size_t siz;
+wcslcat(wchar_t *dst, const wchar_t *src, size_t siz)
{
wchar_t *d = dst;
const wchar_t *s = src;
diff --git a/lib/libc/string/wcslcpy.c b/lib/libc/string/wcslcpy.c
index 92c857d056b..9421ad8245b 100644
--- a/lib/libc/string/wcslcpy.c
+++ b/lib/libc/string/wcslcpy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wcslcpy.c,v 1.2 2001/01/03 14:33:02 lukem Exp $ */
+/* $NetBSD: wcslcpy.c,v 1.3 2012/06/25 22:32:46 abs Exp $ */
/* from OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp */
/*
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wcslcpy.c,v 1.2 2001/01/03 14:33:02 lukem Exp $");
+__RCSID("$NetBSD: wcslcpy.c,v 1.3 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -43,10 +43,7 @@ __RCSID("$NetBSD: wcslcpy.c,v 1.2 2001/01/03 14:33:02 lukem Exp $");
* Returns wcslen(src); if retval >= siz, truncation occurred.
*/
size_t
-wcslcpy(dst, src, siz)
- wchar_t *dst;
- const wchar_t *src;
- size_t siz;
+wcslcpy(wchar_t *dst, const wchar_t *src, size_t siz)
{
wchar_t *d = dst;
const wchar_t *s = src;
diff --git a/lib/libc/string/wcslen.c b/lib/libc/string/wcslen.c
index c62c4594107..703d6ec411c 100644
--- a/lib/libc/string/wcslen.c
+++ b/lib/libc/string/wcslen.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wcslen.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */
+/* $NetBSD: wcslen.c,v 1.3 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -30,15 +30,14 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wcslen.c,v 1.2 2001/01/03 14:29:36 lukem Exp $");
+__RCSID("$NetBSD: wcslen.c,v 1.3 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
#include <wchar.h>
size_t
-wcslen(s)
- const wchar_t *s;
+wcslen(const wchar_t *s)
{
const wchar_t *p;
diff --git a/lib/libc/string/wcsncat.c b/lib/libc/string/wcsncat.c
index 1fdca11645e..e76421f3200 100644
--- a/lib/libc/string/wcsncat.c
+++ b/lib/libc/string/wcsncat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wcsncat.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */
+/* $NetBSD: wcsncat.c,v 1.3 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -30,17 +30,14 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wcsncat.c,v 1.2 2001/01/03 14:29:36 lukem Exp $");
+__RCSID("$NetBSD: wcsncat.c,v 1.3 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
#include <wchar.h>
wchar_t *
-wcsncat(s1, s2, n)
- wchar_t *s1;
- const wchar_t *s2;
- size_t n;
+wcsncat(wchar_t *s1, const wchar_t *s2, size_t n)
{
wchar_t *p;
wchar_t *q;
diff --git a/lib/libc/string/wcsncmp.c b/lib/libc/string/wcsncmp.c
index eec477f419e..9703ddaaf41 100644
--- a/lib/libc/string/wcsncmp.c
+++ b/lib/libc/string/wcsncmp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wcsncmp.c,v 1.8 2009/01/11 02:46:30 christos Exp $ */
+/* $NetBSD: wcsncmp.c,v 1.9 2012/06/25 22:32:46 abs Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)strncmp.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: wcsncmp.c,v 1.8 2009/01/11 02:46:30 christos Exp $");
+__RCSID("$NetBSD: wcsncmp.c,v 1.9 2012/06/25 22:32:46 abs Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -43,9 +43,7 @@ __RCSID("$NetBSD: wcsncmp.c,v 1.8 2009/01/11 02:46:30 christos Exp $");
#include "runetype_local.h"
int
-wcsncmp(s1, s2, n)
- const wchar_t *s1, *s2;
- size_t n;
+wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n)
{
_DIAGASSERT(s1 != NULL);
diff --git a/lib/libc/string/wcsncpy.c b/lib/libc/string/wcsncpy.c
index 978ff48a54f..586f805f229 100644
--- a/lib/libc/string/wcsncpy.c
+++ b/lib/libc/string/wcsncpy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wcsncpy.c,v 1.3 2005/10/13 21:13:05 tnozaki Exp $ */
+/* $NetBSD: wcsncpy.c,v 1.4 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -30,17 +30,14 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wcsncpy.c,v 1.3 2005/10/13 21:13:05 tnozaki Exp $");
+__RCSID("$NetBSD: wcsncpy.c,v 1.4 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
#include <wchar.h>
wchar_t *
-wcsncpy(s1, s2, n)
- wchar_t *s1;
- const wchar_t *s2;
- size_t n;
+wcsncpy(wchar_t *s1, const wchar_t *s2, size_t n)
{
wchar_t *p;
diff --git a/lib/libc/string/wcsrchr.c b/lib/libc/string/wcsrchr.c
index f062cd2a4e8..65fca34c413 100644
--- a/lib/libc/string/wcsrchr.c
+++ b/lib/libc/string/wcsrchr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wcsrchr.c,v 1.3 2005/11/29 03:12:00 christos Exp $ */
+/* $NetBSD: wcsrchr.c,v 1.4 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -30,16 +30,14 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wcsrchr.c,v 1.3 2005/11/29 03:12:00 christos Exp $");
+__RCSID("$NetBSD: wcsrchr.c,v 1.4 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
#include <wchar.h>
wchar_t *
-wcsrchr(s, c)
- const wchar_t *s;
- wchar_t c;
+wcsrchr(const wchar_t *s, wchar_t c)
{
const wchar_t *p;
diff --git a/lib/libc/string/wcsstr.c b/lib/libc/string/wcsstr.c
index b136c4497e8..99ae107ffe8 100644
--- a/lib/libc/string/wcsstr.c
+++ b/lib/libc/string/wcsstr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wcsstr.c,v 1.4 2005/11/29 03:12:00 christos Exp $ */
+/* $NetBSD: wcsstr.c,v 1.5 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wcsstr.c,v 1.4 2005/11/29 03:12:00 christos Exp $");
+__RCSID("$NetBSD: wcsstr.c,v 1.5 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@@ -38,12 +38,10 @@ __RCSID("$NetBSD: wcsstr.c,v 1.4 2005/11/29 03:12:00 christos Exp $");
wchar_t *
#ifdef WCSWCS
-wcswcs(big, little)
+wcswcs(const wchar_t *big, const wchar_t *little)
#else
-wcsstr(big, little)
+wcsstr(const wchar_t *big, const wchar_t *little)
#endif
- const wchar_t *big;
- const wchar_t *little;
{
const wchar_t *p;
const wchar_t *q;
diff --git a/lib/libc/string/wcstok.c b/lib/libc/string/wcstok.c
index ee97cb48f70..7580e677f63 100644
--- a/lib/libc/string/wcstok.c
+++ b/lib/libc/string/wcstok.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wcstok.c,v 1.3 2003/07/10 08:50:48 tshiozak Exp $ */
+/* $NetBSD: wcstok.c,v 1.4 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c) 1998 Softweyr LLC. All rights reserved.
@@ -43,17 +43,15 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wcstok.c,v 1.3 2003/07/10 08:50:48 tshiozak Exp $");
+__RCSID("$NetBSD: wcstok.c,v 1.4 2012/06/25 22:32:46 abs Exp $");
#endif
#include <assert.h>
#include <wchar.h>
wchar_t *
-wcstok(s, delim, last)
- wchar_t * __restrict s;
- const wchar_t * __restrict delim;
- wchar_t ** __restrict last;
+wcstok(wchar_t * __restrict s, const wchar_t * __restrict delim,
+ wchar_t ** __restrict last)
{
const wchar_t *spanp;
wchar_t c, sc;
diff --git a/lib/libc/string/wmemchr.c b/lib/libc/string/wmemchr.c
index 899c1ae588b..72735a7cd49 100644
--- a/lib/libc/string/wmemchr.c
+++ b/lib/libc/string/wmemchr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wmemchr.c,v 1.3 2005/11/29 03:12:00 christos Exp $ */
+/* $NetBSD: wmemchr.c,v 1.4 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -30,17 +30,14 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wmemchr.c,v 1.3 2005/11/29 03:12:00 christos Exp $");
+__RCSID("$NetBSD: wmemchr.c,v 1.4 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
#include <wchar.h>
wchar_t *
-wmemchr(s, c, n)
- const wchar_t *s;
- wchar_t c;
- size_t n;
+wmemchr(const wchar_t *s, wchar_t c, size_t n)
{
size_t i;
diff --git a/lib/libc/string/wmemcmp.c b/lib/libc/string/wmemcmp.c
index d9c6eec4a70..f0055a55656 100644
--- a/lib/libc/string/wmemcmp.c
+++ b/lib/libc/string/wmemcmp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wmemcmp.c,v 1.6 2009/01/11 02:46:30 christos Exp $ */
+/* $NetBSD: wmemcmp.c,v 1.7 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wmemcmp.c,v 1.6 2009/01/11 02:46:30 christos Exp $");
+__RCSID("$NetBSD: wmemcmp.c,v 1.7 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@@ -38,10 +38,7 @@ __RCSID("$NetBSD: wmemcmp.c,v 1.6 2009/01/11 02:46:30 christos Exp $");
#include "runetype_local.h"
int
-wmemcmp(s1, s2, n)
- const wchar_t *s1;
- const wchar_t *s2;
- size_t n;
+wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n)
{
size_t i;
diff --git a/lib/libc/string/wmemcpy.c b/lib/libc/string/wmemcpy.c
index 07a3f6f2e60..b648fb886aa 100644
--- a/lib/libc/string/wmemcpy.c
+++ b/lib/libc/string/wmemcpy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wmemcpy.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
+/* $NetBSD: wmemcpy.c,v 1.3 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wmemcpy.c,v 1.2 2001/01/03 14:29:37 lukem Exp $");
+__RCSID("$NetBSD: wmemcpy.c,v 1.3 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@@ -38,10 +38,7 @@ __RCSID("$NetBSD: wmemcpy.c,v 1.2 2001/01/03 14:29:37 lukem Exp $");
#include <wchar.h>
wchar_t *
-wmemcpy(d, s, n)
- wchar_t *d;
- const wchar_t *s;
- size_t n;
+wmemcpy(wchar_t *d, const wchar_t *s, size_t n)
{
_DIAGASSERT(d != NULL);
diff --git a/lib/libc/string/wmemmove.c b/lib/libc/string/wmemmove.c
index d193e69194c..e057467696e 100644
--- a/lib/libc/string/wmemmove.c
+++ b/lib/libc/string/wmemmove.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wmemmove.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
+/* $NetBSD: wmemmove.c,v 1.3 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wmemmove.c,v 1.2 2001/01/03 14:29:37 lukem Exp $");
+__RCSID("$NetBSD: wmemmove.c,v 1.3 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@@ -38,10 +38,7 @@ __RCSID("$NetBSD: wmemmove.c,v 1.2 2001/01/03 14:29:37 lukem Exp $");
#include <wchar.h>
wchar_t *
-wmemmove(d, s, n)
- wchar_t *d;
- const wchar_t *s;
- size_t n;
+wmemmove(wchar_t *d, const wchar_t *s, size_t n)
{
_DIAGASSERT(d != NULL);
diff --git a/lib/libc/string/wmemset.c b/lib/libc/string/wmemset.c
index c35e1d4953a..597da33ad2f 100644
--- a/lib/libc/string/wmemset.c
+++ b/lib/libc/string/wmemset.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wmemset.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
+/* $NetBSD: wmemset.c,v 1.3 2012/06/25 22:32:46 abs Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -30,17 +30,14 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wmemset.c,v 1.2 2001/01/03 14:29:37 lukem Exp $");
+__RCSID("$NetBSD: wmemset.c,v 1.3 2012/06/25 22:32:46 abs Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
#include <wchar.h>
wchar_t *
-wmemset(s, c, n)
- wchar_t *s;
- wchar_t c;
- size_t n;
+wmemset(wchar_t *s, wchar_t c, size_t n)
{
size_t i;
wchar_t *p;