Age | Commit message (Collapse) | Author |
|
* 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.
|
|
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.
|