From owner-svn-src-stable-8@FreeBSD.ORG Sun Dec 16 17:00:00 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AEDF4D0; Sun, 16 Dec 2012 17:00:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EA1808FC13; Sun, 16 Dec 2012 16:59:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGGxx8B015402; Sun, 16 Dec 2012 16:59:59 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGGxx1G015401; Sun, 16 Dec 2012 16:59:59 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161659.qBGGxx1G015401@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 16:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244302 - stable/8/usr.bin/cut X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 17:00:00 -0000 Author: eadler Date: Sun Dec 16 16:59:59 2012 New Revision: 244302 URL: http://svnweb.freebsd.org/changeset/base/244302 Log: MFC r227162: Add missing static keywords to cut(1) Approved by: ed Approved by: cperciva (implicit) Modified: stable/8/usr.bin/cut/cut.c Directory Properties: stable/8/usr.bin/cut/ (props changed) Modified: stable/8/usr.bin/cut/cut.c ============================================================================== --- stable/8/usr.bin/cut/cut.c Sun Dec 16 16:59:44 2012 (r244301) +++ stable/8/usr.bin/cut/cut.c Sun Dec 16 16:59:59 2012 (r244302) @@ -54,25 +54,25 @@ __FBSDID("$FreeBSD$"); #include #include -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;