summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-03-21 18:49:23 +0000
committerobrien <obrien@FreeBSD.org>2002-03-21 18:49:23 +0000
commit1196344bb37334ed0f8808056a53ca058758843c (patch)
tree12b252b7426e8a8904ef257bea10fea6038142f4 /lib/libc
parent8ee1755c8ef3729bb2d3c4bfae2b85b786fdaf70 (diff)
downloadFreeBSD-src-1196344bb37334ed0f8808056a53ca058758843c.zip
FreeBSD-src-1196344bb37334ed0f8808056a53ca058758843c.tar.gz
Remove 'register' keyword.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/alpha/gen/isinf.c4
-rw-r--r--lib/libc/alpha/gen/ldexp.c2
-rw-r--r--lib/libc/db/btree/bt_utils.c10
-rw-r--r--lib/libc/db/hash/hash.c24
-rw-r--r--lib/libc/db/hash/hash_bigkey.c18
-rw-r--r--lib/libc/db/hash/hash_buf.c16
-rw-r--r--lib/libc/db/hash/hash_func.c30
-rw-r--r--lib/libc/db/hash/hash_log2.c4
-rw-r--r--lib/libc/db/hash/hash_page.c58
-rw-r--r--lib/libc/db/recno/rec_search.c6
-rw-r--r--lib/libc/db/test/btree.tests/main.c4
-rw-r--r--lib/libc/db/test/dbtest.c4
-rw-r--r--lib/libc/ia64/gen/isinf.c4
-rw-r--r--lib/libc/ia64/gen/ldexp.c2
-rw-r--r--lib/libc/net/gethostbydns.c14
-rw-r--r--lib/libc/net/gethostbyht.c8
-rw-r--r--lib/libc/net/gethostbynis.c2
-rw-r--r--lib/libc/net/getnetbydns.c6
-rw-r--r--lib/libc/net/getnetbyht.c8
-rw-r--r--lib/libc/net/getnetbynis.c2
-rw-r--r--lib/libc/net/getproto.c6
-rw-r--r--lib/libc/net/getprotoent.c4
-rw-r--r--lib/libc/net/getprotoname.c8
-rw-r--r--lib/libc/net/getservbyname.c6
-rw-r--r--lib/libc/net/getservbyport.c4
-rw-r--r--lib/libc/net/getservent.c2
-rw-r--r--lib/libc/net/herror.c2
-rw-r--r--lib/libc/net/inet_addr.c4
-rw-r--r--lib/libc/net/inet_lnaof.c2
-rw-r--r--lib/libc/net/inet_netof.c2
-rw-r--r--lib/libc/net/inet_network.c8
-rw-r--r--lib/libc/net/ip6opt.c6
-rw-r--r--lib/libc/net/iso_addr.c8
-rw-r--r--lib/libc/net/linkaddr.c18
-rw-r--r--lib/libc/net/name6.c8
-rw-r--r--lib/libc/net/ns_addr.c2
-rw-r--r--lib/libc/net/ns_ntoa.c6
-rw-r--r--lib/libc/net/nsap_addr.c8
-rw-r--r--lib/libc/net/rcmd.c4
-rw-r--r--lib/libc/net/res_init.c8
-rw-r--r--lib/libc/net/res_mkquery.c10
-rw-r--r--lib/libc/net/res_query.c2
-rw-r--r--lib/libc/net/rthdr.c14
-rw-r--r--lib/libc/quad/muldi3.c6
-rw-r--r--lib/libc/quad/qdivrem.c10
-rw-r--r--lib/libc/regex/engine.c156
-rw-r--r--lib/libc/regex/grot/debug.c28
-rw-r--r--lib/libc/regex/grot/main.c22
-rw-r--r--lib/libc/regex/grot/split.c34
-rw-r--r--lib/libc/regex/regcomp.c406
-rw-r--r--lib/libc/regex/regerror.c12
-rw-r--r--lib/libc/regex/regexec.c4
-rw-r--r--lib/libc/regex/regfree.c2
-rw-r--r--lib/libc/rpc/auth_des.c4
-rw-r--r--lib/libc/rpc/authdes_prot.c4
-rw-r--r--lib/libc/rpc/des_crypt.c18
-rw-r--r--lib/libc/rpc/key_call.c2
-rw-r--r--lib/libc/rpc/netnamer.c6
-rw-r--r--lib/libc/rpc/rpc_soc.c4
-rw-r--r--lib/libc/rpc/svc_auth_des.c32
-rw-r--r--lib/libc/sparc64/fpu/fpu_add.c8
-rw-r--r--lib/libc/sparc64/fpu/fpu_compare.c4
-rw-r--r--lib/libc/sparc64/fpu/fpu_div.c8
-rw-r--r--lib/libc/sparc64/fpu/fpu_explode.c34
-rw-r--r--lib/libc/sparc64/fpu/fpu_implode.c42
-rw-r--r--lib/libc/sparc64/fpu/fpu_mul.c8
-rw-r--r--lib/libc/sparc64/fpu/fpu_sqrt.c12
-rw-r--r--lib/libc/sparc64/fpu/fpu_subr.c16
-rw-r--r--lib/libc/sparc64/gen/isinf.c4
-rw-r--r--lib/libc/sparc64/gen/ldexp.c2
-rw-r--r--lib/libc/stdio/fdopen.c2
-rw-r--r--lib/libc/stdio/fgets.c10
-rw-r--r--lib/libc/stdio/flags.c4
-rw-r--r--lib/libc/stdio/fpurge.c2
-rw-r--r--lib/libc/stdio/fputc.c2
-rw-r--r--lib/libc/stdio/fread.c8
-rw-r--r--lib/libc/stdio/fseek.c4
-rw-r--r--lib/libc/stdio/ftell.c10
-rw-r--r--lib/libc/stdio/funopen.c2
-rw-r--r--lib/libc/stdio/fvwrite.c12
-rw-r--r--lib/libc/stdio/gets.c4
-rw-r--r--lib/libc/stdio/makebuf.c8
-rw-r--r--lib/libc/stdio/mktemp.c4
-rw-r--r--lib/libc/stdio/perror.c2
-rw-r--r--lib/libc/stdio/putc.c2
-rw-r--r--lib/libc/stdio/putchar.c2
-rw-r--r--lib/libc/stdio/setbuffer.c2
-rw-r--r--lib/libc/stdio/setvbuf.c8
-rw-r--r--lib/libc/stdio/stdio.c6
-rw-r--r--lib/libc/stdio/vfprintf.c4
-rw-r--r--lib/libc/stdio/vfscanf.c6
-rw-r--r--lib/libc/stdio/wbuf.c6
-rw-r--r--lib/libc/stdio/wsetup.c2
-rw-r--r--lib/libc/stdlib/atexit.c2
-rw-r--r--lib/libc/stdlib/bsearch.c16
-rw-r--r--lib/libc/stdlib/calloc.c6
-rw-r--r--lib/libc/stdlib/exit.c4
-rw-r--r--lib/libc/stdlib/getenv.c10
-rw-r--r--lib/libc/stdlib/getsubopt.c14
-rw-r--r--lib/libc/stdlib/heapsort.c6
-rw-r--r--lib/libc/stdlib/malloc.c2
-rw-r--r--lib/libc/stdlib/merge.c8
-rw-r--r--lib/libc/stdlib/qsort.c6
-rw-r--r--lib/libc/stdlib/radixsort.c16
-rw-r--r--lib/libc/stdlib/random.c22
-rw-r--r--lib/libc/stdlib/setenv.c12
-rw-r--r--lib/libc/stdlib/strhash.c12
-rw-r--r--lib/libc/stdtime/asctime.c4
-rw-r--r--lib/libc/stdtime/localtime.c146
-rw-r--r--lib/libc/string/bcmp.c4
-rw-r--r--lib/libc/string/bcopy.c8
-rw-r--r--lib/libc/string/ffs.c4
-rw-r--r--lib/libc/string/index.c2
-rw-r--r--lib/libc/string/memccpy.c8
-rw-r--r--lib/libc/string/memchr.c6
-rw-r--r--lib/libc/string/memcmp.c2
-rw-r--r--lib/libc/string/memset.c12
-rw-r--r--lib/libc/string/rindex.c6
-rw-r--r--lib/libc/string/strcasecmp.c6
-rw-r--r--lib/libc/string/strcasestr.c6
-rw-r--r--lib/libc/string/strcat.c4
-rw-r--r--lib/libc/string/strcmp.c2
-rw-r--r--lib/libc/string/strcpy.c4
-rw-r--r--lib/libc/string/strcspn.c6
-rw-r--r--lib/libc/string/strlcat.c6
-rw-r--r--lib/libc/string/strlcpy.c6
-rw-r--r--lib/libc/string/strlen.c2
-rw-r--r--lib/libc/string/strmode.c4
-rw-r--r--lib/libc/string/strncat.c6
-rw-r--r--lib/libc/string/strncmp.c4
-rw-r--r--lib/libc/string/strncpy.c6
-rw-r--r--lib/libc/string/strpbrk.c6
-rw-r--r--lib/libc/string/strsep.c10
-rw-r--r--lib/libc/string/strsignal.c4
-rw-r--r--lib/libc/string/strspn.c6
-rw-r--r--lib/libc/string/strstr.c6
-rw-r--r--lib/libc/string/swab.c6
137 files changed, 927 insertions, 879 deletions
diff --git a/lib/libc/alpha/gen/isinf.c b/lib/libc/alpha/gen/isinf.c
index 3ebab1a..663154c 100644
--- a/lib/libc/alpha/gen/isinf.c
+++ b/lib/libc/alpha/gen/isinf.c
@@ -38,7 +38,7 @@ int
isnan(d)
double d;
{
- register struct ieee_double *p = (struct ieee_double *)&d;
+ struct ieee_double *p = (struct ieee_double *)&d;
return (p->dbl_exp == DBL_EXP_INFNAN &&
(p->dbl_frach || p->dbl_fracl));
@@ -48,7 +48,7 @@ int
isinf(d)
double d;
{
- register struct ieee_double *p = (struct ieee_double *)&d;
+ struct ieee_double *p = (struct ieee_double *)&d;
return (p->dbl_exp == DBL_EXP_INFNAN &&
!p->dbl_frach && !p->dbl_fracl);
diff --git a/lib/libc/alpha/gen/ldexp.c b/lib/libc/alpha/gen/ldexp.c
index bbea4f6..78decbb 100644
--- a/lib/libc/alpha/gen/ldexp.c
+++ b/lib/libc/alpha/gen/ldexp.c
@@ -44,7 +44,7 @@ ldexp(val, exp)
double val;
int exp;
{
- register int oldexp, newexp, mulexp;
+ int oldexp, newexp, mulexp;
union doub {
double v;
struct ieee_double s;
diff --git a/lib/libc/db/btree/bt_utils.c b/lib/libc/db/btree/bt_utils.c
index 9c1438e..8bbfade 100644
--- a/lib/libc/db/btree/bt_utils.c
+++ b/lib/libc/db/btree/bt_utils.c
@@ -37,6 +37,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)bt_utils.c 8.8 (Berkeley) 7/20/94";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/param.h>
@@ -216,8 +218,8 @@ int
__bt_defcmp(a, b)
const DBT *a, *b;
{
- register size_t len;
- register u_char *p1, *p2;
+ size_t len;
+ u_char *p1, *p2;
/*
* XXX
@@ -246,8 +248,8 @@ size_t
__bt_defpfx(a, b)
const DBT *a, *b;
{
- register u_char *p1, *p2;
- register size_t cnt, len;
+ u_char *p1, *p2;
+ size_t cnt, len;
cnt = 1;
len = MIN(a->size, b->size);
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c
index 34fe4ad..cb69744 100644
--- a/lib/libc/db/hash/hash.c
+++ b/lib/libc/db/hash/hash.c
@@ -32,13 +32,13 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include "namespace.h"
#include <sys/param.h>
@@ -358,7 +358,7 @@ init_htab(hashp, nelem)
HTAB *hashp;
int nelem;
{
- register int nbuckets, nsegs;
+ int nbuckets, nsegs;
int l2;
/*
@@ -605,11 +605,11 @@ hash_access(hashp, action, key, val)
ACTION action;
DBT *key, *val;
{
- register BUFHEAD *rbufp;
+ BUFHEAD *rbufp;
BUFHEAD *bufp, *save_bufp;
- register u_int16_t *bp;
- register int n, ndx, off, size;
- register char *kp;
+ u_int16_t *bp;
+ int n, ndx, off, size;
+ char *kp;
u_int16_t pageno;
#ifdef HASH_STATISTICS
@@ -734,8 +734,8 @@ hash_seq(dbp, key, data, flag)
DBT *key, *data;
u_int32_t flag;
{
- register u_int32_t bucket;
- register BUFHEAD *bufp;
+ u_int32_t bucket;
+ BUFHEAD *bufp;
HTAB *hashp;
u_int16_t *bp, ndx;
@@ -878,7 +878,7 @@ hash_realloc(p_ptr, oldsize, newsize)
SEGMENT **p_ptr;
int oldsize, newsize;
{
- register void *p;
+ void *p;
if ( (p = malloc(newsize)) ) {
memmove(p, *p_ptr, oldsize);
@@ -914,8 +914,8 @@ alloc_segs(hashp, nsegs)
HTAB *hashp;
int nsegs;
{
- register int i;
- register SEGMENT store;
+ int i;
+ SEGMENT store;
int save_errno;
diff --git a/lib/libc/db/hash/hash_bigkey.c b/lib/libc/db/hash/hash_bigkey.c
index 0cee07e..f49e77f 100644
--- a/lib/libc/db/hash/hash_bigkey.c
+++ b/lib/libc/db/hash/hash_bigkey.c
@@ -37,6 +37,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)hash_bigkey.c 8.3 (Berkeley) 5/31/94";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
/*
* PACKAGE: hash
@@ -90,7 +92,7 @@ __big_insert(hashp, bufp, key, val)
BUFHEAD *bufp;
const DBT *key, *val;
{
- register u_int16_t *p;
+ u_int16_t *p;
int key_size, n, val_size;
u_int16_t space, move_bytes, off;
char *cp, *key_data, *val_data;
@@ -188,7 +190,7 @@ __big_delete(hashp, bufp)
HTAB *hashp;
BUFHEAD *bufp;
{
- register BUFHEAD *last_bfp, *rbufp;
+ BUFHEAD *last_bfp, *rbufp;
u_int16_t *bp, pageno;
int key_done, n;
@@ -270,8 +272,8 @@ __find_bigpair(hashp, bufp, ndx, key, size)
char *key;
int size;
{
- register u_int16_t *bp;
- register char *p;
+ u_int16_t *bp;
+ char *p;
int ksize;
u_int16_t bytes;
char *kkey;
@@ -452,8 +454,8 @@ collect_data(hashp, bufp, len, set)
BUFHEAD *bufp;
int len, set;
{
- register u_int16_t *bp;
- register char *p;
+ u_int16_t *bp;
+ char *p;
BUFHEAD *xbp;
u_int16_t save_addr;
int mylen, totlen;
@@ -576,8 +578,8 @@ __big_split(hashp, op, np, big_keyp, addr, obucket, ret)
u_int32_t obucket;/* Old Bucket */
SPLIT_RETURN *ret;
{
- register BUFHEAD *tmpp;
- register u_int16_t *tp;
+ BUFHEAD *tmpp;
+ u_int16_t *tp;
BUFHEAD *bp;
DBT key, val;
u_int32_t change;
diff --git a/lib/libc/db/hash/hash_buf.c b/lib/libc/db/hash/hash_buf.c
index afa9164..401b682 100644
--- a/lib/libc/db/hash/hash_buf.c
+++ b/lib/libc/db/hash/hash_buf.c
@@ -32,13 +32,13 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)hash_buf.c 8.5 (Berkeley) 7/15/94";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
/*
* PACKAGE: hash
@@ -109,9 +109,9 @@ __get_buf(hashp, addr, prev_bp, newpage)
BUFHEAD *prev_bp;
int newpage; /* If prev_bp set, indicates a new overflow page. */
{
- register BUFHEAD *bp;
- register u_int32_t is_disk_mask;
- register int is_disk, segment_ndx;
+ BUFHEAD *bp;
+ u_int32_t is_disk_mask;
+ int is_disk, segment_ndx;
SEGMENT segp;
is_disk = 0;
@@ -163,9 +163,9 @@ newbuf(hashp, addr, prev_bp)
u_int32_t addr;
BUFHEAD *prev_bp;
{
- register BUFHEAD *bp; /* The buffer we're going to use */
- register BUFHEAD *xbp; /* Temp pointer */
- register BUFHEAD *next_xbp;
+ BUFHEAD *bp; /* The buffer we're going to use */
+ BUFHEAD *xbp; /* Temp pointer */
+ BUFHEAD *next_xbp;
SEGMENT segp;
int segment_ndx;
u_int16_t oaddr, *shortp;
diff --git a/lib/libc/db/hash/hash_func.c b/lib/libc/db/hash/hash_func.c
index a5ec434..d7f84bb 100644
--- a/lib/libc/db/hash/hash_func.c
+++ b/lib/libc/db/hash/hash_func.c
@@ -37,6 +37,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)hash_func.c 8.2 (Berkeley) 2/21/94";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/types.h>
@@ -68,10 +70,10 @@ u_int32_t (*__default_hash) __P((const void *, size_t)) = hash4;
static u_int32_t
hash1(keyarg, len)
const void *keyarg;
- register size_t len;
+ size_t len;
{
- register const u_char *key;
- register u_int32_t h;
+ const u_char *key;
+ u_int32_t h;
/* Convert string to integer */
for (key = keyarg, h = 0; len--;)
@@ -90,9 +92,9 @@ hash2(keyarg, len)
const void *keyarg;
size_t len;
{
- register const u_char *e, *key;
- register u_int32_t h;
- register u_char c;
+ const u_char *e, *key;
+ u_int32_t h;
+ u_char c;
key = keyarg;
e = key + len;
@@ -117,11 +119,11 @@ hash2(keyarg, len)
static u_int32_t
hash3(keyarg, len)
const void *keyarg;
- register size_t len;
+ size_t len;
{
- register const u_char *key;
- register size_t loop;
- register u_int32_t h;
+ const u_char *key;
+ size_t loop;
+ u_int32_t h;
#define HASHC h = *key++ + 65599 * h
@@ -165,11 +167,11 @@ hash3(keyarg, len)
static u_int32_t
hash4(keyarg, len)
const void *keyarg;
- register size_t len;
+ size_t len;
{
- register const u_char *key;
- register size_t loop;
- register u_int32_t h;
+ const u_char *key;
+ size_t loop;
+ u_int32_t h;
#define HASH4a h = (h << 5) - h + *key++;
#define HASH4b h = (h << 5) + h + *key++;
diff --git a/lib/libc/db/hash/hash_log2.c b/lib/libc/db/hash/hash_log2.c
index c8c56bf..c9634dc 100644
--- a/lib/libc/db/hash/hash_log2.c
+++ b/lib/libc/db/hash/hash_log2.c
@@ -37,6 +37,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)hash_log2.c 8.2 (Berkeley) 5/31/94";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/types.h>
@@ -46,7 +48,7 @@ u_int32_t
__log2(num)
u_int32_t num;
{
- register u_int32_t i, limit;
+ u_int32_t i, limit;
limit = 1;
for (i = 0; limit < num; limit = limit << 1, i++);
diff --git a/lib/libc/db/hash/hash_page.c b/lib/libc/db/hash/hash_page.c
index dd042c8..65358a2 100644
--- a/lib/libc/db/hash/hash_page.c
+++ b/lib/libc/db/hash/hash_page.c
@@ -32,13 +32,13 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)hash_page.c 8.7 (Berkeley) 8/16/94";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
/*
* PACKAGE: hashing
@@ -101,7 +101,7 @@ putpair(p, key, val)
char *p;
const DBT *key, *val;
{
- register u_int16_t *bp, n, off;
+ u_int16_t *bp, n, off;
bp = (u_int16_t *)p;
@@ -132,10 +132,10 @@ extern int
__delpair(hashp, bufp, ndx)
HTAB *hashp;
BUFHEAD *bufp;
- register int ndx;
+ int ndx;
{
- register u_int16_t *bp, newoff;
- register int n;
+ u_int16_t *bp, newoff;
+ int n;
u_int16_t pairlen;
bp = (u_int16_t *)bufp->page;
@@ -151,9 +151,9 @@ __delpair(hashp, bufp, ndx)
if (ndx != (n - 1)) {
/* Hard Case -- need to shuffle keys */
- register int i;
- register char *src = bufp->page + (int)OFFSET(bp);
- register char *dst = src + (int)pairlen;
+ int i;
+ char *src = bufp->page + (int)OFFSET(bp);
+ char *dst = src + (int)pairlen;
memmove(dst, src, bp[ndx + 1] - OFFSET(bp));
/* Now adjust the pointers */
@@ -186,9 +186,9 @@ __split_page(hashp, obucket, nbucket)
HTAB *hashp;
u_int32_t obucket, nbucket;
{
- register BUFHEAD *new_bufp, *old_bufp;
- register u_int16_t *ino;
- register char *np;
+ BUFHEAD *new_bufp, *old_bufp;
+ u_int16_t *ino;
+ char *np;
DBT key, val;
int n, ndx, retval;
u_int16_t copyto, diff, off, moved;
@@ -283,12 +283,12 @@ ugly_split(hashp, obucket, old_bufp, new_bufp, copyto, moved)
u_int32_t obucket; /* Same as __split_page. */
BUFHEAD *old_bufp, *new_bufp;
int copyto; /* First byte on page which contains key/data values. */
- int moved; /* Number of pairs moved to new page. */
+ int moved; /* Number of pairs moved to new page. */
{
- register BUFHEAD *bufp; /* Buffer header for ino */
- register u_int16_t *ino; /* Page keys come off of */
- register u_int16_t *np; /* New page */
- register u_int16_t *op; /* Page keys go on to if they aren't moving */
+ BUFHEAD *bufp; /* Buffer header for ino */
+ u_int16_t *ino; /* Page keys come off of */
+ u_int16_t *np; /* New page */
+ u_int16_t *op; /* Page keys go on to if they aren't moving */
BUFHEAD *last_bfp; /* Last buf header OVFL needing to be freed */
DBT key, val;
@@ -404,7 +404,7 @@ __addel(hashp, bufp, key, val)
BUFHEAD *bufp;
const DBT *key, *val;
{
- register u_int16_t *bp, *sop;
+ u_int16_t *bp, *sop;
int do_expand;
bp = (u_int16_t *)bufp->page;
@@ -470,7 +470,7 @@ __add_ovflpage(hashp, bufp)
HTAB *hashp;
BUFHEAD *bufp;
{
- register u_int16_t *sp;
+ u_int16_t *sp;
u_int16_t ndx, ovfl_num;
#ifdef DEBUG1
int tmp1, tmp2;
@@ -525,7 +525,7 @@ __get_page(hashp, p, bucket, is_bucket, is_disk, is_bitmap)
u_int32_t bucket;
int is_bucket, is_disk, is_bitmap;
{
- register int fd, page, size;
+ int fd, page, size;
int rsize;
u_int16_t *bp;
@@ -555,7 +555,7 @@ __get_page(hashp, p, bucket, is_bucket, is_disk, is_bitmap)
PAGE_INIT(p);
} else
if (hashp->LORDER != BYTE_ORDER) {
- register int i, max;
+ int i, max;
if (is_bitmap) {
max = hashp->BSIZE >> 2; /* divide by 4 */
@@ -585,7 +585,7 @@ __put_page(hashp, p, bucket, is_bucket, is_bitmap)
u_int32_t bucket;
int is_bucket, is_bitmap;
{
- register int fd, page, size;
+ int fd, page, size;
int wsize;
size = hashp->BSIZE;
@@ -594,8 +594,8 @@ __put_page(hashp, p, bucket, is_bucket, is_bitmap)
fd = hashp->fp;
if (hashp->LORDER != BYTE_ORDER) {
- register int i;
- register int max;
+ int i;
+ int max;
if (is_bitmap) {
max = hashp->BSIZE >> 2; /* divide by 4 */
@@ -654,7 +654,7 @@ static u_int32_t
first_free(map)
u_int32_t map;
{
- register u_int32_t i, mask;
+ u_int32_t i, mask;
mask = 0x1;
for (i = 0; i < BITS_PER_MAP; i++) {
@@ -669,8 +669,8 @@ static u_int16_t
overflow_page(hashp)
HTAB *hashp;
{
- register u_int32_t *freep;
- register int max_free, offset, splitnum;
+ u_int32_t *freep;
+ int max_free, offset, splitnum;
u_int16_t addr;
int bit, first_page, free_bit, free_page, i, in_use_bits, j;
#ifdef DEBUG2
@@ -818,7 +818,7 @@ __free_ovflpage(hashp, obufp)
HTAB *hashp;
BUFHEAD *obufp;
{
- register u_int16_t addr;
+ u_int16_t addr;
u_int32_t *freep;
int bit_address, free_page, free_bit;
u_int16_t ndx;
@@ -886,7 +886,7 @@ squeeze_key(sp, key, val)
u_int16_t *sp;
const DBT *key, *val;
{
- register char *p;
+ char *p;
u_int16_t free_space, n, off, pageno;
p = (char *)sp;
diff --git a/lib/libc/db/recno/rec_search.c b/lib/libc/db/recno/rec_search.c
index acc109e..8e82917 100644
--- a/lib/libc/db/recno/rec_search.c
+++ b/lib/libc/db/recno/rec_search.c
@@ -34,6 +34,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)rec_search.c 8.4 (Berkeley) 7/14/94";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/types.h>
@@ -66,8 +68,8 @@ __rec_search(t, recno, op)
recno_t recno;
enum SRCHOP op;
{
- register indx_t index;
- register PAGE *h;
+ indx_t index;
+ PAGE *h;
EPGNO *parent;
RINTERNAL *r;
pgno_t pg;
diff --git a/lib/libc/db/test/btree.tests/main.c b/lib/libc/db/test/btree.tests/main.c
index 39c1da0..5fd0b27 100644
--- a/lib/libc/db/test/btree.tests/main.c
+++ b/lib/libc/db/test/btree.tests/main.c
@@ -37,6 +37,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <fcntl.h>
@@ -608,7 +610,7 @@ load(db, argv)
DB *db;
char **argv;
{
- register char *p, *t;
+ char *p, *t;
FILE *fp;
DBT data, key;
recno_t cnt;
diff --git a/lib/libc/db/test/dbtest.c b/lib/libc/db/test/dbtest.c
index be433c0..8627572 100644
--- a/lib/libc/db/test/dbtest.c
+++ b/lib/libc/db/test/dbtest.c
@@ -344,8 +344,8 @@ void
compare(db1, db2)
DBT *db1, *db2;
{
- register size_t len;
- register u_char *p1, *p2;
+ size_t len;
+ u_char *p1, *p2;
if (db1->size != db2->size)
printf("compare failed: key->data len %lu != data len %lu\n",
diff --git a/lib/libc/ia64/gen/isinf.c b/lib/libc/ia64/gen/isinf.c
index 239f2a0..3af80bc 100644
--- a/lib/libc/ia64/gen/isinf.c
+++ b/lib/libc/ia64/gen/isinf.c
@@ -36,7 +36,7 @@ int
isnan(d)
double d;
{
- register struct ieee_double *p = (struct ieee_double *)&d;
+ struct ieee_double *p = (struct ieee_double *)&d;
return (p->dbl_exp == DBL_EXP_INFNAN &&
(p->dbl_frach || p->dbl_fracl));
@@ -46,7 +46,7 @@ int
isinf(d)
double d;
{
- register struct ieee_double *p = (struct ieee_double *)&d;
+ struct ieee_double *p = (struct ieee_double *)&d;
return (p->dbl_exp == DBL_EXP_INFNAN &&
!p->dbl_frach && !p->dbl_fracl);
diff --git a/lib/libc/ia64/gen/ldexp.c b/lib/libc/ia64/gen/ldexp.c
index f419a31..c9f7674 100644
--- a/lib/libc/ia64/gen/ldexp.c
+++ b/lib/libc/ia64/gen/ldexp.c
@@ -42,7 +42,7 @@ ldexp(val, exp)
double val;
int exp;
{
- register int oldexp, newexp, mulexp;
+ int oldexp, newexp, mulexp;
union doub {
double v;
struct ieee_double s;
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c
index a113640..f232dc9 100644
--- a/lib/libc/net/gethostbydns.c
+++ b/lib/libc/net/gethostbydns.c
@@ -162,9 +162,9 @@ gethostanswer(answer, anslen, qname, qtype)
const char *qname;
int qtype;
{
- register const HEADER *hp;
- register const u_char *cp;
- register int n;
+ const HEADER *hp;
+ const u_char *cp;
+ int n;
const u_char *eom, *erdata;
char *bp, **ap, **hap;
int type, class, buflen, ancount, qdcount;
@@ -387,7 +387,7 @@ gethostanswer(answer, anslen, qname, qtype)
continue;
}
if (!haveanswer) {
- register int nn;
+ int nn;
host.h_name = bp;
nn = strlen(bp) + 1; /* for the \0 */
@@ -486,7 +486,7 @@ _dns_gethostbyname(void *rval, void *cb_data, va_list ap)
const char *name;
int af;
querybuf buf;
- register const char *cp;
+ const char *cp;
char *bp;
int n, size, type, len;
@@ -613,10 +613,10 @@ _dns_gethostbyaddr(void *rval, void *cb_data, va_list ap)
static const u_char tunnelled[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 };
int n, size;
querybuf buf;
- register struct hostent *hp;
+ struct hostent *hp;
char qbuf[MAXDNAME+1], *qp;
#ifdef SUNSECURITY
- register struct hostent *rhp;
+ struct hostent *rhp;
char **haddr;
u_long old_options;
char hname2[MAXDNAME+1];
diff --git a/lib/libc/net/gethostbyht.c b/lib/libc/net/gethostbyht.c
index 478d2d2..c05d8b3 100644
--- a/lib/libc/net/gethostbyht.c
+++ b/lib/libc/net/gethostbyht.c
@@ -103,7 +103,7 @@ struct hostent *
gethostent()
{
char *p;
- register char *cp, **q;
+ char *cp, **q;
int af, len;
if (!hostf && !(hostf = fopen(_PATH_HOSTS, "r" ))) {
@@ -169,8 +169,8 @@ _ht_gethostbyname(void *rval, void *cb_data, va_list ap)
{
const char *name;
int af;
- register struct hostent *p;
- register char **cp;
+ struct hostent *p;
+ char **cp;
name = va_arg(ap, const char *);
af = va_arg(ap, int);
@@ -197,7 +197,7 @@ _ht_gethostbyaddr(void *rval, void *cb_data, va_list ap)
{
const char *addr;
int len, af;
- register struct hostent *p;
+ struct hostent *p;
addr = va_arg(ap, const char *);
len = va_arg(ap, int);
diff --git a/lib/libc/net/gethostbynis.c b/lib/libc/net/gethostbynis.c
index 7b1d82b..3667be4 100644
--- a/lib/libc/net/gethostbynis.c
+++ b/lib/libc/net/gethostbynis.c
@@ -63,7 +63,7 @@ _gethostbynis(name, map, af)
char *map;
int af;
{
- register char *cp, **q;
+ char *cp, **q;
char *result;
int resultlen,size;
static struct hostent h;
diff --git a/lib/libc/net/getnetbydns.c b/lib/libc/net/getnetbydns.c
index 433b3b8..ed208f0 100644
--- a/lib/libc/net/getnetbydns.c
+++ b/lib/libc/net/getnetbydns.c
@@ -110,9 +110,9 @@ getnetanswer(answer, anslen, net_i)
int net_i;
{
- register HEADER *hp;
- register u_char *cp;
- register int n;
+ HEADER *hp;
+ u_char *cp;
+ int n;
u_char *eom;
int type, class, buflen, ancount, qdcount, haveanswer, i, nchar;
char aux1[MAXHOSTNAMELEN], aux2[MAXHOSTNAMELEN], ans[MAXHOSTNAMELEN];
diff --git a/lib/libc/net/getnetbyht.c b/lib/libc/net/getnetbyht.c
index b5f73be..59c8cd7 100644
--- a/lib/libc/net/getnetbyht.c
+++ b/lib/libc/net/getnetbyht.c
@@ -93,7 +93,7 @@ struct netent *
getnetent()
{
char *p;
- register char *cp, **q;
+ char *cp, **q;
if (netf == NULL && (netf = fopen(_PATH_NETWORKS, "r" )) == NULL)
return (NULL);
@@ -141,8 +141,8 @@ int
_ht_getnetbyname(void *rval, void *cb_data, va_list ap)
{
const char *name;
- register struct netent *p;
- register char **cp;
+ struct netent *p;
+ char **cp;
name = va_arg(ap, const char *);
@@ -166,7 +166,7 @@ _ht_getnetbyaddr(void *rval, void *cb_data, va_list ap)
{
unsigned long net;
int type;
- register struct netent *p;
+ struct netent *p;
net = va_arg(ap, unsigned long);
type = va_arg(ap, int);
diff --git a/lib/libc/net/getnetbynis.c b/lib/libc/net/getnetbynis.c
index c6db4f4..f8c7fee 100644
--- a/lib/libc/net/getnetbynis.c
+++ b/lib/libc/net/getnetbynis.c
@@ -56,7 +56,7 @@ static char *host_aliases[MAXALIASES];
static struct netent *
_getnetbynis(const char *name, char *map, int af)
{
- register char *cp, **q;
+ char *cp, **q;
static char *result;
int resultlen;
static struct netent h;
diff --git a/lib/libc/net/getproto.c b/lib/libc/net/getproto.c
index 46f46d3..b22bc51 100644
--- a/lib/libc/net/getproto.c
+++ b/lib/libc/net/getproto.c
@@ -34,6 +34,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)getproto.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <netdb.h>
@@ -41,9 +43,9 @@ extern int _proto_stayopen;
struct protoent *
getprotobynumber(proto)
- register int proto;
+ int proto;
{
- register struct protoent *p;
+ struct protoent *p;
setprotoent(_proto_stayopen);
while ( (p = getprotoent()) )
diff --git a/lib/libc/net/getprotoent.c b/lib/libc/net/getprotoent.c
index c10ae33..c8f1ad4 100644
--- a/lib/libc/net/getprotoent.c
+++ b/lib/libc/net/getprotoent.c
@@ -34,6 +34,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)getprotoent.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/socket.h>
@@ -75,7 +77,7 @@ struct protoent *
getprotoent()
{
char *p;
- register char *cp, **q;
+ char *cp, **q;
if (protof == NULL && (protof = fopen(_PATH_PROTOCOLS, "r" )) == NULL)
return (NULL);
diff --git a/lib/libc/net/getprotoname.c b/lib/libc/net/getprotoname.c
index 0832acf..7039b0a 100644
--- a/lib/libc/net/getprotoname.c
+++ b/lib/libc/net/getprotoname.c
@@ -34,6 +34,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)getprotoname.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <netdb.h>
#include <string.h>
@@ -42,10 +44,10 @@ extern int _proto_stayopen;
struct protoent *
getprotobyname(name)
- register const char *name;
+ const char *name;
{
- register struct protoent *p;
- register char **cp;
+ struct protoent *p;
+ char **cp;
setprotoent(_proto_stayopen);
while ( (p = getprotoent()) ) {
diff --git a/lib/libc/net/getservbyname.c b/lib/libc/net/getservbyname.c
index 124f5ac..79769f6 100644
--- a/lib/libc/net/getservbyname.c
+++ b/lib/libc/net/getservbyname.c
@@ -34,6 +34,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)getservbyname.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <netdb.h>
#include <string.h>
@@ -44,8 +46,8 @@ struct servent *
getservbyname(name, proto)
const char *name, *proto;
{
- register struct servent *p;
- register char **cp;
+ struct servent *p;
+ char **cp;
#ifdef YP
extern char *___getservbyname_yp;
diff --git a/lib/libc/net/getservbyport.c b/lib/libc/net/getservbyport.c
index ef9a2e8..2efb60f 100644
--- a/lib/libc/net/getservbyport.c
+++ b/lib/libc/net/getservbyport.c
@@ -34,6 +34,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)getservbyport.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <netdb.h>
#include <string.h>
@@ -45,7 +47,7 @@ getservbyport(port, proto)
int port;
const char *proto;
{
- register struct servent *p;
+ struct servent *p;
#ifdef YP
extern int ___getservbyport_yp;
diff --git a/lib/libc/net/getservent.c b/lib/libc/net/getservent.c
index 76307a1..53a03f6 100644
--- a/lib/libc/net/getservent.c
+++ b/lib/libc/net/getservent.c
@@ -213,7 +213,7 @@ struct servent *
getservent()
{
char *p;
- register char *cp, **q;
+ char *cp, **q;
#ifdef YP
if (serv_stepping_yp && _getservent_yp(line)) {
diff --git a/lib/libc/net/herror.c b/lib/libc/net/herror.c
index e42badf..a4b4e3d 100644
--- a/lib/libc/net/herror.c
+++ b/lib/libc/net/herror.c
@@ -81,7 +81,7 @@ herror(s)
const char *s;
{
struct iovec iov[4];
- register struct iovec *v = iov;
+ struct iovec *v = iov;
if (s && *s) {
v->iov_base = (char *)s;
diff --git a/lib/libc/net/inet_addr.c b/lib/libc/net/inet_addr.c
index bff7af8..5335687f 100644
--- a/lib/libc/net/inet_addr.c
+++ b/lib/libc/net/inet_addr.c
@@ -74,7 +74,7 @@ static char rcsid[] = "$FreeBSD$";
*/
in_addr_t /* XXX should be struct in_addr :( */
inet_addr(cp)
- register const char *cp;
+ const char *cp;
{
struct in_addr val;
@@ -92,7 +92,7 @@ inet_addr(cp)
*/
int
inet_aton(cp, addr)
- register const char *cp;
+ const char *cp;
struct in_addr *addr;
{
u_long parts[4];
diff --git a/lib/libc/net/inet_lnaof.c b/lib/libc/net/inet_lnaof.c
index 9225928..e79a39b 100644
--- a/lib/libc/net/inet_lnaof.c
+++ b/lib/libc/net/inet_lnaof.c
@@ -50,7 +50,7 @@ in_addr_t
inet_lnaof(in)
struct in_addr in;
{
- register in_addr_t i = ntohl(in.s_addr);
+ in_addr_t i = ntohl(in.s_addr);
if (IN_CLASSA(i))
return ((i)&IN_CLASSA_HOST);
diff --git a/lib/libc/net/inet_netof.c b/lib/libc/net/inet_netof.c
index 94f27a3..feba96b 100644
--- a/lib/libc/net/inet_netof.c
+++ b/lib/libc/net/inet_netof.c
@@ -49,7 +49,7 @@ in_addr_t
inet_netof(in)
struct in_addr in;
{
- register in_addr_t i = ntohl(in.s_addr);
+ in_addr_t i = ntohl(in.s_addr);
if (IN_CLASSA(i))
return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT);
diff --git a/lib/libc/net/inet_network.c b/lib/libc/net/inet_network.c
index 7cc30a5..5ee0c8e 100644
--- a/lib/libc/net/inet_network.c
+++ b/lib/libc/net/inet_network.c
@@ -49,12 +49,12 @@ static char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93";
*/
in_addr_t
inet_network(cp)
- register const char *cp;
+ const char *cp;
{
- register in_addr_t val, base, n;
- register char c;
+ in_addr_t val, base, n;
+ char c;
in_addr_t parts[4], *pp = parts;
- register int i;
+ int i;
again:
val = 0; base = 10;
diff --git a/lib/libc/net/ip6opt.c b/lib/libc/net/ip6opt.c
index f9291b9..b692a91 100644
--- a/lib/libc/net/ip6opt.c
+++ b/lib/libc/net/ip6opt.c
@@ -70,7 +70,7 @@ inet6_option_init(bp, cmsgp, type)
struct cmsghdr **cmsgp;
int type;
{
- register struct cmsghdr *ch = (struct cmsghdr *)bp;
+ struct cmsghdr *ch = (struct cmsghdr *)bp;
/* argument validation */
if (type != IPV6_HOPOPTS && type != IPV6_DSTOPTS)
@@ -102,7 +102,7 @@ inet6_option_append(cmsg, typep, multx, plusy)
int plusy;
{
int padlen, optlen, off;
- register u_char *bp = (u_char *)cmsg + cmsg->cmsg_len;
+ u_char *bp = (u_char *)cmsg + cmsg->cmsg_len;
struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg);
/* argument validation */
@@ -176,7 +176,7 @@ inet6_option_alloc(cmsg, datalen, multx, plusy)
int plusy;
{
int padlen, off;
- register u_int8_t *bp = (u_char *)cmsg + cmsg->cmsg_len;
+ u_int8_t *bp = (u_char *)cmsg + cmsg->cmsg_len;
u_int8_t *retval;
struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg);
diff --git a/lib/libc/net/iso_addr.c b/lib/libc/net/iso_addr.c
index 8829497..d81ee5f 100644
--- a/lib/libc/net/iso_addr.c
+++ b/lib/libc/net/iso_addr.c
@@ -34,6 +34,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)iso_addr.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <netiso/iso.h>
@@ -50,12 +52,12 @@ static char sccsid[] = "@(#)iso_addr.c 8.1 (Berkeley) 6/4/93";
struct iso_addr *
iso_addr(addr)
- register const char *addr;
+ const char *addr;
{
static struct iso_addr out_addr;
- register char *cp = out_addr.isoa_genaddr;
+ char *cp = out_addr.isoa_genaddr;
char *cplim = cp + sizeof(out_addr.isoa_genaddr);
- register int byte = 0, state = VIRGIN, new;
+ int byte = 0, state = VIRGIN, new;
bzero((char *)&out_addr, sizeof(out_addr));
do {
diff --git a/lib/libc/net/linkaddr.c b/lib/libc/net/linkaddr.c
index 68eed3d..c23559a 100644
--- a/lib/libc/net/linkaddr.c
+++ b/lib/libc/net/linkaddr.c
@@ -34,6 +34,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)linkaddr.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/socket.h>
@@ -53,12 +55,12 @@ static char sccsid[] = "@(#)linkaddr.c 8.1 (Berkeley) 6/4/93";
void
link_addr(addr, sdl)
- register const char *addr;
- register struct sockaddr_dl *sdl;
+ const char *addr;
+ struct sockaddr_dl *sdl;
{
- register char *cp = sdl->sdl_data;
+ char *cp = sdl->sdl_data;
char *cplim = sdl->sdl_len + (char *)sdl;
- register int byte = 0, state = NAMING, new;
+ int byte = 0, state = NAMING, new;
bzero((char *)&sdl->sdl_family, sdl->sdl_len - 1);
sdl->sdl_family = AF_LINK;
@@ -124,12 +126,12 @@ static char hexlist[] = "0123456789abcdef";
char *
link_ntoa(sdl)
- register const struct sockaddr_dl *sdl;
+ const struct sockaddr_dl *sdl;
{
static char obuf[64];
- register char *out = obuf;
- register int i;
- register u_char *in = (u_char *)LLADDR(sdl);
+ char *out = obuf;
+ int i;
+ u_char *in = (u_char *)LLADDR(sdl);
u_char *inlim = in + sdl->sdl_alen;
int firsttime = 1;
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c
index 4ab24b3..6beaa2c 100644
--- a/lib/libc/net/name6.c
+++ b/lib/libc/net/name6.c
@@ -991,9 +991,9 @@ getanswer(answer, anslen, qname, qtype, template, errp)
struct hostent *template;
int *errp;
{
- register const HEADER *hp;
- register const u_char *cp;
- register int n;
+ const HEADER *hp;
+ const u_char *cp;
+ int n;
const u_char *eom, *erdata;
char *bp, **ap, **hap;
int type, class, buflen, ancount, qdcount;
@@ -1202,7 +1202,7 @@ getanswer(answer, anslen, qname, qtype, template, errp)
DNS_ASSERT(strcasecmp(template->h_name, bp) == 0);
DNS_ASSERT(n == template->h_length);
if (!haveanswer) {
- register int nn;
+ int nn;
template->h_name = bp;
nn = strlen(bp) + 1; /* for the \0 */
diff --git a/lib/libc/net/ns_addr.c b/lib/libc/net/ns_addr.c
index e00f20d..a9558b6 100644
--- a/lib/libc/net/ns_addr.c
+++ b/lib/libc/net/ns_addr.c
@@ -103,7 +103,7 @@ Field(buf, out, len)
u_char *out;
int len;
{
- register char *bp = buf;
+ char *bp = buf;
int i, ibase, base16 = 0, base10 = 0, clen = 0;
int hb[6], *hp;
diff --git a/lib/libc/net/ns_ntoa.c b/lib/libc/net/ns_ntoa.c
index 6ba2caf..0f9458f 100644
--- a/lib/libc/net/ns_ntoa.c
+++ b/lib/libc/net/ns_ntoa.c
@@ -52,9 +52,9 @@ ns_ntoa(addr)
static char obuf[40];
union { union ns_net net_e; u_long long_e; } net;
u_short port = htons(addr.x_port);
- register char *cp;
+ char *cp;
char *cp2;
- register u_char *up = addr.x_host.c_host;
+ u_char *up = addr.x_host.c_host;
u_char *uplim = up + 6;
static char *spectHex();
@@ -89,7 +89,7 @@ spectHex(p0)
{
int ok = 0;
int nonzero = 0;
- register char *p = p0;
+ char *p = p0;
for (; *p; p++) switch (*p) {
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
diff --git a/lib/libc/net/nsap_addr.c b/lib/libc/net/nsap_addr.c
index 1f16fd2..cc1ea19 100644
--- a/lib/libc/net/nsap_addr.c
+++ b/lib/libc/net/nsap_addr.c
@@ -30,7 +30,7 @@ static char rcsid[] = "$FreeBSD$";
static char
xtob(c)
- register int c;
+ int c;
{
return (c - (((c >= '0') && (c <= '9')) ? '0' : '7'));
}
@@ -74,10 +74,10 @@ inet_nsap_addr(ascii, binary, maxlen)
char *
inet_nsap_ntoa(binlen, binary, ascii)
int binlen;
- register const u_char *binary;
- register char *ascii;
+ const u_char *binary;
+ char *ascii;
{
- register int nib;
+ int nib;
int i;
static char tmpbuf[255*3];
char *start;
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c
index 68ccb71..f64fa2c 100644
--- a/lib/libc/net/rcmd.c
+++ b/lib/libc/net/rcmd.c
@@ -457,7 +457,7 @@ iruserok_sa(ra, rlen, superuser, ruser, luser)
int superuser;
const char *ruser, *luser;
{
- register char *cp;
+ char *cp;
struct stat sbuf;
struct passwd *pwd;
FILE *hostf;
@@ -605,7 +605,7 @@ __ivaliduser_sa(hostf, raddr, salen, luser, ruser)
socklen_t salen;
const char *luser, *ruser;
{
- register char *user, *p;
+ char *user, *p;
int ch;
char buf[MAXHOSTNAMELEN + 128]; /* host + login */
char hname[MAXHOSTNAMELEN];
diff --git a/lib/libc/net/res_init.c b/lib/libc/net/res_init.c
index ce74928..46bf3a9 100644
--- a/lib/libc/net/res_init.c
+++ b/lib/libc/net/res_init.c
@@ -139,9 +139,9 @@ struct __res_state_ext _res_ext;
int
res_init()
{
- register FILE *fp;
- register char *cp, **pp;
- register int n;
+ FILE *fp;
+ char *cp, **pp;
+ int n;
char buf[MAXDNAME];
int nserv = 0; /* number of nameserver records read from file */
int haveenv = 0;
@@ -556,7 +556,7 @@ static u_int32_t
net_mask(in) /* XXX - should really use system's version of this */
struct in_addr in;
{
- register u_int32_t i = ntohl(in.s_addr);
+ u_int32_t i = ntohl(in.s_addr);
if (IN_CLASSA(i))
return (htonl(IN_CLASSA_NET));
diff --git a/lib/libc/net/res_mkquery.c b/lib/libc/net/res_mkquery.c
index 6cbd373..8f7a7a8 100644
--- a/lib/libc/net/res_mkquery.c
+++ b/lib/libc/net/res_mkquery.c
@@ -100,9 +100,9 @@ res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
u_char *buf; /* buffer to put query */
int buflen; /* size of buffer */
{
- register HEADER *hp;
- register u_char *cp;
- register int n;
+ HEADER *hp;
+ u_char *cp;
+ int n;
u_char *dnptrs[20], **dpp, **lastdnptr;
if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
@@ -213,8 +213,8 @@ res_opt(n0, buf, buflen, anslen)
int buflen; /* size of buffer */
int anslen; /* answer buffer length */
{
- register HEADER *hp;
- register u_char *cp;
+ HEADER *hp;
+ u_char *cp;
hp = (HEADER *) buf;
cp = buf + n0;
diff --git a/lib/libc/net/res_query.c b/lib/libc/net/res_query.c
index 8a94a42..6a46f29 100644
--- a/lib/libc/net/res_query.c
+++ b/lib/libc/net/res_query.c
@@ -373,7 +373,7 @@ const char *
hostalias(name)
const char *name;
{
- register char *cp1, *cp2;
+ char *cp1, *cp2;
FILE *fp;
char *file;
char buf[BUFSIZ];
diff --git a/lib/libc/net/rthdr.c b/lib/libc/net/rthdr.c
index 1f9d102..c919313 100644
--- a/lib/libc/net/rthdr.c
+++ b/lib/libc/net/rthdr.c
@@ -62,8 +62,8 @@ inet6_rthdr_init(bp, type)
void *bp;
int type;
{
- register struct cmsghdr *ch = (struct cmsghdr *)bp;
- register struct ip6_rthdr *rthdr;
+ struct cmsghdr *ch = (struct cmsghdr *)bp;
+ struct ip6_rthdr *rthdr;
rthdr = (struct ip6_rthdr *)CMSG_DATA(ch);
@@ -90,7 +90,7 @@ inet6_rthdr_add(cmsg, addr, flags)
const struct in6_addr *addr;
u_int flags;
{
- register struct ip6_rthdr *rthdr;
+ struct ip6_rthdr *rthdr;
rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
@@ -139,7 +139,7 @@ inet6_rthdr_lasthop(cmsg, flags)
struct cmsghdr *cmsg;
unsigned int flags;
{
- register struct ip6_rthdr *rthdr;
+ struct ip6_rthdr *rthdr;
rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
@@ -195,7 +195,7 @@ int
inet6_rthdr_segments(cmsg)
const struct cmsghdr *cmsg;
{
- register struct ip6_rthdr *rthdr;
+ struct ip6_rthdr *rthdr;
rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
@@ -229,7 +229,7 @@ inet6_rthdr_getaddr(cmsg, index)
struct cmsghdr *cmsg;
int index;
{
- register struct ip6_rthdr *rthdr;
+ struct ip6_rthdr *rthdr;
rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
@@ -270,7 +270,7 @@ inet6_rthdr_getflags(cmsg, index)
const struct cmsghdr *cmsg;
int index;
{
- register struct ip6_rthdr *rthdr;
+ struct ip6_rthdr *rthdr;
rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
diff --git a/lib/libc/quad/muldi3.c b/lib/libc/quad/muldi3.c
index 5e2331f..38cc42e 100644
--- a/lib/libc/quad/muldi3.c
+++ b/lib/libc/quad/muldi3.c
@@ -38,6 +38,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)muldi3.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include "quad.h"
@@ -105,8 +107,8 @@ __muldi3(a, b)
quad_t a, b;
{
union uu u, v, low, prod;
- register u_long high, mid, udiff, vdiff;
- register int negall, negmid;
+ u_long high, mid, udiff, vdiff;
+ int negall, negmid;
#define u1 u.ul[H]
#define u0 u.ul[L]
#define v1 v.ul[H]
diff --git a/lib/libc/quad/qdivrem.c b/lib/libc/quad/qdivrem.c
index 56f91ec..9176b8e 100644
--- a/lib/libc/quad/qdivrem.c
+++ b/lib/libc/quad/qdivrem.c
@@ -38,6 +38,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)qdivrem.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
/*
* Multiprecision divide. This algorithm is from Knuth vol. 2 (2nd ed),
@@ -64,9 +66,9 @@ typedef u_long digit;
* We may assume len >= 0. NOTE THAT THIS WRITES len+1 DIGITS.
*/
static void
-shl(register digit *p, register int len, register int sh)
+shl(digit *p, int len, int sh)
{
- register int i;
+ int i;
for (i = 0; i < len; i++)
p[i] = LHALF(p[i] << sh) | (p[i + 1] >> (HALF_BITS - sh));
@@ -87,7 +89,7 @@ __qdivrem(uq, vq, arq)
{
union uu tmp;
digit *u, *v, *q;
- register digit v1, v2;
+ digit v1, v2;
u_long qhat, rhat, t;
int m, n, d, j, i;
digit uspace[5], vspace[5], qspace[5];
@@ -197,7 +199,7 @@ __qdivrem(uq, vq, arq)
v1 = v[1]; /* for D3 -- note that v[1..n] are constant */
v2 = v[2]; /* for D3 */
do {
- register digit uj0, uj1, uj2;
+ digit uj0, uj1, uj2;
/*
* D3: Calculate qhat (\^q, in TeX notation).
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c
index 04844ba..ce0a39d 100644
--- a/lib/libc/regex/engine.c
+++ b/lib/libc/regex/engine.c
@@ -134,33 +134,33 @@ static char *pchar __P((int ch));
/*
- matcher - the actual matching engine
- == static int matcher(register struct re_guts *g, char *string, \
+ == static int matcher(struct re_guts *g, char *string, \
== size_t nmatch, regmatch_t pmatch[], int eflags);
*/
static int /* 0 success, REG_NOMATCH failure */
matcher(g, string, nmatch, pmatch, eflags)
-register struct re_guts *g;
+struct re_guts *g;
char *string;
size_t nmatch;
regmatch_t pmatch[];
int eflags;
{
- register char *endp;
- register int i;
+ char *endp;
+ int i;
struct match mv;
- register struct match *m = &mv;
- register char *dp;
- register const sopno gf = g->firststate+1; /* +1 for OEND */
- register const sopno gl = g->laststate;
+ struct match *m = &mv;
+ char *dp;
+ const sopno gf = g->firststate+1; /* +1 for OEND */
+ const sopno gl = g->laststate;
char *start;
char *stop;
/* Boyer-Moore algorithms variables */
- register char *pp;
+ char *pp;
int cj, mj;
- register char *mustfirst;
- register char *mustlast;
- register int *matchjump;
- register int *charjump;
+ char *mustfirst;
+ char *mustlast;
+ int *matchjump;
+ int *charjump;
/* simplify the situation where possible */
if (g->cflags&REG_NOSUB)
@@ -345,30 +345,30 @@ int eflags;
/*
- dissect - figure out what matched what, no back references
- == static char *dissect(register struct match *m, char *start, \
+ == static char *dissect(struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst);
*/
static char * /* == stop (success) always */
dissect(m, start, stop, startst, stopst)
-register struct match *m;
+struct match *m;
char *start;
char *stop;
sopno startst;
sopno stopst;
{
- register int i;
- register sopno ss; /* start sop of current subRE */
- register sopno es; /* end sop of current subRE */
- register char *sp; /* start of string matched by it */
- register char *stp; /* string matched by it cannot pass here */
- register char *rest; /* start of rest of string */
- register char *tail; /* string unmatched by rest of RE */
- register sopno ssub; /* start sop of subsubRE */
- register sopno esub; /* end sop of subsubRE */
- register char *ssp; /* start of string matched by subsubRE */
- register char *sep; /* end of string matched by subsubRE */
- register char *oldssp; /* previous ssp */
- register char *dp;
+ int i;
+ sopno ss; /* start sop of current subRE */
+ sopno es; /* end sop of current subRE */
+ char *sp; /* start of string matched by it */
+ char *stp; /* string matched by it cannot pass here */
+ char *rest; /* start of rest of string */
+ char *tail; /* string unmatched by rest of RE */
+ sopno ssub; /* start sop of subsubRE */
+ sopno esub; /* end sop of subsubRE */
+ char *ssp; /* start of string matched by subsubRE */
+ char *sep; /* end of string matched by subsubRE */
+ char *oldssp; /* previous ssp */
+ char *dp;
AT("diss", start, stop, startst, stopst);
sp = start;
@@ -533,30 +533,30 @@ sopno stopst;
/*
- backref - figure out what matched what, figuring in back references
- == static char *backref(register struct match *m, char *start, \
+ == static char *backref(struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst, sopno lev);
*/
static char * /* == stop (success) or NULL (failure) */
backref(m, start, stop, startst, stopst, lev)
-register struct match *m;
+struct match *m;
char *start;
char *stop;
sopno startst;
sopno stopst;
sopno lev; /* PLUS nesting level */
{
- register int i;
- register sopno ss; /* start sop of current subRE */
- register char *sp; /* start of string matched by it */
- register sopno ssub; /* start sop of subsubRE */
- register sopno esub; /* end sop of subsubRE */
- register char *ssp; /* start of string matched by subsubRE */
- register char *dp;
- register size_t len;
- register int hard;
- register sop s;
- register regoff_t offsave;
- register cset *cs;
+ int i;
+ sopno ss; /* start sop of current subRE */
+ char *sp; /* start of string matched by it */
+ sopno ssub; /* start sop of subsubRE */
+ sopno esub; /* end sop of subsubRE */
+ char *ssp; /* start of string matched by subsubRE */
+ char *dp;
+ size_t len;
+ int hard;
+ sop s;
+ regoff_t offsave;
+ cset *cs;
AT("back", start, stop, startst, stopst);
sp = start;
@@ -738,26 +738,26 @@ sopno lev; /* PLUS nesting level */
/*
- fast - step through the string at top speed
- == static char *fast(register struct match *m, char *start, \
+ == static char *fast(struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst);
*/
static char * /* where tentative match ended, or NULL */
fast(m, start, stop, startst, stopst)
-register struct match *m;
+struct match *m;
char *start;
char *stop;
sopno startst;
sopno stopst;
{
- register states st = m->st;
- register states fresh = m->fresh;
- register states tmp = m->tmp;
- register char *p = start;
- register int c = (start == m->beginp) ? OUT : *(start-1);
- register int lastc; /* previous c */
- register int flagch;
- register int i;
- register char *coldp; /* last p after which no match was underway */
+ states st = m->st;
+ states fresh = m->fresh;
+ states tmp = m->tmp;
+ char *p = start;
+ int c = (start == m->beginp) ? OUT : *(start-1);
+ int lastc; /* previous c */
+ int flagch;
+ int i;
+ char *coldp; /* last p after which no match was underway */
CLEAR(st);
SET1(st, startst);
@@ -829,26 +829,26 @@ sopno stopst;
/*
- slow - step through the string more deliberately
- == static char *slow(register struct match *m, char *start, \
+ == static char *slow(struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst);
*/
static char * /* where it ended */
slow(m, start, stop, startst, stopst)
-register struct match *m;
+struct match *m;
char *start;
char *stop;
sopno startst;
sopno stopst;
{
- register states st = m->st;
- register states empty = m->empty;
- register states tmp = m->tmp;
- register char *p = start;
- register int c = (start == m->beginp) ? OUT : *(start-1);
- register int lastc; /* previous c */
- register int flagch;
- register int i;
- register char *matchp; /* last p at which a match ended */
+ states st = m->st;
+ states empty = m->empty;
+ states tmp = m->tmp;
+ char *p = start;
+ int c = (start == m->beginp) ? OUT : *(start-1);
+ int lastc; /* previous c */
+ int flagch;
+ int i;
+ char *matchp; /* last p at which a match ended */
AT("slow", start, stop, startst, stopst);
CLEAR(st);
@@ -916,8 +916,8 @@ sopno stopst;
/*
- step - map set of states reachable before char to set reachable after
- == static states step(register struct re_guts *g, sopno start, sopno stop, \
- == register states bef, int ch, register states aft);
+ == static states step(struct re_guts *g, sopno start, sopno stop, \
+ == states bef, int ch, states aft);
== #define BOL (OUT+1)
== #define EOL (BOL+1)
== #define BOLEOL (BOL+2)
@@ -930,19 +930,19 @@ sopno stopst;
*/
static states
step(g, start, stop, bef, ch, aft)
-register struct re_guts *g;
+struct re_guts *g;
sopno start; /* start state within strip */
sopno stop; /* state after stop state within strip */
-register states bef; /* states reachable before */
+states bef; /* states reachable before */
int ch; /* character or NONCHAR code */
-register states aft; /* states already known reachable after */
+states aft; /* states already known reachable after */
{
- register cset *cs;
- register sop s;
- register sopno pc;
- register onestate here; /* note, macros know this name */
- register sopno look;
- register int i;
+ cset *cs;
+ sop s;
+ sopno pc;
+ onestate here; /* note, macros know this name */
+ sopno look;
+ int i;
for (pc = start, INIT(here, pc); pc != stop; pc++, INC(here)) {
s = g->strip[pc];
@@ -1058,9 +1058,9 @@ states st;
int ch;
FILE *d;
{
- register struct re_guts *g = m->g;
- register int i;
- register int first = 1;
+ struct re_guts *g = m->g;
+ int i;
+ int first = 1;
if (!(m->eflags&REG_TRACE))
return;
diff --git a/lib/libc/regex/grot/debug.c b/lib/libc/regex/grot/debug.c
index 357f3ea..24bad14 100644
--- a/lib/libc/regex/grot/debug.c
+++ b/lib/libc/regex/grot/debug.c
@@ -21,10 +21,10 @@ regprint(r, d)
regex_t *r;
FILE *d;
{
- register struct re_guts *g = r->re_g;
- register int i;
- register int c;
- register int last;
+ struct re_guts *g = r->re_g;
+ int i;
+ int c;
+ int last;
int nincat[NC];
fprintf(d, "%ld states, %d categories", (long)g->nstates,
@@ -87,21 +87,21 @@ FILE *d;
/*
- s_print - print the strip for debugging
- == static void s_print(register struct re_guts *g, FILE *d);
+ == static void s_print(struct re_guts *g, FILE *d);
*/
static void
s_print(g, d)
-register struct re_guts *g;
+struct re_guts *g;
FILE *d;
{
- register sop *s;
- register cset *cs;
- register int i;
- register int done = 0;
- register sop opnd;
- register int col = 0;
- register int last;
- register sopno offset = 2;
+ sop *s;
+ cset *cs;
+ int i;
+ int done = 0;
+ sop opnd;
+ int col = 0;
+ int last;
+ sopno offset = 2;
# define GAP() { if (offset % 5 == 0) { \
if (col > 40) { \
fprintf(d, "\n\t"); \
diff --git a/lib/libc/regex/grot/main.c b/lib/libc/regex/grot/main.c
index c0a73dc..cb56e48 100644
--- a/lib/libc/regex/grot/main.c
+++ b/lib/libc/regex/grot/main.c
@@ -37,7 +37,7 @@ char *argv[];
size_t len;
int c;
int errflg = 0;
- register int i;
+ int i;
extern int optind;
extern char *optarg;
@@ -220,7 +220,7 @@ int opts; /* may not match f1 */
int err;
int len;
char *type = (opts & REG_EXTENDED) ? "ERE" : "BRE";
- register int i;
+ int i;
char *grump;
char f0copy[1000];
char f2copy[1000];
@@ -317,9 +317,9 @@ options(type, s)
int type; /* 'c' compile, 'e' exec */
char *s;
{
- register char *p;
- register int o = (type == 'c') ? copts : eopts;
- register char *legal = (type == 'c') ? "bisnmp" : "^$#tl";
+ char *p;
+ int o = (type == 'c') ? copts : eopts;
+ char *legal = (type == 'c') ? "bisnmp" : "^$#tl";
for (p = s; *p != '\0'; p++)
if (strchr(legal, *p) != NULL)
@@ -379,11 +379,11 @@ char *s;
/*
- fixstr - transform magic characters in strings
- == void fixstr(register char *p);
+ == void fixstr(char *p);
*/
void
fixstr(p)
-register char *p;
+char *p;
{
if (p == NULL)
return;
@@ -409,11 +409,11 @@ char *str;
regmatch_t sub;
char *should;
{
- register int len;
- register int shlen;
- register char *p;
+ int len;
+ int shlen;
+ char *p;
static char grump[500];
- register char *at = NULL;
+ char *at = NULL;
if (should != NULL && strcmp(should, "-") == 0)
should = NULL;
diff --git a/lib/libc/regex/grot/split.c b/lib/libc/regex/grot/split.c
index bcd6a37..e001f39 100644
--- a/lib/libc/regex/grot/split.c
+++ b/lib/libc/regex/grot/split.c
@@ -14,14 +14,14 @@ char *fields[]; /* list is not NULL-terminated */
int nfields; /* number of entries available in fields[] */
char *sep; /* "" white, "c" single char, "ab" [ab]+ */
{
- register char *p = string;
- register char c; /* latest character */
- register char sepc = sep[0];
- register char sepc2;
- register int fn;
- register char **fp = fields;
- register char *sepp;
- register int trimtrail;
+ char *p = string;
+ char c; /* latest character */
+ char sepc = sep[0];
+ char sepc2;
+ int fn;
+ char **fp = fields;
+ char *sepp;
+ int trimtrail;
/* white space */
if (sepc == '\0') {
@@ -155,7 +155,7 @@ int argc;
char *argv[];
{
char buf[512];
- register int n;
+ int n;
# define MNF 10
char *fields[MNF];
@@ -187,7 +187,7 @@ char *seps;
{
# define NF 5
char *fields[NF];
- register int nf;
+ int nf;
nf = split(string, fields, NF, seps);
print(nf, NF, fields);
@@ -198,8 +198,8 @@ int nf;
int nfp;
char *fields[];
{
- register int fn;
- register int bound;
+ int fn;
+ int bound;
bound = (nf > nfp) ? nfp : nf;
printf("%d:\t", nf);
@@ -279,12 +279,12 @@ struct {
regress()
{
char buf[512];
- register int n;
+ int n;
char *fields[RNF+1];
- register int nf;
- register int i;
- register int printit;
- register char *f;
+ int nf;
+ int i;
+ int printit;
+ char *f;
for (n = 0; tests[n].str != NULL; n++) {
(void) strcpy(buf, tests[n].str);
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index 602ddb0..f522e40 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -194,10 +194,10 @@ const char *pattern;
int cflags;
{
struct parse pa;
- register struct re_guts *g;
- register struct parse *p = &pa;
- register int i;
- register size_t len;
+ struct re_guts *g;
+ struct parse *p = &pa;
+ int i;
+ size_t len;
#ifdef REDEBUG
# define GOODFLAGS(f) (f)
#else
@@ -303,18 +303,18 @@ int cflags;
/*
- p_ere - ERE parser top level, concatenation and alternation
- == static void p_ere(register struct parse *p, int stop);
+ == static void p_ere(struct parse *p, int stop);
*/
static void
p_ere(p, stop)
-register struct parse *p;
+struct parse *p;
int stop; /* character this ERE should end at */
{
- register char c;
- register sopno prevback;
- register sopno prevfwd;
- register sopno conc;
- register int first = 1; /* is this the first alternative? */
+ char c;
+ sopno prevback;
+ sopno prevfwd;
+ sopno conc;
+ int first = 1; /* is this the first alternative? */
for (;;) {
/* do a bunch of concatenated expressions */
@@ -349,17 +349,17 @@ int stop; /* character this ERE should end at */
/*
- p_ere_exp - parse one subERE, an atom possibly followed by a repetition op
- == static void p_ere_exp(register struct parse *p);
+ == static void p_ere_exp(struct parse *p);
*/
static void
p_ere_exp(p)
-register struct parse *p;
+struct parse *p;
{
- register char c;
- register sopno pos;
- register int count;
- register int count2;
- register sopno subno;
+ char c;
+ sopno pos;
+ int count;
+ int count2;
+ sopno subno;
int wascaret = 0;
assert(MORE()); /* caller should have ensured this */
@@ -498,11 +498,11 @@ register struct parse *p;
/*
- p_str - string (no metacharacters) "parser"
- == static void p_str(register struct parse *p);
+ == static void p_str(struct parse *p);
*/
static void
p_str(p)
-register struct parse *p;
+struct parse *p;
{
(void)REQUIRE(MORE(), REG_EMPTY);
while (MORE())
@@ -511,8 +511,8 @@ register struct parse *p;
/*
- p_bre - BRE parser top level, anchoring and concatenation
- == static void p_bre(register struct parse *p, register int end1, \
- == register int end2);
+ == static void p_bre(struct parse *p, int end1, \
+ == int end2);
* Giving end1 as OUT essentially eliminates the end1/end2 check.
*
* This implementation is a bit of a kludge, in that a trailing $ is first
@@ -523,13 +523,13 @@ register struct parse *p;
*/
static void
p_bre(p, end1, end2)
-register struct parse *p;
-register int end1; /* first terminating character */
-register int end2; /* second terminating character */
+struct parse *p;
+int end1; /* first terminating character */
+int end2; /* second terminating character */
{
- register sopno start = HERE();
- register int first = 1; /* first subexpression? */
- register int wasdollar = 0;
+ sopno start = HERE();
+ int first = 1; /* first subexpression? */
+ int wasdollar = 0;
if (EAT('^')) {
EMIT(OBOL, 0);
@@ -552,19 +552,19 @@ register int end2; /* second terminating character */
/*
- p_simp_re - parse a simple RE, an atom possibly followed by a repetition
- == static int p_simp_re(register struct parse *p, int starordinary);
+ == static int p_simp_re(struct parse *p, int starordinary);
*/
static int /* was the simple RE an unbackslashed $? */
p_simp_re(p, starordinary)
-register struct parse *p;
+struct parse *p;
int starordinary; /* is a leading * an ordinary character? */
{
- register int c;
- register int count;
- register int count2;
- register sopno pos;
- register int i;
- register sopno subno;
+ int c;
+ int count;
+ int count2;
+ sopno pos;
+ int i;
+ sopno subno;
# define BACKSL (1<<CHAR_BIT)
pos = HERE(); /* repetion op, if any, covers from here */
@@ -670,14 +670,14 @@ int starordinary; /* is a leading * an ordinary character? */
/*
- p_count - parse a repetition count
- == static int p_count(register struct parse *p);
+ == static int p_count(struct parse *p);
*/
static int /* the value */
p_count(p)
-register struct parse *p;
+struct parse *p;
{
- register int count = 0;
- register int ndigits = 0;
+ int count = 0;
+ int ndigits = 0;
while (MORE() && isdigit((uch)PEEK()) && count <= DUPMAX) {
count = count*10 + (GETNEXT() - '0');
@@ -690,17 +690,17 @@ register struct parse *p;
/*
- p_bracket - parse a bracketed character list
- == static void p_bracket(register struct parse *p);
+ == static void p_bracket(struct parse *p);
*
* Note a significant property of this code: if the allocset() did SETERROR,
* no set operations are done.
*/
static void
p_bracket(p)
-register struct parse *p;
+struct parse *p;
{
- register cset *cs = allocset(p);
- register int invert = 0;
+ cset *cs = allocset(p);
+ int invert = 0;
/* Dept of Truly Sickening Special-Case Kludges */
if (p->next + 5 < p->end && strncmp(p->next, "[:<:]]", 6) == 0) {
@@ -730,8 +730,8 @@ register struct parse *p;
return;
if (p->g->cflags&REG_ICASE) {
- register int i;
- register int ci;
+ int i;
+ int ci;
for (i = p->g->csetsize - 1; i >= 0; i--)
if (CHIN(cs, i) && isalpha(i)) {
@@ -743,7 +743,7 @@ register struct parse *p;
mccase(p, cs);
}
if (invert) {
- register int i;
+ int i;
for (i = p->g->csetsize - 1; i >= 0; i--)
if (CHIN(cs, i))
@@ -767,16 +767,16 @@ register struct parse *p;
/*
- p_b_term - parse one term of a bracketed character list
- == static void p_b_term(register struct parse *p, register cset *cs);
+ == static void p_b_term(struct parse *p, cset *cs);
*/
static void
p_b_term(p, cs)
-register struct parse *p;
-register cset *cs;
+struct parse *p;
+cset *cs;
{
- register char c;
- register char start, finish;
- register int i;
+ char c;
+ char start, finish;
+ int i;
/* classify what we've got */
switch ((MORE()) ? PEEK() : '\0') {
@@ -846,17 +846,17 @@ register cset *cs;
/*
- p_b_cclass - parse a character-class name and deal with it
- == static void p_b_cclass(register struct parse *p, register cset *cs);
+ == static void p_b_cclass(struct parse *p, cset *cs);
*/
static void
p_b_cclass(p, cs)
-register struct parse *p;
-register cset *cs;
+struct parse *p;
+cset *cs;
{
- register int c;
- register char *sp = p->next;
- register struct cclass *cp;
- register size_t len;
+ int c;
+ char *sp = p->next;
+ struct cclass *cp;
+ size_t len;
while (MORE() && isalpha((uch)PEEK()))
NEXT();
@@ -940,16 +940,16 @@ register cset *cs;
/*
- p_b_eclass - parse an equivalence-class name and deal with it
- == static void p_b_eclass(register struct parse *p, register cset *cs);
+ == static void p_b_eclass(struct parse *p, cset *cs);
*
* This implementation is incomplete. xxx
*/
static void
p_b_eclass(p, cs)
-register struct parse *p;
-register cset *cs;
+struct parse *p;
+cset *cs;
{
- register char c;
+ char c;
c = p_b_coll_elem(p, '=');
CHadd(cs, c);
@@ -957,13 +957,13 @@ register cset *cs;
/*
- p_b_symbol - parse a character or [..]ed multicharacter collating symbol
- == static char p_b_symbol(register struct parse *p);
+ == static char p_b_symbol(struct parse *p);
*/
static char /* value of symbol */
p_b_symbol(p)
-register struct parse *p;
+struct parse *p;
{
- register char value;
+ char value;
(void)REQUIRE(MORE(), REG_EBRACK);
if (!EATTWO('[', '.'))
@@ -977,16 +977,16 @@ register struct parse *p;
/*
- p_b_coll_elem - parse a collating-element name and look it up
- == static char p_b_coll_elem(register struct parse *p, int endc);
+ == static char p_b_coll_elem(struct parse *p, int endc);
*/
static char /* value of collating element */
p_b_coll_elem(p, endc)
-register struct parse *p;
+struct parse *p;
int endc; /* name ended by endc,']' */
{
- register char *sp = p->next;
- register struct cname *cp;
- register int len;
+ char *sp = p->next;
+ struct cname *cp;
+ int len;
while (MORE() && !SEETWO(endc, ']'))
NEXT();
@@ -1024,17 +1024,17 @@ int ch;
/*
- bothcases - emit a dualcase version of a two-case character
- == static void bothcases(register struct parse *p, int ch);
+ == static void bothcases(struct parse *p, int ch);
*
* Boy, is this implementation ever a kludge...
*/
static void
bothcases(p, ch)
-register struct parse *p;
+struct parse *p;
int ch;
{
- register char *oldnext = p->next;
- register char *oldend = p->end;
+ char *oldnext = p->next;
+ char *oldend = p->end;
char bracket[3];
ch = (uch)ch;
@@ -1052,14 +1052,14 @@ int ch;
/*
- ordinary - emit an ordinary character
- == static void ordinary(register struct parse *p, register int ch);
+ == static void ordinary(struct parse *p, int ch);
*/
static void
ordinary(p, ch)
-register struct parse *p;
-register int ch;
+struct parse *p;
+int ch;
{
- register cat_t *cap = p->g->categories;
+ cat_t *cap = p->g->categories;
if ((p->g->cflags&REG_ICASE) && isalpha((uch)ch) && othercase(ch) != ch)
bothcases(p, ch);
@@ -1072,16 +1072,16 @@ register int ch;
/*
- nonnewline - emit REG_NEWLINE version of OANY
- == static void nonnewline(register struct parse *p);
+ == static void nonnewline(struct parse *p);
*
* Boy, is this implementation ever a kludge...
*/
static void
nonnewline(p)
-register struct parse *p;
+struct parse *p;
{
- register char *oldnext = p->next;
- register char *oldend = p->end;
+ char *oldnext = p->next;
+ char *oldend = p->end;
char bracket[4];
p->next = bracket;
@@ -1098,21 +1098,21 @@ register struct parse *p;
/*
- repeat - generate code for a bounded repetition, recursively if needed
- == static void repeat(register struct parse *p, sopno start, int from, int to);
+ == static void repeat(struct parse *p, sopno start, int from, int to);
*/
static void
repeat(p, start, from, to)
-register struct parse *p;
+struct parse *p;
sopno start; /* operand from here to end of strip */
int from; /* repeated from this number */
int to; /* to this number of times (maybe INFINITY) */
{
- register sopno finish = HERE();
+ sopno finish = HERE();
# define N 2
# define INF 3
# define REP(f, t) ((f)*8 + (t))
# define MAP(n) (((n) <= 1) ? (n) : ((n) == INFINITY) ? INF : N)
- register sopno copy;
+ sopno copy;
if (p->error != 0) /* head off possible runaway recursion */
return;
@@ -1170,11 +1170,11 @@ int to; /* to this number of times (maybe INFINITY) */
/*
- seterr - set an error condition
- == static int seterr(register struct parse *p, int e);
+ == static int seterr(struct parse *p, int e);
*/
static int /* useless but makes type checking happy */
seterr(p, e)
-register struct parse *p;
+struct parse *p;
int e;
{
if (p->error == 0) /* keep earliest error condition */
@@ -1186,18 +1186,18 @@ int e;
/*
- allocset - allocate a set of characters for []
- == static cset *allocset(register struct parse *p);
+ == static cset *allocset(struct parse *p);
*/
static cset *
allocset(p)
-register struct parse *p;
+struct parse *p;
{
- register int no = p->g->ncsets++;
- register size_t nc;
- register size_t nbytes;
- register cset *cs;
- register size_t css = (size_t)p->g->csetsize;
- register int i;
+ int no = p->g->ncsets++;
+ size_t nc;
+ size_t nbytes;
+ cset *cs;
+ size_t css = (size_t)p->g->csetsize;
+ int i;
if (no >= p->ncsalloc) { /* need another column of space */
p->ncsalloc += CHAR_BIT;
@@ -1241,16 +1241,16 @@ register struct parse *p;
/*
- freeset - free a now-unused set
- == static void freeset(register struct parse *p, register cset *cs);
+ == static void freeset(struct parse *p, cset *cs);
*/
static void
freeset(p, cs)
-register struct parse *p;
-register cset *cs;
+struct parse *p;
+cset *cs;
{
- register int i;
- register cset *top = &p->g->sets[p->g->ncsets];
- register size_t css = (size_t)p->g->csetsize;
+ int i;
+ cset *top = &p->g->sets[p->g->ncsets];
+ size_t css = (size_t)p->g->csetsize;
for (i = 0; i < css; i++)
CHsub(cs, i);
@@ -1260,7 +1260,7 @@ register cset *cs;
/*
- freezeset - final processing on a set of characters
- == static int freezeset(register struct parse *p, register cset *cs);
+ == static int freezeset(struct parse *p, cset *cs);
*
* The main task here is merging identical sets. This is usually a waste
* of time (although the hash code minimizes the overhead), but can win
@@ -1270,14 +1270,14 @@ register cset *cs;
*/
static int /* set number */
freezeset(p, cs)
-register struct parse *p;
-register cset *cs;
+struct parse *p;
+cset *cs;
{
- register short h = cs->hash;
- register int i;
- register cset *top = &p->g->sets[p->g->ncsets];
- register cset *cs2;
- register size_t css = (size_t)p->g->csetsize;
+ short h = cs->hash;
+ int i;
+ cset *top = &p->g->sets[p->g->ncsets];
+ cset *cs2;
+ size_t css = (size_t)p->g->csetsize;
/* look for an earlier one which is the same */
for (cs2 = &p->g->sets[0]; cs2 < top; cs2++)
@@ -1300,15 +1300,15 @@ register cset *cs;
/*
- firstch - return first character in a set (which must have at least one)
- == static int firstch(register struct parse *p, register cset *cs);
+ == static int firstch(struct parse *p, cset *cs);
*/
static int /* character; there is no "none" value */
firstch(p, cs)
-register struct parse *p;
-register cset *cs;
+struct parse *p;
+cset *cs;
{
- register int i;
- register size_t css = (size_t)p->g->csetsize;
+ int i;
+ size_t css = (size_t)p->g->csetsize;
for (i = 0; i < css; i++)
if (CHIN(cs, i))
@@ -1319,16 +1319,16 @@ register cset *cs;
/*
- nch - number of characters in a set
- == static int nch(register struct parse *p, register cset *cs);
+ == static int nch(struct parse *p, cset *cs);
*/
static int
nch(p, cs)
-register struct parse *p;
-register cset *cs;
+struct parse *p;
+cset *cs;
{
- register int i;
- register size_t css = (size_t)p->g->csetsize;
- register int n = 0;
+ int i;
+ size_t css = (size_t)p->g->csetsize;
+ int n = 0;
for (i = 0; i < css; i++)
if (CHIN(cs, i))
@@ -1338,16 +1338,16 @@ register cset *cs;
/*
- mcadd - add a collating element to a cset
- == static void mcadd(register struct parse *p, register cset *cs, \
- == register char *cp);
+ == static void mcadd(struct parse *p, cset *cs, \
+ == char *cp);
*/
static void
mcadd(p, cs, cp)
-register struct parse *p;
-register cset *cs;
-register char *cp;
+struct parse *p;
+cset *cs;
+char *cp;
{
- register size_t oldend = cs->smultis;
+ size_t oldend = cs->smultis;
cs->smultis += strlen(cp) + 1;
if (cs->multis == NULL)
@@ -1366,15 +1366,15 @@ register char *cp;
#if used
/*
- mcsub - subtract a collating element from a cset
- == static void mcsub(register cset *cs, register char *cp);
+ == static void mcsub(cset *cs, char *cp);
*/
static void
mcsub(cs, cp)
-register cset *cs;
-register char *cp;
+cset *cs;
+char *cp;
{
- register char *fp = mcfind(cs, cp);
- register size_t len = strlen(fp);
+ char *fp = mcfind(cs, cp);
+ size_t len = strlen(fp);
assert(fp != NULL);
(void) memmove(fp, fp + len + 1,
@@ -1393,26 +1393,26 @@ register char *cp;
/*
- mcin - is a collating element in a cset?
- == static int mcin(register cset *cs, register char *cp);
+ == static int mcin(cset *cs, char *cp);
*/
static int
mcin(cs, cp)
-register cset *cs;
-register char *cp;
+cset *cs;
+char *cp;
{
return(mcfind(cs, cp) != NULL);
}
/*
- mcfind - find a collating element in a cset
- == static char *mcfind(register cset *cs, register char *cp);
+ == static char *mcfind(cset *cs, char *cp);
*/
static char *
mcfind(cs, cp)
-register cset *cs;
-register char *cp;
+cset *cs;
+char *cp;
{
- register char *p;
+ char *p;
if (cs->multis == NULL)
return(NULL);
@@ -1425,47 +1425,47 @@ register char *cp;
/*
- mcinvert - invert the list of collating elements in a cset
- == static void mcinvert(register struct parse *p, register cset *cs);
+ == static void mcinvert(struct parse *p, cset *cs);
*
* This would have to know the set of possibilities. Implementation
* is deferred.
*/
static void
mcinvert(p, cs)
-register struct parse *p;
-register cset *cs;
+struct parse *p;
+cset *cs;
{
assert(cs->multis == NULL); /* xxx */
}
/*
- mccase - add case counterparts of the list of collating elements in a cset
- == static void mccase(register struct parse *p, register cset *cs);
+ == static void mccase(struct parse *p, cset *cs);
*
* This would have to know the set of possibilities. Implementation
* is deferred.
*/
static void
mccase(p, cs)
-register struct parse *p;
-register cset *cs;
+struct parse *p;
+cset *cs;
{
assert(cs->multis == NULL); /* xxx */
}
/*
- isinsets - is this character in any sets?
- == static int isinsets(register struct re_guts *g, int c);
+ == static int isinsets(struct re_guts *g, int c);
*/
static int /* predicate */
isinsets(g, c)
-register struct re_guts *g;
+struct re_guts *g;
int c;
{
- register uch *col;
- register int i;
- register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
- register unsigned uc = (uch)c;
+ uch *col;
+ int i;
+ int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
+ unsigned uc = (uch)c;
for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
if (col[uc] != 0)
@@ -1475,19 +1475,19 @@ int c;
/*
- samesets - are these two characters in exactly the same sets?
- == static int samesets(register struct re_guts *g, int c1, int c2);
+ == static int samesets(struct re_guts *g, int c1, int c2);
*/
static int /* predicate */
samesets(g, c1, c2)
-register struct re_guts *g;
+struct re_guts *g;
int c1;
int c2;
{
- register uch *col;
- register int i;
- register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
- register unsigned uc1 = (uch)c1;
- register unsigned uc2 = (uch)c2;
+ uch *col;
+ int i;
+ int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
+ unsigned uc1 = (uch)c1;
+ unsigned uc2 = (uch)c2;
for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
if (col[uc1] != col[uc2])
@@ -1497,17 +1497,17 @@ int c2;
/*
- categorize - sort out character categories
- == static void categorize(struct parse *p, register struct re_guts *g);
+ == static void categorize(struct parse *p, struct re_guts *g);
*/
static void
categorize(p, g)
struct parse *p;
-register struct re_guts *g;
+struct re_guts *g;
{
- register cat_t *cats = g->categories;
- register int c;
- register int c2;
- register cat_t cat;
+ cat_t *cats = g->categories;
+ int c;
+ int c2;
+ cat_t cat;
/* avoid making error situations worse */
if (p->error != 0)
@@ -1525,16 +1525,16 @@ register struct re_guts *g;
/*
- dupl - emit a duplicate of a bunch of sops
- == static sopno dupl(register struct parse *p, sopno start, sopno finish);
+ == static sopno dupl(struct parse *p, sopno start, sopno finish);
*/
static sopno /* start of duplicate */
dupl(p, start, finish)
-register struct parse *p;
+struct parse *p;
sopno start; /* from here */
sopno finish; /* to this less one */
{
- register sopno ret = HERE();
- register sopno len = finish - start;
+ sopno ret = HERE();
+ sopno len = finish - start;
assert(finish >= start);
if (len == 0)
@@ -1549,7 +1549,7 @@ sopno finish; /* to this less one */
/*
- doemit - emit a strip operator
- == static void doemit(register struct parse *p, sop op, size_t opnd);
+ == static void doemit(struct parse *p, sop op, size_t opnd);
*
* It might seem better to implement this as a macro with a function as
* hard-case backup, but it's just too big and messy unless there are
@@ -1557,7 +1557,7 @@ sopno finish; /* to this less one */
*/
static void
doemit(p, op, opnd)
-register struct parse *p;
+struct parse *p;
sop op;
size_t opnd;
{
@@ -1579,18 +1579,18 @@ size_t opnd;
/*
- doinsert - insert a sop into the strip
- == static void doinsert(register struct parse *p, sop op, size_t opnd, sopno pos);
+ == static void doinsert(struct parse *p, sop op, size_t opnd, sopno pos);
*/
static void
doinsert(p, op, opnd, pos)
-register struct parse *p;
+struct parse *p;
sop op;
size_t opnd;
sopno pos;
{
- register sopno sn;
- register sop s;
- register int i;
+ sopno sn;
+ sop s;
+ int i;
/* avoid making error situations worse */
if (p->error != 0)
@@ -1619,12 +1619,12 @@ sopno pos;
/*
- dofwd - complete a forward reference
- == static void dofwd(register struct parse *p, sopno pos, sop value);
+ == static void dofwd(struct parse *p, sopno pos, sop value);
*/
static void
dofwd(p, pos, value)
-register struct parse *p;
-register sopno pos;
+struct parse *p;
+sopno pos;
sop value;
{
/* avoid making error situations worse */
@@ -1637,14 +1637,14 @@ sop value;
/*
- enlarge - enlarge the strip
- == static void enlarge(register struct parse *p, sopno size);
+ == static void enlarge(struct parse *p, sopno size);
*/
static void
enlarge(p, size)
-register struct parse *p;
-register sopno size;
+struct parse *p;
+sopno size;
{
- register sop *sp;
+ sop *sp;
if (p->ssize >= size)
return;
@@ -1660,12 +1660,12 @@ register sopno size;
/*
- stripsnug - compact the strip
- == static void stripsnug(register struct parse *p, register struct re_guts *g);
+ == static void stripsnug(struct parse *p, struct re_guts *g);
*/
static void
stripsnug(p, g)
-register struct parse *p;
-register struct re_guts *g;
+struct parse *p;
+struct re_guts *g;
{
g->nstates = p->slen;
g->strip = (sop *)realloc((char *)p->strip, p->slen * sizeof(sop));
@@ -1677,7 +1677,7 @@ register struct re_guts *g;
/*
- findmust - fill in must and mlen with longest mandatory literal string
- == static void findmust(register struct parse *p, register struct re_guts *g);
+ == static void findmust(struct parse *p, struct re_guts *g);
*
* This algorithm could do fancy things like analyzing the operands of |
* for common subsequences. Someday. This code is simple and finds most
@@ -1688,15 +1688,15 @@ register struct re_guts *g;
static void
findmust(p, g)
struct parse *p;
-register struct re_guts *g;
+struct re_guts *g;
{
- register sop *scan;
+ sop *scan;
sop *start;
- register sop *newstart;
- register sopno newlen;
- register sop s;
- register char *cp;
- register sopno i;
+ sop *newstart;
+ sopno newlen;
+ sop s;
+ char *cp;
+ sopno i;
int offset;
int cs, mccs;
@@ -1925,7 +1925,7 @@ int mccs;
/*
- computejumps - compute char jumps for BM scan
- == static void computejumps(register struct parse *p, register struct re_guts *g);
+ == static void computejumps(struct parse *p, struct re_guts *g);
*
* This algorithm assumes g->must exists and is has size greater than
* zero. It's based on the algorithm found on Computer Algorithms by
@@ -1969,7 +1969,7 @@ struct re_guts *g;
/*
- computematchjumps - compute match jumps for BM scan
- == static void computematchjumps(register struct parse *p, register struct re_guts *g);
+ == static void computematchjumps(struct parse *p, struct re_guts *g);
*
* This algorithm assumes g->must exists and is has size greater than
* zero. It's based on the algorithm found on Computer Algorithms by
@@ -2054,17 +2054,17 @@ struct re_guts *g;
/*
- pluscount - count + nesting
- == static sopno pluscount(register struct parse *p, register struct re_guts *g);
+ == static sopno pluscount(struct parse *p, struct re_guts *g);
*/
static sopno /* nesting depth */
pluscount(p, g)
struct parse *p;
-register struct re_guts *g;
+struct re_guts *g;
{
- register sop *scan;
- register sop s;
- register sopno plusnest = 0;
- register sopno maxnest = 0;
+ sop *scan;
+ sop s;
+ sopno plusnest = 0;
+ sopno maxnest = 0;
if (p->error != 0)
return(0); /* there may not be an OEND */
diff --git a/lib/libc/regex/regerror.c b/lib/libc/regex/regerror.c
index b1d151d..97080df 100644
--- a/lib/libc/regex/regerror.c
+++ b/lib/libc/regex/regerror.c
@@ -40,6 +40,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)regerror.c 8.4 (Berkeley) 3/20/94";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <stdio.h>
@@ -118,10 +120,10 @@ const regex_t *preg;
char *errbuf;
size_t errbuf_size;
{
- register struct rerr *r;
- register size_t len;
- register int target = errcode &~ REG_ITOA;
- register char *s;
+ struct rerr *r;
+ size_t len;
+ int target = errcode &~ REG_ITOA;
+ char *s;
char convbuf[50];
if (errcode == REG_ATOI)
@@ -164,7 +166,7 @@ regatoi(preg, localbuf)
const regex_t *preg;
char *localbuf;
{
- register struct rerr *r;
+ struct rerr *r;
for (r = rerrs; r->code != 0; r++)
if (strcmp(r->name, preg->re_endp) == 0)
diff --git a/lib/libc/regex/regexec.c b/lib/libc/regex/regexec.c
index 80a7ad0..a23c61c 100644
--- a/lib/libc/regex/regexec.c
+++ b/lib/libc/regex/regexec.c
@@ -40,6 +40,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)regexec.c 8.3 (Berkeley) 3/20/94";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
/*
* the outer shell of regexec()
@@ -160,7 +162,7 @@ size_t nmatch;
regmatch_t pmatch[];
int eflags;
{
- register struct re_guts *g = preg->re_g;
+ struct re_guts *g = preg->re_g;
#ifdef REDEBUG
# define GOODFLAGS(f) (f)
#else
diff --git a/lib/libc/regex/regfree.c b/lib/libc/regex/regfree.c
index 4266d1c..41c04b4 100644
--- a/lib/libc/regex/regfree.c
+++ b/lib/libc/regex/regfree.c
@@ -60,7 +60,7 @@ void
regfree(preg)
regex_t *preg;
{
- register struct re_guts *g;
+ struct re_guts *g;
if (preg->re_magic != MAGIC1) /* oops */
return; /* nice to complain, but hard */
diff --git a/lib/libc/rpc/auth_des.c b/lib/libc/rpc/auth_des.c
index 6a7da3a..c771f31 100644
--- a/lib/libc/rpc/auth_des.c
+++ b/lib/libc/rpc/auth_des.c
@@ -278,7 +278,7 @@ authdes_marshal(AUTH *auth, XDR *xdrs)
des_block ivec;
int status;
int len;
- register rpc_inline_t *ixdr;
+ rpc_inline_t *ixdr;
/*
* Figure out the "time", accounting for any time difference
@@ -366,7 +366,7 @@ authdes_validate(AUTH *auth, struct opaque_auth *rverf)
struct ad_private *ad = AUTH_PRIVATE(auth);
struct authdes_verf verf;
int status;
- register uint32_t *ixdr;
+ uint32_t *ixdr;
des_block buf;
if (rverf->oa_length != (2 + 1) * BYTES_PER_XDR_UNIT) {
diff --git a/lib/libc/rpc/authdes_prot.c b/lib/libc/rpc/authdes_prot.c
index f60e79f..49d06f0 100644
--- a/lib/libc/rpc/authdes_prot.c
+++ b/lib/libc/rpc/authdes_prot.c
@@ -77,8 +77,8 @@ xdr_authdes_cred(xdrs, cred)
bool_t
xdr_authdes_verf(xdrs, verf)
- register XDR *xdrs;
- register struct authdes_verf *verf;
+ XDR *xdrs;
+ struct authdes_verf *verf;
{
/*
* Unrolled xdr
diff --git a/lib/libc/rpc/des_crypt.c b/lib/libc/rpc/des_crypt.c
index 7c68267..d7012e7 100644
--- a/lib/libc/rpc/des_crypt.c
+++ b/lib/libc/rpc/des_crypt.c
@@ -40,15 +40,15 @@
static const char rcsid[] = "$FreeBSD$";
#endif
-static int common_crypt __P(( char *, char *, register unsigned, unsigned, struct desparams * ));
+static int common_crypt __P(( char *, char *, unsigned, unsigned, struct desparams * ));
int (*__des_crypt_LOCAL)() = 0;
extern int _des_crypt_call __P((char *, int, struct desparams *));
/*
* Copy 8 bytes
*/
#define COPY8(src, dst) { \
- register char *a = (char *) dst; \
- register char *b = (char *) src; \
+ char *a = (char *) dst; \
+ char *b = (char *) src; \
*a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \
*a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \
}
@@ -57,9 +57,9 @@ extern int _des_crypt_call __P((char *, int, struct desparams *));
* Copy multiple of 8 bytes
*/
#define DESCOPY(src, dst, len) { \
- register char *a = (char *) dst; \
- register char *b = (char *) src; \
- register int i; \
+ char *a = (char *) dst; \
+ char *b = (char *) src; \
+ int i; \
for (i = (int) len; i > 0; i -= 8) { \
*a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \
*a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \
@@ -123,11 +123,11 @@ static int
common_crypt(key, buf, len, mode, desp)
char *key;
char *buf;
- register unsigned len;
+ unsigned len;
unsigned mode;
- register struct desparams *desp;
+ struct desparams *desp;
{
- register int desdev;
+ int desdev;
if ((len % 8) != 0 || len > DES_MAXDATA) {
return(DESERR_BADPARAM);
diff --git a/lib/libc/rpc/key_call.c b/lib/libc/rpc/key_call.c
index 00df403..642d6fd 100644
--- a/lib/libc/rpc/key_call.c
+++ b/lib/libc/rpc/key_call.c
@@ -284,7 +284,7 @@ static struct key_call_private *key_call_private_main = NULL;
static void
key_call_destroy(void *vp)
{
- register struct key_call_private *kcp = (struct key_call_private *)vp;
+ struct key_call_private *kcp = (struct key_call_private *)vp;
if (kcp) {
if (kcp->client)
diff --git a/lib/libc/rpc/netnamer.c b/lib/libc/rpc/netnamer.c
index 6384f83..5816441 100644
--- a/lib/libc/rpc/netnamer.c
+++ b/lib/libc/rpc/netnamer.c
@@ -157,9 +157,9 @@ _getgroups(uname, groups)
gid_t groups[NGROUPS];
{
gid_t ngroups = 0;
- register struct group *grp;
- register int i;
- register int j;
+ struct group *grp;
+ int i;
+ int j;
int filter;
setgrent();
diff --git a/lib/libc/rpc/rpc_soc.c b/lib/libc/rpc/rpc_soc.c
index e049656..35fd983 100644
--- a/lib/libc/rpc/rpc_soc.c
+++ b/lib/libc/rpc/rpc_soc.c
@@ -458,7 +458,7 @@ clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz)
struct sockaddr_un *raddr;
u_long prog;
u_long vers;
- register int *sockp;
+ int *sockp;
u_int sendsz;
u_int recvsz;
{
@@ -508,7 +508,7 @@ done:
*/
SVCXPRT *
svcunix_create(sock, sendsize, recvsize, path)
- register int sock;
+ int sock;
u_int sendsize;
u_int recvsize;
char *path;
diff --git a/lib/libc/rpc/svc_auth_des.c b/lib/libc/rpc/svc_auth_des.c
index 52f4499..6cbc931 100644
--- a/lib/libc/rpc/svc_auth_des.c
+++ b/lib/libc/rpc/svc_auth_des.c
@@ -110,16 +110,16 @@ static struct {
*/
enum auth_stat
_svcauth_des(rqst, msg)
- register struct svc_req *rqst;
- register struct rpc_msg *msg;
+ struct svc_req *rqst;
+ struct rpc_msg *msg;
{
- register long *ixdr;
+ long *ixdr;
des_block cryptbuf[2];
- register struct authdes_cred *cred;
+ struct authdes_cred *cred;
struct authdes_verf verf;
int status;
- register struct cache_entry *entry;
+ struct cache_entry *entry;
short sid = 0;
des_block *sessionkey;
des_block ivec;
@@ -357,7 +357,7 @@ _svcauth_des(rqst, msg)
static void
cache_init()
{
- register int i;
+ int i;
authdes_cache = (struct cache_entry *)
mem_alloc(sizeof(struct cache_entry) * AUTHDES_CACHESZ);
@@ -388,11 +388,11 @@ cache_victim()
*/
static void
cache_ref(sid)
- register short sid;
+ short sid;
{
- register int i;
- register short curr;
- register short prev;
+ int i;
+ short curr;
+ short prev;
prev = authdes_lru[0];
authdes_lru[0] = sid;
@@ -411,13 +411,13 @@ cache_ref(sid)
*/
static short
cache_spot(key, name, timestamp)
- register des_block *key;
+ des_block *key;
char *name;
struct timeval *timestamp;
{
- register struct cache_entry *cp;
- register int i;
- register u_long hi;
+ struct cache_entry *cp;
+ int i;
+ u_long hi;
hi = key->key.high;
for (cp = authdes_cache, i = 0; i < AUTHDES_CACHESZ; i++, cp++) {
@@ -466,10 +466,10 @@ authdes_getucred(adc, uid, gid, grouplen, groups)
uid_t *uid;
gid_t *gid;
int *grouplen;
- register gid_t *groups;
+ gid_t *groups;
{
unsigned sid;
- register int i;
+ int i;
uid_t i_uid;
gid_t i_gid;
int i_grouplen;
diff --git a/lib/libc/sparc64/fpu/fpu_add.c b/lib/libc/sparc64/fpu/fpu_add.c
index 45e1873..5be2261 100644
--- a/lib/libc/sparc64/fpu/fpu_add.c
+++ b/lib/libc/sparc64/fpu/fpu_add.c
@@ -64,11 +64,11 @@
struct fpn *
__fpu_add(fe)
- register struct fpemu *fe;
+ struct fpemu *fe;
{
- register struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2, *r;
- register u_int r0, r1, r2, r3;
- register int rd;
+ struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2, *r;
+ u_int r0, r1, r2, r3;
+ int rd;
/*
* Put the `heavier' operand on the right (see fpu_emu.h).
diff --git a/lib/libc/sparc64/fpu/fpu_compare.c b/lib/libc/sparc64/fpu/fpu_compare.c
index 5d63699..4eaabde 100644
--- a/lib/libc/sparc64/fpu/fpu_compare.c
+++ b/lib/libc/sparc64/fpu/fpu_compare.c
@@ -95,8 +95,8 @@ static int fcc_shift[] = {
void
__fpu_compare(struct fpemu *fe, int cmpe, int fcc)
{
- register struct fpn *a, *b;
- register int cc;
+ struct fpn *a, *b;
+ int cc;
FPU_DECL_CARRY
a = &fe->fe_f1;
diff --git a/lib/libc/sparc64/fpu/fpu_div.c b/lib/libc/sparc64/fpu/fpu_div.c
index 3dc6bf4..c3895c2 100644
--- a/lib/libc/sparc64/fpu/fpu_div.c
+++ b/lib/libc/sparc64/fpu/fpu_div.c
@@ -156,11 +156,11 @@
struct fpn *
__fpu_div(fe)
- register struct fpemu *fe;
+ struct fpemu *fe;
{
- register struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2;
- register u_int q, bit;
- register u_int r0, r1, r2, r3, d0, d1, d2, d3, y0, y1, y2, y3;
+ struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2;
+ u_int q, bit;
+ u_int r0, r1, r2, r3, d0, d1, d2, d3, y0, y1, y2, y3;
FPU_DECL_CARRY
/*
diff --git a/lib/libc/sparc64/fpu/fpu_explode.c b/lib/libc/sparc64/fpu/fpu_explode.c
index 769f492..48c22fe 100644
--- a/lib/libc/sparc64/fpu/fpu_explode.c
+++ b/lib/libc/sparc64/fpu/fpu_explode.c
@@ -86,8 +86,8 @@
*/
int
__fpu_itof(fp, i)
- register struct fpn *fp;
- register u_int i;
+ struct fpn *fp;
+ u_int i;
{
if (i == 0)
@@ -112,8 +112,8 @@ __fpu_itof(fp, i)
*/
int
__fpu_xtof(fp, i)
- register struct fpn *fp;
- register u_int64_t i;
+ struct fpn *fp;
+ u_int64_t i;
{
if (i == 0)
@@ -173,11 +173,11 @@ __fpu_xtof(fp, i)
*/
int
__fpu_stof(fp, i)
- register struct fpn *fp;
- register u_int i;
+ struct fpn *fp;
+ u_int i;
{
- register int exp;
- register u_int frac, f0, f1;
+ int exp;
+ u_int frac, f0, f1;
#define SNG_SHIFT (SNG_FRACBITS - FP_LG)
exp = (i >> (32 - 1 - SNG_EXPBITS)) & mask(SNG_EXPBITS);
@@ -193,11 +193,11 @@ __fpu_stof(fp, i)
*/
int
__fpu_dtof(fp, i, j)
- register struct fpn *fp;
- register u_int i, j;
+ struct fpn *fp;
+ u_int i, j;
{
- register int exp;
- register u_int frac, f0, f1, f2;
+ int exp;
+ u_int frac, f0, f1, f2;
#define DBL_SHIFT (DBL_FRACBITS - 32 - FP_LG)
exp = (i >> (32 - 1 - DBL_EXPBITS)) & mask(DBL_EXPBITS);
@@ -214,11 +214,11 @@ __fpu_dtof(fp, i, j)
*/
int
__fpu_qtof(fp, i, j, k, l)
- register struct fpn *fp;
- register u_int i, j, k, l;
+ struct fpn *fp;
+ u_int i, j, k, l;
{
- register int exp;
- register u_int frac, f0, f1, f2, f3;
+ int exp;
+ u_int frac, f0, f1, f2, f3;
#define EXT_SHIFT (-(EXT_FRACBITS - 3 * 32 - FP_LG)) /* left shift! */
/*
@@ -235,7 +235,7 @@ __fpu_qtof(fp, i, j, k, l)
}
/*
- * Explode the contents of a register / regpair / regquad.
+ * Explode the contents of a / regpair / regquad.
* If the input is a signalling NaN, an NV (invalid) exception
* will be set. (Note that nothing but NV can occur until ALU
* operations are performed.)
diff --git a/lib/libc/sparc64/fpu/fpu_implode.c b/lib/libc/sparc64/fpu/fpu_implode.c
index ee7a8f7..207fa63 100644
--- a/lib/libc/sparc64/fpu/fpu_implode.c
+++ b/lib/libc/sparc64/fpu/fpu_implode.c
@@ -62,7 +62,7 @@
#include "fpu_emu.h"
#include "fpu_extern.h"
-static int round __P((register struct fpemu *, register struct fpn *));
+static int round __P((struct fpemu *, struct fpn *));
static int toinf __P((struct fpemu *, int));
/*
@@ -78,10 +78,10 @@ static int toinf __P((struct fpemu *, int));
* responsibility to fix this if necessary.
*/
static int
-round(register struct fpemu *fe, register struct fpn *fp)
+round(struct fpemu *fe, struct fpn *fp)
{
- register u_int m0, m1, m2, m3;
- register int gr, s;
+ u_int m0, m1, m2, m3;
+ int gr, s;
m0 = fp->fp_mant[0];
m1 = fp->fp_mant[1];
@@ -193,10 +193,10 @@ toinf(struct fpemu *fe, int sign)
u_int
__fpu_ftoi(fe, fp)
struct fpemu *fe;
- register struct fpn *fp;
+ struct fpn *fp;
{
- register u_int i;
- register int sign, exp;
+ u_int i;
+ int sign, exp;
sign = fp->fp_sign;
switch (fp->fp_class) {
@@ -242,11 +242,11 @@ __fpu_ftoi(fe, fp)
u_int
__fpu_ftox(fe, fp, res)
struct fpemu *fe;
- register struct fpn *fp;
+ struct fpn *fp;
u_int *res;
{
- register u_int64_t i;
- register int sign, exp;
+ u_int64_t i;
+ int sign, exp;
sign = fp->fp_sign;
switch (fp->fp_class) {
@@ -294,10 +294,10 @@ __fpu_ftox(fe, fp, res)
u_int
__fpu_ftos(fe, fp)
struct fpemu *fe;
- register struct fpn *fp;
+ struct fpn *fp;
{
- register u_int sign = fp->fp_sign << 31;
- register int exp;
+ u_int sign = fp->fp_sign << 31;
+ int exp;
#define SNG_EXP(e) ((e) << SNG_FRACBITS) /* makes e an exponent */
#define SNG_MASK (SNG_EXP(1) - 1) /* mask for fraction */
@@ -378,11 +378,11 @@ done:
u_int
__fpu_ftod(fe, fp, res)
struct fpemu *fe;
- register struct fpn *fp;
+ struct fpn *fp;
u_int *res;
{
- register u_int sign = fp->fp_sign << 31;
- register int exp;
+ u_int sign = fp->fp_sign << 31;
+ int exp;
#define DBL_EXP(e) ((e) << (DBL_FRACBITS & 31))
#define DBL_MASK (DBL_EXP(1) - 1)
@@ -439,11 +439,11 @@ done:
u_int
__fpu_ftoq(fe, fp, res)
struct fpemu *fe;
- register struct fpn *fp;
+ struct fpn *fp;
u_int *res;
{
- register u_int sign = fp->fp_sign << 31;
- register int exp;
+ u_int sign = fp->fp_sign << 31;
+ int exp;
#define EXT_EXP(e) ((e) << (EXT_FRACBITS & 31))
#define EXT_MASK (EXT_EXP(1) - 1)
@@ -499,9 +499,9 @@ done:
void
__fpu_implode(fe, fp, type, space)
struct fpemu *fe;
- register struct fpn *fp;
+ struct fpn *fp;
int type;
- register u_int *space;
+ u_int *space;
{
switch (type) {
diff --git a/lib/libc/sparc64/fpu/fpu_mul.c b/lib/libc/sparc64/fpu/fpu_mul.c
index f090120..4f6b691 100644
--- a/lib/libc/sparc64/fpu/fpu_mul.c
+++ b/lib/libc/sparc64/fpu/fpu_mul.c
@@ -104,11 +104,11 @@
*/
struct fpn *
__fpu_mul(fe)
- register struct fpemu *fe;
+ struct fpemu *fe;
{
- register struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2;
- register u_int a3, a2, a1, a0, x3, x2, x1, x0, bit, m;
- register int sticky;
+ struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2;
+ u_int a3, a2, a1, a0, x3, x2, x1, x0, bit, m;
+ int sticky;
FPU_DECL_CARRY
/*
diff --git a/lib/libc/sparc64/fpu/fpu_sqrt.c b/lib/libc/sparc64/fpu/fpu_sqrt.c
index fba8c43..044ee07 100644
--- a/lib/libc/sparc64/fpu/fpu_sqrt.c
+++ b/lib/libc/sparc64/fpu/fpu_sqrt.c
@@ -193,12 +193,12 @@ struct fpn *
__fpu_sqrt(fe)
struct fpemu *fe;
{
- register struct fpn *x = &fe->fe_f1;
- register u_int bit, q, tt;
- register u_int x0, x1, x2, x3;
- register u_int y0, y1, y2, y3;
- register u_int d0, d1, d2, d3;
- register int e;
+ struct fpn *x = &fe->fe_f1;
+ u_int bit, q, tt;
+ u_int x0, x1, x2, x3;
+ u_int y0, y1, y2, y3;
+ u_int d0, d1, d2, d3;
+ int e;
/*
* Take care of special cases first. In order:
diff --git a/lib/libc/sparc64/fpu/fpu_subr.c b/lib/libc/sparc64/fpu/fpu_subr.c
index 693255e..7d6769d 100644
--- a/lib/libc/sparc64/fpu/fpu_subr.c
+++ b/lib/libc/sparc64/fpu/fpu_subr.c
@@ -67,10 +67,10 @@
* sticky field is ignored anyway.
*/
int
-__fpu_shr(register struct fpn *fp, register int rsh)
+__fpu_shr(struct fpn *fp, int rsh)
{
- register u_int m0, m1, m2, m3, s;
- register int lsh;
+ u_int m0, m1, m2, m3, s;
+ int lsh;
#ifdef DIAGNOSTIC
if (rsh <= 0 || (fp->fp_class != FPC_NUM && !ISNAN(fp)))
@@ -141,10 +141,10 @@ __fpu_shr(register struct fpn *fp, register int rsh)
* a supernormal and it will fix it (provided fp->fp_mant[3] == 0).
*/
void
-__fpu_norm(register struct fpn *fp)
+__fpu_norm(struct fpn *fp)
{
- register u_int m0, m1, m2, m3, top, sup, nrm;
- register int lsh, rsh, exp;
+ u_int m0, m1, m2, m3, top, sup, nrm;
+ int lsh, rsh, exp;
exp = fp->fp_exp;
m0 = fp->fp_mant[0];
@@ -209,9 +209,9 @@ __fpu_norm(register struct fpn *fp)
* As a side effect, we set NV (invalid) for the current exceptions.
*/
struct fpn *
-__fpu_newnan(register struct fpemu *fe)
+__fpu_newnan(struct fpemu *fe)
{
- register struct fpn *fp;
+ struct fpn *fp;
fe->fe_cx = FSR_NV;
fp = &fe->fe_f3;
diff --git a/lib/libc/sparc64/gen/isinf.c b/lib/libc/sparc64/gen/isinf.c
index 9a70e44..f1f529f 100644
--- a/lib/libc/sparc64/gen/isinf.c
+++ b/lib/libc/sparc64/gen/isinf.c
@@ -39,7 +39,7 @@ int
isnan(d)
double d;
{
- register struct ieee_double *p = (struct ieee_double *)&d;
+ struct ieee_double *p = (struct ieee_double *)&d;
return (p->dbl_exp == DBL_EXP_INFNAN &&
(p->dbl_frach || p->dbl_fracl));
@@ -49,7 +49,7 @@ int
isinf(d)
double d;
{
- register struct ieee_double *p = (struct ieee_double *)&d;
+ struct ieee_double *p = (struct ieee_double *)&d;
return (p->dbl_exp == DBL_EXP_INFNAN &&
!p->dbl_frach && !p->dbl_fracl);
diff --git a/lib/libc/sparc64/gen/ldexp.c b/lib/libc/sparc64/gen/ldexp.c
index 86ef6aa..5f0fe39 100644
--- a/lib/libc/sparc64/gen/ldexp.c
+++ b/lib/libc/sparc64/gen/ldexp.c
@@ -53,7 +53,7 @@ ldexp(val, exp)
double val;
int exp;
{
- register int oldexp, newexp;
+ int oldexp, newexp;
union {
double v;
struct ieee_double s;
diff --git a/lib/libc/stdio/fdopen.c b/lib/libc/stdio/fdopen.c
index 30bf5b9..7b8af8a 100644
--- a/lib/libc/stdio/fdopen.c
+++ b/lib/libc/stdio/fdopen.c
@@ -54,7 +54,7 @@ fdopen(fd, mode)
int fd;
const char *mode;
{
- register FILE *fp;
+ FILE *fp;
static int nofile;
int flags, oflags, fdflags, tmp;
diff --git a/lib/libc/stdio/fgets.c b/lib/libc/stdio/fgets.c
index ccf5535..1802155 100644
--- a/lib/libc/stdio/fgets.c
+++ b/lib/libc/stdio/fgets.c
@@ -57,12 +57,12 @@ static const char rcsid[] =
char *
fgets(buf, n, fp)
char *buf;
- register int n;
- register FILE *fp;
+ int n;
+ FILE *fp;
{
- register size_t len;
- register char *s;
- register unsigned char *p, *t;
+ size_t len;
+ char *s;
+ unsigned char *p, *t;
if (n <= 0) /* sanity check */
return (NULL);
diff --git a/lib/libc/stdio/flags.c b/lib/libc/stdio/flags.c
index 4f39460..be1377d 100644
--- a/lib/libc/stdio/flags.c
+++ b/lib/libc/stdio/flags.c
@@ -56,10 +56,10 @@ static const char rcsid[] =
*/
int
__sflags(mode, optr)
- register const char *mode;
+ const char *mode;
int *optr;
{
- register int ret, m, o;
+ int ret, m, o;
switch (*mode++) {
diff --git a/lib/libc/stdio/fpurge.c b/lib/libc/stdio/fpurge.c
index 4959098..5f96c6a 100644
--- a/lib/libc/stdio/fpurge.c
+++ b/lib/libc/stdio/fpurge.c
@@ -56,7 +56,7 @@ static const char rcsid[] =
*/
int
fpurge(fp)
- register FILE *fp;
+ FILE *fp;
{
int retval;
FLOCKFILE(fp);
diff --git a/lib/libc/stdio/fputc.c b/lib/libc/stdio/fputc.c
index 24eb560..d7e8ab4 100644
--- a/lib/libc/stdio/fputc.c
+++ b/lib/libc/stdio/fputc.c
@@ -50,7 +50,7 @@ static const char rcsid[] =
int
fputc(c, fp)
int c;
- register FILE *fp;
+ FILE *fp;
{
int retval;
FLOCKFILE(fp);
diff --git a/lib/libc/stdio/fread.c b/lib/libc/stdio/fread.c
index f7e8985..08a15ef 100644
--- a/lib/libc/stdio/fread.c
+++ b/lib/libc/stdio/fread.c
@@ -53,11 +53,11 @@ size_t
fread(buf, size, count, fp)
void *buf;
size_t size, count;
- register FILE *fp;
+ FILE *fp;
{
- register size_t resid;
- register char *p;
- register int r;
+ size_t resid;
+ char *p;
+ int r;
size_t total;
/*
diff --git a/lib/libc/stdio/fseek.c b/lib/libc/stdio/fseek.c
index 237d793..86659e5 100644
--- a/lib/libc/stdio/fseek.c
+++ b/lib/libc/stdio/fseek.c
@@ -58,7 +58,7 @@ static const char rcsid[] =
int
fseek(fp, offset, whence)
- register FILE *fp;
+ FILE *fp;
long offset;
int whence;
{
@@ -109,7 +109,7 @@ _fseeko(fp, offset, whence, ltest)
int whence;
int ltest;
{
- register fpos_t (*seekfn) __P((void *, fpos_t, int));
+ fpos_t (*seekfn) __P((void *, fpos_t, int));
fpos_t target, curoff, ret;
size_t n;
struct stat st;
diff --git a/lib/libc/stdio/ftell.c b/lib/libc/stdio/ftell.c
index 174eaa8..9d51750 100644
--- a/lib/libc/stdio/ftell.c
+++ b/lib/libc/stdio/ftell.c
@@ -56,9 +56,9 @@ static const char rcsid[] =
*/
long
ftell(fp)
- register FILE *fp;
+ FILE *fp;
{
- register off_t rv;
+ off_t rv;
rv = ftello(fp);
if (rv > LONG_MAX) {
@@ -73,7 +73,7 @@ ftell(fp)
*/
off_t
ftello(fp)
- register FILE *fp;
+ FILE *fp;
{
fpos_t rv;
int ret;
@@ -92,10 +92,10 @@ ftello(fp)
int
_ftello(fp, offset)
- register FILE *fp;
+ FILE *fp;
fpos_t *offset;
{
- register fpos_t pos;
+ fpos_t pos;
size_t n;
if (fp->_seek == NULL) {
diff --git a/lib/libc/stdio/funopen.c b/lib/libc/stdio/funopen.c
index f66c60e..61ecfd8 100644
--- a/lib/libc/stdio/funopen.c
+++ b/lib/libc/stdio/funopen.c
@@ -56,7 +56,7 @@ funopen(cookie, readfn, writefn, seekfn, closefn)
#endif
int (*closefn)();
{
- register FILE *fp;
+ FILE *fp;
int flags;
if (readfn == NULL) {
diff --git a/lib/libc/stdio/fvwrite.c b/lib/libc/stdio/fvwrite.c
index 9196825..aee2134 100644
--- a/lib/libc/stdio/fvwrite.c
+++ b/lib/libc/stdio/fvwrite.c
@@ -56,13 +56,13 @@ static const char rcsid[] =
*/
int
__sfvwrite(fp, uio)
- register FILE *fp;
- register struct __suio *uio;
+ FILE *fp;
+ struct __suio *uio;
{
- register size_t len;
- register char *p;
- register struct __siov *iov;
- register int w, s;
+ size_t len;
+ char *p;
+ struct __siov *iov;
+ int w, s;
char *nl;
int nlknown, nldist;
diff --git a/lib/libc/stdio/gets.c b/lib/libc/stdio/gets.c
index 7a368cf..7989bb6 100644
--- a/lib/libc/stdio/gets.c
+++ b/lib/libc/stdio/gets.c
@@ -54,8 +54,8 @@ char *
gets(buf)
char *buf;
{
- register int c;
- register char *s;
+ int c;
+ char *s;
static int warned;
static char w[] =
"warning: this program uses gets(), which is unsafe.\n";
diff --git a/lib/libc/stdio/makebuf.c b/lib/libc/stdio/makebuf.c
index 34fe8e6..8188f50 100644
--- a/lib/libc/stdio/makebuf.c
+++ b/lib/libc/stdio/makebuf.c
@@ -58,10 +58,10 @@ static char sccsid[] = "@(#)makebuf.c 8.1 (Berkeley) 6/4/93";
*/
void
__smakebuf(fp)
- register FILE *fp;
+ FILE *fp;
{
- register void *p;
- register int flags;
+ void *p;
+ int flags;
size_t size;
int couldbetty;
@@ -91,7 +91,7 @@ __smakebuf(fp)
*/
int
__swhatbuf(fp, bufsize, couldbetty)
- register FILE *fp;
+ FILE *fp;
size_t *bufsize;
int *couldbetty;
{
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c
index e4c8c28..a0d396d 100644
--- a/lib/libc/stdio/mktemp.c
+++ b/lib/libc/stdio/mktemp.c
@@ -104,11 +104,11 @@ mktemp(path)
static int
_gettemp(path, doopen, domkdir, slen)
char *path;
- register int *doopen;
+ int *doopen;
int domkdir;
int slen;
{
- register char *start, *trv, *suffp;
+ char *start, *trv, *suffp;
char *pad;
struct stat sbuf;
int rval;
diff --git a/lib/libc/stdio/perror.c b/lib/libc/stdio/perror.c
index c137e06..77886bf 100644
--- a/lib/libc/stdio/perror.c
+++ b/lib/libc/stdio/perror.c
@@ -50,7 +50,7 @@ void
perror(s)
const char *s;
{
- register struct iovec *v;
+ struct iovec *v;
struct iovec iov[4];
v = iov;
diff --git a/lib/libc/stdio/putc.c b/lib/libc/stdio/putc.c
index 72d6bbf..ca32e54 100644
--- a/lib/libc/stdio/putc.c
+++ b/lib/libc/stdio/putc.c
@@ -58,7 +58,7 @@ static const char rcsid[] =
int
putc(c, fp)
int c;
- register FILE *fp;
+ FILE *fp;
{
int retval;
FLOCKFILE(fp);
diff --git a/lib/libc/stdio/putchar.c b/lib/libc/stdio/putchar.c
index a611fbb..f1c727b 100644
--- a/lib/libc/stdio/putchar.c
+++ b/lib/libc/stdio/putchar.c
@@ -63,7 +63,7 @@ putchar(c)
int c;
{
int retval;
- register FILE *so = stdout;
+ FILE *so = stdout;
FLOCKFILE(so);
retval = __sputc(c, so);
diff --git a/lib/libc/stdio/setbuffer.c b/lib/libc/stdio/setbuffer.c
index 7db2d4d..cb770be 100644
--- a/lib/libc/stdio/setbuffer.c
+++ b/lib/libc/stdio/setbuffer.c
@@ -46,7 +46,7 @@ static const char rcsid[] =
void
setbuffer(fp, buf, size)
- register FILE *fp;
+ FILE *fp;
char *buf;
int size;
{
diff --git a/lib/libc/stdio/setvbuf.c b/lib/libc/stdio/setvbuf.c
index c2179ca..f416735 100644
--- a/lib/libc/stdio/setvbuf.c
+++ b/lib/libc/stdio/setvbuf.c
@@ -55,12 +55,12 @@ static const char rcsid[] =
*/
int
setvbuf(fp, buf, mode, size)
- register FILE *fp;
+ FILE *fp;
char *buf;
- register int mode;
- register size_t size;
+ int mode;
+ size_t size;
{
- register int ret, flags;
+ int ret, flags;
size_t iosize;
int ttyflag;
diff --git a/lib/libc/stdio/stdio.c b/lib/libc/stdio/stdio.c
index 7f66fa8..0358f10 100644
--- a/lib/libc/stdio/stdio.c
+++ b/lib/libc/stdio/stdio.c
@@ -60,7 +60,7 @@ __sread(cookie, buf, n)
char *buf;
int n;
{
- register FILE *fp = cookie;
+ FILE *fp = cookie;
return(_read(fp->_file, buf, (size_t)n));
}
@@ -71,7 +71,7 @@ __swrite(cookie, buf, n)
char const *buf;
int n;
{
- register FILE *fp = cookie;
+ FILE *fp = cookie;
return (_write(fp->_file, buf, (size_t)n));
}
@@ -82,7 +82,7 @@ __sseek(cookie, offset, whence)
fpos_t offset;
int whence;
{
- register FILE *fp = cookie;
+ FILE *fp = cookie;
return (lseek(fp->_file, (off_t)offset, whence));
}
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
index 03c3706..15b1c64 100644
--- a/lib/libc/stdio/vfprintf.c
+++ b/lib/libc/stdio/vfprintf.c
@@ -189,8 +189,8 @@ static char *
__ultoa(u_long val, char *endp, int base, int octzero, char *xdigs,
int needgrp, char thousep, const char *grp)
{
- register char *cp = endp;
- register long sval;
+ char *cp = endp;
+ long sval;
int ndig;
/*
diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c
index 5181a4e..c8644e8 100644
--- a/lib/libc/stdio/vfscanf.c
+++ b/lib/libc/stdio/vfscanf.c
@@ -702,10 +702,10 @@ match_failure:
*/
static u_char *
__sccl(tab, fmt)
- register char *tab;
- register u_char *fmt;
+ char *tab;
+ u_char *fmt;
{
- register int c, n, v, i;
+ int c, n, v, i;
/* first `clear' the whole table */
c = *fmt++; /* first char hat => negated scanset */
diff --git a/lib/libc/stdio/wbuf.c b/lib/libc/stdio/wbuf.c
index 54da709..a354345 100644
--- a/lib/libc/stdio/wbuf.c
+++ b/lib/libc/stdio/wbuf.c
@@ -54,10 +54,10 @@ static const char rcsid[] =
*/
int
__swbuf(c, fp)
- register int c;
- register FILE *fp;
+ int c;
+ FILE *fp;
{
- register int n;
+ int n;
/*
* In case we cannot write, or longjmp takes us out early,
diff --git a/lib/libc/stdio/wsetup.c b/lib/libc/stdio/wsetup.c
index 074a880..be5c0a6 100644
--- a/lib/libc/stdio/wsetup.c
+++ b/lib/libc/stdio/wsetup.c
@@ -53,7 +53,7 @@ static const char rcsid[] =
*/
int
__swsetup(fp)
- register FILE *fp;
+ FILE *fp;
{
/* make sure stdio is set up */
if (!__sdidinit)
diff --git a/lib/libc/stdlib/atexit.c b/lib/libc/stdlib/atexit.c
index 1416b47..f5b57c4 100644
--- a/lib/libc/stdlib/atexit.c
+++ b/lib/libc/stdlib/atexit.c
@@ -65,7 +65,7 @@ atexit(fn)
void (*fn)();
{
static struct atexit __atexit0; /* one guaranteed table */
- register struct atexit *p;
+ struct atexit *p;
_MUTEX_LOCK(&atexit_mutex);
if ((p = __atexit) == NULL)
diff --git a/lib/libc/stdlib/bsearch.c b/lib/libc/stdlib/bsearch.c
index 4cee9de..5ee24bc 100644
--- a/lib/libc/stdlib/bsearch.c
+++ b/lib/libc/stdlib/bsearch.c
@@ -34,6 +34,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)bsearch.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <stddef.h>
#include <stdlib.h>
@@ -56,16 +58,16 @@ static char sccsid[] = "@(#)bsearch.c 8.1 (Berkeley) 6/4/93";
*/
void *
bsearch(key, base0, nmemb, size, compar)
- register const void *key;
+ const void *key;
const void *base0;
size_t nmemb;
- register size_t size;
- register int (*compar) __P((const void *, const void *));
+ size_t size;
+ int (*compar) __P((const void *, const void *));
{
- register const char *base = base0;
- register size_t lim;
- register int cmp;
- register const void *p;
+ const char *base = base0;
+ size_t lim;
+ int cmp;
+ const void *p;
for (lim = nmemb; lim != 0; lim >>= 1) {
p = base + (lim >> 1) * size;
diff --git a/lib/libc/stdlib/calloc.c b/lib/libc/stdlib/calloc.c
index 7a83603..ced9273 100644
--- a/lib/libc/stdlib/calloc.c
+++ b/lib/libc/stdlib/calloc.c
@@ -34,6 +34,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)calloc.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
@@ -41,9 +43,9 @@ static char sccsid[] = "@(#)calloc.c 8.1 (Berkeley) 6/4/93";
void *
calloc(num, size)
size_t num;
- register size_t size;
+ size_t size;
{
- register void *p;
+ void *p;
size *= num;
if ( (p = malloc(size)) )
diff --git a/lib/libc/stdlib/exit.c b/lib/libc/stdlib/exit.c
index 32f51d4..8ed5844 100644
--- a/lib/libc/stdlib/exit.c
+++ b/lib/libc/stdlib/exit.c
@@ -61,8 +61,8 @@ void
exit(status)
int status;
{
- register struct atexit *p;
- register int n;
+ struct atexit *p;
+ int n;
/* Ensure that the auto-initialization routine is linked in: */
extern int _thread_autoinit_dummy_decl;
diff --git a/lib/libc/stdlib/getenv.c b/lib/libc/stdlib/getenv.c
index a6bbd35..24683f3 100644
--- a/lib/libc/stdlib/getenv.c
+++ b/lib/libc/stdlib/getenv.c
@@ -34,6 +34,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)getenv.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <stddef.h>
@@ -52,13 +54,13 @@ inline char *__findenv __P((const char *, int *));
*/
inline char *
__findenv(name, offset)
- register const char *name;
+ const char *name;
int *offset;
{
extern char **environ;
- register int len, i;
- register const char *np;
- register char **p, *cp;
+ int len, i;
+ const char *np;
+ char **p, *cp;
if (name == NULL || environ == NULL)
return (NULL);
diff --git a/lib/libc/stdlib/getsubopt.c b/lib/libc/stdlib/getsubopt.c
index bc055b8..c27bcf6 100644
--- a/lib/libc/stdlib/getsubopt.c
+++ b/lib/libc/stdlib/getsubopt.c
@@ -31,9 +31,11 @@
* SUCH DAMAGE.
*/
-#ifndef lint
+#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)getsubopt.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
+#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <unistd.h>
#include <stdlib.h>
@@ -48,11 +50,11 @@ char *suboptarg;
int
getsubopt(optionp, tokens, valuep)
- register char **optionp, **valuep;
- register char * const *tokens;
+ char **optionp, **valuep;
+ char * const *tokens;
{
- register int cnt;
- register char *p;
+ int cnt;
+ char *p;
suboptarg = *valuep = NULL;
diff --git a/lib/libc/stdlib/heapsort.c b/lib/libc/stdlib/heapsort.c
index 9649553..89e9592 100644
--- a/lib/libc/stdlib/heapsort.c
+++ b/lib/libc/stdlib/heapsort.c
@@ -37,6 +37,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)heapsort.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <errno.h>
#include <stddef.h>
@@ -143,8 +145,8 @@ heapsort(vbase, nmemb, size, compar)
size_t nmemb, size;
int (*compar) __P((const void *, const void *));
{
- register int cnt, i, j, l;
- register char tmp, *tmp1, *tmp2;
+ int cnt, i, j, l;
+ char tmp, *tmp1, *tmp2;
char *base, *k, *p, *t;
if (nmemb <= 1)
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
index 2b8d807..7998acc 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -1084,7 +1084,7 @@ ifree(void *ptr)
void *
malloc(size_t size)
{
- register void *r;
+ void *r;
THREAD_LOCK();
malloc_func = " in malloc():";
diff --git a/lib/libc/stdlib/merge.c b/lib/libc/stdlib/merge.c
index 083a964..2fb1f3a 100644
--- a/lib/libc/stdlib/merge.c
+++ b/lib/libc/stdlib/merge.c
@@ -37,6 +37,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)merge.c 8.2 (Berkeley) 2/14/94";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
/*
* Hybrid exponential search/linear search merge sort with hybrid
@@ -98,12 +100,12 @@ int
mergesort(base, nmemb, size, cmp)
void *base;
size_t nmemb;
- register size_t size;
+ size_t size;
int (*cmp) __P((const void *, const void *));
{
- register int i, sense;
+ int i, sense;
int big, iflag;
- register u_char *f1, *f2, *t, *b, *tp2, *q, *l1, *l2;
+ u_char *f1, *f2, *t, *b, *tp2, *q, *l1, *l2;
u_char *list2, *list1, *p2, *p, *last, **p1;
if (size < PSIZE / 2) { /* Pointers must fit into 2 * size. */
diff --git a/lib/libc/stdlib/qsort.c b/lib/libc/stdlib/qsort.c
index 8adb714..71d9dc9 100644
--- a/lib/libc/stdlib/qsort.c
+++ b/lib/libc/stdlib/qsort.c
@@ -52,10 +52,10 @@ static inline void swapfunc __P((char *, char *, int, int));
*/
#define swapcode(TYPE, parmi, parmj, n) { \
long i = (n) / sizeof (TYPE); \
- register TYPE *pi = (TYPE *) (parmi); \
- register TYPE *pj = (TYPE *) (parmj); \
+ TYPE *pi = (TYPE *) (parmi); \
+ TYPE *pj = (TYPE *) (parmj); \
do { \
- register TYPE t = *pi; \
+ TYPE t = *pi; \
*pi++ = *pj; \
*pj++ = t; \
} while (--i > 0); \
diff --git a/lib/libc/stdlib/radixsort.c b/lib/libc/stdlib/radixsort.c
index 0a583ac..873c7ec 100644
--- a/lib/libc/stdlib/radixsort.c
+++ b/lib/libc/stdlib/radixsort.c
@@ -37,6 +37,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)radixsort.c 8.2 (Berkeley) 4/28/95";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
/*
* Radixsort routines.
@@ -140,8 +142,8 @@ r_sort_a(a, n, i, tr, endch)
u_int endch;
{
static int count[256], nc, bmin;
- register int c;
- register const u_char **ak, *r;
+ int c;
+ const u_char **ak, *r;
stack s[SIZE], *sp, *sp0, *sp1, temp;
int *cp, bigc;
const u_char **an, *t, **aj, **top[256];
@@ -231,8 +233,8 @@ r_sort_b(a, ta, n, i, tr, endch)
u_int endch;
{
static int count[256], nc, bmin;
- register int c;
- register const u_char **ak, **ai;
+ int c;
+ const u_char **ak, **ai;
stack s[512], *sp, *sp0, *sp1, temp;
const u_char **top[256];
int *cp, bigc;
@@ -297,12 +299,12 @@ r_sort_b(a, ta, n, i, tr, endch)
static inline void
simplesort(a, n, b, tr, endch) /* insertion sort */
- register const u_char **a;
+ const u_char **a;
int n, b;
- register const u_char *tr;
+ const u_char *tr;
u_int endch;
{
- register u_char ch;
+ u_char ch;
const u_char **ak, **ai, *s, *t;
for (ak = a+1; --n >= 1; ak++)
diff --git a/lib/libc/stdlib/random.c b/lib/libc/stdlib/random.c
index df5154e..be12368 100644
--- a/lib/libc/stdlib/random.c
+++ b/lib/libc/stdlib/random.c
@@ -81,7 +81,7 @@ static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95";
* period of the generator is approximately deg*(2**deg - 1); thus doubling
* the amount of state information has a vast influence on the period of the
* generator. Note: the deg*(2**deg - 1) is an approximation only good for
- * large deg, when the period of the shift register is the dominant factor.
+ * large deg, when the period of the shift is the dominant factor.
* With deg equal to seven, the period is actually much longer than the
* 7*(2**7 - 1) predicted by this formula.
*
@@ -217,7 +217,7 @@ static long *end_ptr = &randtbl[DEG_3 + 1];
static inline long good_rand __P((long));
static inline long good_rand (x)
- register long x;
+ long x;
{
#ifdef USE_WEAK_SEEDING
/*
@@ -235,7 +235,7 @@ static inline long good_rand (x)
* Park and Miller, Communications of the ACM, vol. 31, no. 10,
* October 1988, p. 1195.
*/
- register long hi, lo;
+ long hi, lo;
hi = x / 127773;
lo = x % 127773;
@@ -262,7 +262,7 @@ void
srandom(x)
unsigned long x;
{
- register long i;
+ long i;
if (rand_type == TYPE_0)
state[0] = x;
@@ -351,8 +351,8 @@ initstate(seed, arg_state, n)
char *arg_state; /* pointer to state array */
long n; /* # bytes of state info */
{
- register char *ostate = (char *)(&state[-1]);
- register long *long_arg_state = (long *) arg_state;
+ char *ostate = (char *)(&state[-1]);
+ long *long_arg_state = (long *) arg_state;
if (rand_type == TYPE_0)
state[-1] = rand_type;
@@ -417,9 +417,9 @@ char *
setstate(arg_state)
char *arg_state; /* pointer to state array */
{
- register long *new_state = (long *) arg_state;
- register long type = new_state[0] % MAX_TYPES;
- register long rear = new_state[0] / MAX_TYPES;
+ long *new_state = (long *) arg_state;
+ long type = new_state[0] % MAX_TYPES;
+ long rear = new_state[0] / MAX_TYPES;
char *ostate = (char *)(&state[-1]);
if (rand_type == TYPE_0)
@@ -469,8 +469,8 @@ setstate(arg_state)
long
random()
{
- register long i;
- register long *f, *r;
+ long i;
+ long *f, *r;
if (rand_type == TYPE_0) {
i = state[0];
diff --git a/lib/libc/stdlib/setenv.c b/lib/libc/stdlib/setenv.c
index cd82c0d..ef10810 100644
--- a/lib/libc/stdlib/setenv.c
+++ b/lib/libc/stdlib/setenv.c
@@ -51,13 +51,13 @@ char *__findenv __P((const char *, int *));
*/
int
setenv(name, value, rewrite)
- register const char *name;
- register const char *value;
+ const char *name;
+ const char *value;
int rewrite;
{
extern char **environ;
static char **alloced; /* if allocated space before */
- register char *c;
+ char *c;
int l_value, offset;
if (*value == '=') /* no `=' in value */
@@ -71,8 +71,8 @@ setenv(name, value, rewrite)
return (0);
}
} else { /* create new slot */
- register int cnt;
- register char **p;
+ int cnt;
+ char **p;
for (p = environ, cnt = 0; *p; ++p, ++cnt);
if (alloced == environ) { /* just increase size */
@@ -111,7 +111,7 @@ unsetenv(name)
const char *name;
{
extern char **environ;
- register char **p;
+ char **p;
int offset;
while (__findenv(name, &offset)) /* if set multiple times */
diff --git a/lib/libc/stdlib/strhash.c b/lib/libc/stdlib/strhash.c
index 8de4f3f..8da9064 100644
--- a/lib/libc/stdlib/strhash.c
+++ b/lib/libc/stdlib/strhash.c
@@ -100,7 +100,7 @@ static hash_node *list_find(caddr_t key, hash_node *head);
hash_table *
hash_create(int size)
{
- register int i;
+ int i;
hash_table *new = (hash_table *)malloc(sizeof(hash_table));
if (!new || size < 0){
@@ -293,8 +293,8 @@ assign_key(char *key, hash_node *node)
void
hash_traverse(hash_table *table, int (*func)(), void *arg)
{
- register int i;
- register int size = table->size;
+ int i;
+ int size = table->size;
if (!func)
return;
@@ -320,8 +320,8 @@ hash_traverse(hash_table *table, int (*func)(), void *arg)
void
hash_purge(hash_table *table, void (*purge_func)(char *p1, void *p2))
{
- register int i;
- register int size = table->size;
+ int i;
+ int size = table->size;
for (i = 0; i < size; i++) {
hash_node *n = table->buckets[i];
@@ -350,7 +350,7 @@ hash_purge(hash_table *table, void (*purge_func)(char *p1, void *p2))
void
hash_stats(hash_table *table, int verbose)
{
- register int i;
+ int i;
int total_elements = 0;
int non_empty_buckets = 0;
int max_count = 0;
diff --git a/lib/libc/stdtime/asctime.c b/lib/libc/stdtime/asctime.c
index d6e02b8..06df9a7 100644
--- a/lib/libc/stdtime/asctime.c
+++ b/lib/libc/stdtime/asctime.c
@@ -51,8 +51,8 @@ char *result;
** three explicit spaces, two explicit colons, a newline,
** and a trailing ASCII nul).
*/
- register const char * wn;
- register const char * mn;
+ const char * wn;
+ const char * mn;
if (timeptr->tm_wday < 0 || timeptr->tm_wday >= DAYSPERWEEK)
wn = "???";
diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c
index eaee232..28a7b68 100644
--- a/lib/libc/stdtime/localtime.c
+++ b/lib/libc/stdtime/localtime.c
@@ -207,8 +207,8 @@ static long
detzcode(codep)
const char * const codep;
{
- register long result;
- register int i;
+ long result;
+ int i;
result = (codep[0] & 0x80) ? ~0L : 0L;
for (i = 0; i < 4; ++i)
@@ -219,8 +219,8 @@ const char * const codep;
static void
settzname P((void))
{
- register struct state * sp = lclptr;
- register int i;
+ struct state * sp = lclptr;
+ int i;
tzname[0] = wildabbr;
tzname[1] = wildabbr;
@@ -238,7 +238,7 @@ settzname P((void))
}
#endif /* defined ALL_STATE */
for (i = 0; i < sp->typecnt; ++i) {
- register const struct ttinfo * const ttisp = &sp->ttis[i];
+ const struct ttinfo * const ttisp = &sp->ttis[i];
tzname[ttisp->tt_isdst] =
&sp->chars[ttisp->tt_abbrind];
@@ -257,7 +257,7 @@ settzname P((void))
** And to get the latest zone names into tzname. . .
*/
for (i = 0; i < sp->timecnt; ++i) {
- register const struct ttinfo * const ttisp =
+ const struct ttinfo * const ttisp =
&sp->ttis[
sp->types[i]];
@@ -268,12 +268,12 @@ settzname P((void))
static int
tzload(name, sp)
-register const char * name;
-register struct state * const sp;
+const char * name;
+struct state * const sp;
{
- register const char * p;
- register int i;
- register int fid;
+ const char * p;
+ int i;
+ int fid;
/* XXX The following is from OpenBSD, and I'm not sure it is correct */
if (name != NULL && issetugid() != 0)
@@ -283,7 +283,7 @@ register struct state * const sp;
if (name == NULL && (name = TZDEFAULT) == NULL)
return -1;
{
- register int doaccess;
+ int doaccess;
struct stat stab;
/*
** Section 4.9.1 of the C standard says that
@@ -367,7 +367,7 @@ register struct state * const sp;
return -1;
}
for (i = 0; i < sp->typecnt; ++i) {
- register struct ttinfo * ttisp;
+ struct ttinfo * ttisp;
ttisp = &sp->ttis[i];
ttisp->tt_gmtoff = detzcode(p);
@@ -384,7 +384,7 @@ register struct state * const sp;
sp->chars[i] = *p++;
sp->chars[i] = '\0'; /* ensure '\0' at end */
for (i = 0; i < sp->leapcnt; ++i) {
- register struct lsinfo * lsisp;
+ struct lsinfo * lsisp;
lsisp = &sp->lsis[i];
lsisp->ls_trans = detzcode(p);
@@ -393,7 +393,7 @@ register struct state * const sp;
p += 4;
}
for (i = 0; i < sp->typecnt; ++i) {
- register struct ttinfo * ttisp;
+ struct ttinfo * ttisp;
ttisp = &sp->ttis[i];
if (ttisstdcnt == 0)
@@ -406,7 +406,7 @@ register struct state * const sp;
}
}
for (i = 0; i < sp->typecnt; ++i) {
- register struct ttinfo * ttisp;
+ struct ttinfo * ttisp;
ttisp = &sp->ttis[i];
if (ttisgmtcnt == 0)
@@ -439,9 +439,9 @@ static const int year_lengths[2] = {
static const char *
getzname(strp)
-register const char * strp;
+const char * strp;
{
- register char c;
+ char c;
while ((c = *strp) != '\0' && !is_digit(c) && c != ',' && c != '-' &&
c != '+')
@@ -458,13 +458,13 @@ register const char * strp;
static const char *
getnum(strp, nump, min, max)
-register const char * strp;
+const char * strp;
int * const nump;
const int min;
const int max;
{
- register char c;
- register int num;
+ char c;
+ int num;
if (strp == NULL || !is_digit(c = *strp))
return NULL;
@@ -491,7 +491,7 @@ const int max;
static const char *
getsecs(strp, secsp)
-register const char * strp;
+const char * strp;
long * const secsp;
{
int num;
@@ -533,10 +533,10 @@ long * const secsp;
static const char *
getoffset(strp, offsetp)
-register const char * strp;
+const char * strp;
long * const offsetp;
{
- register int neg = 0;
+ int neg = 0;
if (*strp == '-') {
neg = 1;
@@ -561,7 +561,7 @@ long * const offsetp;
static const char *
getrule(strp, rulep)
const char * strp;
-register struct rule * const rulep;
+struct rule * const rulep;
{
if (*strp == 'J') {
/*
@@ -616,12 +616,12 @@ static time_t
transtime(janfirst, year, rulep, offset)
const time_t janfirst;
const int year;
-register const struct rule * const rulep;
+const struct rule * const rulep;
const long offset;
{
- register int leapyear;
- register time_t value;
- register int i;
+ int leapyear;
+ time_t value;
+ int i;
int d, m1, yy0, yy1, yy2, dow;
INITIALIZE(value);
@@ -710,7 +710,7 @@ const long offset;
static int
tzparse(name, sp, lastditch)
const char * name;
-register struct state * const sp;
+struct state * const sp;
const int lastditch;
{
const char * stdname;
@@ -719,10 +719,10 @@ const int lastditch;
size_t dstlen;
long stdoffset;
long dstoffset;
- register time_t * atp;
- register unsigned char * typep;
- register char * cp;
- register int load_result;
+ time_t * atp;
+ unsigned char * typep;
+ char * cp;
+ int load_result;
INITIALIZE(dstname);
stdname = name;
@@ -762,8 +762,8 @@ const int lastditch;
if (*name == ',' || *name == ';') {
struct rule start;
struct rule end;
- register int year;
- register time_t janfirst;
+ int year;
+ time_t janfirst;
time_t starttime;
time_t endtime;
@@ -812,12 +812,12 @@ const int lastditch;
SECSPERDAY;
}
} else {
- register long theirstdoffset;
- register long theirdstoffset;
- register long theiroffset;
- register int isdst;
- register int i;
- register int j;
+ long theirstdoffset;
+ long theirdstoffset;
+ long theiroffset;
+ int isdst;
+ int i;
+ int j;
if (*name != '\0')
return -1;
@@ -961,7 +961,7 @@ tzsetwall P((void))
static void
tzset_basic(void)
{
- register const char * name;
+ const char * name;
name = getenv("TZ");
if (name == NULL) {
@@ -1023,9 +1023,9 @@ const time_t * const timep;
const long offset;
struct tm * const tmp;
{
- register struct state * sp;
- register const struct ttinfo * ttisp;
- register int i;
+ struct state * sp;
+ const struct ttinfo * ttisp;
+ int i;
const time_t t = *timep;
sp = lclptr;
@@ -1214,18 +1214,18 @@ static void
timesub(timep, offset, sp, tmp)
const time_t * const timep;
const long offset;
-register const struct state * const sp;
-register struct tm * const tmp;
+const struct state * const sp;
+struct tm * const tmp;
{
- register const struct lsinfo * lp;
- register long days;
- register long rem;
- register int y;
- register int yleap;
- register const int * ip;
- register long corr;
- register int hit;
- register int i;
+ const struct lsinfo * lp;
+ long days;
+ long rem;
+ int y;
+ int yleap;
+ const int * ip;
+ long corr;
+ int hit;
+ int i;
corr = 0;
hit = 0;
@@ -1289,7 +1289,7 @@ register struct tm * const tmp;
y = EPOCH_YEAR;
#define LEAPS_THRU_END_OF(y) ((y) / 4 - (y) / 100 + (y) / 400)
while (days < 0 || days >= (long) year_lengths[yleap = isleap(y)]) {
- register int newy;
+ int newy;
newy = y + days / DAYSPERNYEAR;
if (days < 0)
@@ -1369,7 +1369,7 @@ int * const tensptr;
int * const unitsptr;
const int base;
{
- register int tensdelta;
+ int tensdelta;
tensdelta = (*unitsptr >= 0) ?
(*unitsptr / base) :
@@ -1380,10 +1380,10 @@ const int base;
static int
tmcomp(atmp, btmp)
-register const struct tm * const atmp;
-register const struct tm * const btmp;
+const struct tm * const atmp;
+const struct tm * const btmp;
{
- register int result;
+ int result;
if ((result = (atmp->tm_year - btmp->tm_year)) == 0 &&
(result = (atmp->tm_mon - btmp->tm_mon)) == 0 &&
@@ -1401,11 +1401,11 @@ void (* const funcp) P((const time_t*, long, struct tm*));
const long offset;
int * const okayp;
{
- register const struct state * sp;
- register int dir;
- register int bits;
- register int i, j ;
- register int saved_seconds;
+ const struct state * sp;
+ int dir;
+ int bits;
+ int i, j ;
+ int saved_seconds;
time_t newt;
time_t t;
struct tm yourtm, mytm;
@@ -1548,9 +1548,9 @@ struct tm * const tmp;
void (* const funcp) P((const time_t *, long, struct tm *));
const long offset;
{
- register time_t t;
- register const struct state * sp;
- register int samei, otheri;
+ time_t t;
+ const struct state * sp;
+ int samei, otheri;
int okay;
if (tmp->tm_isdst > 1)
@@ -1683,9 +1683,9 @@ static long
leapcorr(timep)
time_t * timep;
{
- register struct state * sp;
- register struct lsinfo * lp;
- register int i;
+ struct state * sp;
+ struct lsinfo * lp;
+ int i;
sp = lclptr;
i = sp->leapcnt;
diff --git a/lib/libc/string/bcmp.c b/lib/libc/string/bcmp.c
index 6fd1265..013d0d6 100644
--- a/lib/libc/string/bcmp.c
+++ b/lib/libc/string/bcmp.c
@@ -45,9 +45,9 @@ __FBSDID("$FreeBSD$");
int
bcmp(b1, b2, length)
const void *b1, *b2;
- register size_t length;
+ size_t length;
{
- register char *p1, *p2;
+ char *p1, *p2;
if (length == 0)
return(0);
diff --git a/lib/libc/string/bcopy.c b/lib/libc/string/bcopy.c
index 23cc00f..2a6343b 100644
--- a/lib/libc/string/bcopy.c
+++ b/lib/libc/string/bcopy.c
@@ -70,11 +70,11 @@ bcopy(src0, dst0, length)
#endif
void *dst0;
const void *src0;
- register size_t length;
+ size_t length;
{
- register char *dst = dst0;
- register const char *src = src0;
- register size_t t;
+ char *dst = dst0;
+ const char *src = src0;
+ size_t t;
if (length == 0 || dst == src) /* nothing to do */
goto done;
diff --git a/lib/libc/string/ffs.c b/lib/libc/string/ffs.c
index 231bc25..14985a4 100644
--- a/lib/libc/string/ffs.c
+++ b/lib/libc/string/ffs.c
@@ -44,9 +44,9 @@ __FBSDID("$FreeBSD$");
*/
int
ffs(mask)
- register int mask;
+ int mask;
{
- register int bit;
+ int bit;
if (mask == 0)
return(0);
diff --git a/lib/libc/string/index.c b/lib/libc/string/index.c
index 1f7973a..7eaf3d7 100644
--- a/lib/libc/string/index.c
+++ b/lib/libc/string/index.c
@@ -46,7 +46,7 @@ strchr(p, ch)
#else
index(p, ch)
#endif
- register const char *p, ch;
+ const char *p, ch;
{
for (;; ++p) {
if (*p == ch)
diff --git a/lib/libc/string/memccpy.c b/lib/libc/string/memccpy.c
index 665fdb2..62c47a1 100644
--- a/lib/libc/string/memccpy.c
+++ b/lib/libc/string/memccpy.c
@@ -44,13 +44,13 @@ memccpy(t, f, c, n)
void *t;
const void *f;
int c;
- register size_t n;
+ size_t n;
{
if (n) {
- register unsigned char *tp = t;
- register const unsigned char *fp = f;
- register unsigned char uc = c;
+ unsigned char *tp = t;
+ const unsigned char *fp = f;
+ unsigned char uc = c;
do {
if ((*tp++ = *fp++) == uc)
return (tp);
diff --git a/lib/libc/string/memchr.c b/lib/libc/string/memchr.c
index 16b2c77..a217a80 100644
--- a/lib/libc/string/memchr.c
+++ b/lib/libc/string/memchr.c
@@ -45,11 +45,11 @@ __FBSDID("$FreeBSD$");
void *
memchr(s, c, n)
const void *s;
- register unsigned char c;
- register size_t n;
+ unsigned char c;
+ size_t n;
{
if (n != 0) {
- register const unsigned char *p = s;
+ const unsigned char *p = s;
do {
if (*p++ == c)
diff --git a/lib/libc/string/memcmp.c b/lib/libc/string/memcmp.c
index 9711308..6b28c31 100644
--- a/lib/libc/string/memcmp.c
+++ b/lib/libc/string/memcmp.c
@@ -51,7 +51,7 @@ memcmp(s1, s2, n)
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 e08259d..462dbe9 100644
--- a/lib/libc/string/memset.c
+++ b/lib/libc/string/memset.c
@@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
void
bzero(dst0, length)
void *dst0;
- register size_t length;
+ size_t length;
#else
#define RETURN return (dst0)
#define VAL c0
@@ -65,15 +65,15 @@ bzero(dst0, length)
void *
memset(dst0, c0, length)
void *dst0;
- register int c0;
- register size_t length;
+ int c0;
+ size_t length;
#endif
{
- register size_t t;
+ size_t t;
#ifndef BZERO
- register u_int c;
+ u_int c;
#endif
- register u_char *dst;
+ u_char *dst;
dst = dst0;
/*
diff --git a/lib/libc/string/rindex.c b/lib/libc/string/rindex.c
index fbf698b..1b08dd1 100644
--- a/lib/libc/string/rindex.c
+++ b/lib/libc/string/rindex.c
@@ -46,10 +46,10 @@ strrchr(p, ch)
#else
rindex(p, ch)
#endif
- register const char *p;
- register int ch;
+ const char *p;
+ int ch;
{
- 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 c280ef4..830b8a5 100644
--- a/lib/libc/string/strcasecmp.c
+++ b/lib/libc/string/strcasecmp.c
@@ -46,7 +46,7 @@ int
strcasecmp(s1, s2)
const char *s1, *s2;
{
- register const u_char
+ const u_char
*us1 = (const u_char *)s1,
*us2 = (const u_char *)s2;
@@ -59,10 +59,10 @@ strcasecmp(s1, s2)
int
strncasecmp(s1, s2, n)
const char *s1, *s2;
- register size_t n;
+ size_t n;
{
if (n != 0) {
- register const u_char
+ const u_char
*us1 = (const u_char *)s1,
*us2 = (const u_char *)s2;
diff --git a/lib/libc/string/strcasestr.c b/lib/libc/string/strcasestr.c
index bbe25cb..d950766 100644
--- a/lib/libc/string/strcasestr.c
+++ b/lib/libc/string/strcasestr.c
@@ -45,10 +45,10 @@ __FBSDID("$FreeBSD$");
*/
char *
strcasestr(s, find)
- register const char *s, *find;
+ const char *s, *find;
{
- register char c, sc;
- register size_t len;
+ char c, sc;
+ size_t len;
if ((c = *find++) != 0) {
c = tolower((unsigned char)c);
diff --git a/lib/libc/string/strcat.c b/lib/libc/string/strcat.c
index 4237d8a..2bfd7b7 100644
--- a/lib/libc/string/strcat.c
+++ b/lib/libc/string/strcat.c
@@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$");
char *
strcat(s, append)
- register char *s;
- register const char *append;
+ char *s;
+ const char *append;
{
char *save = s;
diff --git a/lib/libc/string/strcmp.c b/lib/libc/string/strcmp.c
index d444cc1..a6bb0d5 100644
--- a/lib/libc/string/strcmp.c
+++ b/lib/libc/string/strcmp.c
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
*/
int
strcmp(s1, s2)
- register const char *s1, *s2;
+ const char *s1, *s2;
{
while (*s1 == *s2++)
if (*s1++ == 0)
diff --git a/lib/libc/string/strcpy.c b/lib/libc/string/strcpy.c
index ce54d59..590a5fb 100644
--- a/lib/libc/string/strcpy.c
+++ b/lib/libc/string/strcpy.c
@@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$");
char *
strcpy(to, from)
- register char *to;
- register const char *from;
+ char *to;
+ const char *from;
{
char *save = to;
diff --git a/lib/libc/string/strcspn.c b/lib/libc/string/strcspn.c
index d4dac4d..2ec9326 100644
--- a/lib/libc/string/strcspn.c
+++ b/lib/libc/string/strcspn.c
@@ -48,10 +48,10 @@ __FBSDID("$FreeBSD$");
size_t
strcspn(s1, s2)
const char *s1;
- register const char *s2;
+ 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/strlcat.c b/lib/libc/string/strlcat.c
index 71c502c..2c2fa56 100644
--- a/lib/libc/string/strlcat.c
+++ b/lib/libc/string/strlcat.c
@@ -49,9 +49,9 @@ strlcat(dst, src, siz)
const char *src;
size_t siz;
{
- register char *d = dst;
- register const char *s = src;
- register size_t n = siz;
+ char *d = dst;
+ const char *s = src;
+ size_t n = siz;
size_t dlen;
/* Find the end of dst and adjust bytes left but don't go past end */
diff --git a/lib/libc/string/strlcpy.c b/lib/libc/string/strlcpy.c
index 30ec341..a8a6cb7 100644
--- a/lib/libc/string/strlcpy.c
+++ b/lib/libc/string/strlcpy.c
@@ -46,9 +46,9 @@ size_t strlcpy(dst, src, siz)
const char *src;
size_t siz;
{
- register char *d = dst;
- register const char *s = src;
- register size_t n = siz;
+ char *d = dst;
+ const char *s = src;
+ size_t n = siz;
/* Copy as many bytes as will fit */
if (n != 0 && --n != 0) {
diff --git a/lib/libc/string/strlen.c b/lib/libc/string/strlen.c
index 96076af..841c7c2 100644
--- a/lib/libc/string/strlen.c
+++ b/lib/libc/string/strlen.c
@@ -43,7 +43,7 @@ size_t
strlen(str)
const char *str;
{
- register const char *s;
+ const char *s;
for (s = str; *s; ++s);
return(s - str);
diff --git a/lib/libc/string/strmode.c b/lib/libc/string/strmode.c
index 55b72c2..fe2cf9e 100644
--- a/lib/libc/string/strmode.c
+++ b/lib/libc/string/strmode.c
@@ -43,8 +43,8 @@ __FBSDID("$FreeBSD$");
void
strmode(mode, p)
- register mode_t mode;
- register char *p;
+ mode_t mode;
+ char *p;
{
/* print type */
switch (mode & S_IFMT) {
diff --git a/lib/libc/string/strncat.c b/lib/libc/string/strncat.c
index a03848f..cc5ab67 100644
--- a/lib/libc/string/strncat.c
+++ b/lib/libc/string/strncat.c
@@ -50,11 +50,11 @@ char *
strncat(dst, src, n)
char *dst;
const char *src;
- register size_t n;
+ 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 fff21f9..60d09c1 100644
--- a/lib/libc/string/strncmp.c
+++ b/lib/libc/string/strncmp.c
@@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$");
int
strncmp(s1, s2, n)
- register const char *s1, *s2;
- register size_t n;
+ const char *s1, *s2;
+ size_t n;
{
if (n == 0)
diff --git a/lib/libc/string/strncpy.c b/lib/libc/string/strncpy.c
index c9a0525..771ebe6 100644
--- a/lib/libc/string/strncpy.c
+++ b/lib/libc/string/strncpy.c
@@ -50,11 +50,11 @@ char *
strncpy(dst, src, n)
char *dst;
const char *src;
- register size_t n;
+ 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 e9196da..42e8c62 100644
--- a/lib/libc/string/strpbrk.c
+++ b/lib/libc/string/strpbrk.c
@@ -44,10 +44,10 @@ __FBSDID("$FreeBSD$");
*/
char *
strpbrk(s1, s2)
- register const char *s1, *s2;
+ const char *s1, *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 5e9fa9f..dd5ec0b 100644
--- a/lib/libc/string/strsep.c
+++ b/lib/libc/string/strsep.c
@@ -53,12 +53,12 @@ __FBSDID("$FreeBSD$");
*/
char *
strsep(stringp, delim)
- register char **stringp;
- register const char *delim;
+ 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 330efa8..f839e44 100644
--- a/lib/libc/string/strsignal.c
+++ b/lib/libc/string/strsignal.c
@@ -47,8 +47,8 @@ strsignal(num)
{
#define UPREFIX "Unknown signal: "
static char ebuf[40] = UPREFIX; /* 64-bit number + slop */
- register unsigned int signum;
- register char *p, *t;
+ unsigned int signum;
+ char *p, *t;
char tmp[40];
signum = num; /* convert to unsigned */
diff --git a/lib/libc/string/strspn.c b/lib/libc/string/strspn.c
index 6d2510f..5612ba0 100644
--- a/lib/libc/string/strspn.c
+++ b/lib/libc/string/strspn.c
@@ -45,10 +45,10 @@ __FBSDID("$FreeBSD$");
size_t
strspn(s1, s2)
const char *s1;
- register const char *s2;
+ const char *s2;
{
- register const char *p = s1, *spanp;
- register char c, sc;
+ const char *p = s1, *spanp;
+ char c, sc;
/*
* Skip any characters in s2, excluding the terminating \0.
diff --git a/lib/libc/string/strstr.c b/lib/libc/string/strstr.c
index f8535ad1..3f6d81c 100644
--- a/lib/libc/string/strstr.c
+++ b/lib/libc/string/strstr.c
@@ -47,10 +47,10 @@ __FBSDID("$FreeBSD$");
*/
char *
strstr(s, find)
- register const char *s, *find;
+ const char *s, *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/swab.c b/lib/libc/string/swab.c
index 22710df..70da36f 100644
--- a/lib/libc/string/swab.c
+++ b/lib/libc/string/swab.c
@@ -48,9 +48,9 @@ swab(from, to, len)
void *to;
size_t len;
{
- register unsigned long temp;
- register int n;
- register char *fp, *tp;
+ unsigned long temp;
+ int n;
+ char *fp, *tp;
n = (len >> 1) + 1;
fp = (char *)from;
OpenPOWER on IntegriCloud