gpp4 1.3.1
src/ccp4_utils.h
Go to the documentation of this file.
00001 /*
00002      ccp4_utils.h: headers for utility functions.
00003      Copyright (C) 2001  CCLRC, Charles Ballard
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 #ifndef __CCP4_UTILS
00027 #define __CCP4_UTILS
00028 
00029 #include <string.h>
00030 #include "ccp4_types.h"
00031 #include "library_file.h"
00032 
00033 #ifdef __cplusplus
00034 namespace CCP4 {
00035 extern "C" {
00036 #endif
00037 
00038 /****************************************************************************
00039  * Function prototypes                                                      *
00040  ****************************************************************************/
00041 
00042 size_t ccp4_utils_flength (char *, int);
00043 
00044 int ccp4_utils_translate_mode_float(float *, const void *, int, int);
00045 
00046 void ccp4_utils_fatal (const char *);
00047 
00048 void ccp4_utils_print (const char *message);
00049 
00050 int ccp4_utils_setenv (char *);
00051 
00052 /* turn on line buffering for stdout */
00053 int ccp4_utils_outbuf (void);
00054 
00055 /* turn off any buffering on stdin */
00056 int ccp4_utils_noinpbuf (void);
00057 
00058 union float_uint_uchar ccp4_nan ();
00059 
00060 int ccp4_utils_isnan (const union float_uint_uchar *);
00061 
00062 void ccp4_utils_bml (int, union float_uint_uchar *);
00063 
00064 void ccp4_utils_wrg (int, union float_uint_uchar *, float *);
00065 
00066 void ccp4_utils_hgetlimits (int *, float *);
00067 
00068 int ccp4_utils_mkdir (const char *, const char *);
00069 
00070 int ccp4_utils_chmod (const char *, const char *);
00071 
00072 void *ccp4_utils_malloc(size_t);
00073 
00074 void *ccp4_utils_realloc(void *, size_t);
00075 
00076 void *ccp4_utils_calloc(size_t, size_t);
00077 
00078 int ccp4_file_size(const char *);
00079 
00080 char *ccp4_utils_username(void);
00081 
00082 char *ccp4_utils_basename(const char *filename);
00083 
00084 char *ccp4_utils_pathname(const char *filename);
00085 
00086 char *ccp4_utils_extension(const char *filename);
00087 
00088 char *ccp4_utils_joinfilenames(char *dir, char *file);
00089 
00090 void ccp4_utils_idate (int *);
00091 
00092 char *ccp4_utils_date(char *);
00093 
00094 void ccp4_utils_itime (int *);
00095 
00096 char *ccp4_utils_time(char *);
00097 
00098 float ccp4_utils_etime (float *);
00099 
00100 #if defined (_MSC_VER)
00101 double ccp4_erfc( double x );
00102 #endif
00103 
00104 /****************************************************************************
00105 *  End of prototypes                                                        *
00106 *****************************************************************************/
00107 #ifdef __cplusplus
00108 }
00109 }
00110 #endif
00111 
00112 #endif  /* __CCP4_UTILS */
00113 
00114 /*
00115   Local variables:
00116   mode: font-lock
00117   End:
00118 */