process I/O manipulation with C.

Aidan Delaney delaa at datlog.co.uk
Wed Dec 13 20:36:46 AEST 1989


Hi all,

I have this problem with I/O interaction between C and an executing
process. I am running DOS 4.0 and TurboC 1.5.

A software package which I use all the time (no source available)
reads its input from disk and places its output in a disk file.
The input filename is supplied as a command line parameter, thats
no problem, neither is the fact that the results are written to disk.

What is the problem is that the user (myself) has the option
to alter some aspects of the output. Upon initial execution, the
program displays

Option>

and waits for a response to be typed. A CR indicates that the default
options are to be taken.

I want to execute this program from a C program (TurboC), but I also
wish to be able to supply the CR to the option line above. I want
ZERO interaction on the part of the individual who executes
the C code, which in turn calls the processing package, and ideally
I would also wish to suppress ALL output (to the screen) from this
package.

How can I do this?

Thanks for any help, 

Aidan.   delaa%uk.co.datlog at ukc.ac.uk

ps. I am also submitting a version of this query to comp.sys.ibm.pc
but with the query being aimed at obtaining a solution using
DOS command scripts and batch files (though the C method is
much preferred!!!).



More information about the Comp.lang.c mailing list