From 17387a999c446fab250321a02cbcb7774ec6c032 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 9 Nov 1992 17:39:24 +0000 Subject: Declared lots of external functions and variables static. Made several statically-initialized arrays `const.' --- src/ln.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/ln.c') diff --git a/src/ln.c b/src/ln.c index d80d0cede..008e595d8 100644 --- a/src/ln.c +++ b/src/ln.c @@ -34,11 +34,12 @@ int symlink (); char *basename (); enum backup_type get_version (); -int do_link (); int isdir (); int yesno (); void error (); -void usage (); + +static void usage (); +static int do_link (); /* A pointer to the function used to make links. This will point to either `link' or `symlink'. */ @@ -62,7 +63,7 @@ static int hard_dir_link; /* The name by which the program was run, for error messages. */ char *program_name; -static struct option long_options[] = +static struct option const long_options[] = { {"backup", 0, NULL, 'b'}, {"directory", 0, &hard_dir_link, 1}, @@ -173,7 +174,7 @@ main (argc, argv) If DEST is a directory, put the link to SOURCE in that directory. Return 1 if there is an error, otherwise 0. */ -int +static int do_link (source, dest) char *source; char *dest; @@ -277,7 +278,7 @@ do_link (source, dest) return 1; } -void +static void usage () { fprintf (stderr, "\ -- cgit v1.2.3-70-g09d2