I wrote a program in C which has a function that processes files which can be passed to it by a file pointer.
void process_my_file(FILE *fptr, ...) {
/* do work */
}
I would like to read some input from standard input and pass it to my function, without having to write the input to a temporary file. Would it be possible to pass it through the file pointer argument, as if it were a file, without having to write it to disk? Could it be done through some other argument which I could add to the signature?
I'm new to this, and need some suggestions. Thanks in advance!