summaryrefslogtreecommitdiff
path: root/src/split.c
AgeCommit message (Collapse)Author
2006-09-03Don't include dirname.h, since system.h does it now.Paul Eggert
2006-03-26(next_file_name): Use new last_component, in place of base_name.Jim Meyering
2005-07-11(main): Avoid setmode; use POSIX-specified routines instead.Paul Eggert
2005-07-05Adjust to the change to DECIMAL_DIGIT_ACCUMULATE: its last arg is nowPaul Eggert
a type, not a value.
2005-07-03Include fcntl--.h rather than unistd-safer.h.Paul Eggert
Include fd-reopen.h. (input_desc): Remove. All uses replaced by STDIN_FILENO. (cwrite): Don't call fd_safer; no longer needed now that we include fcntl--.h. (main): Reuse stdin rather than opening a new one. This saves a file descriptor.
2005-06-16Don't embed `this'-style quotes in format strings.Jim Meyering
Rather than this: error (..., "...`%s'...", arg); do this: error (..., "...%s...", quote (arg));
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-04-26Remove posixver.h and its uses.Paul Eggert
(main): Don't complain about -NUM option.
2005-04-11Include unistd-safer.h.Paul Eggert
(cwrite): Use fd_safer. Replace mystery constant 0666 with symbolic version, as POSIX requires.
2005-03-25(main): Update use of DECIMAL_DIGIT_ACCUMULATE.Jim Meyering
2005-03-17(main): Use DECIMAL_DIGIT_ACCUMULATE macro in place of nearly-equivalent code.Jim Meyering
2004-12-20(usage): Mention default size.Paul Eggert
2004-09-21(main): Remove unused "case 0".Paul Eggert
(verbose): Now bool, not int. (VERBOSE_OPTION): New enum. (longopts, main): Use it.
2004-08-03(cwrite, bytes_split, lines_split, line_bytes_split):Paul Eggert
Use bool for booleans.
2004-06-21(main): Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-04-15Include getpagesize.h.Jim Meyering
(main): Align I/O buffers to page boundaries.
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
(usage): Don't bother normalizing exit status since the arg is already the correct exit status now.
2003-11-04(next_file_name): Use `sizeof *var' rather thanJim Meyering
hard-coding `sizeof size_t'.
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-09-18revert previous changeJim Meyering
2003-09-18Update AUTHORS definition to be a comma-separated list of strings and/or updateJim Meyering
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
2003-08-09(suffix_alphabet): New var.Jim Meyering
(longopts, usage, next_file_name, main): Support -d. (next_file_name, main): Allow -a0, as POSIX requires. (next_file_name): Don't assume ASCII-like encoding; 'a' through 'z' are not contiguous in EBCDIC.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include closeout.h.
2003-06-27split's --verbose option did nothingJim Meyering
(longopts): Use `1', not `0' as the value for for &verbose.
2003-06-17(main): Call initialize_main.Jim Meyering
2003-04-11Remove anachronistic casts of xmalloc,Jim Meyering
xrealloc, and xcalloc return values and of xrealloc's first argument.
2003-04-09(line_bytes_split): Arg is of type size_t, sinceJim Meyering
that's all that is supported for now. (main): Check for overflow in obsolescent line count option.
2003-04-09(bytes_split): Use size_t temporary (rather thanJim Meyering
uintmax_t original) in remaining computations. From Paul Eggert.
2003-04-09Handle command line option arguments larger than 2^31.Jim Meyering
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.
2003-04-09(lines_split): Rename local, nlines -> n_lines.Jim Meyering
2003-04-08(main): Use STDIN_FILENO, not literal `0'.Jim Meyering
2003-04-08(main): Rename local variable: s/accum/n_units/.Jim Meyering
2003-04-08also change NCHARS, in comments, to N_BYTESJim Meyering
2003-04-08Rename local variables: nchars -> n_bytes.Jim Meyering
2003-03-11(longopts): Don't hard-code `2' here.Jim Meyering
Instead, just specify `&verbose', and ... (main): ... remove the `case 2:' block for --verbose.
2003-02-19Include "full-read.h".Jim Meyering
(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.
2002-10-19(cwrite): Change type of `bytes' parameter to size_tJim Meyering
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.
2002-09-28(FAIL_ONLY_ONE_WAY): New macro. Factor out some duplication.Jim Meyering
(main): Use it. [case 'a']: Use strtoul rather than strtol to avoid compiler warnings.
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2002-02-16Include posixver.h.Jim Meyering
(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.
2002-02-12(DEFAULT_SUFFIX_LENGTH): Define constant.Jim Meyering
(suffix_length): Use it here. (usage): Use it here.
2002-02-12Include "dirname.h".Jim Meyering
(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).
2002-02-02Add more support for POSIX 1003.1-2001, which requires removal forJim Meyering
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.
2001-12-01Reflect renaming to, and new usage of these macros:Jim Meyering
HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION.
2001-12-01(usage): Use new macros, EMIT_HELP_DESCRIPTION and EMIT_VERSION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions.
2001-11-23Factor out some common strings to make translation easier.Jim Meyering
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.
2001-11-11(usage): Split --help output into smaller pieces.Jim Meyering
Use fputs, not printf.
2001-11-04(usage): Say thatJim Meyering
``Mandatory arguments to long options are mandatory for short options too.\n\''