Author: ed
Date: Sun Nov  6 08:15:35 2011
New Revision: 227167
URL: http://svn.freebsd.org/changeset/base/227167

Log:
  Add missing static keywords to join(1)

Modified:
  head/usr.bin/join/join.c

Modified: head/usr.bin/join/join.c
==============================================================================
--- head/usr.bin/join/join.c    Sun Nov  6 08:15:30 2011        (r227166)
+++ head/usr.bin/join/join.c    Sun Nov  6 08:15:35 2011        (r227167)
@@ -83,36 +83,36 @@ typedef struct {
        u_long setcnt;          /* set count */
        u_long setalloc;        /* set allocated count */
 } INPUT;
-INPUT input1 = { NULL, 0, 0, 1, NULL, 0, 0, 0, 0 },
-      input2 = { NULL, 0, 0, 2, NULL, 0, 0, 0, 0 };
+static INPUT input1 = { NULL, 0, 0, 1, NULL, 0, 0, 0, 0 },
+    input2 = { NULL, 0, 0, 2, NULL, 0, 0, 0, 0 };
 
 typedef struct {
        u_long  filenum;        /* file number */
        u_long  fieldno;        /* field number */
 } OLIST;
-OLIST *olist;                  /* output field list */
-u_long olistcnt;               /* output field list count */
-u_long olistalloc;             /* output field allocated count */
-
-int joinout = 1;               /* show lines with matched join fields (-v) */
-int needsep;                   /* need separator character */
-int spans = 1;                 /* span multiple delimiters (-t) */
-char *empty;                   /* empty field replacement string (-e) */
+static OLIST *olist;           /* output field list */
+static u_long olistcnt;                /* output field list count */
+static u_long olistalloc;      /* output field allocated count */
+
+static int joinout = 1;                /* show lines with matched join fields 
(-v) */
+static int needsep;            /* need separator character */
+static int spans = 1;          /* span multiple delimiters (-t) */
+static char *empty;            /* empty field replacement string (-e) */
 static wchar_t default_tabchar[] = L" \t";
-wchar_t *tabchar = default_tabchar;/* delimiter characters (-t) */
+static wchar_t *tabchar = default_tabchar; /* delimiter characters (-t) */
 
-int  cmp(LINE *, u_long, LINE *, u_long);
-void fieldarg(char *);
-void joinlines(INPUT *, INPUT *);
-int  mbscoll(const char *, const char *);
-char *mbssep(char **, const wchar_t *);
-void obsolete(char **);
-void outfield(LINE *, u_long, int);
-void outoneline(INPUT *, LINE *);
-void outtwoline(INPUT *, LINE *, INPUT *, LINE *);
-void slurp(INPUT *);
-wchar_t *towcs(const char *);
-void usage(void);
+static int  cmp(LINE *, u_long, LINE *, u_long);
+static void fieldarg(char *);
+static void joinlines(INPUT *, INPUT *);
+static int  mbscoll(const char *, const char *);
+static char *mbssep(char **, const wchar_t *);
+static void obsolete(char **);
+static void outfield(LINE *, u_long, int);
+static void outoneline(INPUT *, LINE *);
+static void outtwoline(INPUT *, LINE *, INPUT *, LINE *);
+static void slurp(INPUT *);
+static wchar_t *towcs(const char *);
+static void usage(void);
 
 int
 main(int argc, char *argv[])
@@ -270,7 +270,7 @@ main(int argc, char *argv[])
        exit(0);
 }
 
-void
+static void
 slurp(INPUT *F)
 {
        LINE *lp, *lastlp, tmp;
@@ -359,7 +359,7 @@ slurp(INPUT *F)
        }
 }
 
-char *
+static char *
 mbssep(char **stringp, const wchar_t *delim)
 {
        char *s, *tok;
@@ -388,7 +388,7 @@ mbssep(char **stringp, const wchar_t *de
        }
 }
 
-int
+static int
 cmp(LINE *lp1, u_long fieldno1, LINE *lp2, u_long fieldno2)
 {
        if (lp1->fieldcnt <= fieldno1)
@@ -398,7 +398,7 @@ cmp(LINE *lp1, u_long fieldno1, LINE *lp
        return (mbscoll(lp1->fields[fieldno1], lp2->fields[fieldno2]));
 }
 
-int
+static int
 mbscoll(const char *s1, const char *s2)
 {
        wchar_t *w1, *w2;
@@ -414,7 +414,7 @@ mbscoll(const char *s1, const char *s2)
        return (ret);
 }
 
-wchar_t *
+static wchar_t *
 towcs(const char *s)
 {
        wchar_t *wcs;
@@ -428,7 +428,7 @@ towcs(const char *s)
        return (wcs);
 }
 
-void
+static void
 joinlines(INPUT *F1, INPUT *F2)
 {
        u_long cnt1, cnt2;
@@ -448,7 +448,7 @@ joinlines(INPUT *F1, INPUT *F2)
                        outtwoline(F1, &F1->set[cnt1], F2, &F2->set[cnt2]);
 }
 
-void
+static void
 outoneline(INPUT *F, LINE *lp)
 {
        u_long cnt;
@@ -476,7 +476,7 @@ outoneline(INPUT *F, LINE *lp)
        needsep = 0;
 }
 
-void
+static void
 outtwoline(INPUT *F1, LINE *lp1, INPUT *F2, LINE *lp2)
 {
        u_long cnt;
@@ -512,7 +512,7 @@ outtwoline(INPUT *F1, LINE *lp1, INPUT *
        needsep = 0;
 }
 
-void
+static void
 outfield(LINE *lp, u_long fieldno, int out_empty)
 {
        if (needsep++)
@@ -535,7 +535,7 @@ outfield(LINE *lp, u_long fieldno, int o
  * Convert an output list argument "2.1, 1.3, 2.4" into an array of output
  * fields.
  */
-void
+static void
 fieldarg(char *option)
 {
        u_long fieldno, filenum;
@@ -569,7 +569,7 @@ fieldarg(char *option)
        }
 }
 
-void
+static void
 obsolete(char **argv)
 {
        size_t len;
@@ -654,7 +654,7 @@ jbad:                               errx(1, "illegal option 
-- %s",
        }
 }
 
-void
+static void
 usage(void)
 {
        (void)fprintf(stderr, "%s %s\n%s\n",
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to