Age | Commit message (Collapse) | Author |
|
that's all that is supported for now.
(main): Check for overflow in obsolescent line count option.
|
|
uintmax_t original) in remaining computations. From Paul Eggert.
|
|
This allows e.g., splitting into files of size 2GB and larger,
and running split --lines=N with N=2^31 or more.
But for --line-bytes=N, the restriction that N <= SIZE_MAX
remains (for now), due to the way it is implemented.
Include "inttostr.h".
(bytes_split, lines_split, line_bytes_split, main):
Use uintmax_t, not size_t, for file sizes.
(main): Give a better diagnostic for option arguments == 0.
Use umaxtostr to print file sizes.
|
|
|
|
|
|
|
|
|
|
|
|
Instead, just specify `&verbose', and ...
(main): ... remove the `case 2:' block for --verbose.
|
|
(bytes_split, lines_split, line_bytes_split): Use full_read,
not safe_read. The way split was using the latter, a short read
could cause split to terminate before EOF.
(bytes_split): Remove unnecessary `else' after break.
(lines_split): Likewise. and correct misleading indentation.
|
|
Remove now-useless cast.
(stdread): Remove function.
(bytes_split): Use size_t instead of int.
Use safe_read, not stdread.
(lines_split): Likewise.
Use memchr rather than a `while' loop.
(line_bytes_split): Use size_t instead of int.
Use safe_read, not stdread.
(main): Add some FIXME comments to remind me to remove casts.
|
|
(main): Use it.
[case 'a']: Use strtoul rather than strtol to avoid compiler warnings.
|
|
|
|
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(shortopts): Remove; no longer needed.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
|
|
(suffix_length): Use it here.
(usage): Use it here.
|
|
(outbase): Now a global var.
(outfile_end): Remove.
(suffix_length): New var.
(shortopts, longopts, main): Add -a or --suffix-length.
(next_file_name): Implement -a. Do not extend the suffix length.
Check for file names that are too long.
(main): Move outfile initialization to next_file_name.
(shortopts): Remove -v (a typo).
|
|
support of obsolete "-N" option syntax in expand, head, fold,
split, tail, unexpand, uniq, and which prohibits options with
optional arguments in od and pr.
(usage): Document this.
(main): Check for obsolete options.
(shortopts): New constant.
(main): Use -1, not EOF, for getopt_long.
|
|
HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION.
|
|
instead of hard-coding --help and --version descriptions.
|
|
Split usage strings so that --help and --version descriptions are alone
in their own string.
Likewise for the one that says:
Mandatory arguments to long options are mandatory for short options too.
|
|
Use fputs, not printf.
|
|
``Mandatory arguments to long options are mandatory for short options too.\n\''
|
|
(full_write): Remove decl; not needed.
|
|
`and'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[long_options]: Remove the "help" and "version" entries.
Remove declarations of show_help and show_version.
(main): Use parse_long_options, including author name(s).
Remove the show_version and show_help blocks.
|
|
|
|
|
|
(main) [O_BINARY]: Read input in binary mode.
|
|
|
|
|
|
|
|
already high, at INT_MAX :-) on the number of files split could create.
Reported by Ralf W. Stephan.
|
|
Remove definitions of those symbols.
* src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h
since it now includes limit.h which defines RE_DUP_MAX.
* src/nl.c: Likewise.
* src/tac.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(main): Update callers to use combination of error (0, 0, ... and
usage (EXIT_FAILURE).
|
|
|