Jim Meyering [Fri, 31 Aug 2001 07:46:28 +0000 (07:46 +0000)]
Include full-write.h.
(full_write): Remove decl; not needed.
Jim Meyering [Fri, 31 Aug 2001 07:45:28 +0000 (07:45 +0000)]
copyright
Jim Meyering [Fri, 31 Aug 2001 07:45:12 +0000 (07:45 +0000)]
Include full-write.h.
(full_write): Remove decl; not needed.
(simple_cat, cat): Don't assume read and write size fits in int.
Jim Meyering [Fri, 31 Aug 2001 07:42:37 +0000 (07:42 +0000)]
*** empty log message ***
Jim Meyering [Fri, 31 Aug 2001 07:42:30 +0000 (07:42 +0000)]
(full_write): Remove decl; not needed.
Jim Meyering [Fri, 31 Aug 2001 07:37:47 +0000 (07:37 +0000)]
*** empty log message ***
Jim Meyering [Fri, 31 Aug 2001 07:35:47 +0000 (07:35 +0000)]
copyright
Jim Meyering [Fri, 31 Aug 2001 07:35:37 +0000 (07:35 +0000)]
Include full-write.h.
Jim Meyering [Fri, 31 Aug 2001 07:34:41 +0000 (07:34 +0000)]
*** empty log message ***
Jim Meyering [Fri, 31 Aug 2001 07:34:13 +0000 (07:34 +0000)]
(libfetish_a_SOURCES): Add full-write.h.
Jim Meyering [Fri, 31 Aug 2001 07:29:05 +0000 (07:29 +0000)]
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.
Jim Meyering [Fri, 31 Aug 2001 07:22:06 +0000 (07:22 +0000)]
(full_write): Remove decl; not needed.
Jim Meyering [Fri, 31 Aug 2001 07:21:23 +0000 (07:21 +0000)]
(full_write): Remove decl; not needed.
Jim Meyering [Fri, 31 Aug 2001 07:19:24 +0000 (07:19 +0000)]
Include full-write.h.
(full_write): Remove decl; not needed.
(open_fd): Don't assume read and write size fits in int.
Jim Meyering [Fri, 31 Aug 2001 07:15:14 +0000 (07:15 +0000)]
Include full-write.h.
(full_write): Remove decl; not needed.
(copy_reg): Don't assume read and write size fits in int.
Jim Meyering [Fri, 31 Aug 2001 07:05:14 +0000 (07:05 +0000)]
*** empty log message ***
Jim Meyering [Fri, 31 Aug 2001 07:05:08 +0000 (07:05 +0000)]
(jm_PREREQ): Add jm_PREREQ_EXCLUDE.
(jm_PREREQ_EXCLUDE): New macro.
Jim Meyering [Fri, 31 Aug 2001 06:50:44 +0000 (06:50 +0000)]
* src/remove.c: Move true/false definitions and include from here...
* src/system.h: ...to here.
Jim Meyering [Fri, 31 Aug 2001 06:46:52 +0000 (06:46 +0000)]
copyright
Jim Meyering [Fri, 31 Aug 2001 06:46:39 +0000 (06:46 +0000)]
(count_entry, main): Reflect changes to the exclude functions.
Jim Meyering [Fri, 31 Aug 2001 06:35:13 +0000 (06:35 +0000)]
*** empty log message ***
Jim Meyering [Fri, 31 Aug 2001 06:34:06 +0000 (06:34 +0000)]
(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.
Jim Meyering [Fri, 31 Aug 2001 06:33:42 +0000 (06:33 +0000)]
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.
Jim Meyering [Thu, 30 Aug 2001 19:19:10 +0000 (19:19 +0000)]
*** empty log message ***
Jim Meyering [Thu, 30 Aug 2001 19:19:02 +0000 (19:19 +0000)]
(alloca): Arg is of type size_t, not unsigned.
Jim Meyering [Tue, 28 Aug 2001 08:33:05 +0000 (08:33 +0000)]
*** empty log message ***
Jim Meyering [Tue, 28 Aug 2001 08:32:51 +0000 (08:32 +0000)]
(main): Diagnose an invalid width option.
Jim Meyering [Tue, 28 Aug 2001 08:18:29 +0000 (08:18 +0000)]
*** empty log message ***
Jim Meyering [Tue, 28 Aug 2001 08:18:19 +0000 (08:18 +0000)]
(main): Correct the diagnostic for invalid argument to -w.
Jim Meyering [Mon, 27 Aug 2001 21:25:15 +0000 (21:25 +0000)]
#define STRTOUXMAX_UNSIGNED
Jim Meyering [Mon, 27 Aug 2001 21:24:59 +0000 (21:24 +0000)]
whoops. Don't define anything here. imax is the default
Jim Meyering [Mon, 27 Aug 2001 08:56:01 +0000 (08:56 +0000)]
*** empty log message ***
Jim Meyering [Mon, 27 Aug 2001 08:55:54 +0000 (08:55 +0000)]
Undo last change. Instead, simply remove `N_('.
Jim Meyering [Mon, 27 Aug 2001 08:55:04 +0000 (08:55 +0000)]
.
Jim Meyering [Mon, 27 Aug 2001 08:54:19 +0000 (08:54 +0000)]
remove xstrtoxmax.c
Jim Meyering [Mon, 27 Aug 2001 08:52:46 +0000 (08:52 +0000)]
*** empty log message ***
Jim Meyering [Mon, 27 Aug 2001 08:52:40 +0000 (08:52 +0000)]
(libfetish_a_SOURCES): Add strtoxmax.c
Jim Meyering [Mon, 27 Aug 2001 08:50:19 +0000 (08:50 +0000)]
Actually remove the definition of N_.
Jim Meyering [Mon, 27 Aug 2001 08:50:04 +0000 (08:50 +0000)]
(N_): Remove definition.
Revert most of last change.
Instead, simply don't mark the `Copyright...' string for translation.
Based on advice from Paul Eggert.
Jim Meyering [Mon, 27 Aug 2001 08:46:16 +0000 (08:46 +0000)]
*** empty log message ***
Jim Meyering [Mon, 27 Aug 2001 08:46:08 +0000 (08:46 +0000)]
Tweak comment.
Jim Meyering [Mon, 27 Aug 2001 08:44:27 +0000 (08:44 +0000)]
include strtoxmax.c
Jim Meyering [Mon, 27 Aug 2001 08:43:54 +0000 (08:43 +0000)]
renamed to strtoxmax.c
Jim Meyering [Mon, 27 Aug 2001 08:31:30 +0000 (08:31 +0000)]
renamed from strtouxmax.c
Jim Meyering [Sun, 26 Aug 2001 18:27:00 +0000 (18:27 +0000)]
(copyright-check): Update to reflect fact that
the copyright year is now defined separately.
Jim Meyering [Sun, 26 Aug 2001 18:26:49 +0000 (18:26 +0000)]
*** empty log message ***
Jim Meyering [Sun, 26 Aug 2001 18:26:01 +0000 (18:26 +0000)]
(version_etc_copyright_fmt): Replace literal year
of copyright with `%s' so translators don't get an untranslated message in 2002.
(COPYRIGHT_YEAR): Define.
(version_etc): Use fprintf rather than fputs.
Jim Meyering [Sun, 26 Aug 2001 10:54:59 +0000 (10:54 +0000)]
.
Jim Meyering [Sun, 26 Aug 2001 10:46:20 +0000 (10:46 +0000)]
.
Jim Meyering [Sun, 26 Aug 2001 10:43:53 +0000 (10:43 +0000)]
.
Jim Meyering [Sun, 26 Aug 2001 10:43:00 +0000 (10:43 +0000)]
.
Jim Meyering [Sun, 26 Aug 2001 10:42:50 +0000 (10:42 +0000)]
Add xstrtoimax.
Jim Meyering [Sun, 26 Aug 2001 10:41:57 +0000 (10:41 +0000)]
*** empty log message ***
Jim Meyering [Sun, 26 Aug 2001 10:41:52 +0000 (10:41 +0000)]
(libfetish_a_SOURCES): Add xstrtoimax.c.
Jim Meyering [Sun, 26 Aug 2001 07:33:20 +0000 (07:33 +0000)]
.
Jim Meyering [Sun, 26 Aug 2001 07:28:44 +0000 (07:28 +0000)]
*** empty log message ***
Jim Meyering [Sun, 26 Aug 2001 07:28:06 +0000 (07:28 +0000)]
New file, from GNU libc.
Jim Meyering [Sun, 26 Aug 2001 07:20:57 +0000 (07:20 +0000)]
*** empty log message ***
Jim Meyering [Sun, 26 Aug 2001 07:20:50 +0000 (07:20 +0000)]
Require jm_AC_PREREQ_XSTRTOIMAX.
Jim Meyering [Sun, 26 Aug 2001 07:20:05 +0000 (07:20 +0000)]
resync with xstrtoumax.m4
Jim Meyering [Sun, 26 Aug 2001 07:19:43 +0000 (07:19 +0000)]
bump serial number
Jim Meyering [Sun, 26 Aug 2001 07:19:28 +0000 (07:19 +0000)]
Add comments explaining why we AC_REPLACE_FUNCS(strtol).
Jim Meyering [Sun, 26 Aug 2001 07:06:48 +0000 (07:06 +0000)]
*** empty log message ***
Jim Meyering [Sun, 26 Aug 2001 07:03:32 +0000 (07:03 +0000)]
*** empty log message ***
Jim Meyering [Sun, 26 Aug 2001 07:03:07 +0000 (07:03 +0000)]
*** empty log message ***
Jim Meyering [Sun, 26 Aug 2001 07:00:08 +0000 (07:00 +0000)]
Stub. Just #define STRTOUXMAX_SIGNED, then
#include "strtouxmax.c"
Jim Meyering [Sun, 26 Aug 2001 06:59:12 +0000 (06:59 +0000)]
Now this file is just a stub.
Jim Meyering [Sun, 26 Aug 2001 06:58:10 +0000 (06:58 +0000)]
Renamed from a factored strtoumax.c.
Jim Meyering [Sun, 26 Aug 2001 06:53:56 +0000 (06:53 +0000)]
Factored to work both for unsigned and signed types, ...
Jim Meyering [Sun, 26 Aug 2001 06:51:25 +0000 (06:51 +0000)]
*** empty log message ***
Jim Meyering [Sun, 26 Aug 2001 06:51:10 +0000 (06:51 +0000)]
(mergefps): Do not allocate at least sort_size bytes for each merge buffer.
Instead, allocate at least sort_size bytes total.
Jim Meyering [Sun, 26 Aug 2001 05:42:40 +0000 (05:42 +0000)]
.
Jim Meyering [Sun, 26 Aug 2001 05:41:35 +0000 (05:41 +0000)]
*** empty log message ***
Jim Meyering [Sun, 26 Aug 2001 05:40:46 +0000 (05:40 +0000)]
(nextarg): Use strcoll, not strcmp.
Jim Meyering [Sun, 26 Aug 2001 05:39:37 +0000 (05:39 +0000)]
expr now uses LC_COLLATE for string comparison, as per POSIX.
Jim Meyering [Sat, 25 Aug 2001 17:24:16 +0000 (17:24 +0000)]
.
Jim Meyering [Sat, 25 Aug 2001 17:14:46 +0000 (17:14 +0000)]
.
Jim Meyering [Sat, 25 Aug 2001 17:13:45 +0000 (17:13 +0000)]
*** empty log message ***
Jim Meyering [Sat, 25 Aug 2001 17:13:30 +0000 (17:13 +0000)]
*** empty log message ***
Jim Meyering [Sat, 25 Aug 2001 17:13:23 +0000 (17:13 +0000)]
Use @option, rather than @samp everywhere.
Jim Meyering [Sat, 25 Aug 2001 15:11:00 +0000 (15:11 +0000)]
*** empty log message ***
Jim Meyering [Sat, 25 Aug 2001 15:10:53 +0000 (15:10 +0000)]
Re-enable some commented-out tests.
Jim Meyering [Sat, 25 Aug 2001 15:09:36 +0000 (15:09 +0000)]
*** empty log message ***
Jim Meyering [Sat, 25 Aug 2001 15:09:31 +0000 (15:09 +0000)]
(main): Fix a typo in the previous patch: missing
a bounds check for examples like `uniq a b c'.
Jim Meyering [Sat, 25 Aug 2001 15:07:17 +0000 (15:07 +0000)]
(main): Fix some more incompatibilities with POSIX.2,
(e.g. `uniq +3 --' did not work) by invoking getopt_long with
leading '-', resembling what was done to 'sort' on 2001-03-20.
Recognize an +N option only if it is an integer in range, and
(if POSIXLY_CORRECT) only if a file name argument has not been seen;
otherwise silently treat it as a file name.
If the user specifies too many operands, output the first one
in the error message, as a diagnostic aid.
Jim Meyering [Sat, 25 Aug 2001 13:50:47 +0000 (13:50 +0000)]
*** empty log message ***
Jim Meyering [Sat, 25 Aug 2001 13:50:41 +0000 (13:50 +0000)]
(main): Don't report an error when given the valid options `+3 -d'.
Jim Meyering [Sat, 25 Aug 2001 09:23:34 +0000 (09:23 +0000)]
.
Jim Meyering [Sat, 25 Aug 2001 09:20:14 +0000 (09:20 +0000)]
*** empty log message ***
Jim Meyering [Sat, 25 Aug 2001 09:19:59 +0000 (09:19 +0000)]
(different): Don't assume that lengths can fit
into size_t. Tune code for the common case where the line
lengths differ: we avoid comparing them entirely in that case.
Jim Meyering [Sat, 25 Aug 2001 09:04:57 +0000 (09:04 +0000)]
*** empty log message ***
Jim Meyering [Sat, 25 Aug 2001 09:04:54 +0000 (09:04 +0000)]
Add tests for -s 0 and -w 0.
Jim Meyering [Sat, 25 Aug 2001 09:04:33 +0000 (09:04 +0000)]
*** empty log message ***
Jim Meyering [Sat, 25 Aug 2001 07:33:39 +0000 (07:33 +0000)]
*** empty log message ***
Jim Meyering [Sat, 25 Aug 2001 07:33:20 +0000 (07:33 +0000)]
Remove arbitrary restrictions on sizes, fixing a bug reported
by Geoff Whale.
(skip_fields, skip_chars, check_chars): Now size_t, not int.
(size_opt): New function. Do not arbitrarily reject size zero.
Change the wording of the error message slightly, for convenience.
(find_field): Use size_t, not int, to compute sizes.
(different, main): check_chars==0 is no longer a special case, as
it defaults to SIZE_MAX.
(main): Check for overflow with args like -
234234234234234.
Use 'size_opt' to convert optional arguments to sizes.
Jim Meyering [Sat, 25 Aug 2001 05:48:19 +0000 (05:48 +0000)]
Add new test, #54, for the just-fixed bug.
Jim Meyering [Sat, 25 Aug 2001 05:42:53 +0000 (05:42 +0000)]
*** empty log message ***
Jim Meyering [Sat, 25 Aug 2001 05:42:46 +0000 (05:42 +0000)]
(find_field): Don't count trailing newline to be
part of the field. This disagrees with POSIX.2, but it's
gotta be a bug in the standard. An interpretations request
has been submitted to PASC.
Jim Meyering [Sat, 25 Aug 2001 05:42:07 +0000 (05:42 +0000)]
*** empty log message ***
Jim Meyering [Fri, 24 Aug 2001 08:48:21 +0000 (08:48 +0000)]
(cut invocation): Document how cut treats lines with no separators.