*** buffer.c Fri May 9 13:58:41 2003 --- /usr/zenez/build/ou8/ccvs/src/buffer.c Fri May 9 14:44:24 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 = my_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; *************** *** 1422,1428 **** # endif # ifndef NO_SOCKET_TO_FD { ! /* shutdown() sockets */ if (S_ISSOCK(s.st_mode)) shutdown ( fileno (bc->fp), 0); } --- 1422,1428 ---- # endif # ifndef NO_SOCKET_TO_FD { ! /* my_shutdown() sockets */ if (S_ISSOCK(s.st_mode)) my_shutdown ( fileno (bc->fp), 0); } *************** *** 1424,1430 **** { /* shutdown() sockets */ if (S_ISSOCK(s.st_mode)) ! shutdown ( fileno (bc->fp), 0); } # endif /* NO_SOCKET_TO_FD */ # ifdef START_RSH_WITH_POPEN_RW --- 1424,1430 ---- { /* my_shutdown() sockets */ if (S_ISSOCK(s.st_mode)) ! my_shutdown ( fileno (bc->fp), 0); } # endif /* NO_SOCKET_TO_FD */ # ifdef START_RSH_WITH_POPEN_RW *************** *** 1450,1456 **** else # endif # ifndef NO_SOCKET_TO_FD ! /* shutdown() sockets */ if (S_ISSOCK(s.st_mode)) shutdown ( fileno (bc->fp), 1); # else --- 1450,1456 ---- else # endif # ifndef NO_SOCKET_TO_FD ! /* my_shutdown() sockets */ if (S_ISSOCK(s.st_mode)) my_shutdown ( fileno (bc->fp), 1); # else *************** *** 1452,1458 **** # ifndef NO_SOCKET_TO_FD /* shutdown() sockets */ if (S_ISSOCK(s.st_mode)) ! shutdown ( fileno (bc->fp), 1); # else { /* I'm not sure I like this empty block, but the alternative --- 1452,1458 ---- # ifndef NO_SOCKET_TO_FD /* my_shutdown() sockets */ if (S_ISSOCK(s.st_mode)) ! my_shutdown ( fileno (bc->fp), 1); # else { /* I'm not sure I like this empty block, but the alternative