📄 changelog-1997
字号:
(human_readable_base): New variable. (long_options, usage): Add -h or --human-readable and -H or --si. (decode_switches): Adjust to renamed option variables. Use -H if BLOCKSIZE is SI. Add -h, -H. (print_dir): Count blocks using uintmax_t, not int. (gobble_file): Now returns uintmax_t, not int. Don't convert blocks to 512 byte units, as this might overflow; let caller handle the problem. Deduce what caller will print by invoking human_readable. (print_long_format, print_file_name_and_frills): Don't assume inode number, block count, file size fit in unsigned long. Use human_readable to do block count conversion and to print file sizes. (prep_non_filename_text): Print decimal string for time if localtime fails due to enormous time_t. * src/system.h (<limits.h>): Include if HAVE_LIMITS_H. (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX, UINT_MAX): New macros. (ST_NBLOCKS): Now counts actual blocks, not 512-byte blocks. (ST_NBLOCKSIZE): New macro.1997-11-24 Jim Meyering <meyering@na-net.ornl.gov> * src/sys2.h: New file -- but just temporary. * src/system.h: Move lots of pieces into sys2.h. Include sys2.h.1997-11-19 Jim Meyering <meyering@na-net.ornl.gov> * lib/Makefile.am (AUTOMAKE_OPTIONS): Use ansi2knr so *I* don't have to convert my hash package to use k&r C.1997-11-15 Jim Meyering <meyering@na-net.ornl.gov> * intl/Makefile.in (distclean): Don't remove libintl.h here. * Makefile.am (DISTCLEANFILES): Remove it here instead.1997-11-13 Jim Meyering <meyering@na-net.ornl.gov> * lib/mktime.c: Update from FSF. * lib/strftime.c: Update from FSF. * m4/strftime.m4: Check for POSIX.2's %f format spec.1997-11-12 Jim Meyering <meyering@na-net.ornl.gov> * src/copy.c (copy_dir): Use path_concat rather than open-coding it. * src/rm.c [mempcpy]: Remove definition. * src/system.h [!HAVE_MEMPCPY] (mempcpy): Define here instead. * lib/path-concat.c (path_concat): Use mempcpy, not stpcpy.1997-11-09 Jim Meyering <meyering@na-net.ornl.gov> * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r. * m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r. (jm_FUNC_GNU_STRFTIME): Use new macro. (jm_FUNC_STRFTIME): New macro. Likewise. Reported by Noel Cragg.1997-11-08 Jim Meyering <meyering@na-net.ornl.gov> * m4/getline.m4: Fix typo in comment. Add header check for string.h. * m4/Makefile.am (EXTRA_DIST): Add readdir.m4. * configure.in (jm_FUNC_READDIR): Use it. (AC_FUNC_FNMATCH): Add mempcpy.1997-11-02 Jim Meyering <meyering@na-net.ornl.gov> * acconfig.h: Add malloc and realloc. * src/rm.c: Put cycle-detecting code inside an #ifdef ENABLE_CYCLE_CHECK, for systems lacking d_ino. [D_INO_IN_DIRENT]: Define ENABLE_CYCLE_CHECK. * src/rm.c: (ASSIGN_STRDUPA): Clean up. (right_justify): Use memcpy return value directly. Suggestions from Ulrich Drepper. (remove_cwd_entries) [! defined HAVE_WORKING_READDIR]: Impose overhead of working around non-POSIX readdir implementation only on systems that need it. (remove_cwd_entries): Temporarily save a copy of each entry name in an obstack rather than on the stack via alloca, then free it in the likely event that we don't save the entry in the hash table.1997-10-25 Jim Meyering <meyering@na-net.ornl.gov> * lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc. (xcalloc): #ifdef-out unused function. (xrealloc): Remove code to work around deficient versions of realloc. Now we have an autoconf-enabled replacement version. (xmalloc): Remove code to work around deficient versions of malloc. Now we have an autoconf-enabled replacement version. * configure.in (jm_FUNC_MALLOC): Use it. * lib/Makefile.am (EXTRA_DIST): Add malloc.c. * lib/malloc.c: New file. * m4/malloc.m4: New file. * m4/Makefile.am (EXTRA_DIST): Add malloc.m4. * lib/Makefile.am (noinst_HEADERS): Add xalloc.h. * lib/xalloc.h: New file. * lib/xmalloc.c: Updated from textutils. * src/*.c: Remove old-style xmalloc and xrealloc decls. * src/system.h: Include xalloc.h. Remove dcls of xmalloc, xcalloc and xrealloc.1997-10-24 Jim Meyering <meyering@na-net.ornl.gov> * src/ls.c (gobble_file): Cast pointer arg in xrealloc call to char*. * src/*.c: Remove old-style xmalloc and xrealloc decls. * src/system.h: Add prototyped xcalloc, xmalloc and xrealloc decls. Suggestion from Achim Blumensath.1997-10-23 Jim Meyering <meyering@na-net.ornl.gov> * Makefile.am (aclocal-files): Also depend on m4/Makefile.am. * src/system.h [!HAVE_DECLARATION_FREE]: Declare free. [!HAVE_DECLARATION_MALLOC]: Declare malloc. [!HAVE_DECLARATION_REALLOC]: Declare realloc. [!HAVE_DECLARATION_STPCPY]: Declare stpcpy. [!HAVE_DECLARATION_STRSTR]: Declare strstr. * src/copy.c: Remove stpcpy decl. * src/cp.c: Likewise. * src/install.c: Likewise. * src/ln.c: Likewise. * src/ls.c: Likewise. * src/dircolors.c: Remove free and malloc decls. * src/ls.c: Likewise. * src/rm.c: Remove free, malloc, and realloc decls. On some systems, strstr and stpcpy are macros, so declaring them unconditionally gets syntax errors. Reported by Mark M. Kettenis. * configure.in: Use jm_CHECK_DECLS. * m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4.1997-10-22 Jim Meyering <meyering@na-net.ornl.gov> * m4/decl.m4: New file. * m4/check-decl.m4: New file. New macro, jm_CHECK_DECLS.1997-10-18 Jim Meyering <meyering@na-net.ornl.gov> * src/rm.c (remove_cwd_entries): Entries in table of processed dir entries are not malloc'd, so don't have hash cleanup free them. Rewind dirp upon NULL readdir, required for at least SunOS.1997-10-13 Jim Meyering <meyering@na-net.ornl.gov> * configure.in (AC_CHECK_HEADERS): Add termios.h. * src/ls.c: Bracket inclusion of termios.h with #ifdef HAVE_TERMIOS_H. Masami Takikawa reported that this is necessary on NeXTStep 3.0 systems.1997-10-07 Jim Meyering <meyering@na-net.ornl.gov> * src/*.c: Update bug-reporting address.1997-10-06 Jim Meyering <meyering@na-net.ornl.gov> * src/install.c (usage): Add a line describing --verbose. * lib/makepath.c (make_path): Print message IFF the directory was just created and the format string is non-NULL. Print the verbose message using fprintf, not error.1997-10-05 Jim Meyering <meyering@na-net.ornl.gov> * lib/Makefile.am (noinst_HEADERS): Add savedir.h. * src/copy.h (struct cp_options): New field: require_preserve. * src/copy.c (copy_internal): Use require_preserve. * src/cp.c (cp_option_init): Initialize it. (main): Set to 1 for -a and for -p.1997-10-03 Jim Meyering <meyering@na-net.ornl.gov> * lib/savedir.h (savedir) [__P]: New file with prototype. * lib/savedir.c (savedir): Declare DIR parameter to be const. Include savedir.h. Indent cpp directives. * src/chgrp.c: Remove old-style savedir dcl. Include savedir.h for prototype. * src/chmod.c: Likewise. * src/chown.c: Likewise. * src/copy.c: Likewise. * src/du.c: Likewise. Achim Blumensath reported that ``on systems like BeOS, where off_t is 64 bits [not having a prototype] results in passing 0 as name_size...''1997-09-27 Jim Meyering <meyering@na-net.ornl.gov> * src/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), per automake manual.1997-09-20 Jim Meyering <meyering@na-net.ornl.gov> * lib/Makefile.am (libfu_a_SOURCES): Use hash.c, not oa-hash.c. (noinst_HEADERS): Use hash.h, not oa-hash.h.1997-09-15 Jim Meyering <meyering@na-net.ornl.gov> * src/rm.c: Use hash.c (chaining) functions, not those of oa-hash.c (open addressing). The latter implementation is wonderful when deletions are rare, but doesn't support the frequent deletions required to implement the active directory set. * lib/hash.c: New file -- replaces oa-hash.c. * lib/hash.h: New file. * lib/oa-hash.c: Remove. * lib/oa-hash.h: Remove. * src/ln.c (do_link): Perform S_ISLNK test only if lstat succeeded. Otherwise, dest_stats could be used uninitialized.1997-09-14 Jim Meyering <meyering@na-net.ornl.gov> * src/rm.c (full_filename): Use realloc, not xrealloc. * configure.in (jm_FUNC_REALLOC): Use it. * m4/Makefile.am (EXTRA_DIST): Add realloc.m4. * m4/realloc.m4: New file. * lib/Makefile.am (EXTRA_DIST): Add realloc.c. * acconfig.h (realloc): Add #undef. * src/dd.c (equal): Use STREQ (from system.h) instead. (siginfo_handler): New function: handler for SIGINFO/SIGUSR1. (install_handler): New function. (main): Use install_handler instead of open-coding it. Handle SIGINFO (or SIGUSR1 if that's not defined). (print_stats): Move definition to precede first reference. Remove prototype.1997-09-13 Jim Meyering <meyering@na-net.ornl.gov> * src/ls.c (print_many_per_line): Add some non-essential curly braces. (print_horizontal): Likewise. (struct col_info) [valid_len]: Rename from `valid' which conflicted with the macro in locale.h of SunOS4.1.4. * src/rm.c: (PARAMS): Define. (rm): Guard prototype in forward dcl with PARAMS. * lib/strverscmp.h [HAVE_CONFIG_H]: Include config.h. (PARAMS): Define. Guard prototype with PARAMS. * lib/oa-hash.c: Use K&R style function dcls, not ANSI. (HASH_MALLOC): Prefix with (Type*) cast to placate old compilers. Use assert, not ASSERT. Include assert.h. (HASH_DELETED_ITEM_MARKER): Define to address of file-scoped static, not less-portable ((void *) (~0U)). (HASH_VACANT): Define here, not in hash.h. * lib/oa-hash.h: (HASH_DELETED_ITEM_MARKER): Move definition to hash.c. (HASH_VACANT): Likewise. * lib/strverscmp.c [HAVE_CONFIG_H]: Include config.h. (strverscmp): Use `1' not `+1' -- some compilers (sunos' cc) can't parse it. * lib/strdup.c [HAVE_CONFIG_H]: Include config.h. * src/rm.c: Finish rewrite to use chdir and hash tables. See `Implementation overview' comment in the source.1997-09-11 Jim Meyering <meyering@na-net.ornl.gov> * src/install.c: Add new option: --verbose (-v). From Andreas Schwab.1997-09-01 Jim Meyering <meyering@na-net.ornl.gov> * lib/Makefile.am (EXTRA_DIST): Remove mvdir.c and rmdir.c. Add lstat.c and stat.c. * src/ls.c [!STDC_HEADERS]: Declare malloc. * m4/Makefile.am (EXTRA_DIST): Add stat.m4. * m4/stat.m4: New file. * m4/stat.m4 (jm_FUNC_STAT): New macro. * lib/stat.c: New file. * configure.in (jm_FUNC_STAT): Use it. * src/ln.c (do_link): Form destination file name (when DEST is a directory) before checking whether SOURCE and DEST are the same file. See tests/ln/sf-1. Reported by Michael Veksler. * tests/ln: New directory and test. * tests/Makefile.am (SUBDIRS): Add ln. * configure.in (AC_OUTPUT): Add tests/ln/Makefile.1997-08-31 Jim Meyering <meyering@na-net.ornl.gov> * src/chgrp.c (change_file_group): 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 `chgrp --verb bin /' as non-root reported group of / changed to bin chgrp: you are not a member of group `bin': Not owner * src/chown.c (change_file_owner): 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 `chown --verb bin /' as non-root reported owner of / changed to bin chown: /: Not owner * configure.in (jm_FUNC_LSTAT): Use it. * acconfig.h (lstat): Add #undef. * m4/Makefile.am (EXTRA_DIST): Add lstat.m4. * m4/lstat.m4: New file. * m4/lstat.m4 (jm_FUNC_LSTAT): New macro. * lib/lstat.c: New file. * src/rm.c (fspec_get_full_mode): Don't call error here. (remove_file): Call error after fspec_get_full_mode call, if necessary. Don't print mode when asking whether to descend into write-protected directory. (remove_dir): Don't fail just because we can't stat the file to get the mode for the prompt string. (rm): Exit successfully for missing files when -f is given. (rm): Remove cruft to work around SunOS4's broken lstat now that there is a working replacement function. * lib/oa-hash.c: New file. * lib/oa-hash.h: New file. * lib/Makefile.am (libfu_a_SOURCES): Add oa-hash.c. (noinst_HEADERS): Add oa-hash.h. * lib/stpncpy.c: New file. * configure.in (AC_REPLACE_FUNCS): Add stpncpy. * src/rm.c (remove_cwd_entries): Convert to using oa-hash.c. * m4/Makefile.am (EXTRA_DIST): Add d-ino.m4 and d-type.m4. * tests/rm: New directory and tests. * tests/Makefile.am (SUBDIRS): Add rm. * configure.in (AC_OUTPUT): Add tests/rm/Makefile. * src/dircolors.c [!STDC_HEADERS]: Declare malloc. Remove unnecessary dcl of xmalloc. * src/rm.c: Major rewrite in progress. Use fchdir/chdir. * m4/d-ino.m4: New file. * m4/d-type.m4: New file.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -