Remove 'register' keyword.
This commit is contained in:
parent
ddf23aa842
commit
8fb3f3f682
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=92889
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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++;
|
||||
|
@ -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++);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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()) )
|
||||
|
@ -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);
|
||||
|
@ -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()) ) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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':
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -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));
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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).
|
||||
|
@ -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®_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®_TRACE))
|
||||
return;
|
||||
|
@ -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"); \
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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®_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®_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 */
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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();
|
||||
|
@ -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 @@ clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz)
|
||||
*/
|
||||
SVCXPRT *
|
||||
svcunix_create(sock, sendsize, recvsize, path)
|
||||
register int sock;
|
||||
int sock;
|
||||
u_int sendsize;
|
||||
u_int recvsize;
|
||||
char *path;
|
||||
|
@ -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;
|
||||
|
@ -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).
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
||||
/*
|
||||
|
@ -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.)
|
||||
|
@ -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 @@ __fpu_ftos(fe, fp)
|
||||
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 @@ zero: res[1] = 0;
|
||||
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 @@ zero: res[1] = res[2] = res[3] = 0;
|
||||
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) {
|
||||
|
@ -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
|
||||
|
||||
/*
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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++) {
|
||||
|
||||
|
@ -56,7 +56,7 @@ static const char rcsid[] =
|
||||
*/
|
||||
int
|
||||
fpurge(fp)
|
||||
register FILE *fp;
|
||||
FILE *fp;
|
||||
{
|
||||
int retval;
|
||||
FLOCKFILE(fp);
|
||||
|
@ -50,7 +50,7 @@ static const char rcsid[] =
|
||||
int
|
||||
fputc(c, fp)
|
||||
int c;
|
||||
register FILE *fp;
|
||||
FILE *fp;
|
||||
{
|
||||
int retval;
|
||||
FLOCKFILE(fp);
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -56,7 +56,7 @@ funopen(cookie, readfn, writefn, seekfn, closefn)
|
||||
#endif
|
||||
int (*closefn)();
|
||||
{
|
||||
register FILE *fp;
|
||||
FILE *fp;
|
||||
int flags;
|
||||
|
||||
if (readfn == NULL) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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";
|
||||
|
@ -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;
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -50,7 +50,7 @@ void
|
||||
perror(s)
|
||||
const char *s;
|
||||
{
|
||||
register struct iovec *v;
|
||||
struct iovec *v;
|
||||
struct iovec iov[4];
|
||||
|
||||
v = iov;
|
||||
|
@ -58,7 +58,7 @@ static const char rcsid[] =
|
||||
int
|
||||
putc(c, fp)
|
||||
int c;
|
||||
register FILE *fp;
|
||||
FILE *fp;
|
||||
{
|
||||
int retval;
|
||||
FLOCKFILE(fp);
|
||||
|
@ -63,7 +63,7 @@ putchar(c)
|
||||
int c;
|
||||
{
|
||||
int retval;
|
||||
register FILE *so = stdout;
|
||||
FILE *so = stdout;
|
||||
|
||||
FLOCKFILE(so);
|
||||
retval = __sputc(c, so);
|
||||
|
@ -46,7 +46,7 @@ static const char rcsid[] =
|
||||
|
||||
void
|
||||
setbuffer(fp, buf, size)
|
||||
register FILE *fp;
|
||||
FILE *fp;
|
||||
char *buf;
|
||||
int size;
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -702,10 +702,10 @@ again: c = *fmt++;
|
||||
*/
|
||||
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 */
|
||||
|
@ -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,
|
||||
|
@ -53,7 +53,7 @@ static const char rcsid[] =
|
||||
*/
|
||||
int
|
||||
__swsetup(fp)
|
||||
register FILE *fp;
|
||||
FILE *fp;
|
||||
{
|
||||
/* make sure stdio is set up */
|
||||
if (!__sdidinit)
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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)) )
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user