Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site xios.UUCP Path: utzoo!dciem!nrcaer!xios!tony From: tony@xios.UUCP (Keeper Of News) Newsgroups: net.sources Subject: Re: Mods to pathalias to recognize compressed input files Message-ID: <317@xios.UUCP> Date: Wed, 1-Oct-86 12:27:22 EDT Article-I.D.: xios.317 Posted: Wed Oct 1 12:27:22 1986 Date-Received: Sat, 4-Oct-86 07:07:03 EDT References: <316@esl.UUCP> Reply-To: tony@xios.UUCP (Keeper Of News) Organization: Xios Systems Corp., Ottawa, Ont. Lines: 34 Keywords: compress(1) pathalias(l) Summary: Anyone who has tried mac@esl.UUCP's patch to pathalais has probably noticed that you quickly run out of processses. I find it hard to believe that this patch has ever worked, unless on his system fclose (actually freopen) knows that the file it is closing is a pipe and does a wait() automagicly. Here is a fix, just add it near the beginning of yywrap at the end of parse.y. while (*Ifiles) { Lineno = 1; + if( Cfile != NULL && + strcmp(Cfile + strlen(Cfile) - 2, ".Z") == 0) { + /* + * Ignore the case where it ends in .Z but is not compressed + * This is the hight of paranoia, and is more effort than I wish + * to exert tonight. + */ + pclose(stdin); + } if (freopen((Cfile = *Ifiles++), "r", stdin)){ /* if compacted, undo .. */ if (strcmp(Cfile + strlen(Cfile) - 2, ".Z") == 0) { /* Check the magic number */ -- ------------------------------------------------------------------------------- Tony Lill Keeper of News @ Xios Systems Corporation 1600 Carling Avenue, Suite 150, Ottawa, Ontario, Canada, K1Z 8R8 (613) 725-5411 xios!tony ------------------------------------------------------------------------------- Not the edge of the world, but we can see it from here.