Flow123d
release_3.0.0-973-g92f55e826
|
Go to the documentation of this file.
37 #define LINE_SIZE 65536
100 FILE *
xfopen(
const char * fname,
const char * mode );
101 FILE *
xfopen(
const std::string &fname,
const char * mode );
104 FILE *
xfreopen(
const char * filename,
const char * mode, FILE * stream );
110 int xfscanf( FILE * in,
const char *
fmt, ... );
115 char *
xfgets(
char *s,
int n, FILE *in );
117 int xgetc( FILE * f );
118 int xungetc(
int c, FILE * f );
124 size_t xfread(
void * ptr,
size_t size,
size_t count, FILE * stream );
125 size_t xfwrite(
const void * ptr,
size_t size,
size_t count, FILE * stream );
135 int xfeof ( FILE * f );
int xio_getlinesread(FILE *f)
Get number of read lines from stream.
map< FILE *, XFILE * > XFILEMAP
mapping of ptr to regular file structure to extended structure
FILE * xfreopen(const char *filename, const char *mode, FILE *stream)
Reopen stream with different file or mode.
char * xio_getfulldescription(FILE *f)
Get pointer to string with full file description.
void xrewind(FILE *f)
File positioning.
size_t xfread(void *ptr, size_t size, size_t count, FILE *stream)
Direct input/output.
int get_verbosity()
Get current XIO debug verbosity level.
int xgetc(FILE *f)
Get character from stream (function)
char * xfgets(char *s, int n, FILE *in)
Character input/output.
size_t xfwrite(const void *ptr, size_t size, size_t count, FILE *stream)
Write block of data to stream, handle errors.
static void init()
initialize XIO library
int xfgetc(FILE *f)
Get character from stream (function)
char * xio_getfmode(FILE *f)
Get file mode from file stream.
char * filename
file name in the time of opening
int verbosity_
internal XIO debug: print info at each XIO function
static Xio * get_instance()
return instance
FILE * xfopen(const char *fname, const char *mode)
File access.
char * xio_getfname(FILE *f)
XIO library extensions.
int xfclose(FILE *stream)
Close file (function)
XFILE structure holds additional info to generic FILE.
int lineno
last read line (only for text files)
int xfscanf(FILE *in, const char *fmt,...)
FSCANF WITH ERROR HANDLING.
Global macros to enhance readability and debugging, general constants.
int xfprintf(FILE *out, const char *fmt,...)
Formatted input/output.
struct xfile XFILE
XFILE structure holds additional info to generic FILE.
void set_verbosity(int verb)
Enable/Disable XIO debug output for EACH XIO function call.
int xfflush(FILE *f)
Flush stream (function)
XFILEMAP & get_xfile_map()
Get XIO mapping instance.
int xungetc(int c, FILE *f)
Unget character from stream (function)
int xfeof(FILE *f)
Error-handling.
XFILEMAP xfiles_map_
mapping instance