Jim Meyering
258e75ecb6
(main): Declare `target_directory' with const attribute.
2005-08-21 16:08:53 +00:00
Jim Meyering
3d540878ff
(time_style): Add `const' attribute.
...
(tot_dui): Remove unnecessary (and too-short) initializer list.
2005-08-21 16:06:06 +00:00
Jim Meyering
834d8e96c7
(usage) [-b,-t]: Ensure that there are at least two
...
spaces between each option and the corresponding description -- this
lets help2man format entries properly. Reported by Edward Welbourne.
2005-08-18 22:26:42 +00:00
Jim Meyering
6a8b452b32
(usage): Fix typo s/POS 2/POS2/.
2005-08-17 20:50:17 +00:00
Paul Eggert
7b4c1ac12a
(show_dev): New arg STAT_FILE. All uses changed.
...
This sometimes gives better results on networked file systems
that do not respect POSIX semantics. Problem reported by
Bruno Haible.
2005-08-16 20:33:40 +00:00
Jim Meyering
cb50fa3e87
Don't print uninitialized data (or anything else) to stdout
...
upon localtime failure.
(show_date): Remove stray `puts (buf);' (debugging?)
from the 2004-02-02 change.
2005-08-15 12:16:54 +00:00
Jim Meyering
8c6944b93f
(usage): Fix typo s/formated/formatted/ reported by Norbert Kiesel
2005-08-14 15:02:45 +00:00
Jim Meyering
b2e04be2fa
.
2005-08-14 14:31:23 +00:00
Jim Meyering
6dc48762d8
Don't include "timespec.h".
2005-08-14 14:22:00 +00:00
Jim Meyering
478bd8935b
Use one fewer file descriptor in a common case.
...
Include "fd-reopen.h", rather than "fcntl--.h".
Use fd_reopen rather than open.
2005-08-14 14:18:07 +00:00
Jim Meyering
c41d32149a
Include "timespec.h".
...
(age_of): Return the nanoseconds part of the timestamp, if available.
(binary_operator) [-nt, -ot]: Use nanosecond values to break ties.
2005-08-14 14:17:48 +00:00
Jim Meyering
006d08a85d
(long_time_expected_width): Revert last change, just to
...
be paranoid, and add a comment explaining why.
Paul Eggert mentioned the possibility.
2005-08-14 08:30:25 +00:00
Jim Meyering
f9a52f316a
Don't define mbrtowc at all.
...
If mbstate_t is not defined, then AC_TYPE_MBSTATE_T will define
it to `int' for us.
2005-08-13 22:47:48 +00:00
Jim Meyering
1442403a5d
(main): Explain why we reopen stdin for write-only access.
2005-08-12 08:25:52 +00:00
Jim Meyering
9a3ebcb54d
(long_time_expected_width): Don't test for failed localtime.
...
That cannot happen when the result date's year is in range.
Add an assertion instead.
2005-08-12 08:22:47 +00:00
Jim Meyering
501d8ffe81
(sort_found_occurs, digest_word_file): Likewise.
...
(alloc_and_compile_regex): Likewise.
2005-08-12 08:18:18 +00:00
Jim Meyering
585c8e075b
(sort_files): Use cleaner sizeof *VAR_NAME' rather than sizeof (TYPE_NAME)'.
2005-08-12 08:17:54 +00:00
Jim Meyering
53a9b25dc2
Test `!defined HAVE_MBSTATE_T' rather than
...
`defined mbstate_t' to detect missing support for mbstate_t.
The latter didn't work for HP-UX 11.23.
2005-08-12 08:08:00 +00:00
Jim Meyering
f6ab92093a
Add bulletproofing in case stdin is closed.
...
(have_read_stdin): Remove global variable.
(dc_parse_stream): Always use stdin (freopen, if needed) rather
than sometimes using fopen to get a new file descriptor.
Call fclose unconditionally.
(main): Don't close stdin here. If needed, now it's already done
by dc_parse_stream.
2005-08-12 08:06:28 +00:00
Jim Meyering
5f646f5315
(dc_parse_file): Remove comment about now-removed OPENOPTS.
2005-08-12 07:45:29 +00:00
Jim Meyering
a370bc0aff
(main): Cosmetic: use X2REALLOC rather than x2realloc.
2005-08-12 07:29:51 +00:00
Jim Meyering
8c418c480c
(fold_file): Cosmetic: use X2REALLOC rather than x2realloc.
2005-08-12 07:29:38 +00:00
Jim Meyering
0b08c38152
Cosmetic: use X2NREALLOC (only two arguments) rather than x2nrealloc (with three).
2005-08-12 07:16:25 +00:00
Jim Meyering
e39102faca
adjust long lines
2005-08-12 07:10:22 +00:00
Jim Meyering
bdb22d1235
(main): Cosmetic: use '\0' in place of 0.
2005-08-12 07:09:47 +00:00
Jim Meyering
0508157932
.
2005-08-02 21:15:19 +00:00
Jim Meyering
ef1fad923f
Include "xanstrftime.h".
...
(show_date): Use xanstrftime instead of open-coding it.
2005-08-02 20:53:32 +00:00
Jim Meyering
7a44d1f860
Include "xanstrftime.h".
...
(show_date): Use xanstrftime instead of open-coding it.
2005-08-02 20:52:44 +00:00
Jim Meyering
eed7b13805
(show_date): Remove now-unnecessary code that
...
treated an empty format string as a special case.
2005-08-02 20:44:38 +00:00
Jim Meyering
27cc9e65d2
(usage): Adjust printf argument list to match new format string.
2005-07-19 11:10:35 +00:00
Paul Eggert
eb3bd006a1
(usage, main): --check now accepts multiple input files.
2005-07-19 07:34:55 +00:00
Paul Eggert
d58ce6b09c
(EXIT_STATUS): New macro.
...
(PROGRAM_NAME, usage): Behave like "false" if EXIT_STATUS indicates.
(usage): Remove "These option names may not be abbreviated."
2005-07-18 07:53:05 +00:00
Paul Eggert
983ce81d94
Initial revision.
2005-07-18 07:52:37 +00:00
Paul Eggert
cc5f57603d
(BUILT_SOURCES): Remove false.c.
...
(false.c): Remove; it's now a source file.
2005-07-18 07:52:18 +00:00
Paul Eggert
ef5043084f
(main): Don't worry about POSIXLY_CORRECT.
2005-07-15 21:55:13 +00:00
Paul Eggert
9cfc51e083
Remove FESETROUND_LIBM; no longer needed.
2005-07-14 00:03:08 +00:00
Jim Meyering
95550da8d3
.
2005-07-12 16:44:52 +00:00
Paul Eggert
15a1aede78
(setmode, fileno): Remove; no longer needed, we think.
...
(SET_MODE, SET_BINARY, SET_BINARY2): Remove.
[defined __DJGPP__]: Don't include <io.h> or <sys/exceptn.h>.
2005-07-11 18:30:26 +00:00
Paul Eggert
bdc138f474
(wipefile): Always use binary mode. Clearly this
...
never worked right on DOS!
2005-07-11 18:30:02 +00:00
Paul Eggert
aa43a635c1
(usage): Clarify whether text or binary is the default.
...
(split_3, main): BINARY is now a 3-way value. All uses changed.
(digest_file): Likewise. Clear *BINARY if we determine the file
to be text. All uses changed.
(main): Don't report a file to be binary if we actually read it
as text in MS-DOS, because it was a terminal.
2005-07-11 18:29:44 +00:00
Paul Eggert
d045e55b7c
(unexpand): Always copy in text mode. POSIX says
...
the input and output must be text.
2005-07-11 18:29:21 +00:00
Paul Eggert
44f0501d4f
(expand): Always copy in text mode. POSIX says
...
the input and output must be text.
2005-07-11 18:28:53 +00:00
Paul Eggert
8831c9589a
(copy_reg): Always copy in binary mode.
2005-07-11 18:28:19 +00:00
Paul Eggert
f3946fbee9
(wc): Avoid setmode; use POSIX-specified routines instead.
...
(wc_file): FILE might be null now.
(main): Simplify code a bit, so that fewer places need the setmode fixes.
2005-07-11 18:27:49 +00:00
Paul Eggert
07fc234838
(main): Avoid setmode; use POSIX-specified routines instead.
2005-07-11 18:27:10 +00:00
Paul Eggert
a1170668ff
(tee): Avoid setmode; use POSIX-specified routines instead.
2005-07-11 18:26:52 +00:00
Paul Eggert
9839325ad5
(tail_bytes, tail_lines, tail_file, main):
...
Avoid setmode; use POSIX-specified routines instead.
2005-07-11 18:26:28 +00:00
Paul Eggert
b91eec6bb2
(copy_to_temp, tac_file, main):
...
Avoid setmode; use POSIX-specified routines instead.
2005-07-11 18:25:56 +00:00
Paul Eggert
ed0dda33d5
(bsd_sum_file, sysv_sym_file):
...
Avoid setmode; use POSIX-specified routines instead.
2005-07-11 18:25:23 +00:00
Paul Eggert
b2b2956e01
(main): Avoid setmode; use POSIX-specified routines instead.
2005-07-11 18:24:42 +00:00