Path: utzoo!dciem!nrcaer!scs!spl1!laidbak!att!ihnp4!ucbvax!ADS.COM!hokey%plus5 From: hokey%plus5@ADS.COM (Hokey) Newsgroups: comp.std.c Subject: Re: compressed maps Message-ID: <2447@plus5.UUCP> Date: 4 Jun 88 17:21:45 GMT Article-I.D.: plus5.2447 References: <478@ontenv.UUCP> <3096@cognos.UUCP> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: hokey%plus5@ads.com (Hokey) Organization: Plus Five Computer Services, St. Louis, MO Lines: 18 Summary: We need more than freopen(). I just made some small changes to parse.y which examined the file name. If the name ends in .Z, make input come from a pipe from zcat. This has been working for me since V8 pathalias. This does point out a shortcoming in the stdio routines. It would be really nice to have [fp][fp]reopen() routines, to handle all the possible combinations of "Close the old file/pipe and make it a new file/pipe". Another possibility would be to have a preopen() function. In this case, both freopen() and preopen() would have to be able to properly close whatever (either a file or a pipe) is currently associated with the FILE before opening the new file or pipe. -- Hokey