Age | Commit message (Collapse) | Author |
|
From Jochen Hein.
|
|
if-block. This fixes a bug introduced by my 2001-08-06 change.
|
|
Remove list of options in comment, which wasn't
worth maintaining separately from usage().
(print_element): Move definition up, avoiding the need for
declaration and allowing inlining on some platforms.
Keep track of whether something has been printed; this is more
natural than modifying `toprint'.
(PRINT_KERNEL_NAME): Renamed from PRINT_SYSNAME.
(PRINT_KERNEL_RELEASE): Renamed from PRINT_RELEASE.
(PRINT_KERNEL_VERSION): Renamed from PRINT_VERSION.
(PRINT_HARDWARE_PLATFORM, PRINT_OPERATING_SYSTEM): New macros.
(toprint): Remove global var; now local in `main'.
(long_options, usage, main): Implement changes described in NEWS.
Reorder options to reflect output order.
(main): Use buffers one byte longer, for compatibility with Solaris 8.
Output newline at end. -a sets `toprint' to -1 now; this is simpler.
Do not bother invoking system calls like uname if the resulting
information does not need to be printed.
Do not fail if sysinfo fails; just print "unknown".
|
|
|
|
[HAVE_RESOLVEPATH], [!HAVE_RESOLVEPATH]: Use malloc, not alloca,
so that these two paths also produce `resolved' in malloc'd storage.
Free that memory when done with it.
|
|
|
|
(get_link_name): Don't use PATH_MAX.
Rewrite to use xreadlink.
|
|
(TRUE): Define to `true', not 1.
(FALSE): Define to `false', not 0.
|
|
|
|
|
|
|
|
|
|
|
|
(full_write): Remove decl; not needed.
|
|
|
|
(full_write): Remove decl; not needed.
(simple_cat, cat): Don't assume read and write size fits in int.
|
|
|
|
|
|
|
|
(full_write): Remove decl; not needed.
(open_fd): Don't assume read and write size fits in int.
|
|
(full_write): Remove decl; not needed.
(copy_reg): Don't assume read and write size fits in int.
|
|
* src/system.h: ...to here.
|
|
|
|
|
|
|
|
|
|
Instead, allocate at least sort_size bytes total.
|
|
|
|
a bounds check for examples like `uniq a b c'.
|
|
(e.g. `uniq +3 --' did not work) by invoking getopt_long with
leading '-', resembling what was done to 'sort' on 2001-03-20.
Recognize an +N option only if it is an integer in range, and
(if POSIXLY_CORRECT) only if a file name argument has not been seen;
otherwise silently treat it as a file name.
If the user specifies too many operands, output the first one
in the error message, as a diagnostic aid.
|
|
|
|
into size_t. Tune code for the common case where the line
lengths differ: we avoid comparing them entirely in that case.
|
|
by Geoff Whale.
(skip_fields, skip_chars, check_chars): Now size_t, not int.
(size_opt): New function. Do not arbitrarily reject size zero.
Change the wording of the error message slightly, for convenience.
(find_field): Use size_t, not int, to compute sizes.
(different, main): check_chars==0 is no longer a special case, as
it defaults to SIZE_MAX.
(main): Check for overflow with args like -234234234234234.
Use 'size_opt' to convert optional arguments to sizes.
|
|
part of the field. This disagrees with POSIX.2, but it's
gotta be a bug in the standard. An interpretations request
has been submitted to PASC.
|
|
|
|
|
|
|
|
(main): Do not worry about POSIXLY_CORRECT, as it's OK for
expr to have options (so long as they do not begin with digits).
|
|
All callers changed.
|
|
(eval2): Do comparisons as strings first, before trying to convert to
integer. This avoids loss of information and wrong result, e.g. for
"expr '00' '<' '0!'", where you don't want to convert '00' to '0'.
|
|
(cmpf, less_than, less_equal, equal, not_equal, greater_equal,
greater_than, arithf, arithdivf, plus, minus, multiply, divide, mod):
Remove.
(eval4, eval3, eval2): Rewrite to avoid the need for the above macros
and functions.
|
|
into the scopes where they're actually used.
(unary_operator): Likewise for `fd'.
|
|
Use intmax_t for argument integers, not long.
(age_of, binary_operator): Use time_t for times, not long.
(unary_operator): If N is out of int range, -t N now returns false.
|
|
|
|
|
|
the value of integer expressions.
(struct valinfo.i): Now intmax_t, not int.
(docolon, int_value, str_value, isstring, nextarg, toarith,
freev, tostring, trace): Remove unnecessary forward decls.
(int_value, printv, tostring, toarith, arithf, arithdivf, docolon,
eval6, eval4, eval3): Do integer arithmetic using intmax_t, not int.
(docolon): Don't assume size_t fits in int.
|
|
(show_date) [--rfc-822]: Set LC_ALL=C just before
calling strftime and restore it just afterwards.
Suggestion from Ulrich Drepper.
|
|
Set only LC_TYPE to the "C" locale. Setting LC_ALL is overkill,
and would have unwanted side effects if there is an error message.
|
|
|
|
include the first offending argument in the diagnostic.
Suggestion from Karl Berry.
|