[BACK]Return to file2.h CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / plugin

File: [local] / OpenXM / src / kan96xx / plugin / file2.h (download)

Revision 1.6, Thu Dec 16 08:42:14 2004 UTC (19 years, 5 months ago) by takayama
Branch: MAIN
CVS Tags: R_1_3_1-2, RELEASE_1_3_1_13b, RELEASE_1_2_3_12, RELEASE_1_2_3, KNOPPIX_2006, HEAD, DEB_REL_1_2_3-9
Changes since 1.5: +4 -2 lines

Calling gnuplot by using mkfifo, popen, ... to enable mouse actions.
Ref: gpReadMouseTest.c  in gnuplot.info

But, there still remains bug to open the fifo file.
In order to try the new implementation,   try
/gnuplot.callingMethod 1 def
in gnuplot.sm1

/* $OpenXM: OpenXM/src/kan96xx/plugin/file2.h,v 1.6 2004/12/16 08:42:14 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;
  unsigned char *writeBuf;
  int readpos;
  int readsize;
  int writepos;
  int limit;
  int watch;
  FILE *watchFile;
  void *mathcapList; /* pointer to struct object */
  FILE *log_incomming;
  FILE *log_outgoing;
  int popened; /* 1 => popen, 0 => fopen etc ... */
  FILE *pfp; /* used for pclose */
} FILE2 ;

FILE2 *fp2open(int fd);
int fp2fflush(FILE2 *fp);
int fp2fclose(FILE2 *fp);
char *fp2fcloseInString(FILE2 *fp2, int *sizep);
int fp2fputc(int c,FILE2 *fp);
int fp2fputs(char *s,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);
void fp2setfp(FILE2 *fp2, FILE *fp,int popened);