X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fcommon.h;h=ac96f26b4de304b94a4bf3fa402a317ebc54bd87;hb=e3d28d84bda24a45c239b398e7b42ccd9be2d0c2;hp=c1edba86ef8a0cbf7a5686b3dbe8121d500286ae;hpb=df7b55a8f6354e30e8da62eec7f706df033d0c81;p=chaz%2Ftar diff --git a/src/common.h b/src/common.h index c1edba8..ac96f26 100644 --- a/src/common.h +++ b/src/common.h @@ -1,22 +1,22 @@ /* Common declarations for the tar program. - Copyright (C) 1988, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, - 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 - Free Software Foundation, Inc. + Copyright 1988, 1992-1994, 1996-1997, 1999-2010, 2012-2013 Free + Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3, or (at your option) any later - version. + This file is part of GNU tar. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General - Public License for more details. + GNU tar is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + GNU tar is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ /* Declare the GNU tar archive format. */ #include "tar.h" @@ -96,11 +96,6 @@ enum subcommand GLOBAL enum subcommand subcommand_option; -#define READ_LIKE_SUBCOMMAND \ - (subcommand_option == EXTRACT_SUBCOMMAND \ - || subcommand_option == DIFF_SUBCOMMAND \ - || subcommand_option == LIST_SUBCOMMAND) - /* Selected format for output archive. */ GLOBAL enum archive_format archive_format; @@ -195,6 +190,8 @@ enum old_files }; GLOBAL enum old_files old_files_option; +GLOBAL bool keep_directory_symlink_option; + /* Specified file name for incremental list. */ GLOBAL const char *listed_incremental_option; /* Incremental dump level */ @@ -529,6 +526,7 @@ void rebase_directory (struct directory *dir, const char *repl, size_t rlen); void append_incremental_renames (struct directory *dir); +void show_snapshot_field_ranges (void); void read_directory_file (void); void write_directory_file (void); void purge_directory (char const *directory_name); @@ -601,11 +599,16 @@ char *zap_slashes (char *name); char *normalize_filename (const char *name); void replace_prefix (char **pname, const char *samp, size_t slen, const char *repl, size_t rlen); +char *tar_savedir (const char *name, int must_exist); typedef struct namebuf *namebuf_t; namebuf_t namebuf_create (const char *dir); void namebuf_free (namebuf_t buf); char *namebuf_name (namebuf_t buf, const char *name); +void namebuf_add_dir (namebuf_t buf, const char *name); +char *namebuf_finish (namebuf_t buf); + +char *tar_getcwd (void); /* Represent N using a signed integer I such that (uintmax_t) I == N. With a good optimizing compiler, this is equivalent to (intmax_t) i @@ -709,6 +712,7 @@ int uname_to_uid (char const *uname, uid_t *puid); void name_init (void); void name_add_name (const char *name, int matching_flags); void name_add_dir (const char *name); +void name_add_file (const char *name, int term); void name_term (void); const char *name_next (int change_dirs); void name_gather (void); @@ -753,6 +757,9 @@ const char *archive_format_string (enum archive_format fmt); const char *subcommand_string (enum subcommand c); void set_exit_status (int val); +void request_stdin (const char *option); +void more_options (int argc, char **argv); + /* Module update.c. */ extern char *output_start; @@ -871,11 +878,12 @@ void checkpoint_run (bool do_write); #define WARN_DECOMPRESS_PROGRAM 0x00080000 #define WARN_EXISTING_FILE 0x00100000 #define WARN_XATTR_WRITE 0x00200000 +#define WARN_RECORD_SIZE 0x00400000 -/* The warnings composing WARN_VERBOSE_WARNINGS are enabled by default - in verbose mode */ +/* These warnings are enabled by default in verbose mode: */ #define WARN_VERBOSE_WARNINGS (WARN_RENAME_DIRECTORY|WARN_NEW_DIRECTORY|\ - WARN_DECOMPRESS_PROGRAM|WARN_EXISTING_FILE) + WARN_DECOMPRESS_PROGRAM|WARN_EXISTING_FILE|\ + WARN_RECORD_SIZE) #define WARN_ALL (~WARN_VERBOSE_WARNINGS) void set_warning_option (const char *arg);