Jim Meyering
e3d35f6789
(show_dev): Print inode counts human readably.
1997-12-31 21:34:07 +00:00
Jim Meyering
b76a453304
(decode_switches): -h and -H override output units.
...
(print_dir, gobble_file, print_long_format,
print_file_name_and_frills): Print disk allocations human readably.
1997-12-31 21:33:51 +00:00
Jim Meyering
da111683d5
(show_dev): Move computation of
...
blocks_used etc. and blocks_percent_used,
inodes_used etc. and inodes_percent_used into respective branches
of the `if (inode_format)' statement where they're actually used.
1997-12-31 14:04:20 +00:00
Jim Meyering
25e06fece0
(usage): s/TAB/ /g
1997-12-29 22:09:28 +00:00
Jim Meyering
5cc8090de2
(remove_cwd_entries): Plug a gross leak -- don't call
...
obstack_init inside the loop.
1997-12-29 21:04:26 +00:00
Jim Meyering
134ed86e33
(usage): Replace TABs with spaces in --help message.
1997-12-29 12:05:36 +00:00
Jim Meyering
4656a7e55b
Remove incorrect declaration of group_member.
...
Include group-member.h instead.
Based on suggestion from Ulrich Drepper.
1997-12-28 08:03:54 +00:00
Jim Meyering
1f1ea6519b
(get_ids): Don't cast GID_T_MAX to long, it might overflow.
1997-12-25 17:05:23 +00:00
Jim Meyering
f10648f6c7
(skip): Compare lseek return value with -1 to allow it
...
to be negative as signed value.
1997-12-25 17:04:15 +00:00
Jim Meyering
ea0f644cdd
(S_ISLNK): Define this instead of S_ISDIR.
1997-12-25 17:01:35 +00:00
Jim Meyering
4f71c21910
Declare stpcpy only if not defined as macro.
1997-12-25 17:01:13 +00:00
Jim Meyering
c9f538deb9
(copy_internal): Use S_ISLNK only if defined.
1997-12-25 16:48:29 +00:00
Jim Meyering
f54368ec1b
s/__P/PARAMS/
1997-12-21 22:39:53 +00:00
Jim Meyering
2e308957d4
s/__P/PARAMS/
1997-12-21 22:30:30 +00:00
Jim Meyering
2391251527
Don't include limits.h.
1997-12-21 22:22:04 +00:00
Jim Meyering
3858d01133
Don't include limits.h.
1997-12-21 22:21:26 +00:00
Jim Meyering
62fed0f3a2
Don't include limits.h or sys/param.h.
1997-12-21 22:21:10 +00:00
Jim Meyering
37998fc5bd
Don't include limits.h.
...
These are all done in system.h now.
1997-12-21 22:20:17 +00:00
Jim Meyering
6123a88852
Don't include limits.h.
...
(UINT_MAX): Don't define.
(INT_MAX): Don't define.
These are all done in system.h now.
1997-12-21 22:20:01 +00:00
Jim Meyering
1ed365fb82
Use PARAMS, not __P.
1997-12-21 12:17:26 +00:00
Jim Meyering
bdcaa361bc
Include exclude.h.
...
(exclude): New static var.
(long_options, usage, main): Add --exclude and --exclude-from or -X.
(count_entry): Skip excluded entries.
1997-12-21 12:05:42 +00:00
Jim Meyering
ac5fc8ea73
Include exclude.h.
...
(exclude): New static var.
(long_options, usage, main): Add --exclude and --exclude-from or -X.
(count_entry): Skip excluded entries.
1997-12-21 11:47:27 +00:00
Jim Meyering
a2f0f9ac89
s/__P/PARAMS/g
1997-12-16 15:44:00 +00:00
Jim Meyering
70618de21b
s/__P/PARAMS/g.
1997-12-16 15:42:48 +00:00
Jim Meyering
03f9f3dbec
s/__P/PARAMS/g
1997-12-16 15:32:32 +00:00
Jim Meyering
5d764734f7
tweak indentation
1997-12-16 15:11:23 +00:00
Jim Meyering
36665a7464
(struct bin_str): Make len int, not unsigned, to avoid
...
bogus comparison < 0.
(quote_filename): Add forward decl.
(decode_switches): -b, -e, -N, -Q are now mutually exclusive.
(print_dir): Quote directory name as per quoting options.
(print_long_format): Don't count color changes as part of file name.
(quote_filename): Revamp interface: now accepts stream to output to
and filename, and returns length of quoted filename.
This removes duplicated code and should make errors less likely.
Also, no longer mallocs storage. All callers changed.
Don't quote ' ' if -Q.
(OUTCHAR): New macro.
(SAVECHAR, SAVE_2_CHARS): Remove.
(print_name_with_quoting): New stack arg. All callers changed.
(print_color_indicator): Cast ext len to size_t to avoid warning
with GCC 2.8.
(length_of_file_name_and_frills): Rewrite to use quote_filename.
This fixes bug when computing file name length with -e.
1997-12-14 Paul Eggert <eggert@twinsun.com >
Add shell style quoting, and make it the default.
* NEWS, doc/fileutils.texi: Describe -e, which is now the default.
Describe change to --dired output.
* src/ls.c (quote_shell): New var.
(long_options, decode_switches, usage): New option -e or --quote-shell.
(dired_dump_obstack): New arg STYLE.
(main): Pass quoting style to dired_dump_obstack.
(decode_switches): -N now clears quote_as_string.
(quote_filename): Add shell style quoting.
1997-12-16 15:09:19 +00:00
Jim Meyering
f126c8d3a1
Remove lseek and memchr dcls.
1997-12-14 16:28:18 +00:00
Jim Meyering
9afbb6eec6
(ASSIGN_STRDUPA): Cast alloca return value to char*.
1997-12-14 15:38:04 +00:00
Jim Meyering
56b3459d40
add memchr dcl
1997-12-14 14:00:15 +00:00
Jim Meyering
f684c873f7
s/HAVE_DECLARATION/HAVE_DECL_/g
1997-12-14 12:40:33 +00:00
Jim Meyering
b86f6c2308
(main): Add some braces.
...
Check return code from fclose of each input file.
Close stdout and check for errors.
1997-12-13 23:39:09 +00:00
Jim Meyering
444c6da144
(close_output_file): Check ferror before calling fclose.
...
(main): Close stdout and check for errors.
1997-12-13 23:38:53 +00:00
Jim Meyering
f977e4b5cf
Change --help output to tell the truth: that for of=FILE,
...
FILE *is* truncated. Reported by Miles Bader.
Remove incomplete, usage-like comment at top of file.
1997-12-13 22:49:33 +00:00
Jim Meyering
d75ca19d76
(usage): Mention that `notrunc' is a conv= option.
...
Reported by Miles Bader.
1997-12-13 17:01:54 +00:00
Jim Meyering
295372322d
(do_move): If rename fails for any reason (not just when
...
errno == EXDEV), then revert to trying copy-then-unlink. This is
necessary to allow moving files within certain types of Linux NFS
mounted filesystems. Reported by Marty Leisner.
1997-12-13 16:22:58 +00:00
Jim Meyering
a320eee158
(do_link): Don't require --force when target exists and
...
using --backup. This changes makes ln consistent with cp and mv in
this respect. Suggestion from Eli Zaretskii.
1997-12-11 08:40:10 +00:00
Jim Meyering
4f242b4d51
use NULL, '\0' instead of zeroes
1997-12-10 10:31:25 +00:00
Jim Meyering
3cd84da3a6
(main): Make sure pw->pw_shell is non-NULL before trying to strdup it.
...
Patch from Dick Streefland.
1997-12-10 10:25:46 +00:00
Jim Meyering
20e1875a32
revert last change
1997-12-06 21:09:58 +00:00
Jim Meyering
b73786146f
use SORT_INITIAL_LINE_LENGTH envvar for testing
1997-12-06 21:09:30 +00:00
Jim Meyering
6ee3c1a91a
(fillbuf): split longer-than-80-char line
1997-12-06 12:13:52 +00:00
Jim Meyering
04c29cd1db
Separate struct dcl and typedef.
...
(String *): Rename from parameter-shadowed `string'.
(stringstruct): Remove typedef.
1997-12-06 08:57:14 +00:00
Jim Meyering
bca6f1740d
remove trailing blank
1997-11-30 11:15:27 +00:00
Jim Meyering
d7d6efb0d7
remove trailing blank
1997-11-30 11:15:02 +00:00
Jim Meyering
f7acc655f4
(print_long_format): Rename inner-scoped buf' arrays to hbuf'
...
to avoid shadowing local.
1997-11-30 11:07:49 +00:00
Jim Meyering
e5781fe090
(change_dir_owner): Cast st_size arg to unsigned int in savedir call.
1997-11-30 11:05:34 +00:00
Jim Meyering
a10fdc591f
(change_dir_mode): Cast st_size arg to unsigned int in savedir call.
1997-11-30 11:05:10 +00:00
Jim Meyering
f7ecccf234
(full_filename): Use memcpy, not mempcpy when not using the return value.
1997-11-30 11:02:47 +00:00
Jim Meyering
5112b2973f
filter through cppi
1997-11-30 11:01:54 +00:00