| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* gzio.c (gzio_set_prop): Remove unused ops variable.
|
|
|
|
|
|
|
|
| |
Failed on Cygwin.
* gzio.c (gzio_stream_s): Variable defined here.
* gzio.h (gzio_stream_s): Turn to declaration with extern.
|
|
|
|
| |
* gzio.c (gzio_stream_print, gzio_get_prop): Remove unused locals.
|
|
|
|
|
|
| |
* gzio.c (gzio_stream_print): New static function.
(gzio_ops_rd, gzio_ops_wr): Wire in function instead of
stream_print_op.
|
|
|
|
|
|
| |
* gzio.c (gzio_get_prop): Don't play games with a computed :name;
this property is relied upon for getting the path associated
with an open file.
|
|
|
|
|
|
|
| |
* gzio.c (gzio_get_prop, gzio_set_prop): Handle :byte-oriented
symbol, connecting it to the is_byte_oriented flag.
This is already implemented, by copy and paste from the
stdio routines.
|
|
|
|
|
| |
* gzio.c (struct gzio_handle): Remove is_real_time flag.
(make_gzio_stream): Remove initialization of flag.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gzio.c (w_gzopen_mode): Use w_open_mode if available, in order
to support most of the flags (including "x" which Zlib has,
but which we are not passing through).
* stream.c (w_open_mode): New function formed from w_fopen_mode
content.
(w_fopen_mode): Call w_open_mode.
* stream.c (w_open_mode): Declared.
|
|
* Makefile (OBJS): Conditionally include new gzio.o object file.
* configure: Detect external zlib, setting up new have_zlib
variable in config.make, HAVE_ZLIB in config.h, and also -lz
in conf_ldlibs.
* gzio.[ch]: New files, implementing the stream abstraction
over the gzip file I/O routines in zlib.
* stream.h (struct stdio_mode): New gzip flag and gzlevel
bitfield to hold a value 0 to 9.
(stdio_mode_init_blank, stdio_mode_init_r, stdio_mode_init_rpb):
Update intializers to cover new bitfield members.
* stream.c: Include <zlib.h> and "gzio.h" if HAVE_ZLIB.
(do_parse_mode): Recognize new mode modifier letter "z",
setting the gzip flag in the mode structure. If it's followed
by a digit, set the gziplevel to that value.
(format_mode): Don't output "b" letter for binary mode if
gzip is set, because gzopen interprets "b" differently.
Don't put out "t" if gzip is set. If gzip mode is specified,
do put out the level. If gzip is set, and gziplevel is nonzero
then encode the level: gzopen will understand it.
(open_file): If gzip mode is requested, then open the file
using gzopen mode, a new function in gzio.c. The return a
gzio stream based on the returned gzip file handle. However,
if we are reading, and the gzip stream indicates that it's
not decompressing anything, then we close it and open the
file using an ordinary stream.
(stream_init): Call gzio_init if HAVE_ZLIB is true. This is done
here because the module is integrated with stream.c, and also
so that lib.c doesn't have to know about HAVE_ZLIB and <zlib.h>.
|