Age | Commit message (Collapse) | Author |
|
Similar fixes for many comments.
(TAB_DEFAULT): New constant, so that we can support NUL as
the field separator.
(tab): Now int, not char. Initialize to TAB_DEFAULT.
(specify_sort_size): If multiple sizes are specified, use the largest.
(begfield, limfield): Support NUL tab char.
(set_ordering): Do not let -i override -d.
(main): Report an error if incompatible -o or -t options are given.
Report an error for "-t ''". Allow "-t '\0'" to specify a NUL tab.
|
|
|
|
|
|
small amount of code from him was first moved to lib/human.c, and was
subsequently rewritten entirely.
|
|
message digest modes. Currently works with BSD's MD5 and SHA1
formats since these are the two algorithms presently used in
coreutils. Updated comments to reflect this change.
(bsd_split_3): Updated comments.
|
|
who's -l option has been eliciting an unconditional warning about
this impending change since sh-utils-2.0.12 (April 2002).
|
|
|
|
on a partition (e.g. VFAT) on which distinct names may refer to the
same directory entry (often due to variations in case), and when the
link count for the file is 1, mv no longer unlinks the file.
FIXME: this is a band-aid fix. If the file happens to have a link
count of 2 or greater, mv will still unlink it.
(same_file_ok): Invoke same_name (which might still
return false for names that refer to the same directory entry)
only if the link count is 2 or more.
|
|
This would happen for nonempty files not ending with a newline.
|
|
|
|
when the user-specified format string ends with `%'.
|
|
|
|
instead of %-5h. The latter would make stat emit trailing spaces.
|
|
|
|
as we're now assuming that part of hosted C89.
|
|
to avoid warnings from gcc.
|
|
|
|
|
|
(print_user): Likewise.
This fixes a typo I introduced in who-users.c on 1996-02-23.
|
|
(print_entry): Likewise.
This fixes a typo I introduced in who-users.c on 1996-02-23.
|
|
|
|
race condition bug. The bug would be triggered when tailing a file
with file pointer not at beginning of file, and where the file was
truncated to have a length of less than the initial offset at just
the right moment (between the two lseek calls in this function).
|
|
`tail -n0 -f FILE' and `tail -c0 -f FILE' doing what amounted to a
busy-wait rather than sleeping between iterations. The bug manifests
itself only when tailing regular files that are initially nonempty.
(tail_bytes): Set *read_pos to new file offset after
each xlseek call.
(tail_lines): Likewise, after lseek calls.
|
|
|
|
(check-README, ../AUTHORS): Use it.
|
|
|
|
|
|
E.g., this would not terminate: printf 'a\tb' | fold -w2 -s
(fold_file): Move contents of `else'-block
out of conditional so it's used also for --spaces (-s).
|
|
system.h so the types from time.h and sys/time.h are available.
It appears that this is necessary for OpenBSD, NetBSD, and
Darwin 6.5 (MacOS 10.2.5). Reported by Nelson Beebe.
|
|
Set file timestamps with utimens, not utime.
|
|
(copy_internal): Set file timestamps with utimens, not utime.
|
|
(change_timestamps): Set file timestamps with utimens, not utime.
|
|
(re_protect): Set file timestamps with utimens, not utime.
|
|
|
|
|
|
|
|
|
|
|
|
(longopts, usage, next_file_name, main): Support -d.
(next_file_name, main): Allow -a0, as POSIX requires.
(next_file_name): Don't assume ASCII-like encoding;
'a' through 'z' are not contiguous in EBCDIC.
|
|
|
|
(cut_fields): Invoke getndelim2 rather than getdelim2.
|
|
|
|
|
|
and for the indices to iterate through nsigs.
|
|
types and to remove unnecessary casts.
(min, max): Remove. All uses changed to MIN and MAX.
(hard_lc_collate, hard_LC_TIME, struct buffer.eof, struct
keyfield.skipsblanks, struct keyfield.skipeblanks, struct
keyfield.numeric, struct keyfield.general_numeric, struct
keyfield.month, struct keyfield.reverse, reverse, unique,
have_read_stdin): Now bool, not int. All uses changed.
(eolchar): Now char, not int.
(struct keyfield.ignore): Now bool const *, not int *.
(struct keyfield.translate): Now char const *, not char *.
(struct month.name): Likewise.
(blanks, nonprinting, nondictionary): Now bool[], not int[].
(cleanup, inittables, keycompare, check, mergefps, first_same_file,
check, sort, main): Use const * pointers when possible.
(month_cmp): Rewrite to avoid casts.
(inittables): Initialize tables unconditionally, to avoid branches.
(fillbuf): Return bool, not int. All uses changed.
(fillbuf, keycompare, new_key, main):
Use SIZE_MAX rather than (size_t) -1.
(trailing_blanks): Renamed from trim_trailing_blanks.
Return the number of blanks to trim. All uses changed.
(getmonth): Use trailing_blanks rather than open code.
(keycompare): Do not cast char * to unsigned char *; not needed.
CMP_WITH_IGNORE converts args to UCHAR, so no need to convert it
ourselves.
(compare, main): Use | rather than || to avoid jumps.
Replace "diff = NONZERO (alen)" with "diff = 1", since alen must
be nonzero there.
(check, first_same_file, sort, main):
Use bool instead of int local vars when possible.
(check): Merge the old 'checkfp' and 'check' into a single function,
that returns a boolean (true if the file was ordered).
All uses changed.
(main): Use int instead of unsigned for iterating through nsigs.
Rename local var "posix_pedantic" to "posixly_correct".
|
|
to avoid compilation error on Ultrix. Reported by Christian Krackowizer.
|
|
E.g., `cut -f2' would do so.
|
|
From Paul Eggert.
|
|
|
|
(WORD_TABLE): New member alloc.
(ALLOC_NEW_WORD): Remove.
(occurs_alloc): New var.
(digest_word_file, find_occurs_in_text): Check for arithmetic
overflow when computing table size. Use xrealloc rather than
bumpalloc primitives.
|