Jim Meyering
940fd633a2
Remove unsigned' attribute from type of global prefix'.
...
(copy_rest): Cast to (unsigned char *) before dereferencing.
(get_prefix): Likewise.
2001-11-17 12:21:00 +00:00
Jim Meyering
8379824202
(file_lines): Remove unnecessary cast.
...
(tail_lines): Could have called file_lines even though the first
lseek failed. Fix that.
2001-11-14 11:52:59 +00:00
Jim Meyering
306433db58
split a line that was too long
2001-11-13 23:36:57 +00:00
Jim Meyering
389d9bc4e0
(file_lines): Add a parameter, start_pos.
...
Work properly even when the read pointer is not at beginning of file.
(tail_lines): Call file_lines for any regular file, as long as lseek
can be used to seek to its end, not just when the initial read pointer
is at beginning of file.
2001-11-13 23:32:12 +00:00
Jim Meyering
9a628d3908
(tail_lines): Move declaration of local `length' into scope where it's used.
...
(tail_file): Likewise for local `stats'.
2001-11-13 10:23:44 +00:00
Jim Meyering
5579ee544c
`tail /proc/ksyms' would segfault on Linux.
...
(tail_lines): Use status of lseek (...SEEK_END) call
in deciding whether to call file_lines or pipe_lines.
From Herbert Xu.
2001-11-13 10:14:12 +00:00
Jim Meyering
69b3ea263d
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 20:04:57 +00:00
Jim Meyering
86bb482007
(usage): Split --help output into smaller pieces.
2001-11-11 16:04:43 +00:00
Jim Meyering
436f7c405a
(struct tspec): Declare function pointer with prototype.
2001-11-11 15:42:07 +00:00
Jim Meyering
52f24baacc
(main): Declare function pointer with prototype.
2001-11-11 15:40:39 +00:00
Jim Meyering
6b16d2e1fe
(usage): Fix typo in last change to usage.
2001-11-11 15:38:00 +00:00
Jim Meyering
f409a8a021
(count_items): Mark parameter as unused.
2001-11-11 15:35:37 +00:00
Jim Meyering
dae7a9d7f4
(struct_month_cmp): Guard definition with the same
...
cpp directive that guards the use.
2001-11-11 15:24:53 +00:00
Jim Meyering
4bdaed5ff4
(xwrite): Remove assertion that size_t N >= 0.
2001-11-11 15:08:48 +00:00
Jim Meyering
f7eb4c8913
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 15:08:02 +00:00
Jim Meyering
d9b0ac1791
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 15:02:23 +00:00
Jim Meyering
4696d3dabf
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 15:00:53 +00:00
Jim Meyering
507b8890a4
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 14:55:20 +00:00
Jim Meyering
70654669d5
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 14:48:45 +00:00
Jim Meyering
14c6978cc5
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 14:47:28 +00:00
Jim Meyering
997fd16b2d
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 14:46:13 +00:00
Jim Meyering
2cf349d10e
(main, usage): Split --help output into smaller pieces.
2001-11-11 14:40:01 +00:00
Jim Meyering
051550c21b
(struct COLUMN) [print_func]: Declare as a protype.
...
(struct COLUMN) [char_func]: Declare as a protype.
2001-11-11 14:35:39 +00:00
Jim Meyering
2753d47434
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 14:34:28 +00:00
Jim Meyering
b94d49e397
(parse_old_offset): Declare to be static.
2001-11-11 14:24:54 +00:00
Jim Meyering
b57a53520b
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 14:24:34 +00:00
Jim Meyering
5ffa85be43
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 14:20:56 +00:00
Jim Meyering
03132c06be
(usage): Split --help output into smaller pieces.
2001-11-11 14:18:46 +00:00
Jim Meyering
18cdfb06b1
(make_blank): Declare to be static.
...
(prfield): Declare local to be of type size_t, not int.
2001-11-11 14:13:55 +00:00
Jim Meyering
7cbc9c5c4d
(make_blank): Declare to be static.
2001-11-11 14:12:49 +00:00
Jim Meyering
2fc820ac2b
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 14:12:27 +00:00
Jim Meyering
7d24fad90d
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 13:56:07 +00:00
Jim Meyering
1f7d9dacf4
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 13:52:50 +00:00
Jim Meyering
2237d0c5d1
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 13:41:19 +00:00
Jim Meyering
cfcf052439
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-11 13:38:18 +00:00
Jim Meyering
06e70ddab4
(alloca) [__GNUC__]: Define only if not already defined.
2001-11-11 13:17:49 +00:00
Jim Meyering
6f59cd3b32
(proc_text): Use `puts' to output a string of spaces, not printf.
2001-11-10 14:22:46 +00:00
Jim Meyering
d62b389816
(usage): Document %u.
2001-11-10 08:46:05 +00:00
Jim Meyering
330a67148c
Remove duplicate entry for .png.
2001-11-06 07:36:06 +00:00
Jim Meyering
74942a8e91
(usage): Don't recommend setting LC_COLLATE=C.
...
That can cause problems (now documented in coreutils.texi).
2001-11-05 10:09:25 +00:00
Jim Meyering
ff4121e50e
(usage): Say that
...
``Mandatory arguments to long options are mandatory for short options too.\n\''
2001-11-04 09:43:16 +00:00
Jim Meyering
4155657f6f
(usage): Add one-line description.
2001-11-04 09:03:15 +00:00
Jim Meyering
93b4e4074f
(DEV_INO_PUSH): Avoid unnecessary copies.
...
(dev_ino_pop): Likewise.
2001-11-03 07:33:32 +00:00
Jim Meyering
7b8da9264b
(dev_ino_pop): Cast 2nd arg of obstack_blank to `int'
...
before negating to avoid warning from gcc on systems with 64-bit size_t.
Rename global: s/trace_dirs/recursive/.
(extract_dirs_from_files): Rename parameter:
s/recursive/ignore_dot_and_dot_dot/.
2001-11-02 13:16:10 +00:00
Jim Meyering
71e6aca3b2
Use XREALLOC. It's cleaner.
2001-11-02 08:04:37 +00:00
Jim Meyering
81679a0c34
Use XMALLOC in a several places. It's cleaner.
2001-11-02 07:38:56 +00:00
Jim Meyering
6fa5979ccb
Include dirfd.h.
...
(print_dir): If dirfd fails, resort to using stat.
2001-11-01 21:40:01 +00:00
Jim Meyering
c4dbc53ec4
(struct pending) [st_ino, st_dev]: Remove just-added members.
...
(queue_directory): Remove just-added 3rd parameter
and associated code, and update callers.
(print_dir): Get dev/inode pair via `fstat (dirfd (reading), ...',
and call visit_dir to detect cycles here.
Push the dev/inode pair onto the new stack.
(dev_ino_obstack): New global.
(DEV_INO_PUSH): New macro.
(dev_ino_pop): New function.
(ASSERT_MATCHING_DEV_INO): New macro.
(visit_dir): Take two parameters (dev,ino), not one `pending'.
(main): Initialized the dev_ino_obstack.
Don't call visit_dir here.
Get the dev/ino pair from the new stack, not from the pending entry.
2001-11-01 15:51:53 +00:00
Jim Meyering
9e2756872d
Make ls -R detect directory cycles.
...
Include hash.h, same.h, and xalloc.h.
(INITIAL_TABLE_SIZE, LOOP_DETECT): Define.
(active_dir_set): New global.
(struct dev_ino): Declare.
(dev_ino_hash, dev_ino_compare, dev_ino_free): New functions.
(visit_dir, free_pending_ent): New functions.
(main): Initialize the active_dir_set hash table, if necessary.
Don't confuse a marker entry with a real one.
Detect loops.
Manage the set of active directories.
Free the hash table.
(queue_directory): Add a new parameter.
Ensure that we set the new dev/ino members for each enqueued directory.
Update all callers.
(print_dir): Don't confuse a marker entry with a real one.
(extract_dirs_from_files): Insert a marker entry before inserting
the entries for subdirectories.
2001-11-01 11:31:19 +00:00
Jim Meyering
3eeda5b2bf
Don't try to print a NULL pointer.
...
(main): Don't use ARGMATCH_TO_ARGUMENT.
This reverts part of the 1998-12-31 change.
2001-11-01 10:43:23 +00:00