1
0
mirror of https://git.savannah.gnu.org/git/coreutils.git synced 2026-10-27 02:33:01 +03:00

Commit Graph

  • a10fdc591f (change_dir_mode): Cast st_size arg to unsigned int in savedir call. Jim Meyering 1997-11-30 11:05:10 +00:00
  • f7ecccf234 (full_filename): Use memcpy, not mempcpy when not using the return value. Jim Meyering 1997-11-30 11:02:47 +00:00
  • 5112b2973f filter through cppi Jim Meyering 1997-11-30 11:01:54 +00:00
  • 10aa5f6fd7 (<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. Jim Meyering 1997-11-30 10:25:21 +00:00
  • 9c59f1dcc4 (<inttypes.h>): Include if HAVE_INTTYPES_H. ("human.h"): Include. (<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. (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. Jim Meyering 1997-11-30 10:25:16 +00:00
  • d08a2b63dc (BITSPERBYTE): Remove. (UID_T_MAX, GID_T_MAX): Define in terms of TYPE_MAXIMUM. Jim Meyering 1997-11-30 10:25:11 +00:00
  • 6ed8115087 (<inttypes.h>): Include if HAVE_INTTYPES_H. ("human.h"): Include. (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. Jim Meyering 1997-11-30 10:25:07 +00:00
  • 76916942ca (<inttypes.h>): Include if HAVE_INTTYPES_H. ("human.h"): Include. (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. Jim Meyering 1997-11-30 10:25:02 +00:00
  • 72bc3b818f (<inttypes.h>): Include if HAVE_INTTYPES_H. ("human.h"): Include. (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. Jim Meyering 1997-11-30 10:24:58 +00:00
  • a5fe3a240b (<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. Jim Meyering 1997-11-30 10:24:54 +00:00
  • b8c474191a (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. Jim Meyering 1997-11-30 10:24:50 +00:00
  • 0f411474da (<limits.h>, UINT_MAX, UINT_MAX): Remove; now done by system.h. Jim Meyering 1997-11-30 10:24:45 +00:00
  • dcd4c05dfa (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. Jim Meyering 1997-11-30 10:24:41 +00:00
  • 07783bcdf0 (getuidbyname, getgidbyname): Names can now be NULL in cache. This change merely fixes ifdeffed-out code. Jim Meyering 1997-11-30 10:24:38 +00:00
  • 240cb49efe New file. The interface is inspired by the human_readable function that was in du.c, but it's pretty much rewritten from scratch. Jim Meyering 1997-11-30 10:24:32 +00:00
  • 412d0aba50 (struct fs_usage): New member fsu_blocksize. Other members are now uintmax_t, not long. Jim Meyering 1997-11-30 10:24:28 +00:00
  • 25fabf3d2d 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. Jim Meyering 1997-11-30 10:24:24 +00:00
  • f633782aa1 (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. Jim Meyering 1997-11-30 10:24:20 +00:00
  • ce43e130bb (libfu_a_SOURCES): Add new file human.c. (noinst_HEADERS): Add new file human.h. Jim Meyering 1997-11-30 10:24:16 +00:00
  • 8754a488e0 . Jim Meyering 1997-11-30 08:32:44 +00:00
  • 75a5b970b3 (mempcpy): remove static inline function Jim Meyering 1997-11-30 07:34:12 +00:00
  • e08f95ef54 . Jim Meyering 1997-11-29 18:05:14 +00:00
  • 4eac40b0e5 *** empty log message *** Jim Meyering 1997-11-24 14:25:52 +00:00
  • 04712f52ad also test for stdlib.h don't use STDC_HEADERS in ifdef for stdlib.h Jim Meyering 1997-11-24 14:21:16 +00:00
  • c781b840f2 move big chunk of defs to sys2 Jim Meyering 1997-11-24 14:19:32 +00:00
  • d8415fe94f *** empty log message *** Jim Meyering 1997-11-24 12:57:50 +00:00
  • 9928e82eac *** empty log message *** Jim Meyering 1997-11-24 12:53:29 +00:00
  • 49803907f5 . Jim Meyering 1997-11-19 18:59:48 +00:00
  • 4c3aa5cba3 (hash_pjw): Don't use ANSI `U' suffix. Cast instead. Jim Meyering 1997-11-19 18:59:02 +00:00
  • c04cb4522a add PARAMS around prototype lists Jim Meyering 1997-11-19 18:57:40 +00:00
  • f62113bea3 . Jim Meyering 1997-11-19 18:55:53 +00:00
  • d92a618daf revert a mempcpy to memcpy Jim Meyering 1997-11-19 18:55:31 +00:00
  • 1110f5f335 (AUTOMAKE_OPTIONS): Use ansi2knr so *I* don't have to convert my hash package to use k&r C. Jim Meyering 1997-11-19 15:04:15 +00:00
  • 68c59ca300 *** empty log message *** Jim Meyering 1997-11-18 03:47:06 +00:00
  • 65eb6ca593 *** empty log message *** Jim Meyering 1997-11-18 03:32:19 +00:00
  • 9ed80c0140 (_REENTRANT): #define, as some hosts need this to declare localtime_r properly. From Paul Eggert. Jim Meyering 1997-11-18 03:32:00 +00:00
  • 6106d5a733 . Jim Meyering 1997-11-18 03:29:24 +00:00
  • 59b9b24bad undef putenv Jim Meyering 1997-11-17 15:45:19 +00:00
  • f1b490166e add jm_ prefix to use of am_cv_func_working_mktime increment serial # Jim Meyering 1997-11-17 15:13:41 +00:00
  • 3c94a67faa . Jim Meyering 1997-11-16 15:28:23 +00:00
  • 434a17cc05 . Jim Meyering 1997-11-16 15:27:52 +00:00
  • aa96253ae1 . Jim Meyering 1997-11-15 19:58:19 +00:00
  • 87cff95abc . Jim Meyering 1997-11-15 19:54:47 +00:00
  • 4da60d3e2c *** empty log message *** Jim Meyering 1997-11-15 19:51:16 +00:00
  • fec9572013 include unistd.h Jim Meyering 1997-11-15 19:43:06 +00:00
  • 1076c92f8d . Jim Meyering 1997-11-15 17:19:48 +00:00
  • 8def3e3ec1 remove fixup_null_alloc prototype Jim Meyering 1997-11-15 17:18:01 +00:00
  • 83ef9b531a (EXTRA_DIST): Add mktime.m4. Jim Meyering 1997-11-15 17:14:10 +00:00
  • f9d9d1cbb4 . Jim Meyering 1997-11-15 17:13:23 +00:00
  • 31c1d2ed3d *** empty log message *** Jim Meyering 1997-11-15 17:13:20 +00:00
  • e66833e32e Require jm_AM_FUNC_MKTIME, not the one from automake. Jim Meyering 1997-11-15 17:13:02 +00:00
  • e6186db39f (mempcpy): Remove definition. Jim Meyering 1997-11-15 17:09:34 +00:00
  • ae2984e8ca . Jim Meyering 1997-11-15 17:08:32 +00:00
  • ed5048e229 Check for %F format. Add comments. Jim Meyering 1997-11-15 13:17:15 +00:00
  • e84c69c6cf (bigtime_test): New function from Paul Eggert to detect SunOS4.1.4's infinite looping mktime. Portability tweaks from Paul Eggert. Jim Meyering 1997-11-15 05:41:02 +00:00
  • 7ee6b0046f Temporarily add a copy of this file from the automake distribution. Update names to have jm_ prefix. (irix_6_4_bug): New function based on code from Ariel Faigon. Jim Meyering 1997-11-15 05:28:04 +00:00
  • 708a265b39 . Jim Meyering 1997-11-15 05:24:30 +00:00
  • df29ef2431 . Jim Meyering 1997-11-13 14:29:18 +00:00
  • 3022e9b806 . Jim Meyering 1997-11-13 14:25:41 +00:00
  • db984f4c6d update from GNU libc Jim Meyering 1997-11-13 14:24:03 +00:00
  • e0d703658c update from GNU libc Jim Meyering 1997-11-13 14:22:56 +00:00
  • f52ec0e772 partial update from FSF -- use int, not size_t; 0, not NULL Jim Meyering 1997-11-13 14:21:02 +00:00
  • d29c650718 . Jim Meyering 1997-11-13 14:16:21 +00:00
  • 690342eae7 Update from FSF. Jim Meyering 1997-11-13 13:23:16 +00:00
  • 2e21152e49 Update from FSF. Jim Meyering 1997-11-13 13:22:54 +00:00
  • 7afa02b918 Check for POSIX.2's %f format spec. Jim Meyering 1997-11-13 13:19:15 +00:00
  • 7ba5fcb251 add -*-Makefile-*- Jim Meyering 1997-11-12 17:28:34 +00:00
  • f1af5f9504 . Jim Meyering 1997-11-12 17:27:41 +00:00
  • 5b399f4fe0 [!HAVE_MEMPCPY] (mempcpy): Define here instead. Jim Meyering 1997-11-12 17:21:54 +00:00
  • c0cc0c26ed [!HAVE_MEMPCPY] (mempcpy): Define. Jim Meyering 1997-11-12 17:19:21 +00:00
  • b74c9a14fd (copy_dir): Use path_concat rather than open-coding it. Jim Meyering 1997-11-12 17:18:55 +00:00
  • b3828d9190 *** empty log message *** Jim Meyering 1997-11-12 16:28:53 +00:00
  • 4842565b62 [!HAVE_MEMPCPY] (mempcpy): Define. (batch_convert): Use mempcpy rather than stpcpy. Jim Meyering 1997-11-12 16:28:06 +00:00
  • 4d1e1b28f8 (path_concat): Use mempcpy, not stpcpy. Jim Meyering 1997-11-12 16:18:23 +00:00
  • 992fc3869f return memcpy result directly Jim Meyering 1997-11-12 16:11:17 +00:00
  • e96a4f0ed1 . Jim Meyering 1997-11-10 14:40:40 +00:00
  • 65dd91dfc3 . Jim Meyering 1997-11-10 14:39:14 +00:00
  • 99910b9591 . Jim Meyering 1997-11-10 04:11:57 +00:00
  • dbac29a533 *** empty log message *** Jim Meyering 1997-11-10 03:53:45 +00:00
  • 5e28f75496 (jm_STRFTIME_PREREQS): Check for localtime_r. (jm_FUNC_GNU_STRFTIME): Use new macro. (jm_FUNC_STRFTIME): New macro. Likewise. Jim Meyering 1997-11-10 03:52:47 +00:00
  • bc445a1f16 (jm_FUNC_MKTIME): Check for localtime_r. Jim Meyering 1997-11-10 03:52:33 +00:00
  • 572930e171 *** empty log message *** Jim Meyering 1997-11-10 03:31:27 +00:00
  • 9694cb0f15 add -*-Makefile-*- to first line Jim Meyering 1997-11-09 19:06:53 +00:00
  • 03fbbc6ee0 add -*-Makefile-*- to first line Jim Meyering 1997-11-09 19:06:31 +00:00
  • ab08d64445 . Jim Meyering 1997-11-08 21:10:39 +00:00
  • d9173c1c81 . Jim Meyering 1997-11-08 21:04:13 +00:00
  • 6d3a217c16 (EXTRA_DIST): Add lfs.m4. Jim Meyering 1997-11-08 21:02:34 +00:00
  • 979f238fb3 (fseeko): Define a stub if ! HAVE_FSEEKO. (skip): Use fseeko if available. Don't use lseek; it causes the stdio stream to become out of sync with respect to the underyling file descriptor. From Paul Eggert. Jim Meyering 1997-11-08 21:02:01 +00:00
  • 6af4f825de . Jim Meyering 1997-11-08 20:42:52 +00:00
  • 9ef77c1298 *** empty log message *** Jim Meyering 1997-11-08 20:38:23 +00:00
  • 7417f884af (keycompare): call alloca(0) after each iteration Jim Meyering 1997-11-08 04:47:17 +00:00
  • b391c8ba91 . Jim Meyering 1997-11-08 04:46:30 +00:00
  • cc2fcaa6ab *** empty log message *** Jim Meyering 1997-11-08 03:00:52 +00:00
  • 214ed98dd8 Fix typo in comment. Add header check for string.h. Jim Meyering 1997-11-08 03:00:20 +00:00
  • 36ce9a1c1c use 2 mempcpy instead of two memcpy calls Jim Meyering 1997-11-08 02:59:16 +00:00
  • d87c244809 cleanup use abort for framework errors Jim Meyering 1997-11-08 02:56:10 +00:00
  • 19058180fa . Jim Meyering 1997-11-07 18:19:50 +00:00
  • 55405358b3 *** empty log message *** Jim Meyering 1997-11-07 17:19:00 +00:00
  • aaf22602f2 . Jim Meyering 1997-11-07 17:18:15 +00:00
  • a313a7d147 (getmonth): Remove HAVE_ALLOCA #ifdefs. We always have alloca. (keycompare): Don't use variable size arrays (it's a gcc-extension). Rewrite code that increments new lengths when not `ignoring'. Jim Meyering 1997-11-06 14:37:34 +00:00