X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Ftar.c;h=7f0c5743f70621a9c9a254780e01681b4b66c630;hb=09f55426640cfbfff46d41aa9530d132fc15e4c9;hp=17a7f5fc02ab05aee3a9436ae9eb52110aeaa0a9;hpb=98bca35e4af826614e3be5834ea0ff9fea0d3d21;p=chaz%2Ftar diff --git a/src/tar.c b/src/tar.c index 17a7f5f..7f0c574 100644 --- a/src/tar.c +++ b/src/tar.c @@ -1,5 +1,5 @@ /* Tar -- a tape archiver. - Copyright (C) 1988, 1992 Free Software Foundation + Copyright (C) 1988, 1992, 1993 Free Software Foundation This file is part of GNU Tar. @@ -27,7 +27,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include /* Needed for typedefs in tar.h */ #include "getopt.h" #include "regex.h" -#include "fnmatch.h" /* * The following causes "tar.h" to produce definitions of all the @@ -37,28 +36,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "tar.h" #include "port.h" - -#if defined(_POSIX_VERSION) || defined(DIRENT) -#include -#ifdef direct -#undef direct -#endif /* direct */ -#define direct dirent -#define DP_NAMELEN(x) strlen((x)->d_name) -#endif /* _POSIX_VERSION or DIRENT */ -#if !defined(_POSIX_VERSION) && !defined(DIRENT) && defined(BSD42) -#include -#define DP_NAMELEN(x) (x)->d_namlen -#endif /* not _POSIX_VERSION and BSD42 */ -#ifdef __MSDOS__ -#include "msd_dir.h" -#define DP_NAMELEN(x) (x)->d_namlen -#define direct dirent -#endif -#if defined(USG) && !defined(_POSIX_VERSION) && !defined(DIRENT) -#include -#define DP_NAMELEN(x) strlen((x)->d_name) -#endif /* USG and not _POSIX_VERSION and not DIRENT */ +#include "fnmatch.h" /* * We should use a conversion routine that does reasonable error @@ -175,6 +153,7 @@ struct option long_options[] = {"listed-incremental", 1, 0, 'g'}, {"multi-volume", 0, &f_multivol, 1}, {"info-script", 1, 0, 'F'}, + {"new-volume-script", 1, 0, 'F'}, {"absolute-paths", 0, &f_absolute_paths, 1}, {"interactive", 0, &f_confirm, 1}, {"confirmation", 0, &f_confirm, 1}, @@ -691,7 +670,8 @@ Other options:\n\ DEF_AR_FILE); fputs ("\ --force-local archive file is local even if has a colon\n\ --F, --info-script F run script at end of each tape (implies -M)\n\ +-F, --info-script F\n\ + --new-volume-script F run script at end of each tape (implies -M)\n\ -G, --incremental create/list/extract old GNU-format incremental backup\n\ -g, --listed-incremental F create/list/extract new GNU-format incremental backup\n\ -h, --dereference don't dump symlinks; dump the files they point to\n\ @@ -700,7 +680,7 @@ Other options:\n\ -k, --keep-old-files keep existing files; don't overwrite them from archive\n\ -K, --starting-file F begin at file F in the archive\n\ -l, --one-file-system stay in local file system when creating an archive\n\ --L, --tape-length LENGTH change tapes after writing LENGTH\n\ +-L, --tape-length N change tapes after writing N*1024 bytes\n\ ", stdout); /* KLUDGE */ fputs ("\ -m, --modification-time don't extract file modified time\n\ @@ -888,8 +868,10 @@ tryagain: } /* End of JF quick -C hack */ +#if 0 if (f_exclude && check_exclude (p)) goto tryagain; +#endif return un_quote_string (p); } while (p = read_name_from_file (buffer, &buffer_siz, namef)) @@ -913,8 +895,10 @@ tryagain: next_name_is_dir = 0; goto tryagain; } +#if 0 if (f_exclude && check_exclude (p)) goto tryagain; +#endif return un_quote_string (p); } return NULL; @@ -1018,7 +1002,7 @@ addname (name) if (chdir_name[0] != '/') { char *path = ck_malloc (PATH_MAX); -#if defined(__MSDOS__) || defined(USG) || defined(_POSIX_VERSION) +#if defined(__MSDOS__) || defined(HAVE_GETCWD) || defined(_POSIX_VERSION) if (!getcwd (path, PATH_MAX)) { msg ("Couldn't get current directory.");