00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00028
00029
00030
00031 #ifndef __CCPGeneral__
00032 #define __CCPGeneral__
00033
00034
00035
00036 #include "ccp4_parser.h"
00037
00038 #ifdef __cplusplus
00039 namespace CCP4 {
00040 extern "C" {
00041 #endif
00042
00045 #define CCP4_MAXLINE 200
00046
00049 #define CCP4_MAXTOKS 3
00050
00053 #define CCP4_MAXNAMES 150
00054
00057 #define CCP4_MODULO 100000
00058
00059
00060 #define CGEN_ERRNO(n) (CCP4_ERR_GEN | (n))
00061
00062
00063 #define CGENERR_Ok 0
00064 #define CGENERR_AllocFail 1
00065 #define CGENERR_CantSetEnvironment 2
00066 #define CGENERR_MaxNamesExceeded 3
00067 #define CGENERR_EOptionUseError 4
00068 #define CGENERR_DOptionUseError 5
00069 #define CGENERR_LogicalNameUseError 6
00070 #define CGENERR_CantOpenEnvFile 7
00071 #define CGENERR_CantOpenDefFile 8
00072 #define CGENERR_ParseEnvFail 9
00073 #define CGENERR_ParseDefFail 10
00074 #define CGENERR_CantFindInFile 11
00075 #define CGENERR_EnvPathFail 12
00076 #define CGENERR_DefPathFail 13
00077 #define CGENERR_CantGetClibd 14
00078 #define CGENERR_CantGetCcp4Scr 15
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094 void ccp4f_mem_tidy(void);
00095
00096 int ccperror(int ierr, const char *message);
00097
00098 int ccperror_noexit(int ierr, const char *message);
00099
00100 int ccp4printf(int level, char *format, ...);
00101
00102 int ccp4fyp(int argc, char **argv);
00103
00104 static int ccp4fyp_cleanup(int ienv, char **envname, char **envtype, char **envext,
00105 char *logical_name, char *file_name, char *file_type,
00106 char *file_ext, char *env_file, char *def_file,
00107 char *dir, CCP4PARSERARRAY *parser);
00108
00109 int ccp4setenv(char *logical_name, char* value, char **envname,
00110 char **envtype, char **envext, int *ienv, int no_overwrt);
00111
00112 static int ccp4setenv_cleanup(char *file_ext, char *file_root, char *file_path,
00113 char *file_name);
00114
00115 int ccpexists(char *filename);
00116
00117 int ccpputenv(char *logical_name, char *file_name);
00118
00119 void ccp4_banner(void);
00120
00121 #ifdef __cplusplus
00122 }
00123 }
00124 #endif
00125
00126 #endif
00127
00128
00129
00130
00131
00132