gpp4  1.3.1
ccp4_general.h
Go to the documentation of this file.
1 /*
2  ccp4_general.h: header for general library functions and utilities.
3  Copyright (C) 2001 CCLRC, Peter Briggs et al
4 
5  This library is free software: you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation, either
8  version 3 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with This library. If not, see
17  <http://www.gnu.org/licenses/>.
18 
19 */
20 
26 /* Macro definitions */
27 
28 
29 #ifndef __CCPGeneral__
30 #define __CCPGeneral__
31 
32 
33 /* note order: this must be outside CCP4 namespace */
34 #include "ccp4_parser.h"
35 
36 #ifdef __cplusplus
37 namespace CCP4 {
38 extern "C" {
39 #endif
40 
43 #define CCP4_MAXLINE 200
44 
47 #define CCP4_MAXTOKS 3
48 
51 #define CCP4_MAXNAMES 150
52 
55 #define CCP4_MODULO 100000
56 
57 /* stuff for error reporting */
58 #define CGEN_ERRNO(n) (CCP4_ERR_GEN | (n))
59 
60 /* error defs */
61 #define CGENERR_Ok 0
62 #define CGENERR_AllocFail 1
63 #define CGENERR_CantSetEnvironment 2
64 #define CGENERR_MaxNamesExceeded 3
65 #define CGENERR_EOptionUseError 4
66 #define CGENERR_DOptionUseError 5
67 #define CGENERR_LogicalNameUseError 6
68 #define CGENERR_CantOpenEnvFile 7
69 #define CGENERR_CantOpenDefFile 8
70 #define CGENERR_ParseEnvFail 9
71 #define CGENERR_ParseDefFail 10
72 #define CGENERR_CantFindInFile 11
73 #define CGENERR_EnvPathFail 12
74 #define CGENERR_DefPathFail 13
75 #define CGENERR_CantGetClibd 14
76 #define CGENERR_CantGetCcp4Scr 15
77 
78 /*------------------------------------------------------------------*/
79 
80 /* Structures and typedefs */
81 
82 /*------------------------------------------------------------------*/
83 
84 /* <None declared> */
85 
86 /*------------------------------------------------------------------*/
87 
88 /* Function Prototypes */
89 
90 /*------------------------------------------------------------------*/
91 
92 void ccp4f_mem_tidy(void);
93 
94 int ccperror(int ierr, const char *message);
95 
96 int ccperror_noexit(int ierr, const char *message);
97 
98 int ccp4printf(int level, char *format, ...);
99 
100 int ccp4fyp(int argc, char **argv);
101 
102 int ccp4fyp_cleanup(int ienv, char **envname, char **envtype, char **envext,
103  char *logical_name, char *file_name, char *file_type,
104  char *file_ext, char *env_file, char *def_file,
105  char *dir, CCP4PARSERARRAY *parser);
106 
107 int ccp4setenv(char *logical_name, char* value, char **envname,
108  char **envtype, char **envext, int *ienv, int no_overwrt);
109 
110 int ccp4setenv_cleanup(char *file_ext, char *file_root, char *file_path,
111  char *file_name);
112 
113 int ccpexists(char *filename);
114 
115 int ccpputenv(char *logical_name, char *file_name);
116 
117 void ccp4_banner(void);
118 
119 #ifdef __cplusplus
120 }
121 }
122 #endif
123 
124 #endif /* __CCPGeneral__ */
125 
126 /*
127  Local variables:
128  mode: font-lock
129  End:
130 */
int ccpputenv(char *logical_name, char *file_name)
Definition: ccp4_general.c:1339
int ccpexists(char *filename)
Definition: ccp4_general.c:1309
int ccp4printf(int level, char *format,...)
Definition: ccp4_general.c:182
void ccp4_banner(void)
Definition: ccp4_general.c:1370
int ccperror(int ierr, const char *message)
Definition: ccp4_general.c:67
CCP4 Parser array Construct to hold the information about a parsed line.
Definition: ccp4_parser.h:149
Functions to read in and "parse" CCP4-style keyworded input.
void ccp4f_mem_tidy(void)
Definition: ccp4_general_f.c:44
int ccp4fyp(int argc, char **argv)
Definition: ccp4_general.c:284
int ccperror_noexit(int ierr, const char *message)
Definition: ccp4_general.c:95