#ifndef _sf_file_h #define _sf_file_h #include #include "_bool.h" typedef struct sf_File *sf_file; typedef enum {SF_UCHAR, SF_CHAR, SF_INT, SF_FLOAT, SF_COMPLEX, SF_SHORT, SF_DOUBLE} sf_datatype; void sf_file_error(bool err); /*< set error on opening files >*/ sf_file sf_input (char* tag); /*< Create an input file structure >*/ void sf_fileclose (sf_file file); /*< close a file and free allocated space >*/ bool sf_histint (sf_file file, const char* key,/*@out@*/ int* par); /*< read an int parameter from file >*/ bool sf_histfloat (sf_file file, const char* key,/*@out@*/ float* par); /*< read a float parameter from file >*/ char* sf_histstring (sf_file file, const char* key); /*< read a string parameter from file (returns NULL on failure) >*/ void sf_putint (sf_file file, const char* key, int par); /*< put an int parameter to a file >*/ void sf_floatread (/*@out@*/ float* arr, size_t size, sf_file file); /*< read a float array arr[size] from file >*/ void sf_close(void); /*< Remove temporary files >*/ int current_read (/*@out@*/ float* arrx, float* arry, float* arrz, size_t size, sf_file file); /*< read a float array arr[size] from file >*/ #endif