summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2000-12-25For both ln and install, when using `--backup=simple --suffix=S',Jim Meyering
the suffix `S' wasn't used. (main): Actually use the local variable, `backup_suffix_string'.
2000-12-25(hash_compare_active_dir_ents): Return explicit `true'Jim Meyering
or `false', rather than relying on implicit int-to-enum cast.
2000-12-25(extract_dirs_from_files): Remove unused variable.Jim Meyering
(gobble_file): Move decl of local, val, into the scope where it's used.
2000-12-24(main): Actually use the local variable, `backup_suffix_string'.Jim Meyering
2000-12-23[HAVE_INTTYPES_H]: Include <inttypes.h>.Jim Meyering
2000-12-22(isaac_seed_machdep) [_ARCH_PPC]: Disable the codeJim Meyering
that would use the PPC mfspr `asm' code.
2000-12-19(UINTMAX_MAX): New macro, taken from C99.Jim Meyering
2000-12-19adjust indentationJim Meyering
2000-12-19Include physmem.h.Jim Meyering
(SORTALLOC, mergealloc, LINEALLOC): Remove. (sortalloc): Default to zero at program startup. (SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): New macros. (usage, main): Add support for new -S SIZE option. (specify_sort_size, default_sort_size): New functions. (initlines): Do not let alloc exceed limit. (findlines): Likewise. (checkfp, mergefps, sort): Use sortalloc to size everything else, instead of relying on precomputed sizes.
2000-12-16(uint_to_string): New function.Jim Meyering
(uid_to_name): Use it. (gid_to_name): Use it. Rename locals, user/group, to uid/gid.
2000-12-16(enum Change_status): Start with 1.Jim Meyering
2000-12-16(main): Rename local, group, to gid.Jim Meyering
2000-12-16(main): Rename locals, user/group, to uid/gid.Jim Meyering
2000-12-15(main): Reflect renaming: s/dereference/change_symlinks/.Jim Meyering
2000-12-15(enum Dereference_symlink): rename member: s/change_symlinks/dereference/Jim Meyering
2000-12-15Declare lstat.Jim Meyering
Rename change_symlinks member to `dereference' and use the DEREF_* enum values. (describe_change): Merge the chgrp and chown switch statements. Use xmalloc to form the `user:group' string. (change_file_owner): Record (and later, use) is_symlink and is_directory from the lstat stats, in order to control whether we operate on symlinks and whether (with -R) we traverse symlinks to directories. When dereferencing, use open/fchown (rather than chown) on symlinks.
2000-12-10give a better diagnostic when only the group is being changedJim Meyering
2000-12-09(chopt_free): don't free anythingJim Meyering
2000-12-09Include "chown-core.h".Jim Meyering
[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-09add 3 more prototypesJim Meyering
2000-12-09Include <pwd.h>, <grp.h>, and "xalloc.h".Jim Meyering
[!_POSIX_VERSION]: Declare getgrnam and getgrgid. (gid_to_name): New function. (uid_to_name): Likewise. (chopt_free): Likewise.
2000-12-09Don't include pwd.h or grp.h -- no longer needed.Jim Meyering
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*** empty log message ***Jim Meyering
2000-12-09*** empty log message ***Jim Meyering
2000-12-09(change_file_owner): Restore special file permissionJim Meyering
bits, since calling chown resets them on some systems. Reported by Matt Perry.
2000-12-08Include xalloc.h.Jim Meyering
(main): Use dir_name rather than the underlying dir_name_r. The former now handles cwd-relative names with drive-letter prefixes.
2000-12-07(address_base): Declare to be static.Jim Meyering
2000-12-07(address_base, address_pad_len): New var.Jim Meyering
(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-03(gobble_file) [USE_ACL]: Set have_acl member unconditionallyJim Meyering
to avoid uninitialized memory reference via FILE_HAS_ACL.
2000-12-03remove instrumentationJim Meyering
2000-12-03add instrumentation to detect some UMRsJim Meyering
2000-12-03(tail_file): Initialize ignore, dev, and ino members,Jim Meyering
when tailing forever and the open failed. Otherwise, we could get uninitialized memory references of those fields in recheck.
2000-12-03use CHAR_BIT, not BITSPERBYTEJim Meyering
2000-12-03(CHAR_BIT): Define.Jim Meyering
2000-12-03Make od print valid addresses for offsets of 2^32 and larger. (cont'd)Jim Meyering
(MAX_ADDRESS_LENGTH): Don't hard-code as a literal. Rather, define in terms of the type, off_t. (string_min): Declare to be of type size_t. (flag_dump_strings): Declare to be of type int. (print_s_char): Declare the n_bytes parameter and the local, `i', to be of type off_t. (print_char): Likewise. (print_s_short): Likewise. (print_short): Likewise. (print_int): Likewise. (print_long): Likewise. (print_long_long): Likewise. (print_float): Likewise. (print_double): Likewise. (print_long_double): Likewise. (dump_hexl_mode_trailer): Likewise. (print_named_ascii): Likewise. (print_ascii): Likewise. (write_block): Likewise. (print_ascii): Declare local, `print_function' with a prototype. Change a few `>' comparisons to the equivalent `<' form. (parse_options): Declare `tmp' to be of type uintmax_t. Use xstrtoumax, not xstrtoul. Fail if the specified offset if larger than OFF_T_MAX. (dump_strings): Declare local `i' to be of type size_t. Remove the now-unnecessary cast-to-off_t. (main) [IF_LINT]: Initialize desired_width to avoid a warning. Declare `tmp' to be of type uintmax_t. Use xstrtoumax, not xstrtoul. Fail if minimum string length is larger than SIZE_MAX. Fail if specified width is larger than ULONG_MAX.
2000-12-03(OFF_T_MIN): Remove definition.Jim Meyering
(OFF_T_MAX): Likewise.
2000-12-03(OFF_T_MIN): Define.Jim Meyering
(OFF_T_MAX): Define.
2000-12-03Make od print valid addresses for offsets of 2^32 and larger.Jim Meyering
(format_address): Use off_t, not long unsigned_int as the parameter type. (format_address_none): Likewise. Mark parameter as unused. (format_address_std): Likewise. (format_address_label): Likewise. (print_ascii): Mark format string parameter as unused. (write_block): Use off_t, not long unsigned_int as offset type. (expand_address_fmt): New function. (main): Use it to expand each address format string template. Reported by Mark Nudelman, via Andreas Jaeger.
2000-12-03(parse_options): Use xstrtoumax to parse the byte and lineJim Meyering
offset. Give a better diagnostic when the requested offset is still representable but larger than OFF_T_MAX.
2000-12-02(valid_format): Move pre-increment to a separate statement to avoid a warning.Jim Meyering
2000-12-02Move dcls of globals used only in main...Jim Meyering
(main): ...to here. (usage): Clarify option descriptions.
2000-12-02whoops. rename the use, too -- not just the decl!!Jim Meyering
2000-12-02(checkfp): Rename local `buf' to avoid shadowing previous declaration.Jim Meyering
2000-12-02(skip): Use lseek instead of worrying about fseeko or fseek.Jim Meyering
This should be portable, as we seek before doing any I/O. (fseeko): Remove; no longer used.
2000-12-02add back the parens Paul removed :-)Jim Meyering
2000-12-02(gobble_file): Do not fall back on lstat if statJim Meyering
fails; POSIX.2 does not allow this. Invoke acl only on non-symlinks, and only if lstat or stat succeeds.
2000-12-02(NONZERO): Define and use it to make the code a tinyJim Meyering
bit more readable.
2000-12-02(main): Remove any trailing slash unconditionally.Jim Meyering
Reported by Volker Borchert.
2000-12-02(skip, dd_copy): Use ssize_t to store result ofJim Meyering
safe_read, to avoid overflow e.g. on 64-bit Solaris sparc. (dd_copy): Remove unnecessary cast.
2000-12-02Undo most of the changes since 2000-11-24, since we'veJim Meyering
documented a standard way to do it. (skip_bytes, seek_bytes): Remove. (usage): Remove B suffix. (scanargs, skip, dd_copy, main): Remove support for B suffix.