[comp.std.c] compressed maps

hokey%plus5@ADS.COM (Hokey) (06/05/88)

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

honey@umix.cc.umich.edu (Peter Honeyman) (06/05/88)

i get my pathalias input from this script:

for i in $*; do
	case $i in
	*.Z)	echo "file {`expr $i : '\(.*\).Z'`}
		zcat $i ;;
	*)	echo "file {$i}"
		cat $i ;;
	esac
	echo "private {}"
done | pathalias ...

the "file {}" syntax is new; if you aren't ftp-ing pathalias regularly,
you'll get a syntax error.

	peter

jbs@fenchurch.MIT.EDU (Jeff Siegal) (06/05/88)

In article <4117@umix.cc.umich.edu> honey@citi.umich.edu (Peter Honeyman) writes:
>[...]
>the "file {}" syntax is new; if you aren't ftp-ing pathalias regularly,
                                            ^^^
>you'll get a syntax error.

From where?

Jeff Siegal