diff options
author | Jim Meyering <jim@meyering.net> | 1992-11-08 20:19:58 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1992-11-08 20:19:58 +0000 |
commit | 925487607cfed5d4e68ffa375bc17941934dba07 (patch) | |
tree | d9333d9e8759a18b2ea1b3550319491cce519cb0 /src/sum.c | |
parent | 40d0a06450310c7abc8b393f130fa76de682313d (diff) | |
download | coreutils-925487607cfed5d4e68ffa375bc17941934dba07.tar.xz |
Declared lots of external functions and variables static.
Made several statically-initialized arrays `const'
Diffstat (limited to 'src/sum.c')
-rw-r--r-- | src/sum.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -24,20 +24,21 @@ #include <getopt.h> #include "system.h" -int bsd_sum_file (); -int sysv_sum_file (); +static int bsd_sum_file (); +static int sysv_sum_file (); + void error (); /* The name this program was run with. */ char *program_name; /* Nonzero if any of the files read were the standard input. */ -int have_read_stdin; +static int have_read_stdin; /* Right-rotate 32-bit integer variable C. */ #define ROTATE_RIGHT(c) if ((c) & 01) (c) = ((c) >>1) + 0x8000; else (c) >>= 1; -struct option longopts[] = +static struct option const longopts[] = { {"sysv", 0, NULL, 's'}, {NULL, 0, NULL, 0} @@ -97,7 +98,7 @@ Usage: %s [-rs] [--sysv] [file...]\n", argv[0]); The checksum varies depending on sizeof(int). Return 0 if successful, -1 if an error occurs. */ -int +static int bsd_sum_file (file, print_name) char *file; int print_name; @@ -159,7 +160,7 @@ bsd_sum_file (file, print_name) If PRINT_NAME is >0, print FILE next to the checksum and size. Return 0 if successful, -1 if an error occurs. */ -int +static int sysv_sum_file (file, print_name) char *file; int print_name; |