Remove `register' keyword.
authorJim Meyering <jim@meyering.net>
Sun, 6 Mar 2005 16:31:51 +0000 (16:31 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 6 Mar 2005 16:31:51 +0000 (16:31 +0000)
src/ls.c
src/sort.c
src/sum.c

index 854b335..f9cf259 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -1087,8 +1087,8 @@ process_signals (void)
 int
 main (int argc, char **argv)
 {
-  register int i;
-  register struct pending *thispend;
+  int i;
+  struct pending *thispend;
   int n_files;
 
   /* The signals that are trapped, and the number of such signals.  */
@@ -2244,9 +2244,9 @@ queue_directory (char const *name, char const *realname, bool command_line_arg)
 static void
 print_dir (char const *name, char const *realname, bool command_line_arg)
 {
-  register DIR *dirp;
-  register struct dirent *next;
-  register uintmax_t total_blocks = 0;
+  DIR *dirp;
+  struct dirent *next;
+  uintmax_t total_blocks = 0;
   static bool first = true;
 
   errno = 0;
@@ -2377,7 +2377,7 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
 static void
 add_ignore_pattern (const char *pattern)
 {
-  register struct ignore_pattern *ignore;
+  struct ignore_pattern *ignore;
 
   ignore = xmalloc (sizeof *ignore);
   ignore->pattern = pattern;
@@ -2428,7 +2428,7 @@ unsigned_file_size (off_t size)
 static void
 clear_files (void)
 {
-  register size_t i;
+  size_t i;
 
   for (i = 0; i < files_index; i++)
     {
@@ -2457,9 +2457,9 @@ static uintmax_t
 gobble_file (char const *name, enum filetype type, bool command_line_arg,
             char const *dirname)
 {
-  register uintmax_t blocks;
-  register char *path;
-  register struct fileinfo *f;
+  uintmax_t blocks;
+  char *path;
+  struct fileinfo *f;
 
   if (files_index == nfiles)
     {
@@ -2751,8 +2751,8 @@ basename_is_dot_or_dotdot (const char *name)
 static void
 extract_dirs_from_files (char const *dirname, bool command_line_arg)
 {
-  register size_t i;
-  register size_t j;
+  size_t i;
+  size_t j;
   bool ignore_dot_and_dot_dot = (dirname != NULL);
 
   if (dirname && LOOP_DETECT)
@@ -3001,7 +3001,7 @@ sort_files (void)
 static void
 print_current_files (void)
 {
-  register size_t i;
+  size_t i;
 
   switch (format)
     {
@@ -3716,8 +3716,8 @@ print_color_indicator (const char *name, mode_t mode, int linkok)
 static void
 put_indicator (const struct bin_str *ind)
 {
-  register size_t i;
-  register const char *p;
+  size_t i;
+  const char *p;
 
   p = ind->string;
 
@@ -3728,7 +3728,7 @@ put_indicator (const struct bin_str *ind)
 static size_t
 length_of_file_name_and_frills (const struct fileinfo *f)
 {
-  register size_t len = 0;
+  size_t len = 0;
   size_t name_width;
   char buf[MAX (LONGEST_HUMAN_READABLE + 1, INT_BUFSIZE_BOUND (uintmax_t))];
 
index d8cbfba..bb89835 100644 (file)
@@ -800,10 +800,10 @@ buffer_linelim (struct buffer const *buf)
 static char *
 begfield (const struct line *line, const struct keyfield *key)
 {
-  register char *ptr = line->text, *lim = ptr + line->length - 1;
-  register size_t sword = key->sword;
-  register size_t schar = key->schar;
-  register size_t remaining_bytes;
+  char *ptr = line->text, *lim = ptr + line->length - 1;
+  size_t sword = key->sword;
+  size_t schar = key->schar;
+  size_t remaining_bytes;
 
   /* The leading field separator itself is included in a field when -t
      is absent.  */
@@ -845,9 +845,9 @@ begfield (const struct line *line, const struct keyfield *key)
 static char *
 limfield (const struct line *line, const struct keyfield *key)
 {
-  register char *ptr = line->text, *lim = ptr + line->length - 1;
-  register size_t eword = key->eword, echar = key->echar;
-  register size_t remaining_bytes;
+  char *ptr = line->text, *lim = ptr + line->length - 1;
+  size_t eword = key->eword, echar = key->echar;
+  size_t remaining_bytes;
 
   /* Move PTR past EWORD fields or to one past the last byte on LINE,
      whichever comes first.  If there are more than EWORD fields, leave
@@ -948,7 +948,7 @@ limfield (const struct line *line, const struct keyfield *key)
    Return true if some input was read.  */
 
 static bool
-fillbuf (struct buffer *buf, register FILE *fp, char const *file)
+fillbuf (struct buffer *buf, FILE *fp, char const *file)
 {
   struct keyfield const *key = keylist;
   char eol = eolchar;
@@ -1085,7 +1085,7 @@ fillbuf (struct buffer *buf, register FILE *fp, char const *file)
    return 0 */
 
 static int
-fraccompare (register const char *a, register const char *b)
+fraccompare (const char *a, const char *b)
 {
   if (*a == decimal_point && *b == decimal_point)
     {
@@ -1122,7 +1122,7 @@ fraccompare (register const char *a, register const char *b)
    hideously fast. */
 
 static int
-numcompare (register const char *a, register const char *b)
+numcompare (const char *a, const char *b)
 {
   char tmpa;
   char tmpb;
@@ -1341,17 +1341,17 @@ keycompare (const struct line *a, const struct line *b)
 
   /* For the first iteration only, the key positions have been
      precomputed for us. */
-  register char *texta = a->keybeg;
-  register char *textb = b->keybeg;
-  register char *lima = a->keylim;
-  register char *limb = b->keylim;
+  char *texta = a->keybeg;
+  char *textb = b->keybeg;
+  char *lima = a->keylim;
+  char *limb = b->keylim;
 
   int diff;
 
   for (;;)
     {
-      register char const *translate = key->translate;
-      register bool const *ignore = key->ignore;
+      char const *translate = key->translate;
+      bool const *ignore = key->ignore;
 
       /* Find the lengths. */
       size_t lena = lima <= texta ? 0 : lima - texta;
@@ -1509,7 +1509,7 @@ keycompare (const struct line *a, const struct line *b)
    depending on whether A compares less than, equal to, or greater than B. */
 
 static int
-compare (register const struct line *a, register const struct line *b)
+compare (const struct line *a, const struct line *b)
 {
   int diff;
   size_t alen, blen;
@@ -2226,8 +2226,7 @@ sighandler (int sig)
    BLANKTYPE is the kind of blanks that 'b' should skip. */
 
 static char *
-set_ordering (register const char *s, struct keyfield *key,
-             enum blanktype blanktype)
+set_ordering (const char *s, struct keyfield *key, enum blanktype blanktype)
 {
   while (*s)
     {
index f2c4a2b..317064e 100644 (file)
--- a/src/sum.c
+++ b/src/sum.c
@@ -1,5 +1,5 @@
 /* sum -- checksum and count the blocks in a file
-   Copyright (C) 86, 89, 91, 1995-2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 86, 89, 91, 1995-2002, 2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -86,10 +86,10 @@ With no FILE, or when FILE is -, read standard input.\n\
 static bool
 bsd_sum_file (const char *file, int print_name)
 {
-  register FILE *fp;
-  register int checksum = 0;   /* The checksum mod 2^16. */
-  register uintmax_t total_bytes = 0;  /* The number of bytes. */
-  register int ch;             /* Each character read. */
+  FILE *fp;
+  int checksum = 0;    /* The checksum mod 2^16. */
+  uintmax_t total_bytes = 0;   /* The number of bytes. */
+  int ch;              /* Each character read. */
   char hbuf[LONGEST_HUMAN_READABLE + 1];
 
   if (STREQ (file, "-"))