svn commit: r244301 - stable/7/usr.bin/cut
Eitan Adler
eadler at FreeBSD.org
Sun Dec 16 16:59:45 UTC 2012
Author: eadler
Date: Sun Dec 16 16:59:44 2012
New Revision: 244301
URL: http://svnweb.freebsd.org/changeset/base/244301
Log:
MFC r227162:
Add missing static keywords to cut(1)
Approved by: ed
Approved by: cperciva (implicit)
Modified:
stable/7/usr.bin/cut/cut.c
Directory Properties:
stable/7/usr.bin/cut/ (props changed)
Modified: stable/7/usr.bin/cut/cut.c
==============================================================================
--- stable/7/usr.bin/cut/cut.c Sun Dec 16 16:59:42 2012 (r244300)
+++ stable/7/usr.bin/cut/cut.c Sun Dec 16 16:59:44 2012 (r244301)
@@ -54,25 +54,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[])
@@ -157,7 +157,7 @@ main(int argc, char *argv[])
exit(rval);
}
-void
+static void
get_list(char *list)
{
size_t setautostart, start, stop;
@@ -212,7 +212,7 @@ get_list(char *list)
memset(positions + 1, '1', autostart);
}
-void
+static void
needpos(size_t n)
{
static size_t npos;
@@ -231,7 +231,7 @@ needpos(size_t n)
}
}
-int
+static int
b_cut(FILE *fp, const char *fname __unused)
{
int ch, col;
@@ -265,7 +265,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;
@@ -327,7 +327,7 @@ b_n_cut(FILE *fp, const char *fname)
return (warned);
}
-int
+static int
c_cut(FILE *fp, const char *fname)
{
wint_t ch;
@@ -362,7 +362,7 @@ out:
return (0);
}
-int
+static int
f_cut(FILE *fp, const char *fname)
{
wchar_t ch;
More information about the svn-src-all
mailing list