I had forgotten to add pipecom.h

Moreover, I got fed up with error due to const/non const, so I modified
PipeComSend to take a const argument. THe consequence is that it will not run
under plain C any more.
This commit is contained in:
evomarc 2001-02-01 05:17:16 +00:00
commit 1ace1cf8f9
2 changed files with 63 additions and 6 deletions

48
eo/src/utils/pipecom.h Normal file
View file

@ -0,0 +1,48 @@
/* ----------------------------------------------------------------------
* Where........: CMAP - Polytechnique
* File.........: pipecom.h
* Author.......: Bertrand Lamy (EEAAX)
* Created......: Thu Mar 9 17:21:15 1995
* Description..: Pipe communication with a process
*
* Ident........: $Id: pipecom.h,v 1.2 2001-02-09 05:09:26 evomarc Exp $
* ----------------------------------------------------------------------
*/
#ifndef PIPECOM_H
#define PIPECOM_H
// this file cannot be used from C or C++ any more due to some const additions
// however, if you remove the const, it should work in C also
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
typedef struct PipeCommunication {
FILE *fWrit;
FILE *fRead;
int pid;
} PCom;
PCom *PipeComOpen( char *prog );
PCom *PipeComOpenArgv( char *prog, char *argv[] );
int PipeComSend( PCom *to, const char *line );
int PipeComSendn( PCom *to, const char *data, int n );
int PipeComReceive( PCom *from, char *data, int max );
int PipeComClose( PCom *to );
int PipeComWaitFor( PCom *from, char *what );
#ifdef __cplusplus
} /* ferme extern "C" */
#endif
#endif /* PIPECOM_H */