00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef EO_PIPECOM_H
00014 #define EO_PIPECOM_H
00015
00016 #include <stdio.h>
00017
00018
00019 typedef struct PipeCommunication {
00020 FILE *fWrit;
00021 FILE *fRead;
00022 int pid;
00023 } PCom;
00024
00025
00026 extern PCom *PipeComOpen( char *prog );
00027 extern PCom *PipeComOpenArgv( char *prog, char *argv[] );
00028
00029 extern int PipeComSend( PCom *to, const char *line );
00030 extern int PipeComSendn( PCom *to, const char *data, int n );
00031
00032 extern int PipeComReceive( PCom *from, char *data, int max );
00033
00034 extern int PipeComClose( PCom *to );
00035 extern int PipeComWaitFor( PCom *from, char *what );
00036
00037
00038 #endif // EO_PIPECOM_H
00039
00040
00041
00042
00043
00044
00045
00046
00047