Commit Graph
1283 Commits
Author SHA1 Message Date
Jim Meyering 0f3d7f59a9 [!STDC_HEADERS]: Declare malloc. 1997-08-31 13:00:00 +00:00
Jim Meyering c3cdbb8d3f (change_file_mode): Call describe_change with a 3-state argument.
(describe_change): Report whether the operation was successful,
a failure, or that the request was a no-op.
Before, running `chmod --verb u-r /' as non-root reported
  mode of / changed to 0355 (-wxr-xr-x)
  chmod: /: Not owner
Reported by Philippe Schnoebelen <phs@hobbes.fing.edu.uy>
1997-08-31 12:57:15 +00:00
Jim Meyering b5ef7a4be7 (show_date): Don't hang if strftime produces an empty string. 1997-08-18 19:50:35 +00:00
Jim Meyering 8075bc7e8a s/\<_ (/_(/g 1997-08-03 02:49:43 +00:00
Jim Meyering c091f9835b indent 1997-08-03 02:04:28 +00:00
Jim Meyering 6993b5780b . 1997-08-03 01:54:34 +00:00
Jim Meyering 910502b044 Add new option: --reference=FILE. 1997-07-29 03:05:45 +00:00
Jim Meyering 2ff9982e42 Add new option: --reference=FILE. 1997-07-29 03:04:58 +00:00
Jim Meyering 42e5deb36c (usage): tweak -p descr 1997-07-29 02:55:45 +00:00
Jim Meyering b78d012e9d Declare pointer parameters const as appropriate. 1997-07-29 02:06:25 +00:00
Jim Meyering 43e8e1245e (main): New option --preserve-timestamps (-p).
(install_file_in_file): Change timestamps if requested.
(change_timestamps): New function.
(usage): Describe --preserve-timestamps.
Correct --mode description.
From Galen Hazelwood.
1997-07-29 01:57:24 +00:00
Jim Meyering afc73d862b (parse_obsolescent_option): #ifdef-out portability warning. 1997-07-22 01:26:35 +00:00
Jim Meyering f1ee29eac3 (checkfp): tweak comment 1997-07-19 15:08:53 +00:00
Jim Meyering dddf0d13df (checkfp): Print the `disorder' message. Include both
the number and the contents of the first out-of-order line, in addition
to the file name.  Change meaning of return value.
(check): Don't print disorder message here.
Adjust test of checkfp's return value.
Feature suggestion from Karl Heuer.
1997-07-19 15:04:59 +00:00
Jim Meyering 08bc7404bc This means that if multiple users are given on the command line, the
error return code is that of the last, so earlier failures can't be
detected.
1997-07-16 13:46:53 +00:00
Jim Meyering 74ed7c9f94 Exit with status from `id' command.
Don't print `$name : $groups' if id fails.
Reported by Austin Donnelly.
1997-07-16 12:49:36 +00:00
Jim Meyering 566451e5be remove fixme 1997-07-13 23:37:57 +00:00
Jim Meyering 25ec733e8d Include xstrtoul.h.
Remove global variable, unit_size.
(atou): Remove now-unused function.
(parse_unit): Likewise.
(string_to_ull): New function.
(head): Take new parameter, count_lines.  Use it instead of unit_size.
Update callers.
(head_file): Likewise.
(main): Use string_to_ull, not atou/parse_unit.
1997-07-13 21:59:34 +00:00
Jim Meyering b05ff2249b Rename lots of `this' locals.
Make some parameters `const'.
(who): Update read_utmp caller.
(search_entries): Take additional param: utmp_buf.
Update read_utmp caller.
(who_am_i): Update read_utmp caller.
1997-07-13 04:13:40 +00:00
Jim Meyering 7fe4db1451 (users): Update read_utmp caller. 1997-07-13 03:57:00 +00:00
Jim Meyering 393e4a8c36 (uptime): Update read_utmp caller. 1997-07-13 03:56:29 +00:00
Jim Meyering 6e1340462e Add FIXME.
indent
1997-07-13 03:13:09 +00:00
Jim Meyering aeea923e99 indent 1997-07-13 03:10:15 +00:00
Jim Meyering d461077920 indent 1997-07-13 03:08:45 +00:00
Jim Meyering d0c515b45c indent 1997-07-13 03:07:36 +00:00
Jim Meyering 4b84ea8745 indent 1997-07-13 02:58:35 +00:00
Jim Meyering ad0f8c9b71 (uptime): rename users to n_users 1997-07-13 02:52:58 +00:00
Jim Meyering 67fe78f11c declare xmalloc
(users): rename users to n_users
1997-07-13 02:52:24 +00:00
Jim Meyering b18c5abf1c (who): rename users to n_users 1997-07-13 02:51:34 +00:00
Jim Meyering 59f66af0f4 . 1997-07-13 02:49:39 +00:00
Jim Meyering 4cf5b77561 . 1997-07-13 02:19:46 +00:00
Jim Meyering 65738c9162 . 1997-07-13 02:18:14 +00:00
Jim Meyering 6341f011d7 . 1997-07-13 02:17:51 +00:00
Jim Meyering d1a07e1ad2 (MAYBE_SET_TZ_UTC0): New macro.
(set_tz): New function.
(batch_convert): If necessary, save the initial value of TZ and
for each date in the file, restore it before each call to get_date,
then set it to UTC0 before each show_date call.
(main): Don't set TZ before calling get_date.
Set TZ after get_date call and before show_date call.
Reported by Matthew Braun.
1997-07-12 22:52:57 +00:00
Jim Meyering 83c3f08048 declare stpcpy 1997-07-06 21:24:10 +00:00
Jim Meyering d0caad54ae Add new option: --sort=version (-v). 1997-07-06 21:23:42 +00:00
Jim Meyering 2b0ecc7fa5 (print_long_format): Reflect changes in semantics of getuser, getgroup. 1997-07-06 13:51:16 +00:00
Jim Meyering 08f38fd930 (parse_obsolescent_option): If POSIXLY_CORRECT is set, give
a diagnostic and fail when there are two or more non-option arguments.
1997-07-05 22:50:32 +00:00
Jim Meyering ac0ee614d6 Redefine/undef getusershell around inclusion of <unistd.h>
(via system.h) so Cray's int-returning prototype doesn't conflict
with our char*-returning one.
1997-07-05 08:25:58 +00:00
Jim Meyering 22ff29fe3e (apply_attributes): New function.
(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.
1997-07-03 12:16:41 +00:00
Jim Meyering 7a280a0fda (STRTOX): Convert function header in macro definition
to K&R-style.  Otherwise, ansi2knr would fail to convert the function
definitions to K&R for old style compilers.  From Kaveh Ghazi.
1997-07-02 16:07:44 +00:00
Jim Meyering 6ad0d51107 (copy): Add FIXME comment. 1997-06-29 22:24:26 +00:00
Jim Meyering dc404c4107 (copy_reg): New parameter, SOURCE_STATS.
(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.
1997-06-29 22:21:42 +00:00
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