Commit Graph
24019 Commits
Author SHA1 Message Date
Jim Meyering 26f88f15c8 *** empty log message *** 2000-12-09 20:44:39 +00:00
Jim Meyering 6820c8729e *** empty log message *** 2000-12-09 20:39:17 +00:00
Jim Meyering 78169b6a2f *** empty log message *** 2000-12-09 20:38:12 +00:00
Jim Meyering 5a795ec749 Include "chown-core.h".
[enum Change_status, enum Verbosity]: Remove declarations.
Remove decls of globals that are now part of struct Chown_option.
Remove decl of xstat.
(describe_change): Remove function.
(change_file_group): Likewise.
(change_dir_group): Likewise.
(parse_group): Don't set global, groupname, here...
(main): ... instead, initialize `chopt.group_name' here.
Initialize chopt and update uses of the now-members.
Set group_name also when it's obtained via a --reference=FILE option.
Call change_file_owner (with -1 for uids), not change_file_group.
2000-12-09 20:38:01 +00:00
Jim Meyering d26ef4e978 add 3 more prototypes 2000-12-09 20:31:56 +00:00
Jim Meyering 40d911bc45 Include <pwd.h>, <grp.h>, and "xalloc.h".
[!_POSIX_VERSION]: Declare getgrnam and getgrgid.
(gid_to_name): New function.
(uid_to_name): Likewise.
(chopt_free): Likewise.
2000-12-09 20:31:34 +00:00
Jim Meyering 748db39d02 Don't include pwd.h or grp.h -- no longer needed.
Include chown-core.h.
[enum Change_status, enum Verbosity]: Remove declarations.
Remove decls of globals that are now part of struct Chown_option.
(describe_change): Remove function.
(change_file_owner): Likewise.
(change_dir_owner): Likewise.
(main): Initialize chopt and update uses of the now-members.
Set user_name and group_name also when they're obtained via a
--reference=FILE option.
Pass `chopt' to change_file_owner.
2000-12-09 20:29:32 +00:00
Jim Meyering 4db97b7a7d *** empty log message *** 2000-12-09 14:47:06 +00:00
Jim Meyering f8b26d3ade *** empty log message *** 2000-12-09 14:46:34 +00:00
Jim Meyering 5c8eb8ec36 *** empty log message *** 2000-12-09 14:08:07 +00:00
Jim Meyering 64f7bff756 *** empty log message *** 2000-12-09 13:50:13 +00:00
Jim Meyering 040db4c3fe *** empty log message *** 2000-12-09 13:48:03 +00:00
Jim Meyering 34ef74b11c *** empty log message *** 2000-12-09 13:44:37 +00:00
Jim Meyering de4a3dfb26 *** empty log message *** 2000-12-09 13:44:10 +00:00
Jim Meyering 108881a3b2 *** empty log message *** 2000-12-09 13:38:51 +00:00
Jim Meyering 7d5f893b7f *** empty log message *** 2000-12-09 12:47:51 +00:00
Jim Meyering 8d977c3978 *** empty log message *** 2000-12-09 10:15:26 +00:00
Jim Meyering 73f1bc31d7 (change_file_owner): Restore special file permission
bits, since calling chown resets them on some systems.
Reported by Matt Perry.
2000-12-09 10:15:17 +00:00
Jim Meyering 497d1d9e97 *** empty log message *** 2000-12-09 10:14:52 +00:00
Jim Meyering 764dd3149e Don't make the success of the test depend
on the order in which directory entries are processed.
2000-12-08 20:31:47 +00:00
Jim Meyering b2b9bed164 *** empty log message *** 2000-12-08 20:31:15 +00:00
Jim Meyering 9580e7cc87 *** empty log message *** 2000-12-08 18:32:11 +00:00
Jim Meyering a05267197a (mbsnwidth): Don't loop endlessly when called with an
invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
2000-12-08 18:31:38 +00:00
Jim Meyering a90e5f5a69 *** empty log message *** 2000-12-08 08:06:33 +00:00
Jim Meyering 1f47a082c4 Include xalloc.h.
(main): Use dir_name rather than the underlying dir_name_r.
The former now handles cwd-relative names with drive-letter prefixes.
2000-12-08 07:55:05 +00:00
Jim Meyering 7b55b7aa13 *** empty log message *** 2000-12-07 14:14:18 +00:00
Jim Meyering bcc94017bc convert a > expression to the equivalent < one 2000-12-07 14:13:51 +00:00
Jim Meyering b615d79ac3 (ISSLASH): Define.
(strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
From Prashant TR.
2000-12-07 14:13:13 +00:00
Jim Meyering 04f549820f convert a > expression to the equivalent < one 2000-12-07 14:11:52 +00:00
Jim Meyering ded8b14afb *** empty log message *** 2000-12-07 14:10:33 +00:00
Jim Meyering 4504b81f3b (FILESYSTEM_PREFIX_LEN): Define.
(dir_name_r): Declare this function as static.
[BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
manifest itself on a name containing a mix of slashes and
backslashes.
Make this function work with names starting with a DOS-style
drive letter and colon prefix.
(dir_name): Append `.' if necessary.
Based mostly on patches from Prashant TR and Eli Zaretskii.
2000-12-07 14:10:21 +00:00
Jim Meyering 222412dbf1 (dir_name_r): Remove prototype. 2000-12-07 11:50:35 +00:00
Jim Meyering 71751f757d *** empty log message *** 2000-12-07 10:07:28 +00:00
Jim Meyering 8c8424d0c2 (address_base): Declare to be static. 2000-12-07 10:07:08 +00:00
Jim Meyering e42f27d147 (address_base, address_pad_len): New var.
(output_address_fmt_string, address_fmt_buffer, address_pad): Remove.
(flag_pseudo_start): Now int, not long int.
(pseudo_offset): Now off_t, not long int.
(n_specs, n_specs_allocated): Now size_t, not unsigned int.
(format_address, format_address_none, format_address_std,
format_address_label): Now accepts an extra char argument (an extra
char to print if nonzero), and prints instead of returning a string.
All callers changed.
(bytes_per_block): Now size_t, not int.
(format_address_none): Do not even print the extra char argument.
This simplifies the callers.
(format_address_std, format_address_label): Print off_t ourself
instead of trying to use autoconfigured format.  This is faster and
more portable.
(format_address_paren): New function.
(dump): Remove unnecessary cast.
(expand_address_fmt): Remove.
(main): Use size_t, off_t, etc. instead of builtin types where this is
advisable.  Adjust to above changes.  Remove unnecessary cast.
2000-12-07 10:05:09 +00:00
Jim Meyering d1cca1ee9c *** empty log message *** 2000-12-06 11:06:43 +00:00
Jim Meyering 0654f3206d Check for strtol. Mainly as a cue to cause automake to include
strtol.c -- that file is included by each of strtoul.c and strtoull.c.
Check for limits.h -- strtol.c needs it.
CPPI-1_8
2000-12-06 11:06:39 +00:00
Jim Meyering 67cf94a857 *** empty log message *** 2000-12-06 10:52:37 +00:00
Jim Meyering 69ed54e544 Check for declarations of strtoul and strtoull. 2000-12-06 10:52:28 +00:00
Jim Meyering 3dabe6b533 separate conditions for strtoul and strtoull 2000-12-06 10:26:51 +00:00
Jim Meyering 2845214164 *** empty log message *** 2000-12-06 09:55:03 +00:00
Jim Meyering 6b8102a180 *** empty log message *** 2000-12-06 09:35:48 +00:00
Jim Meyering 570074d6d1 (jm_AC_PREREQ_XSTRTOUMAX): If we need the replacement
strtoull, we may well need the replacement strtoul, too.
2000-12-06 09:35:40 +00:00
Jim Meyering 72a6d74ab2 . 2000-12-05 13:53:13 +00:00
Jim Meyering cd6f0af0ea (dir_name_r): Add `const' in a few local declarations. 2000-12-05 13:14:13 +00:00
Jim Meyering 2746cd50c3 *** empty log message *** 2000-12-04 09:41:28 +00:00
Jim Meyering 8a4261c7a5 *** empty log message *** 2000-12-04 09:37:40 +00:00
Jim Meyering 90799b6c68 Also include memory.h, stdlib.h, unistd.h if appropriate. 2000-12-04 09:37:33 +00:00
Jim Meyering 1c6320fe7c *** empty log message *** 2000-12-04 09:15:54 +00:00
Jim Meyering fecdd2bd2b [!HAVE_DECL_MALLOC]: Declare malloc. 2000-12-04 09:15:49 +00:00