gpp4 1.3.1
|
00001 /* 00002 ccp4_general.h: header for general library functions and utilities. 00003 Copyright (C) 2001 CCLRC, Peter Briggs et al 00004 00005 This library is free software: you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation, either 00008 version 3 of the License, or (at your option) any later version. 00009 00010 This library 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 GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with This library. If not, see 00017 <http://www.gnu.org/licenses/>. 00018 00019 */ 00020 00026 /* Macro definitions */ 00027 00028 00029 #ifndef __CCPGeneral__ 00030 #define __CCPGeneral__ 00031 00032 00033 /* note order: this must be outside CCP4 namespace */ 00034 #include "ccp4_parser.h" 00035 00036 #ifdef __cplusplus 00037 namespace CCP4 { 00038 extern "C" { 00039 #endif 00040 00043 #define CCP4_MAXLINE 200 00044 00047 #define CCP4_MAXTOKS 3 00048 00051 #define CCP4_MAXNAMES 150 00052 00055 #define CCP4_MODULO 100000 00056 00057 /* stuff for error reporting */ 00058 #define CGEN_ERRNO(n) (CCP4_ERR_GEN | (n)) 00059 00060 /* error defs */ 00061 #define CGENERR_Ok 0 00062 #define CGENERR_AllocFail 1 00063 #define CGENERR_CantSetEnvironment 2 00064 #define CGENERR_MaxNamesExceeded 3 00065 #define CGENERR_EOptionUseError 4 00066 #define CGENERR_DOptionUseError 5 00067 #define CGENERR_LogicalNameUseError 6 00068 #define CGENERR_CantOpenEnvFile 7 00069 #define CGENERR_CantOpenDefFile 8 00070 #define CGENERR_ParseEnvFail 9 00071 #define CGENERR_ParseDefFail 10 00072 #define CGENERR_CantFindInFile 11 00073 #define CGENERR_EnvPathFail 12 00074 #define CGENERR_DefPathFail 13 00075 #define CGENERR_CantGetClibd 14 00076 #define CGENERR_CantGetCcp4Scr 15 00077 00078 /*------------------------------------------------------------------*/ 00079 00080 /* Structures and typedefs */ 00081 00082 /*------------------------------------------------------------------*/ 00083 00084 /* <None declared> */ 00085 00086 /*------------------------------------------------------------------*/ 00087 00088 /* Function Prototypes */ 00089 00090 /*------------------------------------------------------------------*/ 00091 00092 void ccp4f_mem_tidy(void); 00093 00094 int ccperror(int ierr, const char *message); 00095 00096 int ccperror_noexit(int ierr, const char *message); 00097 00098 int ccp4printf(int level, char *format, ...); 00099 00100 int ccp4fyp(int argc, char **argv); 00101 00102 int ccp4fyp_cleanup(int ienv, char **envname, char **envtype, char **envext, 00103 char *logical_name, char *file_name, char *file_type, 00104 char *file_ext, char *env_file, char *def_file, 00105 char *dir, CCP4PARSERARRAY *parser); 00106 00107 int ccp4setenv(char *logical_name, char* value, char **envname, 00108 char **envtype, char **envext, int *ienv, int no_overwrt); 00109 00110 int ccp4setenv_cleanup(char *file_ext, char *file_root, char *file_path, 00111 char *file_name); 00112 00113 int ccpexists(char *filename); 00114 00115 int ccpputenv(char *logical_name, char *file_name); 00116 00117 void ccp4_banner(void); 00118 00119 #ifdef __cplusplus 00120 } 00121 } 00122 #endif 00123 00124 #endif /* __CCPGeneral__ */ 00125 00126 /* 00127 Local variables: 00128 mode: font-lock 00129 End: 00130 */