2013-05-17 10:58:27 -04:00
|
|
|
#ifndef _FILEIO_H_
|
|
|
|
#define _FILEIO_H_
|
|
|
|
|
2013-09-20 06:10:30 -04:00
|
|
|
#include "crypt.h"
|
2013-06-09 05:31:28 -04:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
FIOSUC, /* File I/O, success. */
|
|
|
|
FIOFNF, /* File I/O, file not found. */
|
|
|
|
FIOEOF, /* File I/O, end of file. */
|
|
|
|
FIOERR, /* File I/O, error. */
|
|
|
|
FIOMEM, /* File I/O, out of memory */
|
|
|
|
FIOFUN /* File I/O, eod of file/bad line */
|
|
|
|
} fio_code ;
|
2013-06-09 04:16:02 -04:00
|
|
|
|
2013-06-08 05:32:48 -04:00
|
|
|
#define FTYPE_NONE 0
|
|
|
|
#define FTYPE_UNIX 1
|
|
|
|
#define FTYPE_DOS 2
|
|
|
|
#define FTYPE_MAC 4
|
2013-06-09 05:31:28 -04:00
|
|
|
/* FTYPE_MIXED [ 3, 5, 6, 7] */
|
2013-06-08 05:32:48 -04:00
|
|
|
|
2013-09-20 06:10:30 -04:00
|
|
|
#if CRYPT
|
|
|
|
#include "retcode.h"
|
|
|
|
|
2013-06-10 01:30:06 -04:00
|
|
|
extern boolean is_crypted ; /* currently encrypting? */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern char *fline ; /* dynamic return line */
|
2013-06-10 02:39:19 -04:00
|
|
|
extern int flen ; /* current allocated length of fline */
|
2013-06-10 01:30:06 -04:00
|
|
|
extern int ftype ;
|
2013-06-10 02:39:19 -04:00
|
|
|
extern int fpayload ; /* actual length of fline content */
|
2013-06-08 05:32:48 -04:00
|
|
|
|
2013-06-09 05:31:28 -04:00
|
|
|
fio_code ffclose( void) ;
|
|
|
|
fio_code ffgetline( void) ;
|
2013-06-10 21:51:29 -04:00
|
|
|
fio_code ffputline( char *buf, int nbuf, int dosflag) ;
|
2013-06-09 05:31:28 -04:00
|
|
|
fio_code ffropen( const char *fn) ;
|
|
|
|
fio_code ffwopen( const char *fn) ;
|
2013-05-17 10:58:27 -04:00
|
|
|
|
|
|
|
#endif
|