summaryrefslogtreecommitdiffstats
path: root/lib/libc/string
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2003-06-11 21:08:16 +0000
committerderaadt <deraadt@openbsd.org>2003-06-11 21:08:16 +0000
commit86b54bb2dc6aec91522eca6d443b842bd4bd9342 (patch)
tree0e00cbd0851694ae7a727106329ae79a5c5bec59 /lib/libc/string
parentoops (diff)
downloadwireguard-openbsd-86b54bb2dc6aec91522eca6d443b842bd4bd9342.tar.xz
wireguard-openbsd-86b54bb2dc6aec91522eca6d443b842bd4bd9342.zip
ansification; pval ok
Diffstat (limited to 'lib/libc/string')
-rw-r--r--lib/libc/string/bzero.c8
-rw-r--r--lib/libc/string/ffs.c11
-rw-r--r--lib/libc/string/memchr.c7
-rw-r--r--lib/libc/string/memcmp.c8
-rw-r--r--lib/libc/string/memset.c9
-rw-r--r--lib/libc/string/rindex.c4
-rw-r--r--lib/libc/string/strcasecmp.c23
-rw-r--r--lib/libc/string/strcmp.c5
-rw-r--r--lib/libc/string/strcspn.c10
-rw-r--r--lib/libc/string/strdup.c7
-rw-r--r--lib/libc/string/strerror.c5
-rw-r--r--lib/libc/string/strlen.c7
-rw-r--r--lib/libc/string/strmode.c8
-rw-r--r--lib/libc/string/strncat.c11
-rw-r--r--lib/libc/string/strncmp.c6
-rw-r--r--lib/libc/string/strncpy.c11
-rw-r--r--lib/libc/string/strpbrk.c9
-rw-r--r--lib/libc/string/strsep.c14
-rw-r--r--lib/libc/string/strsignal.c6
-rw-r--r--lib/libc/string/strstr.c9
-rw-r--r--lib/libc/string/strtok.c15
-rw-r--r--lib/libc/string/strxfrm.c11
-rw-r--r--lib/libc/string/swab.c7
23 files changed, 84 insertions, 127 deletions
diff --git a/lib/libc/string/bzero.c b/lib/libc/string/bzero.c
index 20a6a53808c..7e557ecd4a8 100644
--- a/lib/libc/string/bzero.c
+++ b/lib/libc/string/bzero.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: bzero.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: bzero.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#ifndef _KERNEL
@@ -41,11 +41,9 @@ static char *rcsid = "$OpenBSD: bzero.c,v 1.4 2003/06/02 20:18:38 millert Exp $"
* bzero -- vax movc5 instruction
*/
void
-bzero(b, length)
- void *b;
- register size_t length;
+bzero(void *b, size_t length)
{
- register char *p;
+ char *p;
for (p = b; length--;)
*p++ = '\0';
diff --git a/lib/libc/string/ffs.c b/lib/libc/string/ffs.c
index 887ce437d47..f1d14096a20 100644
--- a/lib/libc/string/ffs.c
+++ b/lib/libc/string/ffs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs.c,v 1.5 2000/07/02 03:10:38 mickey Exp $ */
+/* $OpenBSD: ffs.c,v 1.6 2003/06/11 21:08:16 deraadt Exp $ */
/*
* Public domain.
@@ -6,7 +6,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: ffs.c,v 1.5 2000/07/02 03:10:38 mickey Exp $";
+static char *rcsid = "$OpenBSD: ffs.c,v 1.6 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#if !defined(_KERNEL) && !defined(_STANDALONE)
@@ -19,11 +19,10 @@ static char *rcsid = "$OpenBSD: ffs.c,v 1.5 2000/07/02 03:10:38 mickey Exp $";
* ffs -- vax ffs instruction
*/
int
-ffs(mask)
- register int mask;
+ffs(int mask)
{
- register int bit;
- register unsigned int r = mask;
+ int bit;
+ unsigned int r = mask;
static const signed char t[16] = {
-28, 1, 2, 1,
3, 1, 2, 1,
diff --git a/lib/libc/string/memchr.c b/lib/libc/string/memchr.c
index 9a294dff420..454abcbc17f 100644
--- a/lib/libc/string/memchr.c
+++ b/lib/libc/string/memchr.c
@@ -31,16 +31,13 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: memchr.c,v 1.5 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: memchr.c,v 1.6 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
void *
-memchr(s, c, n)
- const void *s;
- int c;
- size_t n;
+memchr(const void *s, int c, size_t n)
{
if (n != 0) {
const unsigned char *p = s;
diff --git a/lib/libc/string/memcmp.c b/lib/libc/string/memcmp.c
index 4897001e74b..6c83208a7b4 100644
--- a/lib/libc/string/memcmp.c
+++ b/lib/libc/string/memcmp.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: memcmp.c,v 1.3 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: memcmp.c,v 1.4 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -40,12 +40,10 @@ static char *rcsid = "$OpenBSD: memcmp.c,v 1.3 2003/06/02 20:18:38 millert Exp $
* Compare memory regions.
*/
int
-memcmp(s1, s2, n)
- const void *s1, *s2;
- size_t n;
+memcmp(const void *s1, const void *s2, size_t n)
{
if (n != 0) {
- register const unsigned char *p1 = s1, *p2 = s2;
+ const unsigned char *p1 = s1, *p2 = s2;
do {
if (*p1++ != *p2++)
diff --git a/lib/libc/string/memset.c b/lib/libc/string/memset.c
index 161a4990025..9bc0556faa4 100644
--- a/lib/libc/string/memset.c
+++ b/lib/libc/string/memset.c
@@ -31,20 +31,17 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: memset.c,v 1.3 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: memset.c,v 1.4 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
void *
-memset(dst, c, n)
- void *dst;
- register int c;
- register size_t n;
+memset(void *dst, int c, size_t n)
{
if (n != 0) {
- register char *d = dst;
+ char *d = dst;
do
*d++ = c;
diff --git a/lib/libc/string/rindex.c b/lib/libc/string/rindex.c
index 317962fdd65..b880d0eaeba 100644
--- a/lib/libc/string/rindex.c
+++ b/lib/libc/string/rindex.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: rindex.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: rindex.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -40,7 +40,7 @@ strrchr(const char *p, int ch)
rindex(const char *p, int ch)
#endif
{
- register char *save;
+ char *save;
for (save = NULL;; ++p) {
if (*p == ch)
diff --git a/lib/libc/string/strcasecmp.c b/lib/libc/string/strcasecmp.c
index f2ad06a726e..62da0634445 100644
--- a/lib/libc/string/strcasecmp.c
+++ b/lib/libc/string/strcasecmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strcasecmp.c,v 1.4 2003/06/02 20:18:38 millert Exp $ */
+/* $OpenBSD: strcasecmp.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -35,7 +35,7 @@
#if 0
static char sccsid[] = "@(#)strcasecmp.c 8.1 (Berkeley) 6/4/93";
#else
-static char *rcsid = "$OpenBSD: strcasecmp.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strcasecmp.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -82,12 +82,11 @@ static const u_char charmap[] = {
};
int
-strcasecmp(s1, s2)
- const char *s1, *s2;
+strcasecmp(const char *s1, const char *s2)
{
- register const u_char *cm = charmap,
- *us1 = (const u_char *)s1,
- *us2 = (const u_char *)s2;
+ const u_char *cm = charmap;
+ const u_char *us1 = (const u_char *)s1;
+ const u_char *us2 = (const u_char *)s2;
while (cm[*us1] == cm[*us2++])
if (*us1++ == '\0')
@@ -96,14 +95,12 @@ strcasecmp(s1, s2)
}
int
-strncasecmp(s1, s2, n)
- const char *s1, *s2;
- register size_t n;
+strncasecmp(const char *s1, const char *s2, size_t n)
{
if (n != 0) {
- register const u_char *cm = charmap,
- *us1 = (const u_char *)s1,
- *us2 = (const u_char *)s2;
+ const u_char *cm = charmap;
+ const u_char *us1 = (const u_char *)s1;
+ const u_char *us2 = (const u_char *)s2;
do {
if (cm[*us1] != cm[*us2++])
diff --git a/lib/libc/string/strcmp.c b/lib/libc/string/strcmp.c
index 082561f7ff5..9bda0a8d756 100644
--- a/lib/libc/string/strcmp.c
+++ b/lib/libc/string/strcmp.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strcmp.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strcmp.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#ifndef _KERNEL
@@ -44,8 +44,7 @@ static char *rcsid = "$OpenBSD: strcmp.c,v 1.4 2003/06/02 20:18:38 millert Exp $
* Compare strings.
*/
int
-strcmp(s1, s2)
- register const char *s1, *s2;
+strcmp(const char *s1, const char *s2)
{
while (*s1 == *s2++)
if (*s1++ == 0)
diff --git a/lib/libc/string/strcspn.c b/lib/libc/string/strcspn.c
index d6aa0994237..f96f9038097 100644
--- a/lib/libc/string/strcspn.c
+++ b/lib/libc/string/strcspn.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strcspn.c,v 1.3 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strcspn.c,v 1.4 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -40,12 +40,10 @@ static char *rcsid = "$OpenBSD: strcspn.c,v 1.3 2003/06/02 20:18:38 millert Exp
* Span the complement of string s2.
*/
size_t
-strcspn(s1, s2)
- const char *s1;
- register const char *s2;
+strcspn(const char *s1, const char *s2)
{
- register const char *p, *spanp;
- register char c, sc;
+ const char *p, *spanp;
+ char c, sc;
/*
* Stop as soon as we find any character from s2. Note that there
diff --git a/lib/libc/string/strdup.c b/lib/libc/string/strdup.c
index 0d2e30a5477..bbea59888cf 100644
--- a/lib/libc/string/strdup.c
+++ b/lib/libc/string/strdup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strdup.c,v 1.4 2003/06/02 20:18:38 millert Exp $ */
+/* $OpenBSD: strdup.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -33,7 +33,7 @@
#if 0
static char sccsid[] = "@(#)strdup.c 8.1 (Berkeley) 6/4/93";
#else
-static char *rcsid = "$OpenBSD: strdup.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strdup.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -44,8 +44,7 @@ static char *rcsid = "$OpenBSD: strdup.c,v 1.4 2003/06/02 20:18:38 millert Exp $
#include <string.h>
char *
-strdup(str)
- const char *str;
+strdup(const char *str)
{
size_t siz;
char *copy;
diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c
index 60591c6ee26..6496f50afdd 100644
--- a/lib/libc/string/strerror.c
+++ b/lib/libc/string/strerror.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strerror.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strerror.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -43,8 +43,7 @@ static char *rcsid = "$OpenBSD: strerror.c,v 1.4 2003/06/02 20:18:38 millert Exp
extern char *__strerror(int, char *);
char *
-strerror(num)
- int num;
+strerror(int num)
{
static char buf[NL_TEXTMAX];
return __strerror(num, buf);
diff --git a/lib/libc/string/strlen.c b/lib/libc/string/strlen.c
index b9f3114cc0e..298a9966a34 100644
--- a/lib/libc/string/strlen.c
+++ b/lib/libc/string/strlen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strlen.c,v 1.5 2003/06/02 20:18:38 millert Exp $ */
+/* $OpenBSD: strlen.c,v 1.6 2003/06/11 21:08:16 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -30,7 +30,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strlen.c,v 1.5 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strlen.c,v 1.6 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#if !defined(_KERNEL) && !defined(_STANDALONE)
@@ -40,8 +40,7 @@ static char *rcsid = "$OpenBSD: strlen.c,v 1.5 2003/06/02 20:18:38 millert Exp $
#endif
size_t
-strlen(str)
- const char *str;
+strlen(const char *str)
{
const char *s;
diff --git a/lib/libc/string/strmode.c b/lib/libc/string/strmode.c
index 0c2afb4d4cd..bd78403cb21 100644
--- a/lib/libc/string/strmode.c
+++ b/lib/libc/string/strmode.c
@@ -28,17 +28,17 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strmode.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strmode.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
+/* XXX mode should be mode_t */
+
void
-strmode(mode, p)
- register mode_t mode;
- register char *p;
+strmode(int mode, char *p)
{
/* print type */
switch (mode & S_IFMT) {
diff --git a/lib/libc/string/strncat.c b/lib/libc/string/strncat.c
index fa839663ac5..05d35e0900a 100644
--- a/lib/libc/string/strncat.c
+++ b/lib/libc/string/strncat.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strncat.c,v 1.3 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strncat.c,v 1.4 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -41,14 +41,11 @@ static char *rcsid = "$OpenBSD: strncat.c,v 1.3 2003/06/02 20:18:38 millert Exp
* are written at dst (at most n+1 bytes being appended). Return dst.
*/
char *
-strncat(dst, src, n)
- char *dst;
- const char *src;
- register size_t n;
+strncat(char *dst, const char *src, size_t n)
{
if (n != 0) {
- register char *d = dst;
- register const char *s = src;
+ char *d = dst;
+ const char *s = src;
while (*d != 0)
d++;
diff --git a/lib/libc/string/strncmp.c b/lib/libc/string/strncmp.c
index dad7198647c..82420e215e1 100644
--- a/lib/libc/string/strncmp.c
+++ b/lib/libc/string/strncmp.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strncmp.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strncmp.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#ifndef _KERNEL
@@ -38,9 +38,7 @@ static char *rcsid = "$OpenBSD: strncmp.c,v 1.4 2003/06/02 20:18:38 millert Exp
#endif
int
-strncmp(s1, s2, n)
- register const char *s1, *s2;
- register size_t n;
+strncmp(const char *s1, const char *s2, size_t n)
{
if (n == 0)
diff --git a/lib/libc/string/strncpy.c b/lib/libc/string/strncpy.c
index 20eb7383fe1..00493f4f7f5 100644
--- a/lib/libc/string/strncpy.c
+++ b/lib/libc/string/strncpy.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strncpy.c,v 1.3 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strncpy.c,v 1.4 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -41,14 +41,11 @@ static char *rcsid = "$OpenBSD: strncpy.c,v 1.3 2003/06/02 20:18:38 millert Exp
* Return dst.
*/
char *
-strncpy(dst, src, n)
- char *dst;
- const char *src;
- register size_t n;
+strncpy(char *dst, const char *src, size_t n)
{
if (n != 0) {
- register char *d = dst;
- register const char *s = src;
+ char *d = dst;
+ const char *s = src;
do {
if ((*d++ = *s++) == 0) {
diff --git a/lib/libc/string/strpbrk.c b/lib/libc/string/strpbrk.c
index 520e20de142..024c42bdc3e 100644
--- a/lib/libc/string/strpbrk.c
+++ b/lib/libc/string/strpbrk.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strpbrk.c,v 1.3 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strpbrk.c,v 1.4 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -37,11 +37,10 @@ static char *rcsid = "$OpenBSD: strpbrk.c,v 1.3 2003/06/02 20:18:38 millert Exp
* Find the first occurrence in s1 of a character in s2 (excluding NUL).
*/
char *
-strpbrk(s1, s2)
- register const char *s1, *s2;
+strpbrk(const char *s1, const char *s2)
{
- register const char *scanp;
- register int c, sc;
+ const char *scanp;
+ int c, sc;
while ((c = *s1++) != 0) {
for (scanp = s2; (sc = *scanp++) != 0;)
diff --git a/lib/libc/string/strsep.c b/lib/libc/string/strsep.c
index 2549707fbb3..337d78e466d 100644
--- a/lib/libc/string/strsep.c
+++ b/lib/libc/string/strsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strsep.c,v 1.4 2003/06/02 20:18:38 millert Exp $ */
+/* $OpenBSD: strsep.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -36,7 +36,7 @@
#if 0
static char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93";
#else
-static char *rcsid = "$OpenBSD: strsep.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strsep.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -52,13 +52,11 @@ static char *rcsid = "$OpenBSD: strsep.c,v 1.4 2003/06/02 20:18:38 millert Exp $
* If *stringp is NULL, strsep returns NULL.
*/
char *
-strsep(stringp, delim)
- register char **stringp;
- register const char *delim;
+strsep(char **stringp, const char *delim)
{
- register char *s;
- register const char *spanp;
- register int c, sc;
+ char *s;
+ const char *spanp;
+ int c, sc;
char *tok;
if ((s = *stringp) == NULL)
diff --git a/lib/libc/string/strsignal.c b/lib/libc/string/strsignal.c
index 3a9f5eb16b6..afe0deb272a 100644
--- a/lib/libc/string/strsignal.c
+++ b/lib/libc/string/strsignal.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strsignal.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strsignal.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -37,9 +37,9 @@ static char *rcsid = "$OpenBSD: strsignal.c,v 1.4 2003/06/02 20:18:38 millert Ex
extern char *__strsignal(int, char *);
char *
-strsignal(sig)
- int sig;
+strsignal(int sig)
{
static char buf[NL_TEXTMAX];
+
return __strsignal(sig, buf);
}
diff --git a/lib/libc/string/strstr.c b/lib/libc/string/strstr.c
index 2e71af478c3..e6a94c5ce65 100644
--- a/lib/libc/string/strstr.c
+++ b/lib/libc/string/strstr.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strstr.c,v 1.3 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strstr.c,v 1.4 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -40,11 +40,10 @@ static char *rcsid = "$OpenBSD: strstr.c,v 1.3 2003/06/02 20:18:38 millert Exp $
* Find the first occurrence of find in s.
*/
char *
-strstr(s, find)
- register const char *s, *find;
+strstr(const char *s, const char *find)
{
- register char c, sc;
- register size_t len;
+ char c, sc;
+ size_t len;
if ((c = *find++) != 0) {
len = strlen(find);
diff --git a/lib/libc/string/strtok.c b/lib/libc/string/strtok.c
index ff096309125..6498eac8cc7 100644
--- a/lib/libc/string/strtok.c
+++ b/lib/libc/string/strtok.c
@@ -28,15 +28,13 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strtok.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strtok.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
char *
-strtok(s, delim)
- register char *s;
- register const char *delim;
+strtok(char *s, const char *delim)
{
static char *last;
@@ -44,13 +42,10 @@ strtok(s, delim)
}
char *
-strtok_r(s, delim, last)
- register char *s;
- register const char *delim;
- char **last;
+strtok_r(char *s, const char *delim, char **last)
{
- register char *spanp;
- register int c, sc;
+ char *spanp;
+ int c, sc;
char *tok;
diff --git a/lib/libc/string/strxfrm.c b/lib/libc/string/strxfrm.c
index 9217ae069c6..b7c8d4822d8 100644
--- a/lib/libc/string/strxfrm.c
+++ b/lib/libc/string/strxfrm.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strxfrm.c,v 1.3 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: strxfrm.c,v 1.4 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <string.h>
@@ -42,13 +42,10 @@ static char *rcsid = "$OpenBSD: strxfrm.c,v 1.3 2003/06/02 20:18:38 millert Exp
* on the original untransformed strings would return.
*/
size_t
-strxfrm(dst, src, n)
- register char *dst;
- register const char *src;
- register size_t n;
+strxfrm(char *dst, const char *src, size_t n)
{
- register size_t r = 0;
- register int c;
+ size_t r = 0;
+ int c;
/*
* Since locales are unimplemented, this is just a copy.
diff --git a/lib/libc/string/swab.c b/lib/libc/string/swab.c
index 05249143617..b928f21aa7c 100644
--- a/lib/libc/string/swab.c
+++ b/lib/libc/string/swab.c
@@ -31,16 +31,13 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: swab.c,v 1.4 2003/06/02 20:18:38 millert Exp $";
+static char *rcsid = "$OpenBSD: swab.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <unistd.h>
void
-swab(from, to, len)
- const void *from;
- void *to;
- size_t len;
+swab(const void *from, void *to, size_t len)
{
register unsigned long temp;
register int n;