Age | Commit message (Collapse) | Author |
|
trailing numeric option in an invalid way.
|
|
testing-only option to start with `-', so that it cannot render
ambiguous any prefix it happens to share with some other option name.
|
|
(elide_tail_bytes_file, elide_tail_lines_file, head_bytes):
(head_lines, head_file): Always use binary mode except for std tty.
|
|
|
|
|
|
|
|
(header_mode_option): Remove.
(main): Don't complain about obsolete -NUM args.
|
|
|
|
|
|
|
|
write_header, elide_tail_bytes_pipe, elide_tail_bytes_file,
elide_tail_lines_pipe, elide_tail_lines_seekable,
elide_tail_lines_file, head_bytes, head_lines, head, head_file,
string_to_integer, main):
Use bool for booleans.
(main): Rewrite to avoid cast.
|
|
|
|
(usage): Don't bother normalizing exit status
since the arg is already the correct exit status now.
|
|
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.
|
|
(struct linebuffer): Change nbytes and nlines
from unsigned int to size_t. unsigned int is safe (after the
2003-09-03 patch) but size_t is cleaner.
Standardize on BUFSIZ as opposed to other macro names and values.
(BUFSIZE): Remove. All uses changed to BUFSIZ.
|
|
|
|
Don't include closeout.h.
|
|
the macro, COPY_FD_DIAGNOSE.
(diagnose_copy_fd_failure): Enclose diagnostic in _(...).
(head_file): Likewise.
|
|
|
|
|
|
This sort of thing is why it'd be *Really Good* to factor
out the common code used here and in tail.c.
|
|
|
|
|
|
|
|
Now that assert is no longer used, don't include <assert.h>.
|
|
(AUTHORS): Add my name.
(elide_tail_lines_pipe): New function.
|
|
(enum Copy_fd_status): Define.
(COPY_FD_DIAGNOSE): New macro.
(elide_tail_lines_seekable): New funtion.
(elide_tail_lines_file): Call it here.
|
|
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.
|
|
|
|
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
|
|
|
|
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(main): Revert to previous behavior, except report
an error and exit if the obsolete syntax is used and if conforming
to the new standard.
|
|
to seek back to the position we would have gotten to had we
been reading one byte at a time. POSIX currently doesn't
require this, but it's easy to do and some software relies on it.
|
|
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 it.
(main): Check for obsolete options.
(header_mode_option): New constant.
|
|
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\''
|
|
(string_to_integer): Check explicitly for overflow,
and lump everything else together as `invalid'.
|
|
|
|
(head_file): ... not here.
|
|
(main): Likewise.
|
|
|
|
|
|
Change all U_LONG_LONG to uintmax_t.
(head_lines): Move a couple dcls into an inner scope.
(string_to_integer): Rename from string_to_ull.
|
|
|