summaryrefslogtreecommitdiff
path: root/src/split.c
AgeCommit message (Collapse)Author
2012-05-10maint: handle file sizes more reliablyPaul Eggert
Problem reported by Samuel Thibault in <http://bugs.gnu.org/11424>. * NEWS: Document this. * src/dd.c (skip): Handle skipping past EOF on shared or typed memory objects the same way as with regular files. (dd_copy): It's OK to truncate shared memory objects. * src/du.c (duinfo_add): Check for overflow. (print_only_size): Report overflow. (process_file): Ignore negative file sizes in the --apparent-size case. * src/od.c (skip): Fix comment about st_size. * src/split.c (main): * src/truncate.c (do_ftruncate, main): On files where st_size is not portable, fall back on using lseek with SEEK_END to determine the size. Although strictly speaking POSIX says the behavior is implementation-defined, in practice if lseek returns a nonnegative value it's a reasonable one to use for the file size. * src/system.h (usable_st_size): Symlinks have reliable st_size too. * tests/misc/truncate-dir-fail: Don't assume that getting the size of a dir is not allowed, as it's now allowed on many platforms, e.g., GNU/Linux.
2012-05-08split: avoid apparent infloop when splitting /dev/zero w/-n on the HurdJim Meyering
* src/split.c (main): Use stat.st_size only for regular files. Samuel Thibault reported in http://bugs.gnu.org/11424 that the /dev/zero-splitting tests would appear to infloop on GNU/Hurd, because /dev/zero's st_size is LONG_MAX. It was only a problem when using the --number (-n) option. * NEWS (Bug fixes): Mention it. This bug was introduced with the --number option, via commit v8.7-25-gbe10739
2012-03-10split: support an arbitrary number of split files by defaultJérémy Compostella
* src/split.c (next_file_name): If `suffix_auto' is true and the first suffix character is 'z', generate a new file file name adding `z' to the prefix and increasing the suffix length by one. (set_suffix_length): Disable auto suffix width in various cases. * tests/split/suffix-auto-length: Test it. * doc/coreutils.texi (split invocation): Mention it. * NEWS (Improvements): Likewise.
2012-02-20split: add the --additional-suffix optionJérémy Compostella
Add the --additional-suffix option, to append an additional static suffix to output file names. * src/split.c (next_file_name): Append suffix to output file names. (main): Handle new --additional-suffix option. * NEWS (New features): Mention it. * doc/coreutils.texi (split invocation): Mention it. * tests/split/additional-suffix: New file. Test --additional-suffix. * tests/Makefile.am (TESTS): Add it. Requested by Peng Yu, in bug 6554
2012-02-18split: support optional start value for --numeric-suffixesJérémy Compostella
Allow changing the --numeric-suffixes start number from the default of 0. * src/split.c (next_file_name): Initialize the suffix index and the output filename according to start value. (main): Check that the suffix length is large enough for the numerical suffix start value. * doc/coreutils.texi (split invocation): Mention it. * NEWS (New features): Mention it. * tests/split/numeric: New file. Test --numeric-suffixes[=FROM]. * tests/Makefile.am (TESTS): Reference the new test.
2012-01-27maint: use single copyright year rangeJim Meyering
Run "make update-copyright".
2012-01-22maint: quote 'like this' or "like this", not `like this'Paul Eggert
* doc/coreutils.texi (Formatting the file names): coreutils now quotes 'like this'. * man/help2man: * src/timeout.c (usage): Quote 'like this' in diagnostics. * HACKING, Makefile.am, NEWS, README, README-hacking, TODO, cfg.mk: * doc/Makefile.am, doc/coreutils.texi, m4/jm-macros.m4: * man/Makefile.am, man/help2man, src/Makefile.am, src/copy.h: * src/extract-magic, src/ls.c, src/pinky.c, src/pr.c, src/sort.c: * src/split.c, src/timeout.c, src/who.c, tests/dd/skip-seek-past-file: * tests/pr/pr-tests: Quote 'like this' in commentary. * cfg.mk (old_NEWS_hash): Update due to changed old NEWS.
2012-01-09maint: src/*.c: change remaining quotes (without embedded spaces)Jim Meyering
Run this (twice): git grep -E -l '`[^ ]+'\' src/*.c \ |xargs perl -pi -e 's/`([^ ]+'\'')/'\''$1/'
2012-01-09maint: convert `...' to '...' in --help outputJim Meyering
All affected lines end with \ or \n\, so run this command until it produces no new changes (4 times): git grep -E -l '`[^ ]+'\''.*\\' src \ |xargs perl -pi -e 's/`([^ ]+'\''.*\\)/'\''$1/'
2012-01-07maint: use new emit_try_help in place of equivalent fprintfJim Meyering
Run this command: perl -0777 -pi -e \ 's/fprintf \(stderr, _\("Try `%s --help.*\n.*;/emit_try_help ();/m'\ src/*.c
2012-01-05split: avoid failure due to leftover 'errno' valueBruno Haible
* src/split.c (lines_chunk_split): Fix logic bug that led to unwarranted failure of "split -n l/2 /dev/zero" on NetBSD 5.1. The same would happen when splitting a growing file, where open/lseek-end gives one size, but by the time we read, there is more data available. (bytes_chunk_extract): Likewise. * NEWS (Bug fixes): Mention this. * tests/split/l-chunk: The latter case was not exercised. Add code to do that. Bug introduced with the chunk-selecting feature in v8.7-25-gbe10739. Co-authored-by: Jim Meyering <meyering@redhat.com>
2012-01-01maint: update all copyright year number rangesJim Meyering
Run "make update-copyright".
2011-09-01build: avoid the use of strsignal() in splitPádraig Brady
... which is not available on some platforms, and the replacement currently requires linking with threading libraries. * src/split.c (closeout): Remove the call to strsignal() which is largely redundant anyway as sig2str() is already used to map number to name in the error. Reported by Bruno Haible on AIX 6.1 and 7.1
2011-06-13maint: use stat-size module from gnulibJames Youngman
* gnulib: Update to latest. * src/system.h: Definitions of ST_* macros have moved into the gnulib module stat-size (specifically, the header file stat-size.h), so remove them from here. * src/truncate.c: Include stat-size.h. * src/stat.c: Likewise. * src/shred.c: Likewise. * src/ls.c: Likewise. * src/du.c: Likewise. * src/ioblksize.h: New file. Move definition of io_blksize out of system.h so that system.h does not have to include stat-size.h. * src/cat.c: Include ioblksize.h. * src/split.c: Likewise. * src/copy.c: Include both stat-size.h and ioblksize.h. * src/Makefile.am (noinst_HEADERS): Add ioblksize.h.
2011-05-26maint: split: remove --filter specific code from other pathsPádraig Brady
* src/split.c (lines_chunk_split): Don't use ignore_error() which is redundant and confusing when not running with --filter. (lines_rr): Likewise. (ofile_open): Likewise. Add a comment to clarify that filters aren't restarted under file descriptor pressure.
2011-05-26split: diagnose when --filter is used with a chunk numberPádraig Brady
* src/split.c (main): Exit with a diagnostic if --filter is specified along with a specific chunk number. * test/split/filter: Ensure this combination fails.
2011-05-26split: exit when we can no longer write to a --filterPádraig Brady
* src/split.c (bytes_split): Stop reading when we can no longer write to a child process. (lines_rr): Likewise. (lines_bytes_split): No change is made here since input is bounded by the original file size. * test/split/filter: Add test cases.
2011-05-26split: return success even if a --filter exitsPádraig Brady
src/split.c (main): Don't unblock SIGPIPE before cleanup, as then any pending signals will be sent and cause the main split process to exit with a non zero status (141). * test/split/filter: Add a test for this case.
2011-05-25split: fix an edge case where -n l/... creates an extra filePádraig Brady
* src/split.c (lines_bytes_chunk): Handle the edge case where the file is truncated as we read. * tests/misc/split-lchunk: Cleanup; no functional change.
2011-05-24split: fix cases where -n l/... creates extraneous filesPádraig Brady
* src/split.c (lines_chunk_split): Ensure that data is only written to stdout when k specified. Also ensure that extra files are not created when there is more data available than reported in the file size. * tests/misc/split-lchunk: Verify that split -n l/k/n doesn't generate any files, and that -n l/n always generates n files. * NEWS: Mention the fix.
2011-05-06split: accept new output --filter=CMD optionKarl Heuer
* src/split.c: Include <signal.h>, <sys/wait.h> and "sig2str.h". (FILTER_OPTION): New anonymous enum member. (filter_command, filter_pid): New globals. (open_pipes, open_pipes_alloc, n_open_pipes): Likewise. (oldblocked, newblocked): Likewise. (longopts): Add "filter". (usage): Document --filter. (create): Extend to create a pipe and fork "sh -c CMD". (closeout): Adapt to close a pipe and wait for child process. (cwrite): Call closeout, not just close. (lines_chunk_split): FIXME (bytes_chunk_extract): FIXME (opid, ofile_open, lines_rr, main): FIXME (ignorable): New function, to encapsulate EPIPE test.
2011-04-30maint: adjust split.c formatting to conformJim Meyering
* src/split.c (usage): Correct indentation. (ofile_open): Likewise. (create): "char *name", not "char* name". (struct of_info) [ofile]: Similar. (parse_chunk): Add spaces around "+".
2011-04-03maint: prohibit direct use of strncmp: prefer STREQ_LEN, STRNCMP_LITJim Meyering
* cfg.mk (sc_prohibit_strncmp): New rule, mostly from libvirt. * src/system.h (STREQ_LEN, STRPREFIX, STRNCMP_LIT): Define. * src/df.c (get_dev, get_point): Convert. * src/extent-scan.c (extent_need_sync): Likewise. * src/ls.c (is_colored, decode_switches): Likewise. (parse_ls_color, (print_color_indicator): Likewise. * src/md5sum.c (split_3): Likewise. * src/split.c (main, emit_ancillary_info): Likewise. * src/tr.c (look_up_char_class): Likewise. * src/uname.c (main): Likewise. * src/who.c (scan_entries): Likewise.
2011-01-24split: avoid a new, spurious warning from gcc-4.6.0Jim Meyering
* src/split.c (lines_rr) [IF_LINT]: Initialize files, now that rawhide's gcc-4.6.0 would otherwise warn about use-uninitialized.
2011-01-01maint: update all copyright year number rangesJim Meyering
Run "make update-copyright".
2010-12-30split: fix the suffix length calculationPádraig Brady
* src/split.c (set_suffix_length): Only auto-calculate the suffix length when the number of files is specified. * tests/misc/split-a: Add a case to trigger the bug, and exercise the suffix length auto-calculation. * NEWS: Mention the fix. Reported by Dmitry V. Levin and Sergey Vlasov at https://bugzilla.altlinux.org/show_bug.cgi?id=24841
2010-12-08split: fix a case where --elide-empty causes invalid chunkingPádraig Brady
When -n l/N is used and long lines are present that both span partitions and multiple buffers, one would get inconsistent chunk sizes. * src/split.c (main): Add a new undocumented ---io-blksize option to support full testing with varied buffer sizes. (cwrite): Refactor most handling of --elide-empty to here. (bytes_split): Remove handling of --elide-empty. (lines_chunk_split): Likewise. The specific issue here was the first handling of elide_empty_files interfered with the replenishing of the input buffer. * test/misc/split-lchunk: Add -e and the new ---io-blksize combinations to the test.
2010-11-22split: add --number to generate a particular number of filesChen Guo
* src/split.c (usage, long_options, main): New options --number, --unbuffered, --elide-empty-files. (set_suffix_length): New function to auto increase suffix length to handle a specified number of files. (create): New function. Refactored from cwrite() and ofile_open(). (bytes_split): Add max_files argument to support byte chunking. (lines_chunk_split): New function. Split file into chunks of lines. (bytes_chunk_extract): New function. Extract a chunk of file. (of_info): New struct. Used by functions lines_rr and ofile_open to keep track of file descriptors associated with output files. (ofile_open): New function. Shuffle file descriptors when there are more output files than available file descriptors. (lines_rr): New function to distribute lines round-robin to files. (chunk_parse): New function. Parses K/N syntax. * tests/misc/split-bchunk: New test for byte chunking. * tests/misc/split-lchunk: New test for line delimited chunking. * tests/misc/split-rchunk: New test for round-robin chunking. * tests/Makefile.am: Reference new tests. * tests/misc/split-fail: Add failure scenarios for new options. * tests/misc/split-l: Fix a typo. s/ln/split/. * doc/coreutils.texi (split invocation): Document --number. * NEWS: Mention the new feature. * .mailmap: Map new email address for shortlog. Signed-off-by: Pádraig Brady <P@draigBrady.com>
2010-11-16split: fail immediately if impossible to create a large filePádraig Brady
* src/split.c (main): Error if -[bC] value > OFF_T_MAX * tests/misc/split-fail: Adjust for the new lower limits
2010-10-07split: fix reporting of read errorsPádraig Brady
The bug was introduced with commit 23f6d41f, 19-02-2003. * src/split.c (bytes_split, lines_split, line_bytes_split): Correctly check the return from full_read(). * tests/misc/split-fail: Ensure split fails when it can't read its input. * NEWS: Mention the fix.
2010-05-31maint: replace each "for (;;)" with "while (true)"Jim Meyering
Run this command: git ls-files | grep '\.[ch]$' \ | xargs perl -pi -e 's/for \(;;\)/while (true)/g' ...except for randint.c, which does not include stdbool.h. In that case, use "while (1)". * gl/lib/randint.c (randint_genmax): Use "while (1)" for infloops. * src/cat.c (simple_cat, cat): Use "while (true)" for infloops. * gl/lib/randread.c (readsource, readisaac): Likewise. * src/copy.c (copy_reg): Likewise. * src/csplit.c (record_line_starts, process_regexp): Likewise. * src/cut.c (set_fields): Likewise. * src/dd.c (iread, parse_symbols): Likewise. * src/df.c (find_mount_point, main): Likewise. * src/du.c (main): Likewise. * src/expand.c (expand): Likewise. * src/factor.c (factor_using_division, do_stdin): Likewise. * src/fmt.c (get_space): Likewise. * src/ls.c (decode_switches): Likewise. * src/od.c (main): Likewise. * src/pr.c (main, read_line): Likewise. * src/shred.c (dopass, genpattern): Likewise. * src/sort.c (initbuf, fillbuf, getmonth, keycompare): Likewise. * src/split.c (bytes_split, lines_split): Likewise. * src/tac.c (tac_seekable): Likewise. * src/test.c (and, or): Likewise. * src/tr.c (squeeze_filter, main): Likewise. * src/tsort.c (search_item): Likewise. * src/unexpand.c (unexpand): Likewise. * src/uniq.c (main): Likewise. * src/yes.c (main): Likewise.
2010-01-01maint: update all FSF copyright year lists to include 2010Jim Meyering
Use this command: git ls-files | grep -v COPYING \ | xargs env UPDATE_COPYRIGHT_USE_INTERVALS=1 \ build-aux/update-copyright
2009-09-21doc: mention the texinfo documentation in --helpPádraig Brady
* src/system.h: Rename emit_bug_reporting_address() to emit_ancillary_info() and update it to not print the translation project address in en_* locales, and _do_ print it in the 'C' (and other) locales so that it's included in the default man page. Also mention how to invoke the texinfo documentation for each command. Also move the "hard-locale.h" include to the 8 files that now use it. * man/help2man: Strip the newly added texinfo reference from the --help output as a more verbose version is already added by help2man. Suggestion from C de-Avillez
2009-09-10doc: improve various BLOCKSIZE and SIZE helpOndřej Vašík
* doc/coreutils.texi (multiplierSuffixes): Mention that the suffix can be specified without a leading number * src/split.c (usage): Refactor SIZE help to within a function * src/truncate.c (usage): Likewise * src/ls.c (usage): Likewise * src/df.c (usage): Likewise. Also add a function with BLOCKSIZE help * src/du.c (usage): Likewise. * src/system.h: Define 2 functions to emit common help text This was prompted by https://bugzilla.redhat.com/show_bug.cgi?id=511188
2009-08-25global: convert indentation-TABs to spacesJim Meyering
Transformed via this shell code: t=$'\t' git ls-files \ | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \ | grep -vE 'tests/pr/|help2man' \ | xargs grep -lE "^ *$t" \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
2009-06-23maint: update all Copyright year lists to include 2009Jim Meyering
2009-03-11cat,cp,mv,install,split: Set the minimum IO block size used to 32KiBPádraig Brady
This is following on from this change: [02c3dc9d 2008-03-06 cat: use larger buffer sizes ...] which increased the IO block size used by cat by 8 times, but also capped it at 32KiB. * NEWS: Mention the change in behavior. * src/system.h: Add a new io_blksize() function that returns the max of ST_BLKSIZE or 32KiB, as this was seen as a good value for a minimum block size to use to get good performance while minimizing system call overhead. * src/cat.c: Use it. * src/copy.c: ditto * src/split.c: ditto
2008-11-10avoid warnings about discarding "qualifiers from pointer target type"Jim Meyering
Use the new "bad_cast" function or an actual cast-to-"(char *)" to avoid warnings. * src/system.h (bad_cast): Define. * src/chown.c (main): * src/chroot.c (main): * src/date.c (main): * src/du.c (main): * src/expand.c (stdin_argv): * src/ls.c (decode_switches): * src/md5sum.c (main): * src/paste.c (main): * src/pr.c (col_sep_string, column_separator, line_separator, main): * src/sort.c (main): * src/split.c (main): * src/tail.c (main): * src/unexpand.c (stdin_argv): * src/yes.c (main):
2008-11-10use xfreopen in place of unchecked freopenJim Meyering
* bootstrap.conf (modules): Add xfreopen. * src/cat.c (main): Include "xfreopen.h". Use xfreopen. * src/cksum.c (cksum): Likewise. * src/head.c (head_file, main): Likewise. * src/md5sum.c (digest_file): Likewise. * src/od.c (open_next_file): Likewise. * src/split.c (type_undef): Likewise. * src/sum.c (bsd_sum_file, sysv_sum_file): Likewise. * src/tac.c (tac_file, main): Likewise. * src/tail.c (tail_file, main): Likewise. * src/tee.c (tee_files): Likewise. * src/tr.c (main): Likewise. * src/wc.c (wc_file): Likewise. * po/POTFILES.in: Add lib/xfreopen.c
2008-06-28doc: add "..." to Usage, to indicate there may be multiple OPTIONsJim Meyering
* src/base64.c (usage): Likewise. * src/cat.c (usage): Likewise. * src/md5sum.c (usage): Likewise. * src/mkdir.c (usage): Likewise. * src/mkfifo.c (usage): Likewise. * src/split.c (usage): Likewise. * src/stat.c (usage): Likewise. Heiko Marr reported the problem with mkdir.
2008-06-27factor out time_t-to-string conversion idiomJim Meyering
* src/system.h: Include "inttostr.h". (timetostr): New function, factored out of... * src/date.c (show_date): Use timetostr. * src/du.c (show_date): Likewise. * src/ls.c (print_long_format): Likewise. * src/pinky.c (time_string): Likewise. * src/stat.c (human_time): Likewise. * src/*.c: Don't include inttostr.h, since system.h does. * src/c99-to-c89.diff: Adjust offsets.
2008-06-16remove redundant const directivesJim Meyering
In 1463824d8e7f72c31f1d803d7cfe2b608ccafc5c, I added some missing "const" directives, as well as some new, redundant ones. This removes the redundant ones. Pointed out by Eric Blake. * base64.c, cat.c, chcon.c, chgrp.c, chmod.c, chown.c, comm.c: * cp.c, csplit.c, cut.c, date.c, dd.c, df.c, dircolors.c, du.c: * env.c, expand.c, fmt.c, fold.c, groups.c, head.c, id.c: * install.c, join.c, kill.c, ln.c, ls.c, md5sum.c, mkdir.c: * mkfifo.c, mknod.c, mktemp.c, mv.c, nice.c, nl.c, od.c: * paste.c, pathchk.c, pinky.c, pr.c, ptx.c, readlink.c, rm.c: * rmdir.c, runcon.c, seq.c, shred.c, shuf.c, sort.c, split.c: * stat.c, stty.c, su.c, sum.c, tac.c, tail.c, tee.c, timeout.c: * touch.c, tr.c, truncate.c, tty.c, uname.c, unexpand.c, uniq.c: * wc.c, who.c: Remove redundant const directives. * maint.mk (sc_const_long_option): Don't require redundant "const".
2008-06-14add "const" attribute, where possibleJim Meyering
* maint.mk (sc_const_long_option): New rule. Enforce global change. * src/base64.c (long_options): Use "const" where possible. * src/cat.c (main): Likewise. * src/chcon.c (long_options): Likewise. * src/chgrp.c (long_options): Likewise. * src/chmod.c (long_options): Likewise. * src/chown.c (long_options): Likewise. * src/comm.c (long_options, OUTPUT_DELIMITER_OPTION): Likewise. * src/cp.c (long_opts): Likewise. * src/csplit.c (longopts): Likewise. * src/cut.c (longopts): Likewise. * src/date.c (long_options): Likewise. * src/dd.c (conversions, flags, statuses): Likewise. * src/df.c (long_options): Likewise. * src/dircolors.c (long_options): Likewise. * src/du.c (long_options): Likewise. * src/env.c (longopts): Likewise. * src/expand.c (longopts): Likewise. * src/fmt.c (long_options): Likewise. * src/fold.c (longopts): Likewise. * src/groups.c (longopts): Likewise. * src/head.c (long_options): Likewise. * src/id.c (longopts): Likewise. * src/install.c (long_options): Likewise. * src/join.c (longopts): Likewise. * src/kill.c (long_options): Likewise. * src/ln.c (long_options): Likewise. * src/ls.c (long_time_format, long_options, sort_functions): Likewise. * src/md5sum.c (long_options): Likewise. * src/mkdir.c (longopts): Likewise. * src/mkfifo.c (longopts): Likewise. * src/mknod.c (longopts): Likewise. * src/mktemp.c (longopts): Likewise. * src/mv.c (long_options): Likewise. * src/nice.c (longopts): Likewise. * src/nl.c (longopts): Likewise. * src/od.c (charname, long_options): Likewise. * src/paste.c (longopts): Likewise. * src/pathchk.c (longopts): Likewise. * src/pinky.c (longopts): Likewise. * src/pr.c (long_options): Likewise. * src/ptx.c (long_options): Likewise. * src/readlink.c (longopts): Likewise. * src/rm.c (long_opts): Likewise. * src/rmdir.c (longopts): Likewise. * src/runcon.c (long_options): Likewise. * src/seq.c (long_options): Likewise. * src/shred.c (long_opts): Likewise. * src/shuf.c (long_opts): Likewise. * src/sort.c (monthtab, long_options): Likewise. * src/split.c (longopts): Likewise. * src/stat.c (long_options): Likewise. * src/stty.c (mode_info, control_info, longopts, set_mode) Likewise. (set_control_char, speeds): Likewise. * src/su.c (longopts): Likewise. * src/sum.c (longopts): Likewise. * src/tac.c (longopts): Likewise. * src/tail.c (long_options): Likewise. * src/tee.c (long_options): Likewise. * src/timeout.c (long_options): Likewise. * src/touch.c (longopts): Likewise. * src/tr.c (long_options): Likewise. * src/truncate.c (longopts): Likewise. * src/tty.c (longopts): Likewise. * src/uname.c (uname_long_options, arch_long_options): Likewise. * src/unexpand.c (longopts): Likewise. * src/uniq.c (longopts): Likewise. * src/wc.c (longopts): Likewise. * src/who.c (longopts): Likewise.
2008-06-08standardize some error messagesBo Borgerson
* maint.mk: (sc_error_message_warn_fatal, sc_error_message_uppercase): (sc_error_message_period): Add automatic checks for non-standard error messages. * .x-sc_error_message_uppercase: explicit exclusion for this check * src/cp.c: Standardize some error messages. * src/date.c: Likewise. * src/dircolors.c: Likewise. * src/du.c: Likewise. * src/expr.c: Likewise. * src/install.c: Likewise. * src/join.c: Likewise. * src/ln.c: Likewise. * src/mv.c: Likewise. * src/od.c: Likewise. * src/pr.c: Likewise. * src/split.c: Likewise. * src/truncate.c: Likewise. * src/wc.c: Likewise. * tests/du/files0-from: Expect new error message. * tests/misc/join: Likewise. * tests/misc/split-a: Likewise. * tests/misc/wc-files0-from: Likewise. * tests/misc/xstrtol: Likewise. * lib/xmemxfrm.c: Likewise.
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.