summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
1997-11-30(print_long_format): Rename inner-scoped `buf' arrays to `hbuf'Jim Meyering
to avoid shadowing local.
1997-11-30(change_dir_owner): Cast st_size arg to unsigned int in savedir call.Jim Meyering
1997-11-30(change_dir_mode): Cast st_size arg to unsigned int in savedir call.Jim Meyering
1997-11-30(full_filename): Use memcpy, not mempcpy when not using the return value.Jim Meyering
1997-11-30filter through cppiJim Meyering
1997-11-30(<limits.h>): Include if HAVE_LIMITS_H.Jim Meyering
(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-30(<inttypes.h>): Include if HAVE_INTTYPES_H.Jim Meyering
("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.
1997-11-30(BITSPERBYTE): Remove.Jim Meyering
(UID_T_MAX, GID_T_MAX): Define in terms of TYPE_MAXIMUM.
1997-11-30(<inttypes.h>): Include if HAVE_INTTYPES_H.Jim Meyering
("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.
1997-11-30(<inttypes.h>): Include if HAVE_INTTYPES_H.Jim Meyering
("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.
1997-11-30(<inttypes.h>): Include if HAVE_INTTYPES_H.Jim Meyering
("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.
1997-11-30(<inttypes.h>): Include if HAVE_INTTYPES_H.Jim Meyering
(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.
1997-11-30(copy_reg): Store file size as off_t, not long.Jim Meyering
Do not assume st_size has been normalized to 512 byte blocks, or that it fits in size_t after dividing by the blocksize.
1997-11-30(<limits.h>, UINT_MAX, UINT_MAX): Remove; nowJim Meyering
done by system.h.
1997-11-30(mempcpy): remove static inline functionJim Meyering
1997-11-24move big chunk of defs to sys2Jim Meyering
1997-11-24*** empty log message ***Jim Meyering
1997-11-19.Jim Meyering
1997-11-19(hash_pjw): Don't use ANSI `U' suffix. Cast instead.Jim Meyering
1997-11-15(mempcpy): Remove definition.Jim Meyering
1997-11-12[!HAVE_MEMPCPY] (mempcpy): Define here instead.Jim Meyering
1997-11-12[!HAVE_MEMPCPY] (mempcpy): Define.Jim Meyering
1997-11-12(copy_dir): Use path_concat rather than open-coding it.Jim Meyering
1997-11-12[!HAVE_MEMPCPY] (mempcpy): Define.Jim Meyering
(batch_convert): Use mempcpy rather than stpcpy.
1997-11-08(fseeko): Define a stub if ! HAVE_FSEEKO.Jim Meyering
(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.
1997-11-08(keycompare): call alloca(0) after each iterationJim Meyering
1997-11-08use 2 mempcpy instead of two memcpy callsJim Meyering
1997-11-06(getmonth): Remove HAVE_ALLOCA #ifdefs.Jim Meyering
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'.
1997-11-03(main): New option, --max-line-length (-L).Jim Meyering
(wc, write_counts): Implement it. From Bruno Haible.
1997-11-03Put cycle-detecting code inside anJim Meyering
#ifdef ENABLE_CYCLE_CHECK, for systems lacking d_ino. [D_INO_IN_DIRENT]: Define ENABLE_CYCLE_CHECK. (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-28Guard cycle-detecting code inside #ifdef ENABLE_CYCLE_CHECK.Jim Meyering
[D_INO_IN_DIRENT]: Define ENABLE_CYCLE_CHECK.
1997-10-27fix typo in commentJim Meyering
1997-10-26(NLS_STRNCMP) [!ENABLE_NLS]: s/strcmp/strncmp/Jim Meyering
1997-10-25Remove old-style xmalloc and xrealloc decls.Jim Meyering
1997-10-25Remove old-style xmalloc and xrealloc decls.Jim Meyering
1997-10-25Include xalloc.h.Jim Meyering
Remove dcls of xmalloc, xcalloc and xrealloc.
1997-10-25s/xmalloc_exit_failure/xalloc_exit_failureJim Meyering
1997-10-25Remove old-style xmalloc and xrealloc decls.Jim Meyering
1997-10-25Remove old-style xmalloc and xrealloc decls.Jim Meyering
(add_tabstop): Cast first arg of xrealloc to char*.
1997-10-25Include xalloc.h.Jim Meyering
(xmalloc): Remove function. (xrealloc): Remove function. (main): Set xalloc_fail_func to cleanup. Set xmalloc_exit_failure SORT_FAILURE.
1997-10-25Remove old-style xmalloc and xrealloc decls.Jim Meyering
(paste_parallel): Cast first arg of xrealloc to char*.
1997-10-25Remove old-style xmalloc and xrealloc decls.Jim Meyering
(decode_format_string): Cast first arg of xrealloc to char*.
1997-10-25Remove old-style xmalloc and xrealloc decls.Jim Meyering
(add_tabstop): Cast first arg of xrealloc to char*.
1997-10-25Include xalloc.h.Jim Meyering
(xmalloc): Remove function. (xrealloc): Remove function. (main): Set xalloc_fail_func to cleanup.
1997-10-25(ADD_RANGE_PAIR): Cast first arg of xrealloc to char*.Jim Meyering
(getstr): Cast xmalloc return value to char*. (xmalloc): Remove decl. (xrealloc): Remove decl.
1997-10-23[!HAVE_DECLARATION_FREE]: Declare free.Jim Meyering
[!HAVE_DECLARATION_MALLOC]: Declare malloc. [!HAVE_DECLARATION_REALLOC]: Declare realloc. [!HAVE_DECLARATION_STPCPY]: Declare stpcpy. [!HAVE_DECLARATION_STRSTR]: Declare strstr.
1997-10-23Remove stpcpy decl.Jim Meyering
Remove free, malloc, and realloc decls.
1997-10-23Remove free and malloc decls.Jim Meyering
1997-10-23Remove stpcpy decl.Jim Meyering
Remove free and malloc decls.
1997-10-23Remove stpcpy decl.Jim Meyering