summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2003-05-10Handle argc < optind.Jim Meyering
2003-05-10(main): Set program_name before first use.Jim Meyering
Remove that (redundant) first use. Don't exit successfully just because --verbose was specified. Pass 0, not EXIT_SUCCESS, as first argument to error; when that parameter is 0, error does not exit.
2003-05-10(main): Handle argc < optind.Jim Meyering
2003-05-10(main): Handle argc < optind.Jim Meyering
2003-05-10(main): Handle argc < optind.Jim Meyering
2003-05-10add semicolonJim Meyering
2003-05-10(main): When failing due to too few arguments, also sayJim Meyering
that rather than just "Try `uname --help' for more information.".
2003-05-10(main): When failing due to unaccepted arguments,Jim Meyering
also say `too many arguments' rather than just `Try `uname --help' for more information.'.
2003-05-10(main): Handle argc < optind.Jim Meyering
2003-05-10(main): Don't segfault when argc < optind.Jim Meyering
2003-05-10(main): Use error, rather than fprintf, for the sake of consistency.Jim Meyering
2003-05-10(main): Test for the case of no arguments before computing n_files.Jim Meyering
2003-05-10(main): Test for `missing argument' before computing n_files.Jim Meyering
2003-05-10Include error.h.Jim Meyering
2003-05-09(main): Don't overrun array bound if argc is 0.Jim Meyering
2003-05-09fix off-by-one error in last changeJim Meyering
2003-05-09(main): Don't overrun array bound if argc is 0.Jim Meyering
That would happen when invoked via: execl ("/usr/bin/sort", NULL);
2003-05-07Implement support so that `head --lines=-N' works on seekable files.Jim Meyering
(enum Copy_fd_status): Define. (COPY_FD_DIAGNOSE): New macro. (elide_tail_lines_seekable): New funtion. (elide_tail_lines_file): Call it here.
2003-05-06(CHAR_BIT): Remove duplicate definition.Jim Meyering
2003-05-04.Jim Meyering
2003-05-04(HAVE_WORKING_READDIR): Define to 0 if not defined.Jim Meyering
(IF_READDIR_NEEDS_REWINDDIR): Remove. (remove_cwd_entries): Rewrite to avoid IF_READDIR_NEEDS_REWINDDIR, which was a bit weird because it couldn't be emulated by a function.
2003-05-03Extend head to accept --lines=-N (--bytes=-N) and to print allJim Meyering
but the N lines (bytes) at the end of the file. Include full-write.h, full-read.h, inttostr.h, quote.h. Use quote() in diagnostics, rather than literal `' marks. (copy_fd, elide_tail_bytes_pipe, elide_tail_bytes_file): New functions. (elide_tail_lines_pipe, elide_tail_lines_file): New functions. (head_file): Reorganize so as to call head from only one place. (main): Likewise, for head_file. Handle new, undocumented option, --presume-input-pipe. Handle negative line and byte counts.
2003-05-02(usage): Don't mention obsolescent -WIDTH option.Jim Meyering
Instead explain about `-' and standard input. (main): Give a proper diagnostic for e.g., `fmt -c -72'.
2003-05-02Include "quote.h".Jim Meyering
Use quote() in diagnostics, rather than literal `' marks. (main): Exit nonzero when unable to open an input file.
2003-05-02(main): Diagnose invalid suffix on obsolescent width specifications like `-72x'.Jim Meyering
2003-05-02Work around nasty readdir bug with Darwin6.5 and hfs file system.Jim Meyering
(IF_READDIR_NEEDS_REWINDDIR): Define. [! HAVE_WORKING_READDIR] (remove_cwd_entries): If readdir has just returned NULL and there has been at least one successful unlink or rmdir call since the opendir or previous rewinddir, then call rewinddir and reiterate the loop.
2003-05-02Factor out common code.Jim Meyering
(readdir_ignoring_dotdirs): New function. (is_empty_dir): Use it here. (remove_cwd_entries): Use it here.
2003-05-01Change type of n_units, n_bytes, n_lines to be `uintmax_t'.Jim Meyering
(dump_remainder): Move two declarations `down' into the scope where they are used. (xlseek): Return the resulting offset. (file_lines): Rename parameter, file_length, to end_pos. (pipe_lines): Don't coerce safe_read return value to `int'. Adapt tests accordingly. (pipe_bytes) [struct charbuffer] (nbytes): Change type from `int' to `unsigned int'. Change type of `total_bytes' from `int' to `size_t', since the former wouldn't always be wide enough. Don't coerce safe_read return value to `int', and adapt tests accordingly. Now that testing for a read error no longer involves using `tmp', handle that case *after* freeing `tmp'. (start_bytes): Clean up. (tail_bytes): Now that `n_bytes' may be larger than OFF_T_MAX, test for that condition and, if it's true, don't use lseek optimizations. (parse_options): Don't fail just because N_UNITS is larger than the maximum size of a file -- tail may be applied to an input stream (e.g., a pipe) with more data than that.
2003-05-01(file_lines): Rename parameter, file_length, to end_pos.Jim Meyering
2003-05-01(start_lines): Rewrite to use memchr. Clean up.Jim Meyering
2003-04-24.Jim Meyering
2003-04-24(tsort): Remove unnecessary test of have_read_stdin.Jim Meyering
(main): Minor syntactic clean-up.
2003-04-24(tsort): Fail if the input contains an odd number of tokens.Jim Meyering
2003-04-24add localedir.hJim Meyering
2003-04-21(print_esc): Tweak spelling of new variable.Jim Meyering
2003-04-21Fix printf POSIX compatibility bug reported by Ben Harris inJim Meyering
<http://mail.gnu.org/archive/html/bug-coreutils/2003-04/msg00070.html>. * doc/coreutils.texi (printf invocation): It's \NNN in the format, \0NNN in the %b operand. * src/printf.c (usage): Likewise. (print_esc): New arg OCTAL0 to specify whether \0NNN or \NNN is desired. All uses changed. Behave like Bash printf if %b operand uses \NNN where the initial N is not 0.
2003-04-17Remove uses of PROTOTYPE macro.Jim Meyering
2003-04-13(is_empty_dir): Don't closedir (NULL).Jim Meyering
2003-04-12Giving nl an invalid STYLE argument (in --header-numbering=STYLE (-h),Jim Meyering
--body-numbering=STYLE (-b), or --footer-numbering=STYLE (-f)) or FORMAT (--number-format=FORMAT (-n)) would not give a useful diagnostic. (main): Fix those problems and remove literal quote marks (e.g., "`%s'") from format string; instead use "%s" in each format string and `quote (optarg)' as the corresponding argument. Also, diagnose all invalid command line options before failing.
2003-04-12(proc_text): Fix a bug introduced on 2001-11-10,Jim Meyering
for textutils-2.0.17, that would make nl output extra newlines in some cases.
2003-04-11Remove SPC in SPC-TAB sequence.Jim Meyering
2003-04-11Remove SPC in SPC-TAB sequence.Jim Meyering
2003-04-11Remove SPC in SPC-TAB sequence.Jim Meyering
2003-04-11Remove SPC in SPC-TAB sequence.Jim Meyering
2003-04-11Remove SPC in SPC-TAB sequence.Jim Meyering
2003-04-11Remove SPC in SPC-TAB sequence.Jim Meyering
Remove trailing blanks. filter though cppi
2003-04-11Remove SPC in SPC-TAB sequence.Jim Meyering
2003-04-11Remove SPC in SPC-TAB sequence.Jim Meyering
2003-04-11Remove SPC in SPC-TAB sequence.Jim Meyering
2003-04-11Include <stdlib.h> unconditionally.Jim Meyering