Commit Graph
11405 Commits
Author SHA1 Message Date
Jim Meyering dea4390e10 . 2001-08-31 10:04:15 +00:00
Jim Meyering d77adba2d7 *** empty log message *** 2001-08-31 09:55:52 +00:00
Jim Meyering b6c2910a61 (bool): Remove typedef, now that it's in system.h.
(TRUE): Define to `true', not 1.
(FALSE): Define to `false', not 0.
2001-08-31 09:55:26 +00:00
Jim Meyering 023c594b9b *** empty log message *** 2001-08-31 09:45:04 +00:00
Jim Meyering d50c8903f9 *** empty log message *** 2001-08-31 09:39:22 +00:00
Jim Meyering b51a19058f Include strtoimax.c, not strtouxmax.c. 2001-08-31 09:39:10 +00:00
Jim Meyering c1845ef979 Renamed from strtoxmax.c, removing the old strtoimax.c.
Also, make the following further changes to make this file's
configuration more similar to that of strtol.c:
(UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
(strtoumax, uintmax_t, strtoull, strtol): Remove.
(intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
(strtoimax): Renamed from strtoumax.  All uses of unsigned values
changed to signed values.

And make the following changes as well:
Fix copyright notice, as 1999 was missing.
(verify): New macro.
(strtoimax): Check sizes at compile-time, not run-time.
Prefer strtol to strtoll if both work.
(main): Remove; it was not that useful and was a pain to maintain.
2001-08-31 09:37:58 +00:00
Jim Meyering ed3076c1e3 . 2001-08-31 09:30:02 +00:00
Jim Meyering 436ab156b1 (libfetish_a_SOURCES): Remove strtoxmax.c. 2001-08-31 09:29:44 +00:00
Jim Meyering ca9bd98b2a (copy_dir): Remove st_size argument. 2001-08-31 09:19:40 +00:00
Jim Meyering b20df0057f (count_entry): Remove st_size argument. 2001-08-31 09:18:13 +00:00
Jim Meyering d7c291117c (change_dir_mode): Remove statp arg; no longer needed. 2001-08-31 09:16:54 +00:00
Jim Meyering 56478b94ae (change_dir_owner): Remove statp arg; no longer needed. 2001-08-31 09:15:59 +00:00
Jim Meyering 3b7a24cc92 Do not include savedir.h; not used. 2001-08-31 09:11:04 +00:00
Jim Meyering 2c63fed0e8 (savedir): Remove size parameter, as POSIX says that
a directory's st_size can have an arbitrary value, so the old
usage could waste an arbitrary amount of memory.  All uses
changed.
2001-08-31 09:09:53 +00:00
Jim Meyering fab23e172d Update prototype. 2001-08-31 09:09:35 +00:00
Jim Meyering 45f197087d *** empty log message *** 2001-08-31 08:18:06 +00:00
Jim Meyering 2fb1f177d9 (strtoimax): New decl. 2001-08-31 08:17:45 +00:00
Jim Meyering dc1f8d9a16 *** empty log message *** 2001-08-31 08:16:12 +00:00
Jim Meyering 2adb484d90 * lib/xstrtol.h: Add copyright notice.
(_DECLARE_XSTRTOL): Improve quality of diagnostic for
LONGINT_INVALID_SUFFIX_CHAR.
2001-08-31 08:15:10 +00:00
Jim Meyering 46abc467c6 *** empty log message *** 2001-08-31 07:52:28 +00:00
Jim Meyering b1828eec81 BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared. 2001-08-31 07:51:13 +00:00
Jim Meyering a6ad856b3b *** empty log message *** 2001-08-31 07:49:54 +00:00
Jim Meyering 8a7b2f0191 Remove '2001' from copyright notice. 2001-08-31 07:49:39 +00:00
Jim Meyering 06392556ec *** empty log message *** 2001-08-31 07:46:38 +00:00
Jim Meyering 222973731a Include full-write.h.
(full_write): Remove decl; not needed.
2001-08-31 07:46:28 +00:00
Jim Meyering 30cc300814 copyright 2001-08-31 07:45:28 +00:00
Jim Meyering 722e2f0957 Include full-write.h.
(full_write): Remove decl; not needed.
(simple_cat, cat): Don't assume read and write size fits in int.
2001-08-31 07:45:12 +00:00
Jim Meyering 4f982cb6f5 *** empty log message *** 2001-08-31 07:42:37 +00:00
Jim Meyering 3f25540d1e (full_write): Remove decl; not needed. 2001-08-31 07:42:30 +00:00
Jim Meyering 7de89daf4d *** empty log message *** 2001-08-31 07:37:47 +00:00
Jim Meyering 4337731793 copyright 2001-08-31 07:35:47 +00:00
Jim Meyering 04b726d04d Include full-write.h. 2001-08-31 07:35:37 +00:00
Jim Meyering 16dc8023ae *** empty log message *** 2001-08-31 07:34:41 +00:00
Jim Meyering c8ef0d4bbe (libfetish_a_SOURCES): Add full-write.h. 2001-08-31 07:34:13 +00:00
Jim Meyering aee944ad9b Correct credits, as cccp.c no longer
exists and anyway it was so heavily changed from the old cccp
code as to be unrecognizable.  Include full-write.h.
(full_write) Return size_t, with short writes meaning failure.
All callers changed.  This fixes a bug with large buffers
on 64-bit hosts.
2001-08-31 07:29:05 +00:00
Jim Meyering 63f570d12b (full_write): Remove decl; not needed. 2001-08-31 07:22:06 +00:00
Jim Meyering 109d7b4386 (full_write): Remove decl; not needed. 2001-08-31 07:21:23 +00:00
Jim Meyering 34db7168de Include full-write.h.
(full_write): Remove decl; not needed.
(open_fd): Don't assume read and write size fits in int.
2001-08-31 07:19:24 +00:00
Jim Meyering b62d5afd3f Include full-write.h.
(full_write): Remove decl; not needed.
(copy_reg): Don't assume read and write size fits in int.
2001-08-31 07:15:14 +00:00
Jim Meyering ab0bba9958 *** empty log message *** 2001-08-31 07:05:14 +00:00
Jim Meyering e4676fbb20 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
(jm_PREREQ_EXCLUDE): New macro.
2001-08-31 07:05:08 +00:00
Jim Meyering fd90d8dbf8 * src/remove.c: Move true/false definitions and include from here...
* src/system.h: ...to here.
2001-08-31 06:50:44 +00:00
Jim Meyering edbe4553a8 copyright 2001-08-31 06:46:52 +00:00
Jim Meyering 0e18bbb519 (count_entry, main): Reflect changes to the exclude functions. 2001-08-31 06:46:39 +00:00
Jim Meyering 473f37a6c9 *** empty log message *** 2001-08-31 06:35:13 +00:00
Jim Meyering 90525ea340 (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): New macros.
(free_exclude): New decl.
(add_exclude, add_exclude_file): Now takes int options arg.
(excluded_filename): No longer requires options arg, as the options
are determined by add_exclude.  Now returns bool, not int.
2001-08-31 06:34:06 +00:00
Jim Meyering 083a5e420b Merge 'exclude' changes from tar 1.13.22.
This fixes one or two unlikely storage allocation overflow bugs,
but doesn't change user-visible behavior otherwise.

(bool): Declare, perhaps by including stdbool.h.
(<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
(<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
Include	if available.
(<xalloc.h>): Include
(SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
(verify): New macro.  Use it to verify that EXCLUDE macros do not
collide with FNM macros.
(struct patopts): New struct.
(struct exclude): Use it, as exclude patterns now come with options.
(new_exclude): Support above changes.
(new_exclude, add_exclude_file):
Initial size must now be a power of two to simplify overflow checking.
(free_exclude, fnmatch_no_wildcards): New function.
(excluded_filename): No longer requires options arg, as the options
are determined by add_exclude.  Now returns bool, not int.
(excluded_filename, add_exclude):
Add support for the fancy new exclusion options.
(add_exclude, add_exclude_file): Now takes int options arg.
Check for arithmetic overflow when computing sizes.
(add_exclude_file): xrealloc might modify errno, so don't
realloc until after errno might be used.
2001-08-31 06:33:42 +00:00
Jim Meyering 0f165cf273 *** empty log message *** 2001-08-30 19:19:10 +00:00
Jim Meyering 3b57acb098 (alloca): Arg is of type size_t, not unsigned. 2001-08-30 19:19:02 +00:00