Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
a diagnostic and fail when there are two or more non-option arguments.
|
|
(via system.h) so Cray's int-returning prototype doesn't conflict
with our char*-returning one.
|
|
(copy_reg): Use apply_attributes instead of open-coding the pieces.
Now, failure to preserve file attributes does not cause mv to change
its exit status, and such failures elicit warning diagnostics. This
behavior is required by POSIX. Before, failure to preserve ownership
due to insufficient access was diagnosed only for root.
Prompted by a report from Bengt Martensson.
|
|
to K&R-style. Otherwise, ansi2knr would fail to convert the function
definitions to K&R for old style compilers. From Kaveh Ghazi.
|
|
|
|
(do_move): Update caller.
(movefile): Take new boolean parameter, DEST_IS_DIR,
to save a stat per moved file when the destination is a directory.
(main): Call movefile with additional argument.
(strip_trailing_slashes_2): New function.
(movefile): Remove trailing slashes from dest. Otherwise, stat ("b/")
fails with ENOTDIR on systems including Linux w/libc 2.0.30.
Reproduce with `rm -rf a b; mkdir a; touch b; ./mv a b/'.
(do_move): Fix misleading comment.
|
|
to the one in the then clause.
|
|
|
|
(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.
|
|
From Karl Heuer.
|
|
|
|
2-digit abbreviation) in each page header. Reported by Noah Friedman.
|
|
that special case. Before `cut -f1 </dev/null' would improperly
output a single newline. Reported by Phil Richards.
|
|
|
|
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'.
|
|
|
|
|
|
|
|
|
|
|
|
Use X, not CP_OPTIONS.
|
|
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>.
|
|
|
|
(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.
|
|
|
|
Indent cpp directives.
|
|
(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.
|
|
Based on the idea and a patch from Torbjorn Lindgren.
(du_files): Likewise.
(count_entry): Likewise.
[AIX]: Remove unused #pragma alloca.
|
|
Add spurious curlies and an empty line.
|
|
(remove_parents): Implement new options.
(main): Likewise.
|
|
|
|
|
|
character constant. Give the *warning* only if !POSIXLY_CORRECT.
|
|
(STRTOX): Use new constant as error message format string in macro.
Suggestion from Andreas Schwab.
|
|
|
|
(xstrtod, xstrtol, xstrtoul): Remove functions.
Use the STRTOX instead.
|
|
|
|
|
|
Based on the idea and a patch from Torbjorn Lindgren.
(du_files): Likewise.
(count_entry): Likewise.
|
|
Change a few #ifdef to #if.
Remove 3 spurious #ifdef that were guarding an #undef each.
|
|
(print_numbers): Likewise.
|
|
|
|
If no tty name is found, use `none' in the log message.
Based on a patch from Galen Hazelwood.
|
|
argument to the -o option. Patch from Gary Anderson.
|
|
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.
|
|
we don't want to change the file's user ID.
|
|
variable when it is the empty string. Suggestion from Ulrich Drepper.
|