26 #include <tjutils/tjutils.h>
34 #define PII 3.14159265358979323846264338327950288
38 #define ODIN_MAXCHAR 4096
42 #define LONGEST_INT long long
44 #define LONGEST_INT long
51 #define ODIN_STAT stat64
54 #define ODIN_STAT stat
59 #define ODIN_OPEN open64
61 #define ODIN_OPEN open
65 #define ODIN_FOPEN fopen64
67 #define ODIN_FOPEN fopen
71 #define ODIN_FSEEK fseeko64
74 #define ODIN_FSEEK fseeko
76 #define ODIN_FSEEK fseek
81 #define ODIN_FTELL ftello64
84 #define ODIN_FTELL ftello
86 #define ODIN_FTELL ftell
91 #define ODIN_MMAP mmap64
93 #define ODIN_MMAP mmap
98 #define AVOID_CC_WARNING(strArray) inline const char* strArray##_dummyfunc() {return strArray[0];}
113 double norm(
double x,
double y);
119 double norm3(
double x,
double y,
double z);
127 double maxof3(
double f1,
double f2,
double f3);
130 #ifndef NO_FILEHANDLING
211 void*
filemap(
const STD_string& filename, LONGEST_INT nbytes, LONGEST_INT offset,
bool readonly,
int& fd);
219 void fileunmap(
int fd,
void* start, LONGEST_INT nbytes, LONGEST_INT offset);
313 int getCommandlineOption(
int argc,
char *argv[],
const char *option,
char *returnvalue,
int maxchar,
bool modify=
true);
332 int getLastArgument(
int argc,
char *argv[],
char *returnvalue,
int maxchar,
bool modify=
true);
const char * configInfo()
double secureInv(double denominator)
int chpwd(const char *dirname)
int movefile(const char *src, const char *dst)
int createdir(const char *dirname)
double norm(double x, double y)
unsigned int numof_cores()
const char * modestring(fopenMode mode)
int chperm(const char *fname, int perm)
int copyfile(const char *src, const char *dst)
int isCommandlineOption(int argc, char *argv[], const char *option, bool modify=true)
LONGEST_INT filesize(const char *filename)
double secureDivision(double numerator, double denominator)
void fileunmap(int fd, void *start, LONGEST_INT nbytes, LONGEST_INT offset)
void * filemap(const STD_string &filename, LONGEST_INT nbytes, LONGEST_INT offset, bool readonly, int &fd)
double maxof3(double f1, double f2, double f3)
bool little_endian_byte_order()
double norm3(double x, double y, double z)
int hasHelpOption(int argc, char *argv[])
int create_empty_file(const STD_string &filename, LONGEST_INT nbytes, fopenMode mode=overwriteMode)
int getCommandlineOption(int argc, char *argv[], const char *option, char *returnvalue, int maxchar, bool modify=true)
bool checkdir(const char *dirname)
int rmfile(const char *fname)
void sleep_ms(unsigned int ms)
const char * getenv_nonnull(const char *variable_name)
int getLastArgument(int argc, char *argv[], char *returnvalue, int maxchar, bool modify=true)