1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-06-30 05:48:23 +02:00
Commit Graph

3534 Commits

Author SHA1 Message Date
Jim Meyering 3617805acb Remove declaration of xstrdup.
Instead, include "xalloc.h".
2003-01-10 08:41:28 +00:00
Jim Meyering acd9f2ab3b copyright 2003-01-09 20:45:06 +00:00
Jim Meyering 229031ed3f (bin_PROGRAMS): Add readlink. 2003-01-09 20:36:37 +00:00
Jim Meyering 2ae02ab5b9 New program, by Dmitry V. Levin. 2003-01-09 20:35:13 +00:00
Jim Meyering 322ee6e302 When selecting ranges of byte offsets (as opposed to ranges of fields)
and when --output-delimiter=STRING is specified, output STRING between
ranges of selected bytes.

(RANGE_START_SENTINEL): Define.
(output_delimiter_specified): New global.
(print_kth): Add parameter.  Adjust all callers.
(set_fields): Mark each range-start index with RANGE_START_SENTINEL.
(cut_bytes): When requested, output STRING between ranges of
selected bytes.
(main): Make a diagnostic a little clearer.
Based on a patch from Jan Nieuwenhuizen.
2003-01-09 20:16:58 +00:00
Jim Meyering e66ab953ef (set_fields): Make code agree with comment:
Don't merge abutting ranges like 4- and 2-3.  This makes no
difference currently, but is required to support an upcoming change.
2003-01-09 19:30:22 +00:00
Jim Meyering 7d1c764098 (set_fields): Fix typo in comment. 2003-01-07 17:12:11 +00:00
Jim Meyering d31fd7a77e tweak comment 2003-01-07 16:36:45 +00:00
Jim Meyering 1ef6e79882 add a comment 2003-01-07 16:06:56 +00:00
Jim Meyering a2b9cb05b7 Remove use of PARAMS. 2003-01-04 10:34:59 +00:00
Jim Meyering a6b5021004 Remove use of PARAMS. 2003-01-04 10:33:01 +00:00
Jim Meyering 6df04c9288 Remove use of PARAMS. 2003-01-04 10:32:21 +00:00
Jim Meyering 8b6b22bcef rm could be tricked into mistakenly reporting a cycle.
* src/remove.c: [cycle_check_state]: New global.
(remove_cwd_entries): Adapt to new semantics of cycle_check.
(rm): Call cycle_check_init and cycle_check_free for each file.

When rm detects a cycle, don't abort the entire command,
but rather just the affected command line argument.
* src/remove.c: Include <setjmp.h>
(struct dirstack_state) [current_arg_jumpbuf]: New member.
(remove_cwd_entries): Call longjmp if we detect a cycle.
(rm): Call setjmp here.

* src/remove.c (cycle_check, is_power_of_two): Remove functions.
Instead, include cycle-check.h and use it.
2003-01-04 10:07:44 +00:00
Jim Meyering e2b894c771 (struct dev_ino): Remove declaration. 2003-01-04 09:53:20 +00:00
Jim Meyering a3e6d3aa63 Don't include trailing /. in diagnostics about directories.
(full_filename_): When FILENAME is just `.'
and there is a nonempty directory-name part, don't append `/.'.
2003-01-04 09:45:54 +00:00
Jim Meyering b09da5c9d0 (remove_cwd_entries): Fix typos in comment. 2003-01-04 09:42:53 +00:00
Jim Meyering 818c25f686 (struct dirstack_state): Define.
To be used in place of these file-scoped globals ...
(dir_stack, len_stack, Active_dir): Remove globals.
(ds_init, ds_free): New functions.
(full_filename): Define.
(full_filename_): Rename from full_filename.



Begin to make AD_* functions more generic.

(AD_push_initial): Don't set status to RM_OK here.
(AD_push): Likewise.
(AD_INIT_OTHER_MEMBERS): Define.
(remove_dir): Define the `status' member manually after each
call to AD_push or AD_push_initial.
2003-01-04 09:41:24 +00:00
Jim Meyering 10a0b7c14d (check-misc): New rule, to ensure that no more
S_IS* macro definitions sneak into the code.
(check): Depend on check-misc.
2003-01-04 08:59:15 +00:00
Jim Meyering 33ca4e1f5a [S_ISLNK, S_ISFIFO, S_ISSOCK]: Don't define.
They're already defined in sys2.h.
2003-01-04 08:58:12 +00:00
Jim Meyering fd5d4e6d54 remove blank line 2003-01-04 08:55:30 +00:00
Jim Meyering 1cf764991f (count_entry) [S_ISLNK]: Don't define.
It's already defined in sys2.h.
2003-01-04 08:55:19 +00:00
Jim Meyering a4efa35cd7 [S_ISLNK]: Don't define. It's already defined in sys2.h. 2003-01-04 08:44:11 +00:00
Jim Meyering 08cf9aee8b Add copyright.
(AUTHORS): I suppose I've written it.
2003-01-03 21:38:27 +00:00
Jim Meyering d45f740edc (false.c): Make the generated file be read-only. 2003-01-03 21:34:06 +00:00
Jim Meyering d517c8fa79 (do_copy): Tweak diagnostic to be consistent with the one
from mv: s/missing file arguments/missing file argument/.
With --target-directory=DIR, cp and mv work with a single file argument.
Reported by Karl Berry.
2003-01-03 19:34:22 +00:00
Jim Meyering 1b6b9abd55 Include "dev-ino.h".
[struct dev_ino]: Remove declaration.
2003-01-03 19:33:52 +00:00
Jim Meyering 317fa67e1e . 2002-12-21 14:50:45 +00:00
Jim Meyering f331e1389c (touch): Change the wording of a diagnostic so
that it makes sense both when the file exists and when it doesn't.
2002-12-20 20:10:48 +00:00
Jim Meyering 302165d602 (valid_options): Declare to be static. 2002-12-18 08:54:01 +00:00
Jim Meyering a5f14f167e Remove all uses of `PARAMS'. 2002-12-15 20:54:29 +00:00
Jim Meyering b7e390ca09 (PARAMS): Remove definition. 2002-12-15 20:53:36 +00:00
Jim Meyering a6561c4753 (PARAMS): Remove definition. 2002-12-15 20:48:26 +00:00
Jim Meyering eb4832a29c Remove declaration of nstrftime.
Include strftime.h instead.
2002-12-15 20:45:36 +00:00
Jim Meyering ec2a27c16b [! HAVE_DECL_MEMRCHR]: Declare memrchr.
This is necessary at least for Irix6.5 when using c89.
Reported by Nelson Beebe.
2002-12-14 17:34:13 +00:00
Jim Meyering 6073421583 (usage): Specify how major and minor mode numbers are interpreted.
Remove now-redundant usage-specifying comment.
2002-12-14 14:15:38 +00:00
Jim Meyering 7ba3e40970 Fix a bug whereby cp would fail to parse an option like
--preserve=mode,ownership.

(decode_preserve_arg): Advance `comma' to
point the character following the comma.
2002-12-11 23:44:23 +00:00
Jim Meyering bd385df70a (NEED_PATHCONF_WRAPPER): Undefine before defining,
in case it's already defined.
2002-12-11 10:00:57 +00:00
Jim Meyering 7b352458d0 (lstat) [! LSTAT_FOLLOWS_SLASHED_SYMLINK]:
Define to rpl_lstat, so that even on systems like Solaris 5.8,
du honors (per POSIX) the trailing slash on an argument referring
to a symlink-to-directory.
2002-12-08 20:51:55 +00:00
Jim Meyering ccb20835c1 . 2002-12-06 15:42:12 +00:00
Jim Meyering 10fc9c5ee9 (gobble_file): Also stat the file if it's a
regular file and --indicator-style=classify (aka -F).
2002-12-06 14:16:09 +00:00
Jim Meyering e84a62d126 . 2002-12-06 13:33:23 +00:00
Jim Meyering 663374c9b6 . 2002-12-06 07:36:39 +00:00
Jim Meyering d4d54b4878 regenerate using automake-1.7.1b 2002-12-03 18:17:18 +00:00
Jim Meyering c526cbabe0 no more ansi2nkr 2002-12-03 18:03:53 +00:00
Jim Meyering 3fbff01425 (AUTOMAKE_OPTIONS): Remove definition (to ansi2knr)
since this package no longer panders to K&R compilers.
2002-12-03 17:36:26 +00:00
Jim Meyering f40bc170b0 Don't include <ctype.h>.
That's already done via system.h.
2002-12-01 10:18:34 +00:00
Jim Meyering cb173ced29 Don't include <string.h> or <ctype.h>.
That's already done via system.h.
2002-12-01 09:49:01 +00:00
Jim Meyering 4966d758f2 ls is now more efficient: it no longer needs to stat each directory
entry on systems with valid dirent.d_type.

(print_dir): Add DT_LNK and DT_REG.
(main): Make --recursive set format_needs_type, not format_needs_stat.
(gobble_file): Remove a FIXME comment, now that this is fixed.
2002-12-01 08:57:26 +00:00
Jim Meyering 7274f62b83 (gobble_file): Remove the block of code that caused
`ls --color -F symlink-to-dir' to list the files in
`symlink-to-dir/.'.  Now, it prints `symlink-to-dir@',
(just like `ls -F symlink-to-dir') but with the addition
of highlighting.
2002-12-01 08:55:45 +00:00
Jim Meyering ce2fb08258 More clean-up, not that / means /. 2002-11-24 16:25:26 +00:00