Paul Eggert [Thu, 6 Sep 2001 19:47:45 +0000 (19:47 +0000)]
(HAVE_LONG_LONG): Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
(strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
to work around bug in IBM C compiler.
Paul Eggert [Wed, 29 Aug 2001 21:37:27 +0000 (21:37 +0000)]
(name_gather, addname): Use offsetof when computing sizes for
struct hack; this avoids wasted space in some cases.
(name_gather): Use strcpy, not memcpy.
for consistency with other code that does similar things.
(read_name_from_file, name_next, name_gather, add_hierarchy_to_namelist):
Avoid quadratic behavior when reallocating buffers.
Check for buffer size overflow.
(addname): Avoid unnecessary clearing of memory.
Paul Eggert [Wed, 29 Aug 2001 21:37:27 +0000 (21:37 +0000)]
(dump_file): Relativize link names before dumping.
This fixes a bug reported by Jose Pedro Oliveira.
(dump_file): Use offsetof when computing sizes for
struct hack; this avoids wasted space in some cases.
Paul Eggert [Wed, 29 Aug 2001 21:37:27 +0000 (21:37 +0000)]
(delay_set_stat): Fix off-by-one error in file
name size allocation that caused core dumps.
From Jan.Djarv@mbox200.swipnet.se.
(extract_archive): Use strcpy, not memcpy,
for consistency with other code that does similar things.
Paul Eggert [Wed, 29 Aug 2001 06:36:20 +0000 (06:36 +0000)]
Fix copyright notice.
(UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
(verify): New macro.
(INT): Renamed from uintmax_t.
(strtoumax, strtoull, strtoul): Remove.
(strtoimax, strtol, strtoll): New macros.
(strtoimax): Renamed from strtoumax. Interchange signed with unsigned.
Verify sizes at compile-time, not at run-time.
Prefer strtol to strtoll if both work.
(main): Remove.
Paul Eggert [Wed, 29 Aug 2001 06:36:20 +0000 (06:36 +0000)]
(jm_AC_PREREQ_XSTRTOUMAX): Quote first arg of AC_DEFUN.
Require jm_AC_TYPE_INTMAX_T and jm_AC_TYPE_LONG_LONG since they
is needed to parse the include file.
Simplify logic behind the args to AC_REPLACE.
Paul Eggert [Wed, 29 Aug 2001 06:36:20 +0000 (06:36 +0000)]
(jm_AC_PREREQ_XSTRTOIMAX):
Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG since they
are needed to parse the include file.
Do not require jm_AC_HEADER_INTTYPES_H; it's obsolete.
Check for inttypes.h.
Simplify logic behind the args to AC_REPLACE.
Paul Eggert [Wed, 29 Aug 2001 06:36:20 +0000 (06:36 +0000)]
(jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf.
(jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Replace with
Use AC_CHECK_TYPE instead of merely looking for the header.
Paul Eggert [Wed, 29 Aug 2001 06:36:20 +0000 (06:36 +0000)]
("pathmax.h"): Do not include; no longer needed.
(<stdlib.h>, <unistd.h>): Include if available.
("xalloc.h"): Include.
(xmalloc, xstrdup, free): Remove decls; no longer needed.
(xgetcwd): Don't assume sizes fit in 'unsigned'.
Check for overflow when path size gets too large.
Simplify failure code.
Paul Eggert [Mon, 27 Aug 2001 14:32:51 +0000 (14:32 +0000)]
(from_header): Do not issue a diagnostic if TYPE is zero.
However, check for error even for '-' or '+' case.
(print_header): Try parsing uids and gids as unsigned integers first,
and as a uid_t or gid_t only if that fails. This adds support for
listing positive uids and gids that are greater than UID_MAX and
GID_MAX.
Paul Eggert [Mon, 27 Aug 2001 14:27:54 +0000 (14:27 +0000)]
(struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
Support hard links to symbolic links.
(struct delayed_symlink): Remove 'names' member, replacing it with
'sources' and 'target' member. All uses changed.
(struct string_list): New type.
(delayed_set_stat, extract_archive): Use offsetof when computing sizes
for struct hack; this avoids wasted space in some cases.
(extract_archive): Fix test for absolute pathnames and/or "..".
Use link_error to report errors for links.
Remove redundant trailing '/' at "really_dir", for all uses, not
just before invoking mkdir.
If overwriting old files, do not worry so much about existing directories.
Fix mode computation in the case where the directory exists.
(apply_delayed_symlinks): If we can't make a hard link to a symbolic
link, make a copy of the symbolic link.
Paul Eggert [Mon, 27 Aug 2001 00:02:27 +0000 (00:02 +0000)]
Put leading '*' in direntry.
Accommodate new gfdl sectioning.
New option --recursion (the default) that is the inverse of --no-recursion.
New options --anchored, --ignore-case, --wildcards,
--wildcards-match-slash, and their negations (e.g., --no-anchored).
Along with --recursion and --no-recursion, these control how exclude
patterns are interpreted. The default interpretation of exclude
patterns is now --no-anchored --no-ignore-case --recursion
--wildcards --wildcards-match-slash.
Paul Eggert [Sat, 13 Jan 2001 06:04:48 +0000 (06:04 +0000)]
Add @setchapternewpage odd.
Remove -I as an alias for -T, for now.
Add @dircategory.
Update copyright. Remove "Published by".
Dates beginning with / or . are taken to be file names.
Paul Eggert [Sat, 13 Jan 2001 05:59:29 +0000 (05:59 +0000)]
(time): Do not declare.
(usage): Remove -I as an alias for -T>
(OPTION_STRING): Remove -I.
(decode_options): Dates that look like an absolute path name,
or that start with '.', are presumed to be file names whose
dates are taken.
Remove 'I' as an aliase for 'T'.
Update copyright.
Paul Eggert [Sat, 13 Jan 2001 05:59:29 +0000 (05:59 +0000)]
(relativize): New function.
> (relativize): New function, with much of old start_header's guts.
Handle filesystem prefixes.
(start_header): Use this new function.
(init_sparsearray): Don't bother to zero out the new array; it's not needed.
(deal_with_sparse): Fix array allocation bug.
(create_archive): Don't assume '/' is the only separator.
(dump_file): Likewise.
Don't worry about leading / in symlink targets.
Paul Eggert [Sat, 13 Jan 2001 05:59:29 +0000 (05:59 +0000)]
(name_next): Don't assume '/' is the only directory separator.
(namelist_match): Likewise.
(add_hierarchy_to_namelist): Remove dirsize arg.
Do not assume '/' is the only directory separator.
(new_name): Likewise.
Paul Eggert [Sat, 13 Jan 2001 05:59:29 +0000 (05:59 +0000)]
(<time.h>): Do not include; system.h now does this.
(time): Remove decl; likewise.
(child_open_for_uncompress): Use new full_write semantics.
(flush_write): Use ISSLASH instead of testing for '/'.
(flush_read): Likewise.
Paul Eggert [Sat, 13 Jan 2001 05:59:29 +0000 (05:59 +0000)]
(<time.h>): Do not include; system.h now does this.
(make_directories): Skip filesystem prefixes.
Don't assume '/' is the only separator.
(extract_sparse_file): Use new full_write semantics.
On write error, return instead of invoking skip_file.
Do not free sparsearray; caller does this now.
(apply_nonancestor_delayed_set_stat): Do not assume '/' is the only
separator.
(extract_archive): Don't assume file name lengths fit in int.
Report what got stripped from member name; it might be more than '/'.
Use new full_write semantics.
Do not pass redundant trailing "/" to mkdir, as POSIX does not allow
mkdir to ignore it.
Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
Paul Eggert [Sun, 29 Oct 2000 05:30:02 +0000 (05:30 +0000)]
(NO_RECURSE_OPTION): Remove.
(long_options): Have getopt set the --no-recursion flag.
(decode_options): Initialize recursion_option to FNM_LEADING_DIR.
Remove case for NO_RECURSE_OPTION.