File indexing completed on 2026-04-17 07:51:37
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 #ifndef UTILITIES_H_INCLUDED
0039 #define UTILITIES_H_INCLUDED
0040
0041 #define OK 0
0042 #define ERROR -1
0043 #define FAIL -1
0044 #define ON 1
0045 #define OFF 0
0046 #define FAIL_SAFE -999
0047 #define MAX_STR_LEN 512
0048 #define MAX_BUFFER_SIZE 16384
0049 #define STR_NULL ((char) 0)
0050
0051 #ifndef N_DATA
0052 #define N_DATA 4096
0053 #endif
0054 #ifdef MAIN
0055 int myerrno = OK;
0056 #else
0057 extern int myerrno;
0058 #endif
0059 #ifdef MAIN
0060 int eprintf_mode = ON;
0061 #else
0062 extern int eprintf_mode;
0063 #endif
0064 #ifndef MAIN
0065 extern
0066 #endif
0067 char *pbuffer;
0068
0069 #ifndef ENDIAN_H_INCLUDED
0070 #define ENDIAN_H_INCLUDED
0071
0072
0073
0074
0075
0076
0077
0078
0079 #define __LITTLE_ENDIAN 1234
0080 #define __BIG_ENDIAN 4321
0081 #define __PDP_ENDIAN 3412
0082
0083
0084 #if !defined(LITTLE_ENDIAN) && defined(__LITTLE_ENDIAN)
0085 #define LITTLE_ENDIAN __LITTLE_ENDIAN
0086 #endif
0087 #if !defined(BIG_ENDIAN) && defined(__BIG_ENDIAN)
0088 #define BIG_ENDIAN __BIG_ENDIAN
0089 #endif
0090 #if !defined(PDP_ENDIAN) && defined(__PDP_ENDIAN)
0091 #define PDP_ENDIAN __PDP_ENDIAN
0092 #endif
0093
0094 #define UNKNOWN_ENDIAN 0000
0095
0096 #endif
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109 float reverse_float_byte_order(float xold);
0110 short reverse_short_byte_order(short xold);
0111 int reverse_int_byte_order(int xold);
0112 int advance(char *istr, int *sval, int len);
0113 int check_byte_order(void);
0114 int clean_name(char *tmp_path, char *opath);
0115 int clean_name(char *);
0116 int copy(char *SourceFile, char *DestinationFile);
0117
0118 int eprintf(const char *fmt, ... );
0119 int ok_check(void);
0120 int ok_checks(char *string);
0121
0122 FILE *open_file(char *filename,const char *extension,const char *access);
0123 int pprintf(char *fmt, ... );
0124 int latex_string(char *string, char *nstring);
0125 void print_runtime_info(int argc, char *argv[]);
0126 void allocate_pbuffer(void);
0127 float interpolate(float xh, float xl, float xm, float yh, float yl);
0128 int array_read(FILE *istrm, float *array, int max_array);
0129 int array_read(char *in_string, float *array, int max_array);
0130 int view_errors(void);
0131 int writeBigEndianBinaryFile(char *doseFileName, int nDoseArray, float *doseArray);
0132 int writeLittleEndianBinaryFile(char *doseFileName, int nDoseArray, float *doseArray);
0133 int writeBinaryFile(char *doseFileName, int nDoseArray, float *doseArray, int swab_flag);
0134 int writeBinaryDataToFile(FILE *outputStream, int nArray, float *array, int swab_flag);
0135 int readBinaryDataFromFile(FILE *iStream, int nItemsToRead, float **arrayToRead, int swab_flag);
0136 int readBinaryDataFromFile(FILE *iStream, int nItemsToRead, float *inputArray, int swab_flag);
0137
0138 int fget_c_string(char *string, int Max_Str_Len, FILE *fspec);
0139 int get_string(FILE *fspec, char *string);
0140 #endif