Remove all usage of the "register" storage class specifier.
This commit is contained in:
parent
f350160963
commit
68229837ff
@ -484,7 +484,7 @@ static void send_bits(int value, int length)
|
||||
*/
|
||||
static unsigned bi_reverse(unsigned code, int len)
|
||||
{
|
||||
register unsigned res = 0;
|
||||
unsigned res = 0;
|
||||
|
||||
do {
|
||||
res |= code & 1;
|
||||
@ -782,7 +782,7 @@ static void check_match(IPos start, IPos match, int length);
|
||||
*/
|
||||
static void lm_init(ush * flags)
|
||||
{
|
||||
register unsigned j;
|
||||
unsigned j;
|
||||
|
||||
/* Initialize the hash table. */
|
||||
memset(head, 0, HASH_SIZE * sizeof(*head));
|
||||
@ -832,9 +832,9 @@ static void lm_init(ush * flags)
|
||||
static int longest_match(IPos cur_match)
|
||||
{
|
||||
unsigned chain_length = max_chain_length; /* max hash chain length */
|
||||
register uch *scan = window + strstart; /* current string */
|
||||
register uch *match; /* matched string */
|
||||
register int len; /* length of current match */
|
||||
uch *scan = window + strstart; /* current string */
|
||||
uch *match; /* matched string */
|
||||
int len; /* length of current match */
|
||||
int best_len = prev_length; /* best match length so far */
|
||||
IPos limit =
|
||||
strstart > (IPos) MAX_DIST ? strstart - (IPos) MAX_DIST : NIL;
|
||||
@ -848,9 +848,9 @@ static int longest_match(IPos cur_match)
|
||||
#if HASH_BITS < 8 || MAX_MATCH != 258
|
||||
# error Code too clever
|
||||
#endif
|
||||
register uch *strend = window + strstart + MAX_MATCH;
|
||||
register uch scan_end1 = scan[best_len - 1];
|
||||
register uch scan_end = scan[best_len];
|
||||
uch *strend = window + strstart + MAX_MATCH;
|
||||
uch scan_end1 = scan[best_len - 1];
|
||||
uch scan_end = scan[best_len];
|
||||
|
||||
/* Do not waste too much time if we already have a good match: */
|
||||
if (prev_length >= good_match) {
|
||||
@ -937,7 +937,7 @@ static void check_match(IPos start, IPos match, int length)
|
||||
*/
|
||||
static void fill_window(void)
|
||||
{
|
||||
register unsigned n, m;
|
||||
unsigned n, m;
|
||||
unsigned more =
|
||||
(unsigned) (window_size - (ulg) lookahead - (ulg) strstart);
|
||||
/* Amount of free space at the end of the window. */
|
||||
@ -1005,7 +1005,7 @@ static ulg deflate(void)
|
||||
IPos prev_match; /* previous match */
|
||||
int flush; /* set if current block must be flushed */
|
||||
int match_available = 0; /* set if previous match exists */
|
||||
register unsigned match_length = MIN_MATCH - 1; /* length of best match */
|
||||
unsigned match_length = MIN_MATCH - 1; /* length of best match */
|
||||
|
||||
/* Process the input block. */
|
||||
while (lookahead != 0) {
|
||||
|
@ -514,7 +514,7 @@ static int inflate_stored(int my_n, int my_b_stored, int my_k_stored, int setup)
|
||||
static int inflate_block(int *e)
|
||||
{
|
||||
unsigned t; /* block type */
|
||||
register unsigned int b; /* bit buffer */
|
||||
unsigned int b; /* bit buffer */
|
||||
unsigned int k; /* number of bits in bit buffer */
|
||||
|
||||
/* make local bit buffer */
|
||||
|
@ -71,7 +71,7 @@ int bb_echo(int ATTRIBUTE_UNUSED argc, char **argv)
|
||||
just_echo:
|
||||
#endif
|
||||
while (*argv) {
|
||||
register int c;
|
||||
int c;
|
||||
|
||||
while ((c = *(*argv)++)) {
|
||||
if (c == eflag) { /* Check for escape seq. */
|
||||
|
@ -35,7 +35,7 @@
|
||||
static void
|
||||
odoffset(int argc, char ***argvp)
|
||||
{
|
||||
register char *num, *p;
|
||||
char *num, *p;
|
||||
int base;
|
||||
char *end;
|
||||
|
||||
|
@ -554,7 +554,7 @@ static void initialize_group_array(void)
|
||||
/* Return non-zero if GID is one that we have in our groups list. */
|
||||
static int is_a_group_member(gid_t gid)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
/* Short-circuit if possible, maybe saving a call to getgroups(). */
|
||||
if (gid == getgid() || gid == getegid())
|
||||
|
@ -178,7 +178,7 @@ static unsigned int expand(const char *arg, char *buffer)
|
||||
|
||||
static int complement(char *buffer, int buffer_len)
|
||||
{
|
||||
register short i, j, ix;
|
||||
short i, j, ix;
|
||||
char conv[ASCII + 2];
|
||||
|
||||
ix = 0;
|
||||
@ -195,7 +195,7 @@ static int complement(char *buffer, int buffer_len)
|
||||
|
||||
int tr_main(int argc, char **argv)
|
||||
{
|
||||
register unsigned char *ptr;
|
||||
unsigned char *ptr;
|
||||
int output_length=0, input_length;
|
||||
int idx = 1;
|
||||
int i;
|
||||
|
@ -463,7 +463,7 @@ static void syntax_error(const char * const message)
|
||||
|
||||
static unsigned int hashidx(const char *name)
|
||||
{
|
||||
register unsigned int idx=0;
|
||||
unsigned int idx=0;
|
||||
|
||||
while (*name) idx = *name++ + (idx << 6) - idx;
|
||||
return idx;
|
||||
@ -574,7 +574,7 @@ static void hash_remove(xhash *hash, const char *name)
|
||||
|
||||
static void skip_spaces(char **s)
|
||||
{
|
||||
register char *p = *s;
|
||||
char *p = *s;
|
||||
|
||||
while(*p == ' ' || *p == '\t' ||
|
||||
(*p == '\\' && *(p+1) == '\n' && (++p, ++t.lineno))) {
|
||||
@ -585,7 +585,7 @@ static void skip_spaces(char **s)
|
||||
|
||||
static char *nextword(char **s)
|
||||
{
|
||||
register char *p = *s;
|
||||
char *p = *s;
|
||||
|
||||
while (*(*s)++) ;
|
||||
|
||||
@ -594,7 +594,7 @@ static char *nextword(char **s)
|
||||
|
||||
static char nextchar(char **s)
|
||||
{
|
||||
register char c, *pps;
|
||||
char c, *pps;
|
||||
|
||||
c = *((*s)++);
|
||||
pps = *s;
|
||||
@ -686,7 +686,7 @@ static var *setvar_u(var *v, const char *value)
|
||||
/* set array element to user string */
|
||||
static void setari_u(var *a, int idx, const char *s)
|
||||
{
|
||||
register var *v;
|
||||
var *v;
|
||||
static char sidx[12];
|
||||
|
||||
sprintf(sidx, "%d", idx);
|
||||
@ -991,7 +991,7 @@ static void rollback_token(void) { t.rollback = TRUE; }
|
||||
|
||||
static node *new_node(uint32_t info)
|
||||
{
|
||||
register node *n;
|
||||
node *n;
|
||||
|
||||
n = (node *)xzalloc(sizeof(node));
|
||||
n->info = info;
|
||||
@ -1136,7 +1136,7 @@ static node *parse_expr(uint32_t iexp)
|
||||
/* add node to chain. Return ptr to alloc'd node */
|
||||
static node *chain_node(uint32_t info)
|
||||
{
|
||||
register node *n;
|
||||
node *n;
|
||||
|
||||
if (! seq->first)
|
||||
seq->first = seq->last = new_node(0);
|
||||
@ -1355,7 +1355,7 @@ static void parse_program(char *p)
|
||||
|
||||
static node *mk_splitter(char *s, tsplitter *spl)
|
||||
{
|
||||
register regex_t *re, *ire;
|
||||
regex_t *re, *ire;
|
||||
node *n;
|
||||
|
||||
re = &spl->re[0];
|
||||
|
20
libbb/dump.c
20
libbb/dump.c
@ -37,9 +37,9 @@ static const char lcc[] = "diouxX";
|
||||
|
||||
int bb_dump_size(FS * fs)
|
||||
{
|
||||
register FU *fu;
|
||||
register int bcnt, cur_size;
|
||||
register char *fmt;
|
||||
FU *fu;
|
||||
int bcnt, cur_size;
|
||||
char *fmt;
|
||||
const char *p;
|
||||
int prec;
|
||||
|
||||
@ -354,7 +354,7 @@ static unsigned char *get(void)
|
||||
{
|
||||
static int ateof = 1;
|
||||
static unsigned char *curp=NULL, *savp; /*DBU:[dave@cray.com]initialize curp */
|
||||
register int n;
|
||||
int n;
|
||||
int need, nread;
|
||||
unsigned char *tmpp;
|
||||
|
||||
@ -502,11 +502,11 @@ static void conv_u(PR * pr, unsigned char * p)
|
||||
static void display(void)
|
||||
{
|
||||
/* extern FU *endfu; */
|
||||
register FS *fs;
|
||||
register FU *fu;
|
||||
register PR *pr;
|
||||
register int cnt;
|
||||
register unsigned char *bp;
|
||||
FS *fs;
|
||||
FU *fu;
|
||||
PR *pr;
|
||||
int cnt;
|
||||
unsigned char *bp;
|
||||
|
||||
off_t saveaddress;
|
||||
unsigned char savech = 0, *savebp;
|
||||
@ -650,7 +650,7 @@ static void display(void)
|
||||
|
||||
int bb_dump_dump(char **argv)
|
||||
{
|
||||
register FS *tfs;
|
||||
FS *tfs;
|
||||
|
||||
/* figure out the data block bb_dump_size */
|
||||
for (bb_dump_blocksize = 0, tfs = bb_dump_fshead; tfs; tfs = tfs->nextfs) {
|
||||
|
@ -377,7 +377,7 @@ static int is_my_tty ( const char *tty )
|
||||
static void motd (void)
|
||||
{
|
||||
FILE *fp;
|
||||
register int c;
|
||||
int c;
|
||||
|
||||
if (( fp = fopen ( bb_path_motd_file, "r" ))) {
|
||||
while (( c = getc ( fp )) != EOF )
|
||||
|
@ -87,7 +87,7 @@ uint16_t udhcp_checksum(void *addr, int count)
|
||||
/* Compute Internet Checksum for "count" bytes
|
||||
* beginning at location "addr".
|
||||
*/
|
||||
register int32_t sum = 0;
|
||||
int32_t sum = 0;
|
||||
uint16_t *source = (uint16_t *) addr;
|
||||
|
||||
while (count > 1) {
|
||||
|
@ -13472,7 +13472,7 @@ static const char op_tokens[] = {
|
||||
|
||||
static arith_t arith (const char *expr, int *perrcode)
|
||||
{
|
||||
register char arithval; /* Current character under analysis */
|
||||
char arithval; /* Current character under analysis */
|
||||
operator lasttok, op;
|
||||
operator prec;
|
||||
|
||||
|
@ -707,10 +707,10 @@ static int get_command(FILE * source, char *command)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char* itoa(register int i)
|
||||
static char* itoa(int i)
|
||||
{
|
||||
static char a[7]; /* Max 7 ints */
|
||||
register char *b = a + sizeof(a) - 1;
|
||||
char *b = a + sizeof(a) - 1;
|
||||
int sign = (i < 0);
|
||||
|
||||
if (sign)
|
||||
|
419
shell/msh.c
419
shell/msh.c
File diff suppressed because it is too large
Load Diff
@ -15,7 +15,7 @@
|
||||
|
||||
static void bb_dump_addfile(char *name)
|
||||
{
|
||||
register char *p;
|
||||
char *p;
|
||||
FILE *fp;
|
||||
char *buf;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user