From d4e24746dc32a013814229b6ca414f11e7cc2137 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 12 Feb 2002 15:46:34 +0000 Subject: [PATCH] (DEFAULT_SUFFIX_LENGTH): Define constant. (suffix_length): Use it here. (usage): Use it here. --- src/split.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/split.c b/src/split.c index ae8f4a92f3..5634019def 100644 --- a/src/split.c +++ b/src/split.c @@ -40,6 +40,8 @@ #define AUTHORS N_ ("Torbjorn Granlund and Richard M. Stallman") +#define DEFAULT_SUFFIX_LENGTH 2 + /* The name this program was run with. */ char *program_name; @@ -48,13 +50,13 @@ static char const *outbase; /* Name of output files. */ static char *outfile; - + /* Pointer to the end of the prefix in OUTFILE. Suffixes are inserted here. */ static char *outfile_mid; /* Length of OUTFILE's suffix. */ -static size_t suffix_length = 2; +static size_t suffix_length = DEFAULT_SUFFIX_LENGTH; /* Name of input file. May be "-". */ static char *infile; @@ -107,12 +109,12 @@ PREFIX is `x'. With no INPUT, or when INPUT is -, read standard input.\n\ fputs (_("\ Mandatory arguments to long options are mandatory for short options too.\n\ "), stdout); - fputs (_("\ - -a, --suffix-length=N use suffixes of length N (default 2)\n\ + fprintf (stdout, _("\ + -a, --suffix-length=N use suffixes of length N (default %d)\n\ -b, --bytes=SIZE put SIZE bytes per output file\n\ -C, --line-bytes=SIZE put at most SIZE bytes of lines per output file\n\ -l, --lines=NUMBER put NUMBER lines per output file\n\ -"), stdout); +"), DEFAULT_SUFFIX_LENGTH); if (POSIX2_VERSION < 200112) fputs (_("\ -NUMBER (obsolete) same as -l NUMBER\n\ -- 2.47.3