Commit Graph

5213 Commits

Author SHA1 Message Date
Paul Eggert dd6f2c49db Include fcntl--.h, not unistd-safer.h.
(touch): Don't call fd_safer; no longer needed now that
we include fcntl--.h.
2005-07-03 07:23:18 +00:00
Paul Eggert 9509ae9a8c Include stdio--.h, not stdio-safer.h.
(tee): Don't call fopen_safer; no longer needed now that we
include stdio--.h.
2005-07-03 07:22:50 +00:00
Paul Eggert 4decb49032 Include fcntl--.h, not unistd-safer.h.
(recheck, tail_file): Don't call fd_safer; no longer needed
now that we include fcntl--.h.
2005-07-03 07:21:49 +00:00
Paul Eggert 7b1780d5cc Include stdlib--.h rather than unistd-safer.h.
(copy_to_temp): Don't call fd_safer; no longer needed now
that we include stdlib--.h.
2005-07-03 07:21:31 +00:00
Paul Eggert b6be15eaca Include fd-reopen.h.
(display_all, display_settings, display_window_size, set_window_size):
Remove fd arg, since we now assume stdin.  All callers changed.
(main): Reuse stdin rather than opening a new one.  This
saves a file descriptor.
2005-07-03 07:21:03 +00:00
Paul Eggert c030201e6d Include fcntl--.h rather than unistd-safer.h.
Include fd-reopen.h.
(input_desc): Remove.  All uses replaced by STDIN_FILENO.
(cwrite): Don't call fd_safer; no longer needed now that
we include fcntl--.h.
(main): Reuse stdin rather than opening a new one.  This
saves a file descriptor.
2005-07-03 07:20:33 +00:00
Paul Eggert d0baad324d Include stdio--.h rather than stdio-safer.h.
Include stdlib--.h.  Do not include unistd-safer.h.
(create_temp_file): Don't call fd_safer; no longer needed
now that we include *--.h files.
(xfopen): Don't call fopen_safer, for similar reasons.
2005-07-03 07:20:04 +00:00
Paul Eggert ce00cad00f Include fcntl--.h, not unistd-safer.h.
(wipename, wipe_file): Don't use fd_safer; no longer needed
now that we include fcntl--.h.
2005-07-03 07:19:29 +00:00
Paul Eggert 8359085a76 Include stdio--.h, not stdio-safer.h.
(open_file): Invoke fopen, not fopen_safer.
2005-07-03 07:19:06 +00:00
Paul Eggert 2eeccaacd9 Include fd-reopen.h.
Include unistd--.h, not unistd-safer.h.
(main): Use fd_reopen to simplify code.  When replacing stdin,
use "/dev/null" not "/", as that's less likely to go wrong these days.
(main): Use dup, not dup_safer.
2005-07-03 07:18:48 +00:00
Paul Eggert 3fff9c1441 Include stdio--.h.
(digest_check): Don't try to read both checksums and data from stdin.
2005-07-03 07:18:21 +00:00
Paul Eggert e32032accf Include stdio--.h, not stdio-safer.h.
(main): Use fopen, not fopen_safer.
2005-07-03 07:17:58 +00:00
Paul Eggert 566d32f04c Include fd-reopen.h.
(open_fd): Remove.  All callers changed to use fd_reopen instead.
2005-07-03 07:17:36 +00:00
Paul Eggert d54f92ab0d Include fd-reopen.h.
Include stdio--.h, not stdio-safer.h.
(input_desc): Remove.  All uses changed to STDIN_FILENO.
(set_input_file): Reopen stdin, to simplify code.
(create_output_file): Use fopen, not fopen_safer.
2005-07-03 07:17:12 +00:00
Paul Eggert 43ab391610 Include fcntl--.h, not unistd-safer.h.
(copy_reg): Don't call fd_safer; no longer needed
now that we include fcntl--.h.
2005-07-03 07:16:43 +00:00
Paul Eggert 5a62048846 Include stdio--.h, not stdio-safer.h.
(compare_files): Use fopen, not fopen_safer.
2005-07-03 07:16:23 +00:00
Paul Eggert 9c17ef9a81 Don't include stdio-safer.h; no longer needed.
(writeline): Remove stream arg; we now always output to stdout.
All callers changed.
(check_file): Reuse stdout rather than opening a new stream.
This saves a file descriptor.
2005-07-03 06:26:15 +00:00
Paul Eggert 6af6438b0a (main): Reuse stdin rather than opening a new stream.
This saves a file descriptor.
2005-07-03 06:25:42 +00:00
Jim Meyering 42f845ebc7 . 2005-07-02 14:33:56 +00:00
Jim Meyering e62b441f50 Assume HAVE_UNISTD_H. 2005-07-01 21:26:24 +00:00
Jim Meyering e0331d4ce0 Assume HAVE_FCNTL_H (i.e., include <fcntl.h>
unconditionally, and don't include <sys/file.h>).
2005-07-01 20:31:16 +00:00
Jim Meyering c44874f722 . 2005-06-30 20:32:46 +00:00
Jim Meyering 8665927afc Add uses of ARGMATCH_VERIFY to ensure that
corresponding option string and value arrays are consistent.
2005-06-30 16:47:54 +00:00
Jim Meyering 7078d7a5b8 Add uses of ARGMATCH_VERIFY to ensure that
corresponding option string and value arrays are consistent.
Remove a harmless trailing `, 0' from a value list.
2005-06-30 16:47:38 +00:00
Jim Meyering 779a89cdb4 Add uses of ARGMATCH_VERIFY to ensure that
corresponding option string and value arrays are consistent.
Remove a harmless trailing `, 0' from a value list.
2005-06-30 16:47:00 +00:00
Jim Meyering a9129f0786 (VERIFY): Guard definition with #ifndef.
(VERIFY_EXPR): Undef before defining.
2005-06-30 16:40:59 +00:00
Jim Meyering 98f3ba52df Use one fewer helper macro. 2005-06-29 17:10:44 +00:00
Jim Meyering fdbdfd5b62 (main): Use X2REALLOC rather than x2realloc. 2005-06-29 16:27:37 +00:00
Jim Meyering e68eeff682 (fillbuf): Use X2REALLOC rather than x2realloc. 2005-06-29 16:26:20 +00:00
Jim Meyering fd98517183 (show_date): Use X2REALLOC rather than x2realloc. 2005-06-29 16:26:01 +00:00
Jim Meyering 9bdffe1137 (main, store_char): Use X2REALLOC rather than x2realloc. 2005-06-29 16:25:50 +00:00
Jim Meyering bea7e93fde Update sole use of VERIFY.
Use X2REALLOC, rather than x2realloc.
2005-06-29 16:23:31 +00:00
Jim Meyering 87f543aea5 (VERIFY): Rewrite to use string-concatenation
and __LINE__ so as not to require a struct name parameter.
(GL_CONCAT, GL_CONCAT2, GL_LINE_CONCAT): Define helper macros.
2005-06-29 16:23:15 +00:00
Jim Meyering 9b050191c5 (gobble_file): Use stat.st_author, not stat.st_uid
when computing the --author column width.  This bug might have
resulted in misaligned columns when using the --author option
on the Hurd.  Spotted by Arnold Robbins.

The bug was introduced on 2003-12-03.
2005-06-29 10:03:10 +00:00
Jim Meyering df46e29284 split long line in copyright comment 2005-06-28 17:50:01 +00:00
Jim Meyering cdedc0925c (fillbuf): Use x2realloc on 1-byte base types, not x2nrealloc. 2005-06-28 16:33:20 +00:00
Jim Meyering dec00b5930 (dump_strings): Use x2realloc on 1-byte base types, not x2nrealloc. 2005-06-28 16:31:31 +00:00
Jim Meyering b64058f69e (show_date): Use x2realloc on 1-byte base types, not x2nrealloc. 2005-06-28 16:29:42 +00:00
Jim Meyering 2f955ff766 (main, store_char): Use x2realloc on 1-byte base types, not x2nrealloc. 2005-06-28 16:22:36 +00:00
Jim Meyering 7f7acc20fd . 2005-06-27 08:50:22 +00:00
Jim Meyering 534ccf18c2 . 2005-06-24 08:06:28 +00:00
Jim Meyering a345498d97 (usage): Clarify how --reply=no works. 2005-06-24 08:02:36 +00:00
Paul Eggert 42cee9216b Do not include hard-locale.h.
(struct duinfo): Remove 'valid' member.  All uses changed to use
negative nsec instead.
(DUIINFO_INI, DUINFO_SET, DUINFO_ADD): Remove.
(duinfo_init, duinfo_set, duinfo_add): New functions, taking the
role of the removed macros.
(opt_time): Renamed from opt_last_time.  All uses changed.
(TIME_OPTION): Renamed from LAST_TIME_OPTION.  All uses changed.
(long_options, usage): Rename --last-time to --time.
(locale_time_style): Remove.
(time_style_args, time_style_types, usage): Remove support for
--time-style=locale.
(show_date): Now returns void, since nobody looked at the result.
Assume FORMAT is not null.  An empty FORMAT now outputs an empty time.
Simplify nstrftime invocation.
(main): Put in ls compatibility workarounds only for TIME_STYLE,
not for --time-style.  Omit unnecessary space in iso time style.
2005-06-23 22:38:28 +00:00
Jim Meyering 75b33a5620 whoops: use puts, not fputs 2005-06-23 15:34:52 +00:00
Jim Meyering d6b20d71f7 (time_format): Add `const' attribute. 2005-06-23 15:27:55 +00:00
Jim Meyering a912688f5c (show_date): Use fputs rather than printf ("%s\n",. 2005-06-23 15:20:05 +00:00
Jim Meyering 38eca4e977 (show_date): Add a FIXME comment. 2005-06-23 15:18:40 +00:00
Jim Meyering c8e4886304 (show_date): Rename local `time_format' so as not to
shadow the file-scoped global by that name.
2005-06-23 15:16:38 +00:00
Jim Meyering ae08ebecae . 2005-06-23 15:07:45 +00:00
Jim Meyering 89b0b72ca3 (usage): Tweak formatting to maintain more or less constant indentation. 2005-06-23 14:40:00 +00:00