platform/upstream/coreutils.git
26 years agoremove trailing blank
Jim Meyering [Sun, 30 Nov 1997 11:15:27 +0000 (11:15 +0000)]
remove trailing blank

26 years agoremove trailing blank
Jim Meyering [Sun, 30 Nov 1997 11:15:02 +0000 (11:15 +0000)]
remove trailing blank

26 years ago*** empty log message ***
Jim Meyering [Sun, 30 Nov 1997 11:13:34 +0000 (11:13 +0000)]
*** empty log message ***

26 years ago.
Jim Meyering [Sun, 30 Nov 1997 11:13:18 +0000 (11:13 +0000)]
.

26 years ago(human_readable): Convert to ANSI-style definition.
Jim Meyering [Sun, 30 Nov 1997 11:10:24 +0000 (11:10 +0000)]
(human_readable): Convert to ANSI-style definition.
[lint]: Define `power'.

26 years agofilter through cppi
Jim Meyering [Sun, 30 Nov 1997 11:08:39 +0000 (11:08 +0000)]
filter through cppi

26 years ago.
Jim Meyering [Sun, 30 Nov 1997 11:08:23 +0000 (11:08 +0000)]
.

26 years ago(print_long_format): Rename inner-scoped `buf' arrays to `hbuf'
Jim Meyering [Sun, 30 Nov 1997 11:07:49 +0000 (11:07 +0000)]
(print_long_format): Rename inner-scoped `buf' arrays to `hbuf'
to avoid shadowing local.

26 years ago(change_dir_owner): Cast st_size arg to unsigned int in savedir call.
Jim Meyering [Sun, 30 Nov 1997 11:05:34 +0000 (11:05 +0000)]
(change_dir_owner): Cast st_size arg to unsigned int in savedir call.

26 years ago(change_dir_mode): Cast st_size arg to unsigned int in savedir call.
Jim Meyering [Sun, 30 Nov 1997 11:05:10 +0000 (11:05 +0000)]
(change_dir_mode): Cast st_size arg to unsigned int in savedir call.

26 years ago(full_filename): Use memcpy, not mempcpy when not using the return value.
Jim Meyering [Sun, 30 Nov 1997 11:02:47 +0000 (11:02 +0000)]
(full_filename): Use memcpy, not mempcpy when not using the return value.

26 years agofilter through cppi
Jim Meyering [Sun, 30 Nov 1997 11:01:54 +0000 (11:01 +0000)]
filter through cppi

26 years ago(<limits.h>): Include if HAVE_LIMITS_H.
Jim Meyering [Sun, 30 Nov 1997 10:25:21 +0000 (10:25 +0000)]
(<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.

26 years ago(<inttypes.h>): Include if HAVE_INTTYPES_H.
Jim Meyering [Sun, 30 Nov 1997 10:25:16 +0000 (10:25 +0000)]
(<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.

26 years ago(BITSPERBYTE): Remove.
Jim Meyering [Sun, 30 Nov 1997 10:25:11 +0000 (10:25 +0000)]
(BITSPERBYTE): Remove.
(UID_T_MAX, GID_T_MAX): Define in terms of TYPE_MAXIMUM.

26 years ago(<inttypes.h>): Include if HAVE_INTTYPES_H.
Jim Meyering [Sun, 30 Nov 1997 10:25:07 +0000 (10:25 +0000)]
(<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.

26 years ago(<inttypes.h>): Include if HAVE_INTTYPES_H.
Jim Meyering [Sun, 30 Nov 1997 10:25:02 +0000 (10:25 +0000)]
(<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.

26 years ago(<inttypes.h>): Include if HAVE_INTTYPES_H.
Jim Meyering [Sun, 30 Nov 1997 10:24:58 +0000 (10:24 +0000)]
(<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.

26 years ago(<inttypes.h>): Include if HAVE_INTTYPES_H.
Jim Meyering [Sun, 30 Nov 1997 10:24:54 +0000 (10:24 +0000)]
(<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.

26 years ago(copy_reg): Store file size as off_t, not long.
Jim Meyering [Sun, 30 Nov 1997 10:24:50 +0000 (10:24 +0000)]
(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.

26 years ago(<limits.h>, UINT_MAX, UINT_MAX): Remove; now
Jim Meyering [Sun, 30 Nov 1997 10:24:45 +0000 (10:24 +0000)]
(<limits.h>, UINT_MAX, UINT_MAX): Remove; now
done by system.h.

26 years ago(savedir): Check for size zero before invoking
Jim Meyering [Sun, 30 Nov 1997 10:24:41 +0000 (10:24 +0000)]
(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.

26 years ago(getuidbyname, getgidbyname): Names can now
Jim Meyering [Sun, 30 Nov 1997 10:24:38 +0000 (10:24 +0000)]
(getuidbyname, getgidbyname): Names can now
be NULL in cache.  This change merely fixes ifdeffed-out code.

26 years agoNew file. The interface is inspired
Jim Meyering [Sun, 30 Nov 1997 10:24:32 +0000 (10:24 +0000)]
New file.  The interface is inspired
by the human_readable function that was in du.c, but it's pretty
much rewritten from scratch.

26 years ago(struct fs_usage): New member fsu_blocksize.
Jim Meyering [Sun, 30 Nov 1997 10:24:28 +0000 (10:24 +0000)]
(struct fs_usage): New member fsu_blocksize.
Other members are now uintmax_t, not long.

26 years agoDo all calculations using uintmax_t.
Jim Meyering [Sun, 30 Nov 1997 10:24:24 +0000 (10:24 +0000)]
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.

26 years ago(st_blocks): long -> off_t.
Jim Meyering [Sun, 30 Nov 1997 10:24:20 +0000 (10:24 +0000)]
(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.

26 years ago(libfu_a_SOURCES): Add new file human.c.
Jim Meyering [Sun, 30 Nov 1997 10:24:16 +0000 (10:24 +0000)]
(libfu_a_SOURCES): Add new file human.c.
(noinst_HEADERS): Add new file human.h.

26 years ago.
Jim Meyering [Sun, 30 Nov 1997 08:32:44 +0000 (08:32 +0000)]
.

26 years ago(mempcpy): remove static inline function
Jim Meyering [Sun, 30 Nov 1997 07:34:12 +0000 (07:34 +0000)]
(mempcpy): remove static inline function

26 years ago.
Jim Meyering [Sat, 29 Nov 1997 18:05:14 +0000 (18:05 +0000)]
.

26 years ago*** empty log message ***
Jim Meyering [Mon, 24 Nov 1997 14:25:52 +0000 (14:25 +0000)]
*** empty log message ***

26 years agoalso test for stdlib.h
Jim Meyering [Mon, 24 Nov 1997 14:21:16 +0000 (14:21 +0000)]
also test for stdlib.h
don't use STDC_HEADERS in ifdef for stdlib.h

26 years agomove big chunk of defs to sys2
Jim Meyering [Mon, 24 Nov 1997 14:19:32 +0000 (14:19 +0000)]
move big chunk of defs to sys2

26 years ago*** empty log message ***
Jim Meyering [Mon, 24 Nov 1997 12:57:50 +0000 (12:57 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Jim Meyering [Mon, 24 Nov 1997 12:53:29 +0000 (12:53 +0000)]
*** empty log message ***

26 years ago.
Jim Meyering [Wed, 19 Nov 1997 18:59:48 +0000 (18:59 +0000)]
.

26 years ago(hash_pjw): Don't use ANSI `U' suffix. Cast instead.
Jim Meyering [Wed, 19 Nov 1997 18:59:02 +0000 (18:59 +0000)]
(hash_pjw): Don't use ANSI `U' suffix.  Cast instead.

26 years agoadd PARAMS around prototype lists
Jim Meyering [Wed, 19 Nov 1997 18:57:40 +0000 (18:57 +0000)]
add PARAMS around prototype lists

26 years ago.
Jim Meyering [Wed, 19 Nov 1997 18:55:53 +0000 (18:55 +0000)]
.

26 years agorevert a mempcpy to memcpy
Jim Meyering [Wed, 19 Nov 1997 18:55:31 +0000 (18:55 +0000)]
revert a mempcpy to memcpy

26 years ago(AUTOMAKE_OPTIONS): Use ansi2knr so *I* don't
Jim Meyering [Wed, 19 Nov 1997 15:04:15 +0000 (15:04 +0000)]
(AUTOMAKE_OPTIONS): Use ansi2knr so *I* don't
have to convert my hash package to use k&r C.

26 years ago*** empty log message ***
Jim Meyering [Tue, 18 Nov 1997 03:47:06 +0000 (03:47 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Jim Meyering [Tue, 18 Nov 1997 03:32:19 +0000 (03:32 +0000)]
*** empty log message ***

26 years ago(_REENTRANT): #define, as some hosts need this to declare localtime_r properly.
Jim Meyering [Tue, 18 Nov 1997 03:32:00 +0000 (03:32 +0000)]
(_REENTRANT): #define, as some hosts need this to declare localtime_r properly.
From Paul Eggert.

26 years ago.
Jim Meyering [Tue, 18 Nov 1997 03:29:24 +0000 (03:29 +0000)]
.

26 years agoundef putenv
Jim Meyering [Mon, 17 Nov 1997 15:45:19 +0000 (15:45 +0000)]
undef putenv

26 years agoadd jm_ prefix to use of am_cv_func_working_mktime
Jim Meyering [Mon, 17 Nov 1997 15:13:41 +0000 (15:13 +0000)]
add jm_ prefix to use of am_cv_func_working_mktime
increment serial #

26 years ago.
Jim Meyering [Sun, 16 Nov 1997 15:28:23 +0000 (15:28 +0000)]
.

26 years ago.
Jim Meyering [Sun, 16 Nov 1997 15:27:52 +0000 (15:27 +0000)]
.

26 years ago.
Jim Meyering [Sat, 15 Nov 1997 19:58:19 +0000 (19:58 +0000)]
.

26 years ago.
Jim Meyering [Sat, 15 Nov 1997 19:54:47 +0000 (19:54 +0000)]
.

26 years ago*** empty log message ***
Jim Meyering [Sat, 15 Nov 1997 19:51:16 +0000 (19:51 +0000)]
*** empty log message ***

26 years agoinclude unistd.h
Jim Meyering [Sat, 15 Nov 1997 19:43:06 +0000 (19:43 +0000)]
include unistd.h

26 years ago.
Jim Meyering [Sat, 15 Nov 1997 17:19:48 +0000 (17:19 +0000)]
.

26 years agoremove fixup_null_alloc prototype
Jim Meyering [Sat, 15 Nov 1997 17:18:01 +0000 (17:18 +0000)]
remove fixup_null_alloc prototype

26 years ago(EXTRA_DIST): Add mktime.m4.
Jim Meyering [Sat, 15 Nov 1997 17:14:10 +0000 (17:14 +0000)]
(EXTRA_DIST): Add mktime.m4.

26 years ago.
Jim Meyering [Sat, 15 Nov 1997 17:13:23 +0000 (17:13 +0000)]
.

26 years ago*** empty log message ***
Jim Meyering [Sat, 15 Nov 1997 17:13:20 +0000 (17:13 +0000)]
*** empty log message ***

26 years agoRequire jm_AM_FUNC_MKTIME, not the one from automake.
Jim Meyering [Sat, 15 Nov 1997 17:13:02 +0000 (17:13 +0000)]
Require jm_AM_FUNC_MKTIME, not the one from automake.

26 years ago(mempcpy): Remove definition.
Jim Meyering [Sat, 15 Nov 1997 17:09:34 +0000 (17:09 +0000)]
(mempcpy): Remove definition.

26 years ago.
Jim Meyering [Sat, 15 Nov 1997 17:08:32 +0000 (17:08 +0000)]
.

26 years agoCheck for %F format.
Jim Meyering [Sat, 15 Nov 1997 13:17:15 +0000 (13:17 +0000)]
Check for %F format.
Add comments.

26 years ago(bigtime_test): New function from Paul Eggert to detect SunOS4.1.4's
Jim Meyering [Sat, 15 Nov 1997 05:41:02 +0000 (05:41 +0000)]
(bigtime_test): New function from Paul Eggert to detect SunOS4.1.4's
infinite looping mktime.
Portability tweaks from Paul Eggert.

26 years agoTemporarily add a copy of this file from the automake
Jim Meyering [Sat, 15 Nov 1997 05:28:04 +0000 (05:28 +0000)]
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.

26 years ago.
Jim Meyering [Sat, 15 Nov 1997 05:24:30 +0000 (05:24 +0000)]
.

26 years ago.
Jim Meyering [Thu, 13 Nov 1997 14:29:18 +0000 (14:29 +0000)]
.

26 years ago.
Jim Meyering [Thu, 13 Nov 1997 14:25:41 +0000 (14:25 +0000)]
.

26 years agoupdate from GNU libc
Jim Meyering [Thu, 13 Nov 1997 14:24:03 +0000 (14:24 +0000)]
update from GNU libc

26 years agoupdate from GNU libc
Jim Meyering [Thu, 13 Nov 1997 14:22:56 +0000 (14:22 +0000)]
update from GNU libc

26 years agopartial update from FSF -- use int, not size_t; 0, not NULL
Jim Meyering [Thu, 13 Nov 1997 14:21:02 +0000 (14:21 +0000)]
partial update from FSF -- use int, not size_t; 0, not NULL

26 years ago.
Jim Meyering [Thu, 13 Nov 1997 14:16:21 +0000 (14:16 +0000)]
.

26 years agoUpdate from FSF.
Jim Meyering [Thu, 13 Nov 1997 13:23:16 +0000 (13:23 +0000)]
Update from FSF.

26 years agoUpdate from FSF.
Jim Meyering [Thu, 13 Nov 1997 13:22:54 +0000 (13:22 +0000)]
Update from FSF.

26 years agoCheck for POSIX.2's %f format spec.
Jim Meyering [Thu, 13 Nov 1997 13:19:15 +0000 (13:19 +0000)]
Check for POSIX.2's %f format spec.

26 years agoadd -*-Makefile-*-
Jim Meyering [Wed, 12 Nov 1997 17:28:34 +0000 (17:28 +0000)]
add -*-Makefile-*-

26 years ago.
Jim Meyering [Wed, 12 Nov 1997 17:27:41 +0000 (17:27 +0000)]
.

26 years ago[!HAVE_MEMPCPY] (mempcpy): Define here instead.
Jim Meyering [Wed, 12 Nov 1997 17:21:54 +0000 (17:21 +0000)]
[!HAVE_MEMPCPY] (mempcpy): Define here instead.

26 years ago[!HAVE_MEMPCPY] (mempcpy): Define.
Jim Meyering [Wed, 12 Nov 1997 17:19:21 +0000 (17:19 +0000)]
[!HAVE_MEMPCPY] (mempcpy): Define.

26 years ago(copy_dir): Use path_concat rather than open-coding it.
Jim Meyering [Wed, 12 Nov 1997 17:18:55 +0000 (17:18 +0000)]
(copy_dir): Use path_concat rather than open-coding it.

26 years ago*** empty log message ***
Jim Meyering [Wed, 12 Nov 1997 16:28:53 +0000 (16:28 +0000)]
*** empty log message ***

26 years ago[!HAVE_MEMPCPY] (mempcpy): Define.
Jim Meyering [Wed, 12 Nov 1997 16:28:06 +0000 (16:28 +0000)]
[!HAVE_MEMPCPY] (mempcpy): Define.
(batch_convert): Use mempcpy rather than stpcpy.

26 years ago(path_concat): Use mempcpy, not stpcpy.
Jim Meyering [Wed, 12 Nov 1997 16:18:23 +0000 (16:18 +0000)]
(path_concat): Use mempcpy, not stpcpy.

26 years agoreturn memcpy result directly
Jim Meyering [Wed, 12 Nov 1997 16:11:17 +0000 (16:11 +0000)]
return memcpy result directly

26 years ago.
Jim Meyering [Mon, 10 Nov 1997 14:40:40 +0000 (14:40 +0000)]
.

26 years ago.
Jim Meyering [Mon, 10 Nov 1997 14:39:14 +0000 (14:39 +0000)]
.

26 years ago.
Jim Meyering [Mon, 10 Nov 1997 04:11:57 +0000 (04:11 +0000)]
.

26 years ago*** empty log message ***
Jim Meyering [Mon, 10 Nov 1997 03:53:45 +0000 (03:53 +0000)]
*** empty log message ***

26 years ago(jm_STRFTIME_PREREQS): Check for localtime_r.
Jim Meyering [Mon, 10 Nov 1997 03:52:47 +0000 (03:52 +0000)]
(jm_STRFTIME_PREREQS): Check for localtime_r.
(jm_FUNC_GNU_STRFTIME): Use new macro.
(jm_FUNC_STRFTIME): New macro.  Likewise.

26 years ago(jm_FUNC_MKTIME): Check for localtime_r.
Jim Meyering [Mon, 10 Nov 1997 03:52:33 +0000 (03:52 +0000)]
(jm_FUNC_MKTIME): Check for localtime_r.

26 years ago*** empty log message ***
Jim Meyering [Mon, 10 Nov 1997 03:31:27 +0000 (03:31 +0000)]
*** empty log message ***

26 years agoadd -*-Makefile-*- to first line
Jim Meyering [Sun, 9 Nov 1997 19:06:53 +0000 (19:06 +0000)]
add -*-Makefile-*- to first line

26 years agoadd -*-Makefile-*- to first line
Jim Meyering [Sun, 9 Nov 1997 19:06:31 +0000 (19:06 +0000)]
add -*-Makefile-*- to first line

26 years ago.
Jim Meyering [Sat, 8 Nov 1997 21:10:39 +0000 (21:10 +0000)]
.

26 years ago.
Jim Meyering [Sat, 8 Nov 1997 21:04:13 +0000 (21:04 +0000)]
.

26 years ago(EXTRA_DIST): Add lfs.m4.
Jim Meyering [Sat, 8 Nov 1997 21:02:34 +0000 (21:02 +0000)]
(EXTRA_DIST): Add lfs.m4.

26 years ago(fseeko): Define a stub if ! HAVE_FSEEKO.
Jim Meyering [Sat, 8 Nov 1997 21:02:01 +0000 (21:02 +0000)]
(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.

26 years ago.
Jim Meyering [Sat, 8 Nov 1997 20:42:52 +0000 (20:42 +0000)]
.

26 years ago*** empty log message ***
Jim Meyering [Sat, 8 Nov 1997 20:38:23 +0000 (20:38 +0000)]
*** empty log message ***

26 years ago(keycompare): call alloca(0) after each iteration
Jim Meyering [Sat, 8 Nov 1997 04:47:17 +0000 (04:47 +0000)]
(keycompare): call alloca(0) after each iteration