Annotation of OpenXM/src/kan96xx/plugin/file2.h, Revision 1.3
1.3 ! takayama 1: /* $OpenXM: OpenXM/src/kan96xx/plugin/file2.h,v 1.2 2000/01/16 07:55:47 takayama Exp $ */
1.1 maekawa 2: /* file2.h */
3:
4: #define MAGIC2 "Buffered IO by FILE2"
5: /* ob.tag == Sfile, ob.lc.str == MAGIC2, ob.lc.voidp = (FILE2 *)fp2; */
6: #define FILE2BSIZE 1024
7:
8: typedef struct FILE2 {
9: int fd;
10: int initialized;
11: unsigned char readBuf[FILE2BSIZE];
12: unsigned char writeBuf[FILE2BSIZE];
13: int readpos;
14: int readsize;
15: int writepos;
16: int limit;
17: int watch;
18: FILE *watchFile;
19: void *mathcapList; /* pointer to struct object */
1.3 ! takayama 20: FILE *log_incomming;
! 21: FILE *log_outgoing;
1.1 maekawa 22: } FILE2 ;
23:
24: FILE2 *fp2open(int fd);
25: int fp2fflush(FILE2 *fp);
26: int fp2fclose(FILE2 *fp);
27: int fp2fputc(int c,FILE2 *fp);
28: int fp2fgetc(FILE2 *fp);
29: int fp2select(FILE2 *fp2, int t);
30: int fp2dumpBuffer(FILE2 *fp);
31: int fp2clearReadBuf(FILE2 *fp);
32: int fp2write(FILE2 *fp,char *data,int size);
33: int fp2watch(FILE2 *fp,FILE *log);
34: int fp2stopWatch(FILE2 *fp);
1.3 ! takayama 35: int fp2log(FILE2 *fp,FILE *incomming,FILE *outgoing);
! 36: int fp2stopLog(FILE2 *fp);
1.1 maekawa 37:
38:
39:
40:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>