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

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

Generated on Mon Aug 22 2011 for gpp4 by  doxygen 1.7.1