Path: utzoo!attcan!utgpu!watmath!iuvax!bobmon From: bobmon@iuvax.cs.indiana.edu (RAMontante) Newsgroups: comp.lang.c Subject: Re: File descriptors and streams and co Message-ID: <19829@iuvax.cs.indiana.edu> Date: 19 Apr 89 15:05:23 GMT Reply-To: bobmon@iuvax.cs.indiana.edu (RAMontante) Organization: malkaryotic Lines: 17 I've approached this "changing stdin" idea from the other way around: all my I/O calls are of the form fgets(buffer, size, MyIn); fputs(string, MyOut); and the initialization logic is sort of like: if (input_name_supplied) { MyIn = fopen(input_name,"r"); /* what? me, error-check? */ } else MyIn = stdin; /* likewise for output */ For what kinds of situation is this approach inadequate?