| 1 |
/* $Header: /home/cvsroot/dvipdfmx/src/mfileio.h,v 1.3 2002/10/30 02:27:12 chofchof Exp $ |
| 2 |
|
| 3 |
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. |
| 4 |
|
| 5 |
Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata, |
| 6 |
the dvipdfmx project team <[email protected]> |
| 7 |
|
| 8 |
Copyright (C) 1998, 1999 by Mark A. Wicks <[email protected]> |
| 9 |
|
| 10 |
This program is free software; you can redistribute it and/or modify |
| 11 |
it under the terms of the GNU General Public License as published by |
| 12 |
the Free Software Foundation; either version 2 of the License, or |
| 13 |
(at your option) any later version. |
| 14 |
|
| 15 |
This program is distributed in the hope that it will be useful, |
| 16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 |
GNU General Public License for more details. |
| 19 |
|
| 20 |
You should have received a copy of the GNU General Public License |
| 21 |
along with this program; if not, write to the Free Software |
| 22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
| 23 |
*/ |
| 24 |
|
| 25 |
#ifndef _MFILEIO_H_ |
| 26 |
#define _MFILEIO_H_ |
| 27 |
|
| 28 |
#include <stdio.h> |
| 29 |
#include "numbers.h" |
| 30 |
|
| 31 |
#ifdef IODEBUG |
| 32 |
FILE *mfopen (const char *name, const char *mode, |
| 33 |
const char *function, int line); |
| 34 |
int mfclose (FILE *file, const char *function, int line); |
| 35 |
#define MFOPEN(name,mode) \ |
| 36 |
mfopen((name),(mode),__FUNCTION__,__LINE__) |
| 37 |
#define MFCLOSE(file) \ |
| 38 |
mfclose((file),__FUNCTION__,__LINE__) |
| 39 |
#else |
| 40 |
#define MFOPEN(name,mode) fopen((name),(mode)) |
| 41 |
#define MFCLOSE(file) fclose(file) |
| 42 |
#endif |
| 43 |
|
| 44 |
extern void seek_absolute (FILE *file, long pos); |
| 45 |
extern void seek_relative (FILE *file, long pos); |
| 46 |
|
| 47 |
extern void seek_end (FILE *file); |
| 48 |
|
| 49 |
extern long tell_position (FILE *file); |
| 50 |
|
| 51 |
extern long file_size (FILE *file); |
| 52 |
|
| 53 |
extern char *mfgets (char *buffer, int length, FILE *file); |
| 54 |
|
| 55 |
extern char work_buffer[]; |
| 56 |
|
| 57 |
#define WORK_BUFFER_SIZE 1024 |
| 58 |
|
| 59 |
#endif /* _MFILEIO_H_ */ |