Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/ln static + __dead



details:   https://anonhg.NetBSD.org/src/rev/99302fa92612
branches:  trunk
changeset: 768962:99302fa92612
user:      joerg <joerg%NetBSD.org@localhost>
date:      Mon Aug 29 14:38:30 2011 +0000

description:
static + __dead

diffstat:

 bin/ln/ln.c |  27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)

diffs (65 lines):

diff -r 4f34295de604 -r 99302fa92612 bin/ln/ln.c
--- a/bin/ln/ln.c       Mon Aug 29 14:34:58 2011 +0000
+++ b/bin/ln/ln.c       Mon Aug 29 14:38:30 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ln.c,v 1.34 2008/07/20 00:52:40 lukem Exp $ */
+/* $NetBSD: ln.c,v 1.35 2011/08/29 14:38:30 joerg Exp $ */
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)ln.c       8.2 (Berkeley) 3/31/94";
 #else
-__RCSID("$NetBSD: ln.c,v 1.34 2008/07/20 00:52:40 lukem Exp $");
+__RCSID("$NetBSD: ln.c,v 1.35 2011/08/29 14:38:30 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -54,19 +54,18 @@
 #include <string.h>
 #include <unistd.h>
 
-int    fflag;                          /* Unlink existing files. */
-int    hflag;                          /* Check new name for symlink first. */
-int    iflag;                          /* Interactive mode. */
-int    sflag;                          /* Symbolic, not hard, link. */
-int    vflag;                          /* Verbose output */
+static int     fflag;                          /* Unlink existing files. */
+static int     hflag;                          /* Check new name for symlink first. */
+static int     iflag;                          /* Interactive mode. */
+static int     sflag;                          /* Symbolic, not hard, link. */
+static int     vflag;                          /* Verbose output */
 
                                        /* System link call. */
-int (*linkf)(const char *, const char *);
-char   linkch;
+static int (*linkf)(const char *, const char *);
+static char   linkch;
 
-int    linkit(const char *, const char *, int);
-void   usage(void);
-int    main(int, char *[]);
+static int     linkit(const char *, const char *, int);
+__dead static void     usage(void);
 
 int
 main(int argc, char *argv[])
@@ -150,7 +149,7 @@
        /* NOTREACHED */
 }
 
-int
+static int
 linkit(const char *target, const char *source, int isdir)
 {
        struct stat sb;
@@ -219,7 +218,7 @@
        return (0);
 }
 
-void
+static void
 usage(void)
 {
 



Home | Main Index | Thread Index | Old Index