Age | Commit message (Collapse) | Author |
|
* src/csplit.c (prefix): Likewise.
* src/printf.c (cfcc_msg): Likewise.
* src/tail.c (valid_file_spec): Likewise.
* src/cut.c (cut_file): Likewise, for a parameter.
* src/expr.c (str_value): Likewise.
* src/fold.c (fold_file): Likewise.
* src/pr.c (init_header): Likewise.
* src/dircolors.c (dc_parse_stream): Likewise, for a local.
* src/tr.c (make_printable_str): Likewise.
* src/nl.c (body_type, header_type, footer_type, current_type):
(separator_str, build_type_arg, nl_file): Likewise, for many.
* src/paste.c (main): Don't assign a read-only string to 'optarg'.
* src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
|
|
(main): Use it. Don't bother allocating a buffer.
|
|
also test whether it is a tty. Using only the lseek-based test would
give a false positive on Solaris. Reported by Peter Fales.
|
|
negative return values less than -2 represent regoff_t overflow.
|
|
Avoid setmode; use POSIX-specified routines instead.
|
|
(copy_to_temp): Don't call fd_safer; no longer needed now
that we include stdlib--.h.
|
|
|
|
|
|
|
|
(copy_to_temp): Use fd_safer.
(tac_file): Don't assume fopen cannot return stdin.
|
|
|
|
using atexit like this is wrong.
|
|
|
|
Use quotearg_colon in most diagnostics.
(copy_to_temp): Rewrite not to exit upon I/O or temp-file-creation
failure. Before, this command (with /full/tmp being a full partition)
TMPDIR=/full/tmp ./tac /proc/modules tac.c
would exit immediately upon the write error while trying to copy
non-seekable /proc/modules to the full partition. Now it still
reports the failure but continues on with the remaining file.
|
|
|
|
function `down' so that it precedes definition of tac_nonseekable.
|
|
(copy_to_temp): Renamed from save_stdin, since
now it copies a general file descriptor, not just stdin.
(tac_nonseekable): Renamed/adapted from tac_stdin.
(tac_file): Get fd via `open' directly rather than via fopen/fileno,
since we never used the stream. Perform "-" to stdin mapping here
rather than in main. Determine whether a file is seekable,
by trying to `lseek' to its end, and dispatch to tac_seekable or
tac_nonseekable accordingly.
(main): Rewrite argument handling now that it uses only tac_file.
Reported by Harald Dunkel in http://bugs.debian.org/278604.
|
|
|
|
tac_stdin, tac_stdin_to_mem, main): Use bool for booleans.
(match_length, G_buffer_size, tac_seekable, main): Use size_t for sizes.
(tac_seekable): Use ptrdiff_t for pointer subtraction.
Report an error if the result is out of range.
(tac_seekable, main): Check for integer overflow in buffer size
calculations.
(main): Remove unnecessary casts.
|
|
(usage): Don't bother normalizing exit status
since the arg is already the correct exit status now.
|
|
(tac_stdin_to_mem): Clean up #if-0'd code.
|
|
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.
|
|
|
|
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
|
|
|
|
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
|
|
Don't include closeout.h.
|
|
|
|
|
|
rather than `int' to avoid warnings from gcc.
|
|
|
|
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
|
|
|
|
|
|
fwrite failures. Do not bother to rewind the temp file, as
it'll be read backwards anyway.
|
|
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\''
|
|
`and'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(tac_stdin_to_mem): Likewise.
|