Commit Graph
1231 Commits
Author SHA1 Message Date
Jim Meyering 94468e0921 indent cpp directives 1997-05-29 13:20:25 +00:00
Jim Meyering 4377246ee3 update from automake-1.1p 1997-05-29 13:19:34 +00:00
Jim Meyering e4f25ca7b1 Use base_name, not basename. 1997-05-27 13:55:23 +00:00
Jim Meyering bc50ceb474 clean up for -Wall 1997-05-27 11:05:40 +00:00
Jim Meyering 4c2adcbd56 Use base_name, not basename. 1997-05-27 11:04:41 +00:00
Jim Meyering f0c27dac9e Use base_name, not basename.
Use X, not CP_OPTIONS.
1997-05-27 11:00:50 +00:00
Jim Meyering 8805ede31b (copy_internal): When preserving symlinks (--no-dereference) and the
destination file is a symlink, use stat (not xstat) to see if it points
back to the source.  Reported by James <james@albion.glarp.com>.
1997-05-26 04:46:47 +00:00
Jim Meyering a65a081656 declare strip_trailing_slashes 1997-05-25 21:25:28 +00:00
Jim Meyering 0cc1681a5b Remove global variable opt_human_readable.
(enum Output_units): Rename from output_size.
Rename size_* to Unit_*.
Add Unit_variable to correspond to --human-readable.
(convert_blocks): Remove now-unused definition.
(human_readable): Rename paramater n_bytes to n_blocks.
Adjust conversions to reflect fact that input is now number of
512-byte blocks, not bytes.
(print_size): New function.
(du_files): Use print_size instead of open coding it.
(count_entry): Always count in units of 512-byte blocks to delay.
This lets du accumulate totals corresponding to a terabyte before
overflowing 32-bit long int.
Use print_size instead of open coding it.
1997-05-25 21:23:15 +00:00
Jim Meyering 07876bcb5d (convert_blocks): Add definition. 1997-05-25 15:10:03 +00:00
Jim Meyering 11080b7544 (convert_blocks): Remove definition.
Indent cpp directives.
1997-05-25 14:22:55 +00:00
Jim Meyering 1b71b3372e (convert_blocks): Remove now-unnecessary #undef.
(du_files): Pass output_size unchanged to convert_blocks.  No need
to test output_size for size_bytes, convert_blocks handles that
correctly.
(count_entry): Likewise.
1997-05-25 14:21:41 +00:00
Jim Meyering 1ba34180d7 (main): Implement new --max-depth=N option.
Based on the idea and a patch from Torbjorn Lindgren.
(du_files): Likewise.
(count_entry): Likewise.
[AIX]: Remove unused #pragma alloca.
1997-05-25 14:11:50 +00:00
Jim Meyering 54a61c3cf6 Remove FIXME.
Add spurious curlies and an empty line.
1997-05-25 13:00:01 +00:00
Jim Meyering 6919955eb1 New options: --ignore-fail-on-non-empty and --verbose.
(remove_parents): Implement new options.
(main): Likewise.
1997-05-25 03:46:46 +00:00
Jim Meyering ccb48f46d6 indent cpp-directives 1997-05-01 20:53:59 +00:00
Jim Meyering 9080de09fc indent cpp-directives 1997-05-01 20:51:16 +00:00
Jim Meyering 795d254715 (STRTOX): Don't fail because of extra character(s) following a
character constant.  Give the *warning* only if !POSIXLY_CORRECT.
1997-04-27 23:45:57 +00:00
Jim Meyering 9778fd673b (cfcc_msg): File-scope constant.
(STRTOX): Use new constant as error message format string in macro.
Suggestion from Andreas Schwab.
1997-04-27 23:33:49 +00:00
Jim Meyering 2e1059b400 . 1997-04-07 15:08:56 +00:00
Jim Meyering ca70b66b72 (STRTOX): New macro to eliminate code duplication.
(xstrtod, xstrtol, xstrtoul): Remove functions.
Use the STRTOX instead.
1997-04-06 20:58:16 +00:00
Jim Meyering 3426e7ca7a Change most char* dcls to const char*. 1997-04-06 19:32:19 +00:00
Jim Meyering 39b444e420 Reorder functions to obviate forward decls. 1997-04-06 19:30:07 +00:00
Jim Meyering cc093a9945 (main): Implement new --max-depth=N option.
Based on the idea and a patch from Torbjorn Lindgren.
(du_files): Likewise.
(count_entry): Likewise.
1997-03-27 05:47:56 +00:00
Jim Meyering 66c246fc17 cpp-indent
Change a few #ifdef to #if.
Remove 3 spurious #ifdef that were guarding an #undef each.
1997-03-19 02:56:54 +00:00
Jim Meyering 33da7dcdda (check_format): Rename local, FORMAT_STRING, to avoid shadowing global.
(print_numbers): Likewise.
1997-03-19 02:12:36 +00:00
Jim Meyering 3f2ded808d (idle_string): Rename local, IDLE, to avoid shadowing global. 1997-03-18 23:34:23 +00:00
Jim Meyering bcdeccb6a3 (log_su): Resort to getpwuid if getlogin fails.
If no tty name is found, use `none' in the log message.
Based on a patch from Galen Hazelwood.
1997-03-18 12:49:20 +00:00
Jim Meyering f02b837782 (main): Allow use of 0 (zero) as the margin offset
argument to the -o option.  Patch from Gary Anderson.
1997-03-14 04:06:12 +00:00
Jim Meyering c127695e96 (main): Make sure c1 is not -1 before using it as an
array index.  Patch from Greg McGary.  Although this is truly a
bug, I believe it would not cause tr to misbehave on most systems.
I could not construct a test case with which this bug causes tr
to generate invalid output.
1997-03-14 03:59:21 +00:00
Jim Meyering 7017b8f67f (change_file_group): Use uid of -1 to indicate
we don't want to change the file's user ID.
1997-03-13 05:19:54 +00:00
Jim Meyering 613357b0ab (decode_switches): Ignore value of COLUMNS envionment
variable when it is the empty string.  Suggestion from Ulrich Drepper.
1997-03-10 04:47:32 +00:00
Jim Meyering ea805db369 (usage): Fix typo in --help output. From Andreas Schwab. 1997-03-01 04:33:59 +00:00
Jim Meyering 94cab36432 (re_protect): When there is any potential for ambiguity in a diagnostic,
give explanatory diagnostic in addition to file name.
1997-02-27 05:49:44 +00:00
Jim Meyering e1b834211b (copy_internal): When there is any potential for
ambiguity in a diagnostic, give explanatory diagnostic in addition
to file name.
1997-02-27 05:49:01 +00:00
Jim Meyering 2e31651a02 (factor): Rewrite inner loop to be more efficient.
Patch from Torbjorn Granlund.
1997-02-20 05:11:12 +00:00
Jim Meyering 4af2c36dfa (main): Remove trailing slashes from command line arguments.
Otherwise, running `mkdir x; chmod 644 x; ls -d x/' (note the trailing
slash) makes ls fail with permission denied on at least Linux 1.2.13
and 2.0.14 systems.
1997-02-20 04:54:56 +00:00
Jim Meyering dd77d0602a Add missing paren. 1997-02-16 23:49:11 +00:00
Jim Meyering feb2f918b3 (parse_obsolescent_option): Reverse order of args in diagnostic.
Remove `' quotes in diagnostic.
(parse_options): Remove `' quotes in diagnostic.
1997-02-16 14:31:39 +00:00
Jim Meyering 6bdbdae68c fixed off-by-one error 1997-02-12 16:31:01 +00:00
Jim Meyering 59f891e8b8 FIXME: major revamp to use FILE*; passed a few more tests 1997-02-12 16:25:40 +00:00
Jim Meyering 2be25646bd change wording in message 1997-02-09 16:07:38 +00:00
Jim Meyering 4ee12115f0 update copyright 1997-02-09 04:56:33 +00:00
Jim Meyering 7eb03c4372 update copyrights for 1997 1997-02-09 04:54:16 +00:00
Jim Meyering b7ffe8cdaf update copyrights for 1997 1997-02-09 04:52:50 +00:00
Jim Meyering dbc538f92b update copyrights for 1997 1997-02-09 04:46:02 +00:00
Jim Meyering 562488ee9c (parse_obsolescent_option): Give warning diagnostic for
(but now accept) obsolescent usage with more than one file argument.
1997-02-09 04:44:47 +00:00
Jim Meyering b7a12bb110 (quote_filename): Allocate two more bytes (for quotes)
when using --quote-name (-Q).
Feb 2 change wasn't complete.  Patch from Mark Harris.
1997-02-06 03:58:09 +00:00
Jim Meyering 49e3c8fee2 Bracket inclusion of termios.h with #if HAVE_TERMIOS_H.
Masami Takikawa reported that NeXTStep 3.0 doesn't have termios.h.
1997-02-05 04:06:53 +00:00
Jim Meyering c1e4806502 [__GNUC__]: Don't define alloca to __builtin_alloca. 1997-02-04 03:52:16 +00:00