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. */
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;
static void
add_ignore_pattern (const char *pattern)
{
- register struct ignore_pattern *ignore;
+ struct ignore_pattern *ignore;
ignore = xmalloc (sizeof *ignore);
ignore->pattern = pattern;
static void
clear_files (void)
{
- register size_t i;
+ size_t i;
for (i = 0; i < files_index; i++)
{
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)
{
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)
static void
print_current_files (void)
{
- register size_t i;
+ size_t i;
switch (format)
{
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;
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))];
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. */
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
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;
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)
{
hideously fast. */
static int
-numcompare (register const char *a, register const char *b)
+numcompare (const char *a, const char *b)
{
char tmpa;
char tmpb;
/* 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;
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;
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)
{
/* 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
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, "-"))