Commit Graph
4332 Commits
Author SHA1 Message Date
Jim Meyering 3d286f8c91 . 2004-04-20 10:18:48 +00:00
Jim Meyering d3cb92f9b8 Don't include pathmax.h; system.h already does it. 2004-04-20 09:34:43 +00:00
Jim Meyering 50469e2c80 . 2004-04-20 09:21:30 +00:00
Jim Meyering ffccc03ad8 (cut_fields): Free buffer upon getndelim2 failure. 2004-04-20 06:50:37 +00:00
Jim Meyering 9b10f9414f (isaac_seed_start) [AVOID_USED_UNINITIALIZED_WARNINGS]:
Initialize a buffer to avoid warnings from tools like valgrind.
2004-04-19 20:07:25 +00:00
Jim Meyering 332853e722 . 2004-04-19 18:58:24 +00:00
Jim Meyering af719b0318 Make pwd work even if the resulting name is so long that getcwd fails.
(path_free, path_init, path_prepend): New functions.
(nth_parent, find_dir_entry, robust_getcwd): New functions.
(main): First try getcwd, then, upon failure, robust_getcwd.
2004-04-19 15:12:31 +00:00
Jim Meyering 6bb27087a1 (print_user): Use xrealloc here, rather than unchecked realloc.
Remove anachronistic casts.
2004-04-18 15:02:49 +00:00
Jim Meyering 544a43b5f7 (full_filename_): Don't leak upon failed realloc. 2004-04-18 14:58:51 +00:00
Jim Meyering d1932b917a (readdir_ignoring_dotdirs): Move function to system.h, renaming it. Update uses. 2004-04-18 13:14:25 +00:00
Jim Meyering de48260615 (readdir_ignoring_dot_and_dotdot): New inline function, from remove.c. 2004-04-18 13:09:27 +00:00
Jim Meyering 58127401f1 (add_file_name): Declare function to be `static'. 2004-04-17 14:05:37 +00:00
Jim Meyering c283745f2e (ds_init, ds_free): Declare functions to be `static'. 2004-04-17 14:01:56 +00:00
Jim Meyering 53a258fa4a (string_to_join_field): Declare function to be `static'. 2004-04-17 14:00:20 +00:00
Jim Meyering 65816f395e Include getpagesize.h.
(main): Align I/O buffers to page boundaries.
2004-04-15 10:52:04 +00:00
Jim Meyering 0adee504ff Include getpagesize.h.
(dopass): Align I/O buffers to page boundaries.
2004-04-15 10:50:07 +00:00
Jim Meyering e28e19cbba Include getpagesize.h.
(copy_reg): Align I/O buffers to page boundaries.
2004-04-15 10:37:59 +00:00
Jim Meyering 0c40916e6f (gcd, lcm, ptr_align): New functions, moved from od.c. 2004-04-15 09:12:25 +00:00
Jim Meyering 1365b2f708 (gcd, lcm): Remove; now in system.h. 2004-04-15 09:12:01 +00:00
Jim Meyering a5d9418d66 (ROUND_UP_OFFSET, PTR_ALIGN): Remove.
All uses replaced by ptr_align.
2004-04-15 09:11:42 +00:00
Jim Meyering 5f20d9e921 Include getpagesize.h.
(main): Align I/O buffers to page boundaries.
2004-04-15 09:10:54 +00:00
Jim Meyering 7c22ac2383 . 2004-04-14 08:43:32 +00:00
Jim Meyering 907e43cc4a . 2004-04-12 09:39:24 +00:00
Jim Meyering 4ed4732e78 Include "utimecmp.h".
(copy_internal): Compare time stamps using utimecmp rather than
MTIME_CMP.
2004-04-12 09:30:57 +00:00
Jim Meyering 8309aea61e Include stat-macros.h, not file-type.h.
Move more definitions into stat-macros.h.
2004-04-09 12:05:45 +00:00
Jim Meyering b9c4b346f1 undo last change 2004-04-09 12:03:02 +00:00
Jim Meyering b29e52796a Don't include "file-type.h", now that system.h does. 2004-04-09 08:26:17 +00:00
Jim Meyering e357aa96a4 Include file-type.h rather than hard-coding all
of its macros definitions -- the list was slightly out of date.
2004-04-09 08:25:32 +00:00
Jim Meyering 7c7a16a2d8 (O_NOCTTY): Remove redundant decl. 2004-04-08 21:36:18 +00:00
Jim Meyering 9f478111bf (flags, usage): Remove noctty flag.
(main): Always use O_NOCTTY when opening files.
2004-04-08 21:36:06 +00:00
Jim Meyering 82024e9938 (set_fd_flags): Undo part of today's change: it's a little
cleaner -- and more efficient in the common case -- to go
ahead and OR in the -1 when fcntl fails.
2004-04-08 21:30:18 +00:00
Jim Meyering 1af4fd3a54 (dd_copy): Mark two diagnostics for translations. 2004-04-08 21:26:28 +00:00
Jim Meyering a61bca91eb . 2004-04-08 15:38:59 +00:00
Jim Meyering d56fd78b42 (dd_LDADD, shred_LDADD): Add fdatasync's lib. 2004-04-08 15:36:31 +00:00
Jim Meyering 10629f7e88 Correct spelling: s/shasum/sha1sum. 2004-04-08 15:31:08 +00:00
Jim Meyering 2a888f75af (LONGEST_SYMBOL): Tweak comment. 2004-04-08 15:25:39 +00:00
Jim Meyering 470a15a00e (set_fd_flags): Don't OR in -1 when fcntl fails.
Rename parameter, flags, to avoid shadowing global.
2004-04-08 15:20:33 +00:00
Jim Meyering 0c5fbdba06 New dd conv= symbols nocreat, excl, fdatasync, fsync,
and new dd options iflag= and oflag=.

(usage): Document.
(fdatasync) [!HAVE_FDATASYNC]: New macro.
(C_NOCREAT, C_EXCL, C_FDATASYNC, C_FSYNC): New macros.
(input_flags, output_flags): New vars.
(LONGEST_SYMBOL): New macro.
(struct symbol_value): Renamed from struct conversion.  Members
symbol and value renamed from convname and conversion.  The
symbol value is now an array instead of a pointer; this saves
a bit of space and time in practice.  All uses changed.
(conversions): Add nocreat, excl, fdatasync, fsync.  Now const.
(flags): New constant array.
(iflag_error_msgid, oflag_error_msgid): New constants.
(parse_symbols): Renamed from parse_conversion and generalized
to handle either conversion or flag symbols.
(scanargs): Adjust uses of parse_symbols accodingly.  Add
support for iflag= and oflag=.  Reject attempts to use
both excl and nocreat.
(set_fd_flags): New function.
(dd_copy): Just return X rather than calling quit (X), since our
caller invokes quit with the returned value.  Add support for
fdatasync and fsync.
(main): Add support for iflags=, oflags=, and new conv= symbols.
2004-04-08 10:22:05 +00:00
Jim Meyering 273184066e (O_DIRECT, O_DSYNC, O_NDELAY, O_NOFOLLOW, O_RSYNC, O_SYNC):
Define to 0 if not already defined.
2004-04-08 08:14:02 +00:00
Jim Meyering 733e79ed1f Add support for IUTF8 input flag. 2004-04-07 09:52:22 +00:00
Jim Meyering faa858b57b (makedev) [mkdev && !makedev]: Define makedev to mkdev.
For Interix.
2004-04-06 13:55:00 +00:00
Jim Meyering c0c9569dc4 A specified format is no longer automatically newline terminated.
If you want a newline at the end of your format, use `\n'.

(print_it): Don't print a newline at the end of
every format.
(do_statfs): Add a newline at end of each default format string.
2004-04-04 16:22:26 +00:00
Jim Meyering b275fab12c . 2004-04-04 06:55:58 +00:00
Jim Meyering 1a39890f3c (main): Adjust to new calling convention for set_cloexec_flag. 2004-04-04 06:33:44 +00:00
Jim Meyering dee056cd1b . 2004-03-31 09:01:47 +00:00
Jim Meyering a448e764c3 whoops. Remove old code, too, <blush>. 2004-03-31 08:27:27 +00:00
Jim Meyering 35e3e7e672 Specifying an invalid --width=N (-w) or --gap-size=N (-g)
would not elicit an error.

Include "xstrtol.h" and "quotearg.h".
(main): Don't use atoi.  Use xstrtoul instead.
2004-03-31 08:25:04 +00:00
Jim Meyering d49a6c1a2b . 2004-03-31 07:48:14 +00:00
Jim Meyering ba894b1ea1 [HAVE_SETHOSTNAME && !defined sethostname]:
Declare sethostname, since no Solaris header does it.
2004-03-29 07:30:09 +00:00
Jim Meyering 6de63bb739 Include "vasprintf.h", for asprintf. 2004-03-29 07:29:49 +00:00