Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Nov 2011 08:14:52 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r227162 - head/usr.bin/cut
Message-ID:  <201111060814.pA68Eqwu008247@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Sun Nov  6 08:14:51 2011
New Revision: 227162
URL: http://svn.freebsd.org/changeset/base/227162

Log:
  Add missing static keywords to cut(1)

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

Modified: head/usr.bin/cut/cut.c
==============================================================================
--- head/usr.bin/cut/cut.c	Sun Nov  6 08:14:45 2011	(r227161)
+++ head/usr.bin/cut/cut.c	Sun Nov  6 08:14:51 2011	(r227162)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111060814.pA68Eqwu008247>