Jim Meyering
a13135d09e
Move the OPENOPTS def from end to beginning of else clause so it's closer
...
to the one in the then clause.
1997-06-29 01:56:36 +00:00
Jim Meyering
f657d65570
update from automake-1.2
1997-06-25 17:05:56 +00:00
Jim Meyering
6700c89ac7
Use variable width columns when printing in multi-column mode.
...
(init_col_info): New function.
(print_current_files): Call init_col_info if format is
`many_per_line' or `horizontal'.
(print_many_per_line): Calculate optimum column widths.
(print_horizontal): Likewise.
From Ulrich Drepper.
1997-06-22 19:52:24 +00:00
Jim Meyering
a6526f2171
(eval6): Accept new unary operator, quote.
...
From Karl Heuer.
1997-06-16 17:01:24 +00:00
Jim Meyering
952a76e506
tweak error message
1997-06-16 16:12:04 +00:00
Jim Meyering
50e65a424c
(init_header) [T_BUF_FMT]: Output the 4-digit year (not the
...
2-digit abbreviation) in each page header. Reported by Noah Friedman.
1997-06-15 11:40:47 +00:00
Jim Meyering
2f1768f676
(cut_fields): Detect when the input is empty and handle
...
that special case. Before `cut -f1 </dev/null' would improperly
output a single newline. Reported by Phil Richards.
1997-06-14 17:31:40 +00:00
Jim Meyering
9fb965dfd8
Add comment for posixly_correct.
1997-06-12 11:47:34 +00:00
Jim Meyering
8406b91aba
(docolon): Test (re_buffer.re_nsub > 0) rather than
...
searching for `\(' to determine whether to return 0 or the empty
string. Before it would improperly return '' if the pattern
contained a substring like this: `\\('. From Karl Heuer.
For example, running expr c : '\\(' should print `0'.
1997-06-11 20:18:15 +00:00
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