Disk ARchive
2.4.2
|
00001 /*********************************************************************/ 00002 // dar - disk archive - a backup/restoration program 00003 // Copyright (C) 2002-2052 Denis Corbin 00004 // 00005 // This program is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU General Public License 00007 // as published by the Free Software Foundation; either version 2 00008 // of the License, or (at your option) any later version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with this program; if not, write to the Free Software 00017 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 // 00019 // to contact the author : http://dar.linux.free.fr/email.html 00020 /*********************************************************************/ 00021 // $Id: dar_suite.hpp,v 1.17 2011/01/09 17:25:58 edrusb Rel $ 00022 // 00023 /*********************************************************************/ 00024 // 00025 00029 00030 #ifndef DAR_SUITE_HPP 00031 #define DAR_SUITE_HPP 00032 00033 #include "../my_config.h" 00034 #include "user_interaction.hpp" 00035 00036 #define EXIT_OK 0 // all that was asked is done 00037 #define EXIT_SYNTAX 1 // syntax error on command line 00038 #define EXIT_ERROR 2 // error not related to the data treated 00039 // (lack of memory, hardware problem, etc.) 00040 #define EXIT_BUG 3 // detected a condition that should never happen 00041 #define EXIT_USER_ABORT 4 // user asked to abort (or question in non 00042 // interactive mode) 00043 #define EXIT_DATA_ERROR 5 // error in data treated (could not save/restore/ 00044 // compare all data due for example to bad access permission. Comparison 00045 // mismatch of some files, archive testing failed etc...) 00046 #define EXIT_SCRIPT_ERROR 6 // error around the execution of a user command 00047 // using -E or -F options 00048 #define EXIT_LIBDAR 7 // error calling libdar. Arguments given to libdar 00049 // do not match those expected (sanity checks warning). 00050 #define EXIT_LIMITINT 8 // limitinit overflow 00051 // fixed using full infinint version of the program 00052 #define EXIT_UNKNOWN_ERROR 9 00053 // error not possible to report by other mean no access to stdout/stderr) 00054 #define EXIT_COMPILATION 10 // feature not activated at compilation time 00055 #define EXIT_SAVED_MODIFIED 11 // some files have been modified at the time they were saved 00056 00057 #define EXTENSION "dar" 00058 00060 #ifndef __VERSION__ 00061 #define __VERSION__ "unknown" 00062 #endif 00063 00065 #ifdef __GNUC__ 00066 #define CC_NAT "GNUC" 00067 #else 00068 #define CC_NAT "unknown" 00069 #endif 00070 00071 using namespace libdar; 00072 00075 00076 extern void dar_suite_reset_signal_handler(); 00077 extern int dar_suite_global(int argc, char * const argv[], const char **env, int (*call)(user_interaction & dialog, int, char *const [], const char **env)); 00078 00079 extern std::string dar_suite_command_line_features(); 00080 00082 00083 #endif