summaryrefslogtreecommitdiff
path: root/src/split.c
AgeCommit message (Collapse)Author
2008-06-03use gnulib's progname moduleJim Meyering
* bootstrap.conf (gnulib_modules): Add progname. * src/*.c (program_name): Remove declaration. * (main): Call set_program_name rather than setting program_name. * src/nice.c (main): Cast program_name to "(char *)". * src/prog-fprintf.c: Include "system.h" * src/system.h: Include "progname.h". * maint.mk (sc_program_name): Adjust rule. Suggestion from Eric Blake.
2008-06-02declare program_name consistentlyJim Meyering
* src/base64.c: Likewise. * src/basename.c: Likewise. * src/cat.c: Likewise. * src/chcon.c: Likewise. * src/chgrp.c: Likewise. * src/chmod.c: Likewise. * src/chown.c: Likewise. * src/chroot.c: Likewise. * src/cksum.c: Likewise. * src/comm.c: Likewise. * src/cp.c: Likewise. * src/csplit.c: Likewise. * src/cut.c: Likewise. * src/date.c: Likewise. * src/dd.c: Likewise. * src/df.c: Likewise. * src/dircolors.c: Likewise. * src/dirname.c: Likewise. * src/du.c: Likewise. * src/echo.c: Likewise. * src/env.c: Likewise. * src/expand.c: Likewise. * src/expr.c: Likewise. * src/factor.c: Likewise. * src/fmt.c: Likewise. * src/fold.c: Likewise. * src/groups.c: Likewise. * src/head.c: Likewise. * src/hostid.c: Likewise. * src/hostname.c: Likewise. * src/id.c: Likewise. * src/install.c: Likewise. * src/join.c: Likewise. * src/kill.c: Likewise. * src/link.c: Likewise. * src/ln.c: Likewise. * src/logname.c: Likewise. * src/ls.c: Likewise. * src/md5sum.c: Likewise. * src/mkdir.c: Likewise. * src/mkfifo.c: Likewise. * src/mknod.c: Likewise. * src/mktemp.c: Likewise. * src/mv.c: Likewise. * src/nice.c: Likewise. * src/nl.c: Likewise. * src/nohup.c: Likewise. * src/od.c: Likewise. * src/paste.c: Likewise. * src/pathchk.c: Likewise. * src/pinky.c: Likewise. * src/pr.c: Likewise. * src/printenv.c: Likewise. * src/printf.c: Likewise. * src/ptx.c: Likewise. * src/pwd.c: Likewise. * src/readlink.c: Likewise. * src/rm.c: Likewise. * src/rmdir.c: Likewise. * src/runcon.c: Likewise. * src/seq.c: Likewise. * src/setuidgid.c: Likewise. * src/shuf.c: Likewise. * src/sleep.c: Likewise. * src/sort.c: Likewise. * src/split.c: Likewise. * src/stat.c: Likewise. * src/stty.c: Likewise. * src/su.c: Likewise. * src/sum.c: Likewise. * src/sync.c: Likewise. * src/tac.c: Likewise. * src/tail.c: Likewise. * src/tee.c: Likewise. * src/test.c: Likewise. * src/timeout.c: Likewise. * src/touch.c: Likewise. * src/tr.c: Likewise. * src/true.c: Likewise. * src/tsort.c: Likewise. * src/tty.c: Likewise. * src/uname.c: Likewise. * src/unexpand.c: Likewise. * src/uniq.c: Likewise. * src/unlink.c: Likewise. * src/uptime.c: Likewise. * src/users.c: Likewise. * src/wc.c: Likewise. * src/who.c: Likewise. * src/whoami.c: Likewise. * src/yes.c: Likewise.
2008-05-26convert the rest to use proper_name -- manuallyJim Meyering
* src/base64.c (AUTHORS): Rename from AUTHOR, for consistency.
2008-05-26use gnulib's proper_name_utf8 function, but *not* proper_nameJim Meyering
* bootstrap.conf (gnulib_modules): Add propername. (XGETTEXT_OPTIONS): Add options to tell xgettext about the functions. * src/cat.c, src/cp.c, src/df.c, src/du.c, src/split.c: Mark Torbjörn Granlund's name. * src/ptx.c: Mark François Pinard's name. Use "TRANSLATORS:" comment marker, rather than "Note to translators:". * src/system.h: Include propername.h. (proper_name): Define away. * src/Makefile.am (cat_LDADD, df_LDADD, du_LDADD, ptx_LDADD, split_LDADD): Initialize, so we can... (cat_LDADD, cp_LDADD, df_LDADD, du_LDADD, ptx_LDADD, split_LDADD): ...Use "+=" to append $(LIBICONV) for each program that uses proper_name_utf8.
2008-02-07mkdir, split: write --verbose output to stdout, not stderr.Steven Schubiger
* src/mkdir.c (verbose_output): New function. (announce_mkdir): Use it. * src/split.c (usage): Update. * src/split.c (cwrite): Write to stdout, not stderr. * doc/coreutils.texi (split invocation): Remove the mention of --verbose output being printed to stderr. * tests/mkdir/p-v: Redirect stdout, not stderr. * tests/misc/split-a: Likewise. * NEWS: Mention this change. * TODO: Remove this item.
2007-12-04Reflect change in gnulib: don't include getpagesize.h,Jim Meyering
now that it's provided by unistd.h. * src/cat.c: Don't include getpagesize.h. * src/copy.c: Likewise. * src/dd.c: Likewise. * src/shred.c: Likewise. * src/split.c: Likewise.
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2007-05-03The following commands and options now support the standard sizePaul Eggert
suffixes kB, M, MB, G, GB, and so on for T, P, Y, Z, and Y: head -c, head -n, od -j, od -N, od -S, split -b, split -C, tail -c, tail -n. * doc/coreutils.texi (od invocation, head invocation, tail invocation): Document support for new size suffixes. (head invocation, tail invocation): Document that -n uses the same suffixes as -c. (tail invocation): More-clearly document what leading "+" does. * src/head.c (usage, string_to_integer): Support new suffixes. * src/od.c (usage, main): Likewise. * src/split.c (usage, main): Likewise. * src/tail.c (usage, parse_options): Likewise. Prompted by a patch from Evan Hunt.
2007-04-12split --line-bytes=N (-C N): don't create an empty file.Paul Eggert
* src/split.c (line_bytes_split): Don't create an empty line afterwards if the last buffer happens to be exactly full. * tests/misc/split-fail: Add a test case for this. * NEWS: mention this.
2007-03-28Help translators include translation team's web or email address.Jim Meyering
* src/system.h (emit_bug_reporting_address): New function. * src/base64.c: Use it rather than a literal printf. * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c: * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c: * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c: * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c: * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c: * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c: * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c: * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c: * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c: * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c: * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c: * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c: * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c: * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c: * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c: * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c: * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c: * src/who.c, src/whoami.c, src/yes.c: Likewise.
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.