00001 #ifndef _DYLIB_IO_H
00002 #define _DYLIB_IO_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "dylib_std.h"
00023 #ifdef _DYLIB_FORTRAN
00024 #include "dylib_fortran.h"
00025 #endif
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 typedef int ioid ;
00040
00041 #define IOID_NOSTRM ((ioid) 0)
00042 #define IOID_INV ((ioid) -1)
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 typedef enum {DY_LCNIL,DY_LCNUM,DY_LCID,DY_LCDEL,DY_LCFS,DY_LCQS,
00068 DY_LCEOF,DY_LCERR} lexclass ;
00069
00070 #ifdef __cplusplus
00071 typedef struct { lexclass clazz ;
00072 char *string ; } lex_struct ;
00073 #else
00074 typedef struct { lexclass class ;
00075 char *string ; } lex_struct ;
00076 #endif
00077
00078 extern bool dyio_ioinit(void) ;
00079 extern void dyio_ioterm(void) ;
00080
00081 extern ioid dyio_openfile(const char *path, const char *mode) ;
00082 extern bool dyio_isactive(ioid id) ;
00083 extern bool dyio_closefile(ioid id) ;
00084 extern bool dyio_setmode(ioid id, char mode), dyio_ttyq(ioid id) ;
00085
00086 extern bool dyio_chgerrlog(const char *path, bool echo) ;
00087
00088 extern const char *dyio_idtopath(ioid id) ;
00089 extern ioid dyio_pathtoid(const char *path, const char *mode) ;
00090
00091 extern long dyio_mark(ioid id) ;
00092 extern bool dyio_backup(ioid id, long there) ;
00093
00094 extern bool dyio_scan(ioid id, const char pattern[], bool rwnd, bool wrap) ;
00095 extern lex_struct *dyio_scanlex(ioid id),
00096 *dyio_scanstr(ioid id, lexclass stype,
00097 int fslen, char qschr, char qechr) ;
00098
00099 extern void dyio_flushio(ioid id, bool echo),
00100 dyio_outfmt(ioid id, bool echo, const char *pattern, ... ),
00101 dyio_outchr(ioid id, bool echo, char chr) ;
00102 extern int dyio_outfxd(char *buffer, int fldsze, char lcr,
00103 const char *pattern, ... ) ;
00104
00105 #ifdef _DYLIB_FORTRAN
00106 extern void dyio_outfmt_(integer *ftnid,
00107 logical *ftnecho, char *pattern, ... ) ;
00108 #endif
00109
00110 #endif