⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changelog-1997

📁 实战Linux编程的原代码,希望对学驱动的人能有所帮助
💻
📖 第 1 页 / 共 5 页
字号:
1997-12-31  Paul Eggert  <eggert@twinsun.com>	If the -h or -H options are given, print inode counts and	disk allocations using a human readable format.	* src/df.c (show_dev): Print inode counts human readably.	* src/ls.c (decode_switches): -h and -H override output units.	(print_dir, gobble_file, print_long_format,	print_file_name_and_frills): Print disk allocations human readably.	* doc/fileutils.texi: Document the above changes.1997-12-31  Jim Meyering  <meyering@na-net.ornl.gov>	* src/df.c (show_dev): Move declarations and computation of	blocks_used etc. and blocks_percent_used and	inodes_used etc. and inodes_percent_used into respective branches	of the `if (inode_format)' statement where they're actually used.	* lib/exclude.h: Define and use PARAMS, not __EXCLUDE_P.	* lib/exclude.c: Use PARAMS, not __EXCLUDE_P.1997-12-29  Jim Meyering  <meyering@na-net.ornl.gov>	* src/rm.c (remove_cwd_entries): Plug a gross leak -- don't call	obstack_init inside the loop.	* src/du.c (usage): Replace TABs with spaces in --help message.	From Santiago Vila.	* lib/argmatch.c (invalid_arg): Use a single fprintf and whole	format statements to ease translation.	From Santiago Vila.	Convert from K&R to ANSI function dcls.1997-12-28  Jim Meyering  <meyering@na-net.ornl.gov>	* lib/group-member.c: Use ANSI syntax, not K&R.	* lib/makepath.c (make_path) [!__STDC__]: Remove K&R-style definition.	* lib/group-member.h: Add PARAMS.	* src/chgrp.c: Remove incorrect declaration of group_member.	Include group-member.h instead.	Based on suggestion from Ulrich Drepper.1997-12-27  Jim Meyering  <meyering@na-net.ornl.gov>	* Version 3.16h.1997-12-25  Jim Meyering  <meyering@na-net.ornl.gov>	* lib/getline.c: (_GNU_SOURCE): Define only if not already defined.	* configure.in: Remove AC_DEFINE of _GNU_SOURCE.	* acconfig.h (_GNU_SOURCE): Define if not already defined.	Put this code in @TOP@ section.	(_GNU_SOURCE): Remove #undef.1997-12-20  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>	* configure.in: Move jm_CHECK_DECLS down so that it follows the	checks for the headers it requires.	* doc/fileutils.texi (mknod invocation): Fix description of file	type mnemonics.	* src/sys2.h: Declare stpcpy only if not defined as macro.	* src/du.c (S_ISLNK): Define this instead of S_ISDIR.	* src/dd.c (skip): Compare lseek return value with -1 to allow it	to be negative as signed value.	* lib/savedir.c: Declare stpcpy only if not defined as macro.	* lib/mountlist.c: Likewise.	* lib/path-concat.c: Include <string.h> if available.	* src/copy.c (copy_internal): Use S_ISLNK only if defined.	* src/install.c (get_ids): Don't cast GID_T_MAX to long, it might	overflow.1997-12-22  Jim Meyering  <meyering@na-net.ornl.gov>	* configure.in: AC_DEFINE _GNU_SOURCE.	* acconfig.h: Add _GNU_SOURCE.1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>	* src/copy.h: Use PARAMS, not __P.	* src/cp-hash.h: Likewise.	* lib/chown.c (rpl_chown): Rename from chown.	Undefine chown just after including config.h.	Include sys/stat.h.	Use correct ordering of uid and gid parameters both in function	definition and in call to chown.	With patches from Kaveh Ghazi.	* sys/fsusage.h: Use PARAMS, not __P.	* sys/getline.h: Likewise.	* sys/hash.h: Likewise.	* sys/human.h: Likewise.	* sys/long-options.h: Likewise.	* sys/makepath.h: Likewise.	* sys/modechange.h: Likewise.	* sys/path-concat.h: Likewise.	* sys/save-cwd.c: Likewise.	* sys/save-cwd.h: Likewise.	* sys/savedir.h: Likewise.	* sys/strverscmp.h: Likewise.	* sys/xalloc.h: Likewise.	* sys/xstrtol.h: Likewise.1997-12-16  Paul Eggert  <eggert@twinsun.com>	Add --exclude and --exclude-from or -X options to du.	* lib/exclude.h, lib/exclude.c: New files.	* lib/Makefile.am (libfu_a_SOURCES): Add exclude.c.	(noinst_HEADERS): Add exclude.h.	* du.c: Include exclude.h.	(exclude): New static var.	(long_options, usage, main): Add --exclude and --exclude-from or -X.	(count_entry): Skip excluded entries.1997-12-16  Jim Meyering  <meyering@na-net.ornl.gov>	* src/sys2.h: s/__P/PARAMS/g.	* src/chgrp.c: Likewise.	* src/chmod.c: Likewise.	* src/chown.c: Likewise.	* src/copy.c: Likewise.	* src/du.c: Likewise.	* src/dd.c: Likewise.	* src/install.c: Likewise.	* src/ls.c: Likewise.1997-12-15  Paul Eggert  <eggert@twinsun.com>	* ls.c (struct bin_str): Make len int, not unsigned, to avoid	bogus comparison < 0.	(quote_filename): Add forward decl.	(decode_switches): -b, -e, -N, -Q are now mutually exclusive.	(print_dir): Quote directory name as per quoting options.	(print_long_format): Don't count color changes as part of file name.	(quote_filename): Revamp interface: now accepts stream to output to	and filename, and returns length of quoted filename.	This removes duplicated code and should make errors less likely.	Also, no longer mallocs storage.  All callers changed.	Don't quote ' ' if -Q.	(OUTCHAR): New macro.	(SAVECHAR, SAVE_2_CHARS): Remove.	(print_name_with_quoting): New stack arg.  All callers changed.	(print_color_indicator): Cast ext len to size_t to avoid warning	with GCC 2.8.	(length_of_file_name_and_frills): Rewrite to use quote_filename.	This fixes bug when computing file name length with -e.1997-12-15  Jim Meyering  <meyering@na-net.ornl.gov>	* tests/rm/deep-1 (deep): Remove `find > k' debugging remnant.1997-12-14  Paul Eggert  <eggert@twinsun.com>	Add shell style quoting, and make it the default.	* NEWS, doc/fileutils.texi: Describe -e, which is now the default.	Describe change to --dired output.	* src/ls.c (quote_shell): New var.	(long_options, decode_switches, usage): New option -e or --quote-shell.	(dired_dump_obstack): New arg STYLE.	(main): Pass quoting style to dired_dump_obstack.	(decode_switches): -N now clears quote_as_string.	(quote_filename): Add shell style quoting.1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>	* tests/ln/sf-1: Make sure we get diagnostics in English.	* Version 3.16g.	* src/system.h: Remove lseek and memchr dcls.	* src/sys2.h: Put them here instead.	* src/rm.c (ASSIGN_STRDUPA): Cast alloca return value to char*.	* lib/hash.h: s/HAVE_DECLARATION_/HAVE_DECL_/.1997-12-13  Jim Meyering  <meyering@na-net.ornl.gov>	* tests/Makefile.am (check-local): New target.	* tests/.posix-warn: New file.	* src/dd.c (usage): Mention that `notrunc' is a conv= option.	Change --help output to tell the truth: that for of=FILE,	FILE *is* truncated.  Reported by Miles Bader.	Remove incomplete, usage-like comment at top of file.	* src/mv.c (do_move): If rename fails for any reason (not just when	errno == EXDEV), then revert to trying copy-then-unlink.  This is	necessary to allow moving files within certain types of Linux NFS	mounted filesystems.  Reported by Marty Leisner.1997-12-11  Jim Meyering  <meyering@na-net.ornl.gov>	* src/ln.c (do_link): Don't require --force when target exists and	using --backup.  This changes makes ln consistent with cp and mv in	this respect.  Suggestion from Eli Zaretskii.1997-12-06  Jim Meyering  <meyering@na-net.ornl.gov>	* src/du.c: Separate struct dcl and typedef.	(String *): Rename from parameter-shadowed `string'.	(stringstruct): Remove typedef.1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>	* lib/savedir.c (savedir): Revert last change.  malloc always	works when called with zero, because we use the wrapper if the	system version is lacking.	* configure.in (AC_LFS): Use this macro rather than open-coding it.	(jm_AC_HEADER_INTTYPES_H): Likewise.	(jm_AC_TYPE_UINTMAX_T): Likewise.	* lib/human.c (human_readable): Convert to ANSI-style definition.	[lint]: Define `power'.	* src/ls.c (print_long_format): Rename inner-scoped `buf' arrays	to `hbuf' to avoid shadowing local.1997-11-29  Paul Eggert  <eggert@twinsun.com>	Port to LFS and C9X in general, and to Solaris 2.6 in particular.	* NEWS: Describe ls -h, -H, rounding, new SI prefixes,	64-bit accumulators, and LFS.	* acconfig.h (HAVE_INTTYPES_H, uintmax_t): New macros.	* configure.in (CPPFLAGS, LDFLAGS, LIBS): Set to appropriate	values if large file support needs explicit enabling.	(HAVE_INTTYPES_H, uintmax_t): New macros to configure.	* doc/fileutils.texi: Describe new -H option, new ls -h option.	Clarify about powers of 1000 vs 1024.	* lib/Makefile.am (libfu_a_SOURCES): Add new file human.c.	(noinst_HEADERS): Add new file human.h.	* lib/fileblocks.c (st_blocks): long -> off_t.	Avoid arithmetic overflow when size is near max.	Depend on _POSIX_SOURCE and BSIZE, not _POSIX_VERSION, for	compatibility with system.h.	(BSIZE): Remove definition, since if BSIZE is not defined	we're never invoked.	* lib/fsusage.c: Do all calculations using uintmax_t.	Include <inttypes.h> if available.	(adjust_blocks, CONVERT_BLOCKS): Remove.	(get_fs_usage): Set new member fsu_blocksize, and do not convert	numbers to 512-byte block units; this avoids overflow here.	Cast lseek arg to off_t, not long.	* lib/fsusage.h (struct fs_usage): New member fsu_blocksize.	Other members are now uintmax_t, not long.	* lib/human.c, lib/human.h: New files.  The interface is inspired	by the human_readable function that was in du.c, but it's pretty	much rewritten from scratch.	* lib/idcache.c (getuidbyname, getgidbyname): Names can now	be NULL in cache.  This change merely fixes ifdeffed-out code.	* lib/savedir.c (savedir): Check for size zero before invoking	malloc; this can occur if st_size arg overflows on conversion to	unsigned int.  All callers now cast st_size arg to unsigned int.	* src/chgrp.c (<limits.h>, UINT_MAX, UINT_MAX): Remove; now	done by system.h.	* src/copy.c (copy_reg): Store file size as off_t, not long.	Do not assume st_size has been normalized to 512 byte blocks,	or that it fits in size_t after dividing by the blocksize.	* src/cp-hash.c (<inttypes.h>): Include if HAVE_INTTYPES_H.	(hash_insert2): Cast inode number to uintmax_t; this prevents	negative remainders if the inode number is negative and ino_t	is longer than unsigned.	* src/dd.c, src/df.c, src/du.c, src/ls.c (<inttypes.h>): Include if	HAVE_INTTYPES_H.	("human.h"): Include.	* src/dd.c (input_blocksize, output_blocksize, conversion_blocksize):	Now size_t instead of long.  0 means unset.	(skip_records, seek_record, max_records): Now uintmax_t, not long.	(w_partial, w_full, r_partial, r_full, r_truncate):	Now uintmax_t instead of unsigned.	(print_stats): Print counts as uintmax_t, not unsigned.	(main, skip): Check for overflow when computing file offsets.	(skip): Records count arg is uintmax_t, not long; blocksize arg is	size_t, not long.  Try lseek even on non regular files, as per comment.	(oc, col): Now size_t, not int.	(copy): No need to check max_records >= 0 any more, as the	default value is now effectively infinity.	Cast lseek arg to off_t.	(copy, copy_with_block): conversion_blocksize - col can never	be negative now, since it's unsigned, so rewrite loops to	avoid problems with unsigned.	(scanargs): Parse numeric args using uintmax_t, not int.	Check for overflow when converting block size args to size_t.	Blocksize options are now unsigned, and are now 0 when not set yet.	(parse_integer): Return uintmax_t, not int; accept new int * arg	to store error indicator, since all returned values are now valid.	Check for overflow when scanning integer.	* src/df.c (LONGEST_HUMAN_READABLE_1K_BYTE_BLOCKS): Remove.	(human_readable_base): Renamed from human_blocks; value is now	zero or positive integer, not just zero or nonzero.	(output_units): New variable;	replaces booleans kilobyte_blocks and megabyte_blocks.	(long_options): Add --si or -H.	(print_header): Adjust to renamed option variables.	(human_readable_1k_blocks): Remove.	(show_dev): Count blocks using uintmax_t, not long.	Calculate percentages using double, not long; this still isn't	perfect as it suffers double rounding, but it's more likely to	round correctly in practice than using long did.	Adjust to renamed option variables.	Use new human_readable library function to format uintmax_t values.	(usage): Add -H, --si.	(main): Adjust to renamed option variables.	Use -H if BLOCKSIZE is SI.  Add -H.	* src/du.c (LONGEST_HUMAN_READABLE, enum Output_units): Remove.	(count_entry): Now returns uintmax_t, not long.	(human_readable_base): Renamed from opt_human_readable; value is now	zero or positive integer, not just zero or nonzero.	(output_units): Now an integer giving output size.	(tot_size): Now uintmax_t, not long.	(long_options, usage): Add --si or -H.	(main): Adjust to renamed option variables.	Use -H if BLOCKSIZE is SI.  Add -H.	(human_readable): Remove; rewritten and now in lib/human.c.	(print_size): Rewrite in terms of human_readable.	Accept extra arg to be printed after size; all callers changed.	* src/install.c (BITSPERBYTE): Remove.	(UID_T_MAX, GID_T_MAX): Define in terms of TYPE_MAXIMUM.	* src/ls.c (<limits.h>): Don't include; system.h does it now.	(INT_MAX): Remove.	(longdiff): Remove bogus definition that uses subtraction;	it gives the wrong answer when overflows occur.	(convert_blocks): Remove.	(output_units): New variable;	replaces booleans kilobyte_blocks and megabyte_blocks.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -