diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-05-07 16:52:08 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-05-07 16:52:08 +0000 |
commit | d4c3d5293371216acaf2236cc3e49003204d175f (patch) | |
tree | 8ef6987b4e5a268c8f18cd0b8998dbe36f40a458 /lib/pm_system.h | |
parent | 47a0786034bdfc849bb5aacd55640862252d9bb4 (diff) | |
download | netpbm-mirror-d4c3d5293371216acaf2236cc3e49003204d175f.tar.gz netpbm-mirror-d4c3d5293371216acaf2236cc3e49003204d175f.tar.xz netpbm-mirror-d4c3d5293371216acaf2236cc3e49003204d175f.zip |
Add pm_system2(), pm_system2_lp(), pm_system2_vp()
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2759 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/pm_system.h')
-rw-r--r-- | lib/pm_system.h | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/lib/pm_system.h b/lib/pm_system.h index a7560f48..dfcd5b3f 100644 --- a/lib/pm_system.h +++ b/lib/pm_system.h @@ -10,6 +10,32 @@ extern "C" { void +pm_system2_vp(const char * const progName, + const char ** const argArray, + void stdinFeeder(int, void *), + void * const feederParm, + void stdoutAccepter(int, void *), + void * const accepterParm, + int * const termStatusP); + +void +pm_system2_lp(const char * const progName, + void stdinFeeder(int, void *), + void * const feederParm, + void stdoutAccepter(int, void *), + void * const accepterParm, + int * const termStatusP, + ...); + +void +pm_system2(void stdinFeeder(int, void *), + void * const feederParm, + void stdoutAccepter(int, void *), + void * const accepterParm, + const char * const shellCommand, + int * const termStatusP); + +void pm_system_vp(const char * const progName, const char ** const argArray, void stdinFeeder(int, void *), @@ -32,6 +58,21 @@ pm_system(void stdinFeeder(int, void *), void * const accepterParm, const char * const shellCommand); +const char * +pm_termStatusDesc(int const termStatus); + + +/* The following are Standard Input feeders and Standard Output accepters + for pm_system() etc. +*/ +void +pm_feed_null(int const pipeToFeedFd, + void * const feederParm); + +void +pm_accept_null(int const pipetosuckFd, + void * const accepterParm); + struct bufferDesc { /* This is just a parameter for the routines below */ unsigned int size; @@ -40,9 +81,11 @@ struct bufferDesc { }; -/* The following are a Standard Input feeder and a Standard Output accepter - for pm_system(). +/* The struct name "bufferDesc", without the "pm" namespace, is an unfortunate + historical accident. */ +typedef struct bufferDesc pm_bufferDesc; + void pm_feed_from_memory(int const pipeToFeedFd, void * const feederParm); |