Commit Graph
18485 Commits
Author SHA1 Message Date
Jim Meyering 2825db7efb *** empty log message *** 2004-05-18 15:28:38 +00:00
Jim Meyering 40d4847f4c (names): Bring back lower-case letters, "_", and
".".  But continue to omit +, =, %, @, #, as they're either
shell metacharacters (for some shells) or are not in some
character sets, or (in the case of '%') must be a
metacharacter somewhere.
2004-05-18 15:28:27 +00:00
Jim Meyering 9057c23a8b *** empty log message *** 2004-05-17 13:39:06 +00:00
Jim Meyering 54806e3dcc . 2004-05-17 13:21:40 +00:00
Jim Meyering c42d585298 Sync with gnulib. 2004-05-17 13:20:25 +00:00
Jim Meyering 4e88ae7892 Sync with gnulib. 2004-05-17 13:18:34 +00:00
Jim Meyering 37dfecb6e7 Sync with gnulib. 2004-05-17 13:17:45 +00:00
Jim Meyering 7f814a5e96 (cut_fields): Adjust to new signature of getndelim2. 2004-05-17 13:16:53 +00:00
Jim Meyering ee47cc09f6 (incname): Decrement `len' only once per loop iteration. 2004-05-17 12:34:36 +00:00
Jim Meyering c91f1d4a89 *** empty log message *** 2004-05-17 12:29:37 +00:00
Jim Meyering 85c13fad0c *** empty log message *** 2004-05-17 12:16:16 +00:00
Jim Meyering 039d3f9981 *** empty log message *** 2004-05-17 12:15:45 +00:00
Jim Meyering 26380c3504 . 2004-05-17 12:11:54 +00:00
Jim Meyering da9163d7b6 . 2004-05-17 12:11:19 +00:00
Jim Meyering 06dc5c8efa *** empty log message *** 2004-05-17 12:10:55 +00:00
Jim Meyering 58f134b649 Use -h where necessary to retain semantics. 2004-05-17 12:10:43 +00:00
Jim Meyering a432ab952a *** empty log message *** 2004-05-17 12:08:24 +00:00
Jim Meyering 636a950344 chgrp and chown now dereference symlinks by default, per POSIX.
(usage): Update to reflect this.
2004-05-17 12:08:09 +00:00
Jim Meyering c2740635cd (chopt_init): Affect each symlink referent by default. 2004-05-17 12:07:48 +00:00
Jim Meyering 36708ba6b5 *** empty log message *** 2004-05-17 12:07:30 +00:00
Jim Meyering 3591f10746 chgrp and chown now dereference symlinks by default, per POSIX.
(chgrp invocation, chown invocation): Document it.
2004-05-17 12:07:25 +00:00
Jim Meyering 37adce2680 chown --dereference did nothing when the owner/group of a
symlink matched the desired owner/group.  Reported by David Malone.
Also reported in 1999 as http://bugs.debian.org/39642.

(change_file_owner): When --dereference has
been specified, and when processing a symlink, stat it to get the
owner and group of the referent.
2004-05-16 21:39:35 +00:00
Jim Meyering 23e13a64a8 *** empty log message *** 2004-05-16 19:32:37 +00:00
Jim Meyering 3bb407ccf3 In shred, check for errors from fdatasync more carefully. If
fdatasync fails with errno==EINVAL, it means this implementation
does not support synchronized I/O for this file.  Do not report
this as an error, as (for example) AIX 5.2 fdatasync reports it
for raw disk devices.  Problem reported by Albert Chin in
<http://mail.gnu.org/archive/html/bug-gnu-utils/2004-05/msg00028.html>.

Check for write errors, though: the old code ignored them.
Improve error checking in a few other cases, too (e.g., close of a
directory).

Also, change several 'int' values to 'bool', so that the error
checking is a bit clearer.  Similarly, change unsigned values
to size_t where appropriate.

* src/shred.c: Include "dirname.h".
(datasync) [!HAVE_FDATASYNC]: Remove.
(dosync): New function.
(dopass): Use it.  Return 1 on write error, -1 on other error.
All callers changed.  Report write error if dosync does.
(do_wipefd, wipefd, wipename, wipefile): Return bool (true/false),
not int (0/-1).  All callers changed.  Return false if there's a
write error.
(incname): Return bool (true/false), not int (0/1).  Accept
size_t length, not unsigned.  All callers changed.  Do not
bother checking for non-digits; it can't happen.  Replace
recursion with iteration.
(wipename): Use dir_name, base_name, etc. instead of assuming
Unix file names.  Use size_t for length, not unsigned.
Report error if unlink or close fails.
(wipename, main): Use bool for booleans.

(names): Use only digits and uppercase letters, for greater
portability.
2004-05-16 19:32:30 +00:00
Jim Meyering 1f90c86c41 *** empty log message *** 2004-05-16 14:18:50 +00:00
Jim Meyering be8365288d *** empty log message *** 2004-05-16 14:17:53 +00:00
Jim Meyering 877467bc0c (TESTS): Add deref. 2004-05-16 14:10:17 +00:00
Jim Meyering 0c1db9f1ca New test for the yesterday's change. 2004-05-16 14:10:10 +00:00
Jim Meyering 85347c1744 *** empty log message *** 2004-05-15 18:27:38 +00:00
Jim Meyering bbc182cdd8 . 2004-05-15 14:59:15 +00:00
Jim Meyering c54468df2e (AD_pop_and_chdir): Eliminate an unnecessary call to AC_stack_top. 2004-05-14 15:47:53 +00:00
Jim Meyering c134ce8fab . 2004-05-14 09:16:23 +00:00
Jim Meyering 784b5000f7 *** empty log message *** 2004-05-14 07:34:16 +00:00
Jim Meyering 8e0b4648a6 Improve performance of `sort -m' on large files, at the cost of
making some contrived examples unsafe.  POSIX allows this
optimization.  Performance problem reported by Jonathan Baker in
<http://mail.gnu.org/archive/html/bug-coreutils/2004-05/msg00071.html>.

(first_same_file): Do not treat input pipes
differently from other files.
2004-05-14 07:34:09 +00:00
Jim Meyering f64a45d112 Document that "sort -m -o F" might write F before reading all the input. 2004-05-14 07:33:48 +00:00
Jim Meyering eed02be1b6 *** empty log message *** 2004-05-14 07:33:23 +00:00
Jim Meyering d667552245 (sort invocation): Document that "sort -m -o F"
might write F before reading all the input.
2004-05-14 07:32:56 +00:00
Jim Meyering af7f1c5b2a *** empty log message *** 2004-05-14 07:29:41 +00:00
Jim Meyering a79866eb4a *** empty log message *** 2004-05-14 07:29:04 +00:00
Jim Meyering ec0c3e624c Fix typo: s/supercede/supersede/. 2004-05-14 07:28:39 +00:00
Jim Meyering f490076195 *** empty log message *** 2004-05-13 07:27:25 +00:00
Jim Meyering 62f51917b8 (unquote, make_printable_str): Use e.g. '\a' rather than '\007',
for portability to EBCDIC hosts.
2004-05-13 07:27:10 +00:00
Jim Meyering 179af74c1a (print_esc_char): Use e.g. '\a' rather than '\007',
for portability to EBCDIC hosts.
2004-05-13 07:26:46 +00:00
Jim Meyering 364d39ccd8 (print_ascii, dump_strings): Use e.g. '\a' rather than
'\007', for portability to EBCDIC hosts.
2004-05-13 07:26:14 +00:00
Jim Meyering 07c04a2026 *** empty log message *** 2004-05-13 07:05:05 +00:00
Jim Meyering 23006caee3 Don't assume that "make -C" works; Solaris "make" doesn't have -C.
* src/Makefile.am (all_programs.list): New rule, copied from
	man/Makefile.am and tests/Makefile.am, except that we use the
	system tr rather than ./tr and we don't use tr -s.
	* tests/Makefile.am (all_programs): Use it.
	* man/Makefile.am (all_programs): Likewise.  Renamed from programs,
	for consistency.  All uses changed.
2004-05-13 07:04:58 +00:00
Jim Meyering 2b4882c233 Don't assume that "make -C" works; Solaris "make" doesn't have -C.
* src/Makefile.am (all_programs.list): New rule, copied from
	man/Makefile.am and tests/Makefile.am, except that we use the
	system tr rather than ./tr and we don't use tr -s.
	* tests/Makefile.am (all_programs): Use it.
2004-05-13 07:03:52 +00:00
Jim Meyering 50f956a0b0 Don't assume that "make -C" works; Solaris "make" doesn't have -C.
(all_programs.list): New rule, copied from
man/Makefile.am and tests/Makefile.am, except that we use the
system tr rather than ./tr and we don't use tr -s.
2004-05-13 07:03:00 +00:00
Jim Meyering bcadb97f7c *** empty log message *** 2004-05-12 09:35:19 +00:00
Jim Meyering 9549a2091e (AD_pop_and_chdir): Move lstat-`.' into if-block
where the result is used.  This avoids one unnecessary lstat call
per command line argument.
2004-05-12 09:35:06 +00:00