# pipecom.h

    00001 /* ----------------------------------------------------------------------
    00002  * Where........: CMAP - Polytechnique
    00003  * File.........: pipecom.h
    00004  * Author.......: Bertrand Lamy (EEAAX)
    00005  * Created......: Thu Mar  9 17:21:15 1995
    00006  * Description..: Pipe communication with a process
    00007  * ----------------------------------------------------------------------
    00008  */
    00009
    00010 // This file cannot be used from C any more due to some const additions.
    00011 // However, if you remove the const, it should work in C as well.
    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 // Local Variables:
    00043 // coding: iso-8859-1
    00044 // mode: C++
    00045 // c-file-style: "Stroustrup"
    00046 // fill-column: 80
    00047 // End: