Jim Meyering [Fri, 12 Aug 2005 13:16:26 +0000 (13:16 +0000)]
(regexec, re_search_stub) [!_LIBC]: Omit declaration of unused local, dfa.
(proceed_next_node): Remove outer declaration and
unnecessary initialization of local-shadowed `dest_node'.
Declare it in inner scopes, nearer its uses instead.
Jim Meyering [Fri, 12 Aug 2005 13:02:01 +0000 (13:02 +0000)]
(setup_dir, enter_dir, leave_dir, free_dir):
Use the hash-table-based cycle-detection code not just when
FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
Reported by James Youngman in
<http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
Jim Meyering [Fri, 12 Aug 2005 08:06:28 +0000 (08:06 +0000)]
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.
Paul Eggert [Thu, 21 Jul 2005 22:00:34 +0000 (22:00 +0000)]
(relative_time): New type.
(RELATIVE_TIME_0): New constant.
(parser_control): Use relative_time instead of doing it ourselves.
(%union): Add new relative_time rel member.
(tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
Now typeless.
(relunit, relunit_snumber): Now of type rel.
(zone, rel, relunit, get_date): Adjust to above changes.
Paul Eggert [Mon, 18 Jul 2005 07:53:05 +0000 (07:53 +0000)]
(EXIT_STATUS): New macro.
(PROGRAM_NAME, usage): Behave like "false" if EXIT_STATUS indicates.
(usage): Remove "These option names may not be abbreviated."
Paul Eggert [Mon, 18 Jul 2005 07:51:32 +0000 (07:51 +0000)]
(false invocation):
Mention that false is often built-in, and that it exits
with status >1 on some hosts.
(true invocation): Remove now-incorrect "non-POSIX mode" reference.
Paul Eggert [Mon, 11 Jul 2005 18:30:26 +0000 (18:30 +0000)]
(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>.
Paul Eggert [Mon, 11 Jul 2005 18:29:44 +0000 (18:29 +0000)]
(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.
Paul Eggert [Mon, 11 Jul 2005 18:27:49 +0000 (18:27 +0000)]
(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.
Paul Eggert [Mon, 11 Jul 2005 18:21:11 +0000 (18:21 +0000)]
(usage, main, long_options) [O_BINARY]:
Remove support for -B. Use same rules as other programs to decide
whether to use binary I/O, except that the -bensAE options always
select text mode.
(main): Avoid setmode; use POSIX-specified routines instead.
Paul Eggert [Mon, 11 Jul 2005 18:20:34 +0000 (18:20 +0000)]
(cat invocation): Remove -B or --binary option
(available on MS-DOS-like platforms only). Explain when text and
binary mode are used now.
(md5sum invocation): -b actually does have an effect on Unix: it
causes "*" to be output. Explain when text and binary mode are
used now.
Paul Eggert [Mon, 11 Jul 2005 18:20:05 +0000 (18:20 +0000)]
Binary input and output are now implemented more consistently.
These changes affect only platforms like MS-DOS that distinguish
between binary and text files.