dar_suite.hpp

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 : dar.linux@free.fr
00020 /*********************************************************************/
00021 // $Id: dar_suite.hpp,v 1.14 2005/08/23 21:23:15 edrusb Rel $
00022 //
00023 /*********************************************************************/
00024 //
00025 #ifndef DAR_SUITE_HPP
00026 #define DAR_SUITE_HPP
00027 
00028 #include "../my_config.h"
00029 #include "user_interaction.hpp"
00030 
00031 #define EXIT_OK 0           // all that was asked is done
00032 #define EXIT_SYNTAX 1       // syntax error on command line
00033 #define EXIT_ERROR 2        // error not related to the data treated
00034     // (lack of memory, hardware problem, etc.)
00035 #define EXIT_BUG 3          // detected a condition that should never happen
00036 #define EXIT_USER_ABORT 4   // user asked to abort (or question in non
00037     // interactive mode)
00038 #define EXIT_DATA_ERROR 5   // error in data treated (could not save/restore/
00039     // compare all data due for example to bad access permission.  Comparison
00040     // mismatch of some files, archive testing failed etc...)
00041 #define EXIT_SCRIPT_ERROR 6 // error around the execution of a user command
00042     // using -E or -F options
00043 #define EXIT_LIBDAR  7     // error calling libdar. Arguments given to libdar
00044     // do not match those expected (sanity checks warning).
00045 #define EXIT_LIMITINT 8    // limitinit overflow
00046     // fixed using full infinint version of the program
00047 #define EXIT_UNKNOWN_ERROR 9
00048     // error not possible to report by other mean no access to stdout/stderr)
00049 #define EXIT_COMPILATION 10 // feature not activated at compilation time
00050 #define EXIT_SAVED_MODIFIED 11 // some files have been modified at the time they were saved
00051 
00052 #define EXTENSION "dar"
00053 
00055 #ifndef __VERSION__
00056 #define __VERSION__ "unknown"
00057 #endif
00058 
00060 #ifdef __GNUC__
00061 #define CC_NAT "GNUC"
00062 #else
00063 #define CC_NAT "unknown"
00064 #endif
00065 
00066 using namespace libdar;
00067 
00068 extern void dar_suite_reset_signal_handler();
00069 extern int dar_suite_global(int argc, char *argv[], const char **env, int (*call)(user_interaction & dialog, int, char *[], const char **env));
00070 
00071 extern std::string dar_suite_command_line_features();
00072 
00073 #endif

Generated on Mon Nov 3 23:50:10 2008 for Disk ARchive by  doxygen 1.5.5