Commit Graph

5539 Commits

Author SHA1 Message Date
Jim Meyering
60fc871dcd *** empty log message *** 2006-02-27 11:03:31 +00:00
Jim Meyering
0c0d4f5707 . 2006-02-27 10:54:09 +00:00
Jim Meyering
3d1be95578 (bin_PROGRAMS): Add base64. 2006-02-27 10:44:34 +00:00
Jim Meyering
b4b3e819aa (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/. 2006-02-27 10:42:36 +00:00
Jim Meyering
ee5fbeafea Don't include .h files already included by system.h:
<string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
Include "system.h" before the other lib/*.h header files.
Include <sys/types.h> before "system.h".
(wrap_write): Remove declaration of unused local, initial_column.
2006-02-27 10:41:03 +00:00
Jim Meyering
cec76053e7 *** empty log message *** 2006-02-27 10:35:37 +00:00
Jim Meyering
7561654142 (NOT_AN_INODE_NUMBER, D_INO): Define (moved here from pwd.c). 2006-02-26 10:03:17 +00:00
Jim Meyering
083f6ad61c (NOT_AN_INODE_NUMBER, D_INO): Move definitions to system.h 2006-02-26 10:02:49 +00:00
Jim Meyering
33eb3efe9f In ls, avoid calling stat for --inode (-i), when possible.
(main): Prefer dirent.d_ino to stat when possible.
(gobble_file): Add inode argument.
(print_dir): Pass inode if available.
(usage): Remove inaccuracy.
2006-02-26 10:01:00 +00:00
Paul Eggert
0e3c5842ad (usage): Mention `sort -k 1b,1'. 2006-02-21 02:55:31 +00:00
Jim Meyering
3f7e0c2173 . 2006-02-20 13:00:54 +00:00
Jim Meyering
1a301edfc7 (INTERACTIVE_OPTION): New enum value.
(interactive_type): New enum.
(long_opts): Let interactive take an optional argument.
(interactive_args, interactive_types): New option arguments.
(usage): Document -I, --interactive=WHEN.  Use program_name
instead of a basename.
(main): New -I option, new behavior to --interactive.
[From Eric Blake]
2006-02-20 12:48:11 +00:00
Jim Meyering
da3340fab1 (usage): Use two spaces (not one) to separate the
--first-only option string from its description, so help2man formats
the derived man page properly.
2006-02-18 07:45:27 +00:00
Jim Meyering
e7771c1161 (usage): Use two spaces (not one) to separate the
--first-only option string from its description, so help2man formats
the derived man page properly.
2006-02-18 07:23:05 +00:00
Jim Meyering
8c232ab86f (usage): Use two spaces (not one) to separate the
--first-only option string from its description, so help2man formats
the derived man page properly.
2006-02-18 07:21:50 +00:00
Jim Meyering
9955ae4cc5 . 2006-02-16 20:28:32 +00:00
Jim Meyering
4eb8760272 fix typo in comment 2006-02-12 07:55:38 +00:00
Jim Meyering
f99aab89d3 . 2006-02-11 20:58:28 +00:00
Jim Meyering
724f97cee2 *** empty log message *** 2006-02-11 20:58:09 +00:00
Jim Meyering
3d2111620b . 2006-02-11 20:52:49 +00:00
Jim Meyering
3693f5cc94 (EXTRA_DIST): Add c99-to-c98.diff. 2006-02-11 20:45:15 +00:00
Jim Meyering
3b79c6d912 rm -r must remove an empty directory, even if it is inaccessible.
(close_preserve_errno): New function.
(fd_to_subdirp): Don't print a diagnostic in this function.
Do it from the callers instead, unless rmdir succeeds.
(remove_cwd_entries, remove_dir): Adjust callers.
2006-02-11 19:25:02 +00:00
Jim Meyering
781167fbe1 (!defined O_DIRECT): If O_DIRECTIO is defined (as it is on Tru64),
define O_DIRECT to that.  Patch From James Lemley.
2006-02-07 22:32:50 +00:00
Jim Meyering
bfd6ff089f . 2006-02-06 09:05:29 +00:00
Jim Meyering
21b19ab75b (usage): Use two spaces (not one) to separate the --no-preserve-root option
string from its description, so help2man formats the derived man page properly.
2006-02-06 08:00:23 +00:00
Jim Meyering
ca51e71b96 (usage): Use two spaces (not one) to separate the
--first-only option string from its description, so help2man formats
the derived man page properly.
2006-02-06 07:58:53 +00:00
Jim Meyering
c446eceb9c (usage): Use two spaces (not one) to separate the
option string from its description, so help2man formats the
derived man page properly.  Patch from Nicolas Franois
in http://bugs.debian.org/351601.
2006-02-06 07:39:37 +00:00
Jim Meyering
130dd0656d (copy_internal): cp -RL no longer fails when encountering
the same directory more than once in the hierarchy beneath a single
command-line argument.  That is legitimate, e.g. when there are
two or more symbolic links, each pointing to some directory that
would not otherwise be copied.  Reported by Christophe LYON.
2006-02-04 10:49:21 +00:00
Paul Eggert
2741d9b096 (usage): Mention that -t a ignores high order bit. 2006-02-02 07:44:57 +00:00
Jim Meyering
81b5d8af5f (find_dir_entry): Remove unused local, `ent_sb_valid'. 2006-02-01 14:43:24 +00:00
Paul Eggert
4b4cc17d42 (parse_options): Use a better diagnostic when someone uses a trailing
numeric option in an invalid way.
2006-01-31 01:39:10 +00:00
Paul Eggert
e7000e0118 (main): Use a better diagnostic when someone uses a
trailing numeric option in an invalid way.
2006-01-31 01:38:30 +00:00
Paul Eggert
5b917cfa59 (show_dev): If the file system claims to have more available than total
blocks, report the number of used blocks as being total - available
(a negative number) rather than as garbage.
2006-01-24 23:30:46 +00:00
Jim Meyering
0cc660d1fe (tail_forever): Don't exit-nonzero when an attempt
to put a regular file in O_NONBLOCK mode fails with EPERM.
That happens on Linux when using tail -f on a file with the
append-only attribute.  Reported by Dean Gaudet.  For details,
see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
2006-01-24 10:32:32 +00:00
Jim Meyering
791e40357b . 2006-01-22 08:53:59 +00:00
Jim Meyering
42629c4629 . 2006-01-17 19:57:26 +00:00
Jim Meyering
0ca8bc4273 Include "openat.h".
Don't include "lchown.h".
(restricted_chown): Accept a new parameter, CWD_FD, and use it in
calling openat, lchownat, chownat, rather than open, lchown, chown.
Update caller.
2006-01-17 17:26:15 +00:00
Jim Meyering
c97a36e2d9 Now that fts no longer changes the current working directory, adjust
its clients accordingly -- note that du.c uses fts but doesn't need
any adjustment, since it doesn't operate on the actual files,
but rather just uses the stat buffers provided by fts.

Include "openat.h".
(process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
2006-01-17 17:25:42 +00:00
Jim Meyering
7dabfc7e73 . 2006-01-12 08:40:34 +00:00
Paul Eggert
bfbe450d32 (test_syntax_error): Append a newline. All callers
changed, except for the ones that didn't already append a newline.
2006-01-11 19:29:47 +00:00
Jim Meyering
6b8b2183e7 (X2NREALLOC): Now that verify_true is no longer void,
cast its result to void, to avoid gcc's warning that
``left-hand operand of comma expression has no effect''.
(DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
2006-01-11 08:22:34 +00:00
Paul Eggert
d11af4159e Sync from gnulib. 2006-01-10 17:47:56 +00:00
Jim Meyering
f09a4ffe18 (gobble_file): Use DTTOIF only if it's defined.
This is necessary for Dragonfly.  Patch by Joerg Sonnenberger.
2006-01-10 07:31:21 +00:00
Jim Meyering
28a712f205 (usage): Adjust the formatting of the entries for
%::z and %:::z (separate with two spaces, not one) so that help2man
formats them properly.  Reported by Philip Rowlands.
2006-01-08 20:45:54 +00:00
Jim Meyering
01ab0b79a1 (rm_1): Remove static' attribute on local status'.
First off, the attribute should have been `volatile' (not static)
to avoid longjmp-related risk of clobber.  Secondly, now there is
no longer any risk of a local variable being clobbered, so there's
no need for any attribute at all.
2006-01-06 10:14:19 +00:00
Jim Meyering
955fbf3211 Give a few functions the inline attribute.
(AD_pop_and_chdir): Use gotos to avoid some duplication.
(AD_push): Rewrite an assertion so that the entire computation
goes away when assertions are turned off.
2006-01-05 14:28:52 +00:00
Jim Meyering
91be6f4495 (ENOSYS) [!defined ENOSYS]: Don't define here.
It's already defined in "system.h".
2006-01-05 10:27:03 +00:00
Jim Meyering
084903a2b1 . 2006-01-04 21:06:39 +00:00
Jim Meyering
6a845acf0f (O_DIRECTORY) [!defined O_DIRECTORY]: Define. 2006-01-03 07:41:03 +00:00
Paul Eggert
7126eb3216 (RC_do_ordinary_chown): New enum value.
(restricted_chown): Return it, if the file cannot be accessed due
to EPERM, or if no uid or gid are required, or if the file is
neither a directory nor a regular file.  Rewrite to avoid gotos.
(change_file_owner): Handle RC_do_ordinary_chown case.
Rewrite to avoid gotos.
2006-01-03 06:20:06 +00:00