*** src/buffer.c.org Fri May 9 13:58:41 2003 --- src/buffer.c Fri May 9 15:38:39 2003 *************** *** 29,35 **** /* Initialize a buffer structure. */ struct buffer * ! buf_initialize (input, output, flush, block, shutdown, memory, closure) int (*input) PROTO((void *, char *, int, int, int *)); int (*output) PROTO((void *, const char *, int, int *)); int (*flush) PROTO((void *)); --- 29,35 ---- /* Initialize a buffer structure. */ struct buffer * ! buf_initialize (input, output, flush, block, my_shutdown, memory, closure) int (*input) PROTO((void *, char *, int, int, int *)); int (*output) PROTO((void *, const char *, int, int *)); int (*flush) PROTO((void *)); *************** *** 34,40 **** int (*output) PROTO((void *, const char *, int, int *)); int (*flush) PROTO((void *)); int (*block) PROTO((void *, int)); ! int (*shutdown) PROTO((struct buffer *)); void (*memory) PROTO((struct buffer *)); void *closure; { --- 34,40 ---- int (*output) PROTO((void *, const char *, int, int *)); int (*flush) PROTO((void *)); int (*block) PROTO((void *, int)); ! int (*my_shutdown) PROTO((struct buffer *)); void (*memory) PROTO((struct buffer *)); void *closure; { *************** *** 48,54 **** buf->output = output; buf->flush = flush; buf->block = block; ! buf->shutdown = shutdown; buf->memory_error = memory ? memory : buf_default_memory_error; buf->closure = closure; return buf; --- 48,54 ---- buf->output = output; buf->flush = flush; buf->block = block; ! buf->my_shutdown = shutdown; buf->memory_error = memory ? memory : buf_default_memory_error; buf->closure = closure; return buf; *************** *** 1203,1210 **** buf_shutdown (buf) struct buffer *buf; { ! if (buf->shutdown) ! return (*buf->shutdown) (buf); return 0; } --- 1203,1210 ---- buf_shutdown (buf) struct buffer *buf; { ! if (buf->my_shutdown) ! return (*buf->my_shutdown) (buf); return 0; } *************** *** 1254,1260 **** { struct stdio_buffer_closure *bc; ! assert(buf->shutdown == stdio_buffer_shutdown); bc = (struct stdio_buffer_closure *) buf->closure; --- 1254,1260 ---- { struct stdio_buffer_closure *bc; ! assert(buf->my_shutdown == stdio_buffer_shutdown); bc = (struct stdio_buffer_closure *) buf->closure; *** src/buffer.h.org Sun Jul 21 18:05:08 2002 --- src/buffer.h Fri May 9 15:35:54 2003 *************** *** 61,67 **** appropriate should be done at this point. This may be NULL. It should return 0 on success, or an errno code. This entry point exists for the compression code. */ ! int (*shutdown) PROTO((struct buffer *)); /* This field is passed to the INPUT, OUTPUT, and BLOCK functions. */ void *closure; --- 61,67 ---- appropriate should be done at this point. This may be NULL. It should return 0 on success, or an errno code. This entry point exists for the compression code. */ ! int (*my_shutdown) PROTO((struct buffer *)); /* This field is passed to the INPUT, OUTPUT, and BLOCK functions. */ void *closure;