svn commit: r244300 - stable/9/usr.bin/cut
Eitan Adler
eadler at FreeBSD.org
Sun Dec 16 16:59:43 UTC 2012
Author: eadler
Date: Sun Dec 16 16:59:42 2012
New Revision: 244300
URL: http://svnweb.freebsd.org/changeset/base/244300
Log:
MFC r227162:
Add missing static keywords to cut(1)
Approved by: ed
Approved by: cperciva (implicit)
Modified:
stable/9/usr.bin/cut/cut.c
Directory Properties:
stable/9/usr.bin/cut/ (props changed)
Modified: stable/9/usr.bin/cut/cut.c
==============================================================================
--- stable/9/usr.bin/cut/cut.c Sun Dec 16 16:55:59 2012 (r244299)
+++ stable/9/usr.bin/cut/cut.c Sun Dec 16 16:59:42 2012 (r244300)
@@ -50,25 +50,25 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
#include <wchar.h>
-int bflag;
-int cflag;
-wchar_t dchar;
-char dcharmb[MB_LEN_MAX + 1];
-int dflag;
-int fflag;
-int nflag;
-int sflag;
-
-size_t autostart, autostop, maxval;
-char * positions;
-
-int b_cut(FILE *, const char *);
-int b_n_cut(FILE *, const char *);
-int c_cut(FILE *, const char *);
-int f_cut(FILE *, const char *);
-void get_list(char *);
-void needpos(size_t);
-static void usage(void);
+static int bflag;
+static int cflag;
+static wchar_t dchar;
+static char dcharmb[MB_LEN_MAX + 1];
+static int dflag;
+static int fflag;
+static int nflag;
+static int sflag;
+
+static size_t autostart, autostop, maxval;
+static char * positions;
+
+static int b_cut(FILE *, const char *);
+static int b_n_cut(FILE *, const char *);
+static int c_cut(FILE *, const char *);
+static int f_cut(FILE *, const char *);
+static void get_list(char *);
+static void needpos(size_t);
+static void usage(void);
int
main(int argc, char *argv[])
@@ -153,7 +153,7 @@ main(int argc, char *argv[])
exit(rval);
}
-void
+static void
get_list(char *list)
{
size_t setautostart, start, stop;
@@ -208,7 +208,7 @@ get_list(char *list)
memset(positions + 1, '1', autostart);
}
-void
+static void
needpos(size_t n)
{
static size_t npos;
@@ -227,7 +227,7 @@ needpos(size_t n)
}
}
-int
+static int
b_cut(FILE *fp, const char *fname __unused)
{
int ch, col;
@@ -261,7 +261,7 @@ b_cut(FILE *fp, const char *fname __unus
* Although this function also handles the case where -n is not specified,
* b_cut() ought to be much faster.
*/
-int
+static int
b_n_cut(FILE *fp, const char *fname)
{
size_t col, i, lbuflen;
@@ -323,7 +323,7 @@ b_n_cut(FILE *fp, const char *fname)
return (warned);
}
-int
+static int
c_cut(FILE *fp, const char *fname)
{
wint_t ch;
@@ -358,7 +358,7 @@ out:
return (0);
}
-int
+static int
f_cut(FILE *fp, const char *fname)
{
wchar_t ch;
More information about the svn-src-stable-9
mailing list