diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-06-19 22:12:08 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-06-19 22:12:08 +0000 |
commit | 3957ca90a5622f6255ef6db322a41f7ffdfe46f4 (patch) | |
tree | 185c77bcab59cd8e974a1faf6ffe84dfa1df6509 | |
parent | 2e5c48261179adc15f565023a7520fd314ac0588 (diff) |
K&R -> ANSI
APIWARN
okay millert@, otto@
-rw-r--r-- | lib/libc/string/wcscat.c | 13 | ||||
-rw-r--r-- | lib/libc/string/wcschr.c | 8 | ||||
-rw-r--r-- | lib/libc/string/wcscmp.c | 7 | ||||
-rw-r--r-- | lib/libc/string/wcscpy.c | 13 | ||||
-rw-r--r-- | lib/libc/string/wcscspn.c | 8 | ||||
-rw-r--r-- | lib/libc/string/wcslcat.c | 9 | ||||
-rw-r--r-- | lib/libc/string/wcslcpy.c | 9 | ||||
-rw-r--r-- | lib/libc/string/wcslen.c | 7 | ||||
-rw-r--r-- | lib/libc/string/wcsncat.c | 9 | ||||
-rw-r--r-- | lib/libc/string/wcsncmp.c | 8 | ||||
-rw-r--r-- | lib/libc/string/wcsncpy.c | 9 | ||||
-rw-r--r-- | lib/libc/string/wcspbrk.c | 8 | ||||
-rw-r--r-- | lib/libc/string/wcsrchr.c | 8 | ||||
-rw-r--r-- | lib/libc/string/wcsspn.c | 8 | ||||
-rw-r--r-- | lib/libc/string/wcsstr.c | 10 | ||||
-rw-r--r-- | lib/libc/string/wcstok.c | 10 | ||||
-rw-r--r-- | lib/libc/string/wcswidth.c | 8 | ||||
-rw-r--r-- | lib/libc/string/wmemchr.c | 9 | ||||
-rw-r--r-- | lib/libc/string/wmemcmp.c | 9 | ||||
-rw-r--r-- | lib/libc/string/wmemcpy.c | 9 | ||||
-rw-r--r-- | lib/libc/string/wmemmove.c | 9 | ||||
-rw-r--r-- | lib/libc/string/wmemset.c | 11 |
22 files changed, 79 insertions, 120 deletions
diff --git a/lib/libc/string/wcscat.c b/lib/libc/string/wcscat.c index 69c8c0c2516..80de3f0d5ec 100644 --- a/lib/libc/string/wcscat.c +++ b/lib/libc/string/wcscat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcscat.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcscat.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcscat.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */ /*- @@ -30,15 +30,18 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcscat.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcscat.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> +#if defined(APIWARN) +__warn_references(wcscat, + "warning: wcscat() is almost always misused, please use wcslcat()"); +#endif + 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/wcschr.c b/lib/libc/string/wcschr.c index eb4e65a85d1..80861225174 100644 --- a/lib/libc/string/wcschr.c +++ b/lib/libc/string/wcschr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcschr.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcschr.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcschr.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */ /*- @@ -30,15 +30,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcschr.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcschr.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> wchar_t * -wcschr(s, c) - const wchar_t *s; - wchar_t c; +wcschr(const wchar_t *s, wchar_t c) { const wchar_t *p; diff --git a/lib/libc/string/wcscmp.c b/lib/libc/string/wcscmp.c index 0f0dc0efdf9..d8a9aa73fb1 100644 --- a/lib/libc/string/wcscmp.c +++ b/lib/libc/string/wcscmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcscmp.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcscmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcscmp.c,v 1.5 2003/08/07 16:43:54 agc Exp $ */ /*- @@ -34,7 +34,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcscmp.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcscmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> @@ -44,8 +44,7 @@ static char *rcsid = "$OpenBSD: wcscmp.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; * Compare strings. */ int -wcscmp(s1, s2) - const wchar_t *s1, *s2; +wcscmp(const wchar_t *s1, const wchar_t *s2) { while (*s1 == *s2++) diff --git a/lib/libc/string/wcscpy.c b/lib/libc/string/wcscpy.c index 266ea4a3df3..e5bf8b0dbf3 100644 --- a/lib/libc/string/wcscpy.c +++ b/lib/libc/string/wcscpy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcscpy.c,v 1.2 2005/04/16 10:40:45 tom Exp $ */ +/* $OpenBSD: wcscpy.c,v 1.3 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcscpy.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */ /*- @@ -30,15 +30,18 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcscpy.c,v 1.2 2005/04/16 10:40:45 tom Exp $"; +static char *rcsid = "$OpenBSD: wcscpy.c,v 1.3 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> +#if defined(APIWARN) +__warn_references(wcscpy, + "warning: wcscpy() is almost always misused, please use wcslcpy()"); +#endif + wchar_t * -wcscpy(s1, s2) - wchar_t *s1; - const wchar_t *s2; +wcscpy(wchar_t *s1, const wchar_t *s2) { wchar_t *p; const wchar_t *q; diff --git a/lib/libc/string/wcscspn.c b/lib/libc/string/wcscspn.c index 905c9376957..59a95101560 100644 --- a/lib/libc/string/wcscspn.c +++ b/lib/libc/string/wcscspn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcscspn.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcscspn.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcscspn.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */ /*- @@ -30,15 +30,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcscspn.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcscspn.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> size_t -wcscspn(s, set) - const wchar_t *s; - const wchar_t *set; +wcscspn(const wchar_t *s, const wchar_t *set) { const wchar_t *p; const wchar_t *q; diff --git a/lib/libc/string/wcslcat.c b/lib/libc/string/wcslcat.c index 266d012ad41..e74d52f4ebb 100644 --- a/lib/libc/string/wcslcat.c +++ b/lib/libc/string/wcslcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcslcat.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcslcat.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcslcat.c,v 1.2 2001/01/03 14:33:02 lukem Exp $ */ /* from OpenBSD: strlcat.c,v 1.3 2000/11/24 11:10:02 itojun Exp */ @@ -30,7 +30,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcslcat.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcslcat.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -44,10 +44,7 @@ static char *rcsid = "$OpenBSD: wcslcat.c,v 1.1 2005/04/13 16:35:58 espie 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 101161e9ced..a6acb80d580 100644 --- a/lib/libc/string/wcslcpy.c +++ b/lib/libc/string/wcslcpy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcslcpy.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcslcpy.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcslcpy.c,v 1.2 2001/01/03 14:33:02 lukem Exp $ */ /* from OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp */ @@ -30,7 +30,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcslcpy.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcslcpy.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -42,10 +42,7 @@ static char *rcsid = "$OpenBSD: wcslcpy.c,v 1.1 2005/04/13 16:35:58 espie 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 6d1c5e5f30f..8bd5b5d07f3 100644 --- a/lib/libc/string/wcslen.c +++ b/lib/libc/string/wcslen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcslen.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcslen.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcslen.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */ /*- @@ -30,14 +30,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcslen.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcslen.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #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 984ef4cabbb..b8e000c864f 100644 --- a/lib/libc/string/wcsncat.c +++ b/lib/libc/string/wcsncat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcsncat.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcsncat.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcsncat.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */ /*- @@ -30,16 +30,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcsncat.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcsncat.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #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 e89b7914d14..aaa96b97a6c 100644 --- a/lib/libc/string/wcsncmp.c +++ b/lib/libc/string/wcsncmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcsncmp.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcsncmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcsncmp.c,v 1.5 2003/08/07 16:43:54 agc Exp $ */ /* @@ -31,16 +31,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcsncmp.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcsncmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> #include "locale/runetype.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) { if (n == 0) diff --git a/lib/libc/string/wcsncpy.c b/lib/libc/string/wcsncpy.c index aa7bf95919c..2bf020e2681 100644 --- a/lib/libc/string/wcsncpy.c +++ b/lib/libc/string/wcsncpy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcsncpy.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcsncpy.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcsncpy.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ /*- @@ -30,16 +30,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcsncpy.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcsncpy.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #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; const wchar_t *q; diff --git a/lib/libc/string/wcspbrk.c b/lib/libc/string/wcspbrk.c index aeaac6ced4f..943057a2e67 100644 --- a/lib/libc/string/wcspbrk.c +++ b/lib/libc/string/wcspbrk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcspbrk.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcspbrk.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcspbrk.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ /*- @@ -30,15 +30,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcspbrk.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcspbrk.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> wchar_t * -wcspbrk(s, set) - const wchar_t *s; - const wchar_t *set; +wcspbrk(const wchar_t *s, const wchar_t *set) { const wchar_t *p; const wchar_t *q; diff --git a/lib/libc/string/wcsrchr.c b/lib/libc/string/wcsrchr.c index d0cd8aebb48..ced0fe3aae7 100644 --- a/lib/libc/string/wcsrchr.c +++ b/lib/libc/string/wcsrchr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcsrchr.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcsrchr.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcsrchr.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ /*- @@ -30,15 +30,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcsrchr.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcsrchr.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #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/wcsspn.c b/lib/libc/string/wcsspn.c index 52b22e3d3bb..80f315f0716 100644 --- a/lib/libc/string/wcsspn.c +++ b/lib/libc/string/wcsspn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcsspn.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcsspn.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcsspn.c,v 1.3 2001/09/21 16:09:15 yamt Exp $ */ /*- @@ -30,15 +30,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcsspn.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcsspn.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> size_t -wcsspn(s, set) - const wchar_t *s; - const wchar_t *set; +wcsspn(const wchar_t *s, const wchar_t *set) { const wchar_t *p; const wchar_t *q; diff --git a/lib/libc/string/wcsstr.c b/lib/libc/string/wcsstr.c index 992b5cab0f6..9f3303004a1 100644 --- a/lib/libc/string/wcsstr.c +++ b/lib/libc/string/wcsstr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcsstr.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcsstr.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcsstr.c,v 1.3 2003/03/05 20:18:17 tshiozak Exp $ */ /*- @@ -30,19 +30,17 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcsstr.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcsstr.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> 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 1b0790fdc62..619aea8acbe 100644 --- a/lib/libc/string/wcstok.c +++ b/lib/libc/string/wcstok.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcstok.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcstok.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcstok.c,v 1.3 2003/07/10 08:50:48 tshiozak Exp $ */ /*- @@ -43,16 +43,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcstok.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcstok.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #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/wcswidth.c b/lib/libc/string/wcswidth.c index c55d9ae72a4..ff6b4e1d3ed 100644 --- a/lib/libc/string/wcswidth.c +++ b/lib/libc/string/wcswidth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wcswidth.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wcswidth.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wcswidth.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ /*- @@ -30,15 +30,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wcswidth.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wcswidth.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> int -wcswidth(s, n) - const wchar_t *s; - size_t n; +wcswidth(const wchar_t *s, size_t n) { int w; diff --git a/lib/libc/string/wmemchr.c b/lib/libc/string/wmemchr.c index 0e502058631..f3b8023c135 100644 --- a/lib/libc/string/wmemchr.c +++ b/lib/libc/string/wmemchr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wmemchr.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wmemchr.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wmemchr.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ /*- @@ -30,16 +30,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wmemchr.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wmemchr.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #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 4792a3b4561..fc021c11d12 100644 --- a/lib/libc/string/wmemcmp.c +++ b/lib/libc/string/wmemcmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wmemcmp.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wmemcmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wmemcmp.c,v 1.3 2003/04/06 18:33:23 tshiozak Exp $ */ /*- @@ -30,17 +30,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wmemcmp.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wmemcmp.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <wchar.h> #include "locale/runetype.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 628795ce41d..6e7e030472d 100644 --- a/lib/libc/string/wmemcpy.c +++ b/lib/libc/string/wmemcpy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wmemcpy.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wmemcpy.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wmemcpy.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ /*- @@ -30,17 +30,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wmemcpy.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wmemcpy.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <string.h> #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) { return (wchar_t *)memcpy(d, s, n * sizeof(wchar_t)); diff --git a/lib/libc/string/wmemmove.c b/lib/libc/string/wmemmove.c index e5a0a1fe257..5de24306567 100644 --- a/lib/libc/string/wmemmove.c +++ b/lib/libc/string/wmemmove.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wmemmove.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wmemmove.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wmemmove.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ /*- @@ -30,17 +30,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wmemmove.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wmemmove.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #include <string.h> #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) { return (wchar_t *)memmove(d, s, n * sizeof(wchar_t)); diff --git a/lib/libc/string/wmemset.c b/lib/libc/string/wmemset.c index abcbe44c466..9db63f05da9 100644 --- a/lib/libc/string/wmemset.c +++ b/lib/libc/string/wmemset.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wmemset.c,v 1.1 2005/04/13 16:35:58 espie Exp $ */ +/* $OpenBSD: wmemset.c,v 1.2 2005/06/19 22:12:07 espie Exp $ */ /* $NetBSD: wmemset.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ /*- @@ -30,21 +30,18 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: wmemset.c,v 1.1 2005/04/13 16:35:58 espie Exp $"; +static char *rcsid = "$OpenBSD: wmemset.c,v 1.2 2005/06/19 22:12:07 espie Exp $"; #endif /* LIBC_SCCS and not lint */ #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; - p = (wchar_t *)s; + p = s; for (i = 0; i < n; i++) { *p = c; p++; |