aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/join
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2011-11-06 08:15:35 +0000
committerEd Schouten <ed@FreeBSD.org>2011-11-06 08:15:35 +0000
commit6c9f9615740f23d8e49b931aa84cee7e2ad86045 (patch)
tree09ee8b0a8e432278ad56d86e1b733ada39c6ef57 /usr.bin/join
parentf82c82df6df0fc066d0705e84d7fff591426cdfd (diff)
downloadsrc-6c9f9615740f23d8e49b931aa84cee7e2ad86045.tar.gz
src-6c9f9615740f23d8e49b931aa84cee7e2ad86045.zip
Add missing static keywords to join(1)
Notes
Notes: svn path=/head/; revision=227167
Diffstat (limited to 'usr.bin/join')
-rw-r--r--usr.bin/join/join.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/usr.bin/join/join.c b/usr.bin/join/join.c
index 12e98031c41b..97bb4cf2b8a9 100644
--- a/usr.bin/join/join.c
+++ b/usr.bin/join/join.c
@@ -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) */
-
-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 wchar_t *tabchar = default_tabchar; /* delimiter characters (-t) */
+
+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 *delim)
}
}
-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 *lp2, u_long fieldno2)
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 *F2, LINE *lp2)
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 out_empty)
* 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", ap);
}
}
-void
+static void
usage(void)
{
(void)fprintf(stderr, "%s %s\n%s\n",