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
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #include "dylib_std.h"
00035 #ifdef _DYLIB_FORTRAN
00036 #include "dylib_fortran.h"
00037 #endif
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 typedef int ioid ;
00052
00053 #define IOID_NOSTRM ((ioid) 0)
00054 #define IOID_INV ((ioid) -1)
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079 typedef enum {LCNIL,LCNUM,LCID,LCDEL,LCFS,LCQS,LCEOF,LCERR} lexclass ;
00080
00081 #ifdef __cplusplus
00082 typedef struct { lexclass clazz ;
00083 char *string ; } lex_struct ;
00084 #else
00085 typedef struct { lexclass class ;
00086 char *string ; } lex_struct ;
00087 #endif
00088
00089 extern bool dyio_ioinit(void) ;
00090 extern void dyio_ioterm(void) ;
00091
00092 extern ioid dyio_openfile(const char *path, const char *mode) ;
00093 extern bool dyio_isactive(ioid id) ;
00094 extern bool dyio_closefile(ioid id) ;
00095 extern bool dyio_setmode(ioid id, char mode), dyio_ttyq(ioid id) ;
00096
00097 extern bool dyio_chgerrlog(const char *path, bool echo) ;
00098
00099 extern const char *dyio_idtopath(ioid id) ;
00100 extern ioid dyio_pathtoid(const char *path, const char *mode) ;
00101
00102 extern long dyio_mark(ioid id) ;
00103 extern bool dyio_backup(ioid id, long there) ;
00104
00105 extern bool dyio_scan(ioid id, const char pattern[], bool rwnd, bool wrap) ;
00106 extern lex_struct *dyio_scanlex(ioid id),
00107 *dyio_scanstr(ioid id, lexclass stype,
00108 int fslen, char qschr, char qechr) ;
00109
00110 extern void dyio_flushio(ioid id, bool echo),
00111 dyio_outfmt(ioid id, bool echo, const char *pattern, ... ),
00112 dyio_outchr(ioid id, bool echo, char chr) ;
00113 extern int dyio_outfxd(char *buffer, int fldsze, char lcr,
00114 const char *pattern, ... ) ;
00115
00116 #ifdef _DYLIB_FORTRAN
00117 extern void dyio_outfmt_(integer *ftnid,
00118 logical *ftnecho, char *pattern, ... ) ;
00119 #endif
00120
00121 #endif