1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-23 09:36:31 -05:00
uemacs/fileio.h

39 lines
975 B
C

#ifndef _FILEIO_H_
#define _FILEIO_H_
#include "crypt.h"
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 ;
#define FTYPE_NONE 0
#define FTYPE_UNIX 1
#define FTYPE_DOS 2
#define FTYPE_MAC 4
/* FTYPE_MIXED [ 3, 5, 6, 7] */
#if CRYPT
#include "retcode.h"
extern boolean is_crypted ; /* currently encrypting? */
#endif
extern char *fline ; /* dynamic return line */
extern int flen ; /* current allocated length of fline */
extern int ftype ;
extern int fpayload ; /* actual length of fline content */
fio_code ffclose( void) ;
fio_code ffgetline( void) ;
fio_code ffputline( char *buf, int nbuf, int dosflag) ;
fio_code ffropen( const char *fn) ;
fio_code ffwopen( const char *fn) ;
#endif