Remove the hack that varied the first character of the output file name
if none was specified on the command line. This is not permitted by POSIX, and no longer needed now that we have the -a option. PR: 85099 Submitted by: Toby Peterson (Apple Computer)
This commit is contained in:
parent
8b78b3dc58
commit
e93586df9d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149345
@ -111,8 +111,8 @@ is not specified, two letters are used as the suffix.
|
||||
If the
|
||||
.Ar name
|
||||
argument is not specified, the file is split into lexically ordered
|
||||
files named with prefixes in the range of
|
||||
.Dq Li x-z
|
||||
files named with the prefix
|
||||
.Dq Li x
|
||||
and with suffixes as above.
|
||||
.Sh ENVIRONMENT
|
||||
The
|
||||
@ -139,12 +139,10 @@ A
|
||||
command appeared in
|
||||
.At v3 .
|
||||
.Sh BUGS
|
||||
For historical reasons, if you specify
|
||||
.Ar name ,
|
||||
For historical reasons,
|
||||
.Nm
|
||||
can only create 676 separate
|
||||
files.
|
||||
The default naming convention allows 2028 separate files.
|
||||
The
|
||||
.Fl a
|
||||
option can be used to work around this limitation.
|
||||
|
@ -319,16 +319,8 @@ newfile(void)
|
||||
if ((maxfiles *= 26) <= 0)
|
||||
errx(EX_USAGE, "suffix is too long (max %ld)", i);
|
||||
|
||||
/*
|
||||
* Hack to increase max files; original code wandered through
|
||||
* magic characters.
|
||||
*/
|
||||
if (fnum == maxfiles) {
|
||||
if (!defname || fname[0] == 'z')
|
||||
errx(EX_DATAERR, "too many files");
|
||||
++fname[0];
|
||||
fnum = 0;
|
||||
}
|
||||
if (fnum == maxfiles)
|
||||
errx(EX_DATAERR, "too many files");
|
||||
|
||||
/* Generate suffix of sufflen letters */
|
||||
tfnum = fnum;
|
||||
|
Loading…
Reference in New Issue
Block a user