Main Page   Compound List   File List   Compound Members   File Members   Related Pages  

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 and is distributed under the terms and
00006      conditions of the CCP4 licence agreement as `Part 0' (Annex 2)
00007      software, which is version 2.1 of the GNU Lesser General Public
00008      Licence (LGPL) with the following additional clause:
00009 
00010         `You may also combine or link a "work that uses the Library" to
00011         produce a work containing portions of the Library, and distribute
00012         that work under terms of your choice, provided that you give
00013         prominent notice with each copy of the work that the specified
00014         version of the Library is used in it, and that you include or
00015         provide public access to the complete corresponding
00016         machine-readable source code for the Library including whatever
00017         changes were used in the work. (i.e. If you make changes to the
00018         Library you must distribute those, but you do not need to
00019         distribute source or object code to those portions of the work
00020         not covered by this licence.)'
00021 
00022      Note that this clause grants an additional right and does not impose
00023      any additional restriction, and so does not affect compatibility
00024      with the GNU General Public Licence (GPL). If you wish to negotiate
00025      other terms, please contact the maintainer.
00026 
00027      You can redistribute it and/or modify the library under the terms of
00028      the GNU Lesser General Public License as published by the Free Software
00029      Foundation; either version 2.1 of the License, or (at your option) any
00030      later version.
00031 
00032      This library is distributed in the hope that it will be useful, but
00033      WITHOUT ANY WARRANTY; without even the implied warranty of
00034      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00035      Lesser General Public License for more details.
00036 
00037      You should have received a copy of the CCP4 licence and/or GNU
00038      Lesser General Public License along with this library; if not, write
00039      to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK.
00040      The GNU Lesser General Public can also be obtained by writing to the
00041      Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00042      MA 02111-1307 USA
00043 */
00044 
00050 #ifndef __CCP4_UTILS
00051 #define __CCP4_UTILS
00052 
00053 #include <string.h>
00054 #include "ccp4_types.h"
00055 #include "library_file.h"
00056 static char rcsidh[] = "$Id: ccp4__utils_8h-source.html,v 1.8 2004/07/05 14:36:55 mdw Exp $";
00057 
00058 #ifdef __cplusplus
00059 namespace CCP4 {
00060 extern "C" {
00061 #endif
00062 
00063 /****************************************************************************
00064  * Function prototypes                                                      *
00065  ****************************************************************************/
00066 
00067 size_t ccp4_utils_flength (char *, int);
00068 
00069 int ccp4_utils_translate_mode_float(float *, const void *, int, int);
00070 
00071 void ccp4_utils_fatal (const char *);
00072 
00073 void ccp4_utils_print (const char *message);
00074 
00075 int ccp4_utils_setenv (char *);
00076 
00077 /* turn on line buffering for stdout */
00078 int ccp4_utils_outbuf (void);
00079 
00080 /* turn off any buffering on stdin */
00081 int ccp4_utils_noinpbuf (void);
00082 
00083 union float_uint_uchar ccp4_nan ();
00084 
00085 int ccp4_utils_isnan (const union float_uint_uchar *);
00086 
00087 void ccp4_utils_bml (int, union float_uint_uchar *);
00088 
00089 void ccp4_utils_wrg (int, union float_uint_uchar *, float *);
00090 
00091 void ccp4_utils_hgetlimits (int *, float *);
00092 
00093 int ccp4_utils_mkdir (const char *, const char *);
00094 
00095 int ccp4_utils_chmod (const char *, const char *);
00096 
00097 void *ccp4_utils_malloc(size_t);
00098 
00099 void *ccp4_utils_realloc(void *, size_t);
00100 
00101 void *ccp4_utils_calloc(size_t, size_t);
00102 
00103 int ccp4_file_size(const char *);
00104 
00105 char *ccp4_utils_username(void);
00106 
00107 char *ccp4_utils_basename(char *filename);
00108 
00109 char *ccp4_utils_pathname(char *filename);
00110 
00111 char *ccp4_utils_extension(char *filename);
00112 
00113 char *ccp4_utils_joinfilenames(char *dir, char *file);
00114 
00115 void ccp4_utils_idate (int *);
00116 
00117 char *ccp4_utils_date(char *);
00118 
00119 void ccp4_utils_itime (int *);
00120 
00121 char *ccp4_utils_time(char *);
00122 
00123 float ccp4_utils_etime (float *);
00124 
00125 #if defined (_MVS)
00126 double ccp4_erfc( double x );
00127 #endif
00128 
00129 /****************************************************************************
00130 *  End of prototypes                                                        *
00131 *****************************************************************************/
00132 #ifdef __cplusplus
00133 }
00134 }
00135 #endif
00136 
00137 #endif  /* __CCP4_UTILS */