• Main Page
  • Related Pages
  • Classes
  • Files
  • File List
  • File Members

src/ccp4_general.h

Go to the documentation of this file.
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 2.1 of the License, or (at your option) any later
00009      version.
00010 
00011      This library is distributed in the hope that it will be useful,
00012      but WITHOUT ANY WARRANTY; without even the implied warranty of
00013      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014      Lesser General Public License for more details.
00015 
00016      You should have received a copy of the GNU Lesser General Public
00017      License along with this library; if not, write to the Free
00018      Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019      Boston, MA 02110-1301 USA
00020 
00021 */
00022 
00028 /* Macro definitions */
00029 
00030 
00031 #ifndef __CCPGeneral__
00032 #define __CCPGeneral__
00033 
00034 
00035 /* note order: this must be outside CCP4 namespace */
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 /* stuff for error reporting */
00060 #define CGEN_ERRNO(n) (CCP4_ERR_GEN | (n))
00061 
00062 /* error defs */
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 /* Structures and typedefs */
00083 
00084 /*------------------------------------------------------------------*/
00085 
00086 /* <None declared> */
00087 
00088 /*------------------------------------------------------------------*/
00089 
00090 /* Function Prototypes */
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 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 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   /* __CCPGeneral__ */
00127 
00128 /*
00129   Local variables:
00130   mode: font-lock
00131   End:
00132 */

Generated on Mon Jan 10 2011 for gpp4 by  doxygen 1.7.1