diff options
author | Jim Meyering <jim@meyering.net> | 1992-11-09 17:39:24 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1992-11-09 17:39:24 +0000 |
commit | 17387a999c446fab250321a02cbcb7774ec6c032 (patch) | |
tree | dc1908dd9bcc3fdd6d4f1dadfae178b12afe08f0 /src/mv.c | |
parent | 925487607cfed5d4e68ffa375bc17941934dba07 (diff) | |
download | coreutils-17387a999c446fab250321a02cbcb7774ec6c032.tar.xz |
Declared lots of external functions and variables static.
Made several statically-initialized arrays `const.'
Diffstat (limited to 'src/mv.c')
-rw-r--r-- | src/mv.c | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -52,15 +52,16 @@ uid_t geteuid (); char *basename (); enum backup_type get_version (); -int copy_reg (); -int do_move (); -int eaccess_stat (); int isdir (); -int movefile (); int yesno (); void error (); void strip_trailing_slashes (); -void usage (); +int eaccess_stat (); + +static int copy_reg (); +static int do_move (); +static int movefile (); +static void usage (); /* The name this program was run with. */ char *program_name; @@ -85,7 +86,7 @@ static int stdin_tty; /* This process's effective user ID. */ static uid_t myeuid; -static struct option long_options[] = +static struct option const long_options[] = { {"backup", 0, NULL, 'b'}, {"force", 0, NULL, 'f'}, @@ -171,7 +172,7 @@ main (argc, argv) /* Move file SOURCE onto DEST. Handles the case when DEST is a directory. Return 0 if successful, 1 if an error occurred. */ -int +static int movefile (source, dest) char *source; char *dest; @@ -199,7 +200,7 @@ static struct stat dest_stats, source_stats; If DEST is a directory, SOURCE must be also. Return 0 if successful, 1 if an error occurred. */ -int +static int do_move (source, dest) char *source; char *dest; @@ -311,7 +312,7 @@ do_move (source, dest) /* Copy regular file SOURCE onto file DEST. Return 1 if an error occurred, 0 if successful. */ -int +static int copy_reg (source, dest) char *source, *dest; { @@ -422,7 +423,7 @@ copy_reg (source, dest) return 0; } -void +static void usage () { fprintf (stderr, "\ |