[Midnightbsd-cvs] src [11561] trunk/usr.bin/csplit/csplit.c: sync with freebsd.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Jul 7 17:59:58 EDT 2018
Revision: 11561
http://svnweb.midnightbsd.org/src/?rev=11561
Author: laffer1
Date: 2018-07-07 17:59:57 -0400 (Sat, 07 Jul 2018)
Log Message:
-----------
sync with freebsd.
Modified Paths:
--------------
trunk/usr.bin/csplit/Makefile
trunk/usr.bin/csplit/csplit.1
trunk/usr.bin/csplit/csplit.c
Property Changed:
----------------
trunk/usr.bin/csplit/csplit.1
Modified: trunk/usr.bin/csplit/Makefile
===================================================================
--- trunk/usr.bin/csplit/Makefile 2018-07-07 21:59:24 UTC (rev 11560)
+++ trunk/usr.bin/csplit/Makefile 2018-07-07 21:59:57 UTC (rev 11561)
@@ -1,4 +1,5 @@
# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/csplit/Makefile 95927 2002-05-02 07:54:04Z tjr $
PROG= csplit
Modified: trunk/usr.bin/csplit/csplit.1
===================================================================
--- trunk/usr.bin/csplit/csplit.1 2018-07-07 21:59:24 UTC (rev 11560)
+++ trunk/usr.bin/csplit/csplit.1 2018-07-07 21:59:57 UTC (rev 11561)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
.\" Copyright (c) 2002 Tim J. Robbins.
.\" All rights reserved.
.\"
@@ -22,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.bin/csplit/csplit.1 187019 2009-01-10 12:47:22Z trhodes $
.\"
.Dd December 24, 2008
.Dt CSPLIT 1
Property changes on: trunk/usr.bin/csplit/csplit.1
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.bin/csplit/csplit.c
===================================================================
--- trunk/usr.bin/csplit/csplit.c 2018-07-07 21:59:24 UTC (rev 11560)
+++ trunk/usr.bin/csplit/csplit.c 2018-07-07 21:59:57 UTC (rev 11561)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2002 Tim J. Robbins.
* All rights reserved.
@@ -43,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/csplit/csplit.c 227161 2011-11-06 08:14:45Z ed $");
#include <sys/types.h>
@@ -60,36 +61,36 @@
#include <string.h>
#include <unistd.h>
-void cleanup(void);
-void do_lineno(const char *);
-void do_rexp(const char *);
-char *getline(void);
-void handlesig(int);
-FILE *newfile(void);
-void toomuch(FILE *, long);
-void usage(void);
+static void cleanup(void);
+static void do_lineno(const char *);
+static void do_rexp(const char *);
+static char *getline(void);
+static void handlesig(int);
+static FILE *newfile(void);
+static void toomuch(FILE *, long);
+static void usage(void);
/*
* Command line options
*/
-const char *prefix; /* File name prefix */
-long sufflen; /* Number of decimal digits for suffix */
-int sflag; /* Suppress output of file names */
-int kflag; /* Keep output if error occurs */
+static const char *prefix; /* File name prefix */
+static long sufflen; /* Number of decimal digits for suffix */
+static int sflag; /* Suppress output of file names */
+static int kflag; /* Keep output if error occurs */
/*
* Other miscellaneous globals (XXX too many)
*/
-long lineno; /* Current line number in input file */
-long reps; /* Number of repetitions for this pattern */
-long nfiles; /* Number of files output so far */
-long maxfiles; /* Maximum number of files we can create */
-char currfile[PATH_MAX]; /* Current output file */
-const char *infn; /* Name of the input file */
-FILE *infile; /* Input file handle */
-FILE *overfile; /* Overflow file for toomuch() */
-off_t truncofs; /* Offset this file should be truncated at */
-int doclean; /* Should cleanup() remove output? */
+static long lineno; /* Current line number in input file */
+static long reps; /* Number of repetitions for this pattern */
+static long nfiles; /* Number of files output so far */
+static long maxfiles; /* Maximum number of files we can create */
+static char currfile[PATH_MAX]; /* Current output file */
+static const char *infn; /* Name of the input file */
+static FILE *infile; /* Input file handle */
+static FILE *overfile; /* Overflow file for toomuch() */
+static off_t truncofs; /* Offset this file should be truncated at */
+static int doclean; /* Should cleanup() remove output? */
int
main(int argc, char *argv[])
@@ -209,7 +210,7 @@
return (0);
}
-void
+static void
usage(void)
{
@@ -218,7 +219,7 @@
exit(1);
}
-void
+static void
handlesig(int sig __unused)
{
const char msg[] = "csplit: caught signal, cleaning up\n";
@@ -229,7 +230,7 @@
}
/* Create a new output file. */
-FILE *
+static FILE *
newfile(void)
{
FILE *fp;
@@ -245,7 +246,7 @@
}
/* Remove partial output, called before exiting. */
-void
+static void
cleanup(void)
{
char fnbuf[PATH_MAX];
@@ -269,7 +270,7 @@
}
/* Read a line from the input into a static buffer. */
-char *
+static char *
getline(void)
{
static char lbuf[LINE_MAX];
@@ -292,7 +293,7 @@
}
/* Conceptually rewind the input (as obtained by getline()) back `n' lines. */
-void
+static void
toomuch(FILE *ofp, long n)
{
char buf[BUFSIZ];
@@ -351,7 +352,7 @@
}
/* Handle splits for /regexp/ and %regexp% patterns. */
-void
+static void
do_rexp(const char *expr)
{
regex_t cre;
@@ -433,7 +434,7 @@
}
/* Handle splits based on line number. */
-void
+static void
do_lineno(const char *expr)
{
long lastline, tgtline;
More information about the Midnightbsd-cvs
mailing list