Annotation of OpenXM/src/kan96xx/plugin/file2.h, Revision 1.4
1.4 ! takayama 1: /* $OpenXM: OpenXM/src/kan96xx/plugin/file2.h,v 1.3 2003/11/17 05:45: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;
1.4 ! takayama 11: unsigned char *readBuf;
! 12: unsigned char *writeBuf;
1.1 maekawa 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);
1.4 ! takayama 27: char *fp2fcloseInString(FILE2 *fp2, int *sizep);
1.1 maekawa 28: int fp2fputc(int c,FILE2 *fp);
29: int fp2fgetc(FILE2 *fp);
30: int fp2select(FILE2 *fp2, int t);
31: int fp2dumpBuffer(FILE2 *fp);
32: int fp2clearReadBuf(FILE2 *fp);
33: int fp2write(FILE2 *fp,char *data,int size);
34: int fp2watch(FILE2 *fp,FILE *log);
35: int fp2stopWatch(FILE2 *fp);
1.3 takayama 36: int fp2log(FILE2 *fp,FILE *incomming,FILE *outgoing);
37: int fp2stopLog(FILE2 *fp);
1.1 maekawa 38:
39:
40:
41:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>