I/O functions with filename storing, able to track current line in opened file. All standard stdio functions working with files (not stdin, stdout, stderr) should be replaced by their equivalents from XIO library.
More...
|
static XFILE * | xio_getfptr (FILE *f) |
| Internal XIO locator. More...
|
|
char * | xio_getfname (FILE *f) |
| Get file name from pointer to FILE structure. More...
|
|
char * | xio_getfmode (FILE *f) |
| Get file mode from file stream. More...
|
|
int | xio_getlinesread (FILE *f) |
| Get number of lines that were completely read from file since fopen() or rewind() More...
|
|
char * | xio_getfulldescription (FILE *f) |
| Get pointer to string with full file description. More...
|
|
FILE * | xfopen (const std::string &fname, const char *mode) |
|
FILE * | xfopen (const char *fname, const char *mode) |
| fopen() with error handling and filename store More...
|
|
int | xfflush (FILE *f) |
| Flush file stream. More...
|
|
int | xfclose (FILE *stream) |
| FCLOSE WITH ERROR HANDLING. More...
|
|
FILE * | xfreopen (const char *filename, const char *mode, FILE *stream) |
| Reopen stream with different file or mode. More...
|
|
int | xfprintf (FILE *out, const char *fmt,...) |
| FPRINTF WITH ERROR HANDLING. More...
|
|
int | xfscanf (FILE *in, const char *fmt,...) |
| FSCANF WITH ERROR HANDLING. More...
|
|
int | xgetc (FILE *f) |
| getc() with error handling and line count More...
|
|
int | xfgetc (FILE *f) |
| fgetc() with error handling and line count More...
|
|
int | xungetc (int c, FILE *f) |
| ungetc() with error handling and line count More...
|
|
int | xrename (const char *oldname, const char *newname) |
| Changes the name of the file or directory specified by oldname to newname. More...
|
|
size_t | xfread (void *ptr, size_t size, size_t count, FILE *stream) |
| Read block of data from stream, handle errors. More...
|
|
size_t | xfwrite (const void *ptr, size_t size, size_t count, FILE *stream) |
| Write block of data to stream, handle errors. More...
|
|
char * | xfgets (char *s, int n, FILE *in) |
| FGETS WITH ERROR HANDLING and line count. More...
|
|
void | xrewind (FILE *f) |
| Rewind file, handle line count. More...
|
|
int | xfeof (FILE *f) |
| Check END OF FILE. More...
|
|
I/O functions with filename storing, able to track current line in opened file. All standard stdio functions working with files (not stdin, stdout, stderr) should be replaced by their equivalents from XIO library.
Copyright (C) 2007 Technical University of Liberec. All rights reserved.
Please make a following refer to Flow123d on your project site if you use the program for any purpose, especially for academic research: Flow123d, Research Centre: Advanced Remedial Technologies, Technical University of Liberec, Czech Republic
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
$Id$ $Revision$ $LastChangedBy$ $LastChangedDate$
- Date
- 6.4.2010
- Author
- Jiri Jenicek
- Todo:
- Better error handling ( perror()? strerror()? )
Definition in file xio.cc.