File: [local] / OpenXM / src / kan96xx / plugin / file2.h (download)
Revision 1.3, Mon Nov 17 05:45:47 2003 UTC (20 years, 7 months ago) by takayama
Branch: MAIN
Changes since 1.2: +5 -1
lines
[(oxLog) client log_file_for_incomming_data log_file_for_outgoing_data] extension
is for taking logs of ox stream in the binary format.
For details, (extension-oxLog) usage
|
/* $OpenXM: OpenXM/src/kan96xx/plugin/file2.h,v 1.3 2003/11/17 05:45:47 takayama Exp $ */
/* file2.h */
#define MAGIC2 "Buffered IO by FILE2"
/* ob.tag == Sfile, ob.lc.str == MAGIC2, ob.lc.voidp = (FILE2 *)fp2; */
#define FILE2BSIZE 1024
typedef struct FILE2 {
int fd;
int initialized;
unsigned char readBuf[FILE2BSIZE];
unsigned char writeBuf[FILE2BSIZE];
int readpos;
int readsize;
int writepos;
int limit;
int watch;
FILE *watchFile;
void *mathcapList; /* pointer to struct object */
FILE *log_incomming;
FILE *log_outgoing;
} FILE2 ;
FILE2 *fp2open(int fd);
int fp2fflush(FILE2 *fp);
int fp2fclose(FILE2 *fp);
int fp2fputc(int c,FILE2 *fp);
int fp2fgetc(FILE2 *fp);
int fp2select(FILE2 *fp2, int t);
int fp2dumpBuffer(FILE2 *fp);
int fp2clearReadBuf(FILE2 *fp);
int fp2write(FILE2 *fp,char *data,int size);
int fp2watch(FILE2 *fp,FILE *log);
int fp2stopWatch(FILE2 *fp);
int fp2log(FILE2 *fp,FILE *incomming,FILE *outgoing);
int fp2stopLog(FILE2 *fp);