buffer.h (32785) | buffer.h (34461) |
---|---|
1/* Declarations concerning the buffer data structure. */ 2 3#if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT) 4 5/* 6 * We must read data from a child process and send it across the 7 * network. We do not want to block on writing to the network, so we 8 * store the data from the child process in memory. A BUFFER --- 82 unchanged lines hidden (view full) --- 91 * allocated. The buffer is BUFFER_DATA_SIZE bytes. 92 */ 93 char *text; 94}; 95 96/* The size we allocate for each buffer_data structure. */ 97#define BUFFER_DATA_SIZE (4096) 98 | 1/* Declarations concerning the buffer data structure. */ 2 3#if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT) 4 5/* 6 * We must read data from a child process and send it across the 7 * network. We do not want to block on writing to the network, so we 8 * store the data from the child process in memory. A BUFFER --- 82 unchanged lines hidden (view full) --- 91 * allocated. The buffer is BUFFER_DATA_SIZE bytes. 92 */ 93 char *text; 94}; 95 96/* The size we allocate for each buffer_data structure. */ 97#define BUFFER_DATA_SIZE (4096) 98 |
99/* The type of a function passed as a memory error handler. */ 100typedef void (*BUFMEMERRPROC) PROTO ((struct buffer *)); 101 |
|
99extern struct buffer *buf_initialize PROTO((int (*) (void *, char *, int, 100 int, int *), 101 int (*) (void *, const char *, 102 int, int *), 103 int (*) (void *), 104 int (*) (void *, int), 105 int (*) (void *), 106 void (*) (struct buffer *), 107 void *)); | 102extern struct buffer *buf_initialize PROTO((int (*) (void *, char *, int, 103 int, int *), 104 int (*) (void *, const char *, 105 int, int *), 106 int (*) (void *), 107 int (*) (void *, int), 108 int (*) (void *), 109 void (*) (struct buffer *), 110 void *)); |
111extern void buf_free PROTO((struct buffer *)); |
|
108extern struct buffer *buf_nonio_initialize PROTO((void (*) (struct buffer *))); 109extern struct buffer *stdio_buffer_initialize 110 PROTO((FILE *, int, void (*) (struct buffer *))); 111extern struct buffer *compress_buffer_initialize 112 PROTO((struct buffer *, int, int, void (*) (struct buffer *))); 113extern struct buffer *packetizing_buffer_initialize 114 PROTO((struct buffer *, int (*) (void *, const char *, char *, int), 115 int (*) (void *, const char *, char *, int, int *), void *, --- 6 unchanged lines hidden (view full) --- 122extern int buf_flush PROTO((struct buffer *, int)); 123extern int set_nonblock PROTO((struct buffer *)); 124extern int set_block PROTO((struct buffer *)); 125extern int buf_send_counted PROTO((struct buffer *)); 126extern int buf_send_special_count PROTO((struct buffer *, int)); 127extern void buf_append_data PROTO((struct buffer *, 128 struct buffer_data *, 129 struct buffer_data *)); | 112extern struct buffer *buf_nonio_initialize PROTO((void (*) (struct buffer *))); 113extern struct buffer *stdio_buffer_initialize 114 PROTO((FILE *, int, void (*) (struct buffer *))); 115extern struct buffer *compress_buffer_initialize 116 PROTO((struct buffer *, int, int, void (*) (struct buffer *))); 117extern struct buffer *packetizing_buffer_initialize 118 PROTO((struct buffer *, int (*) (void *, const char *, char *, int), 119 int (*) (void *, const char *, char *, int, int *), void *, --- 6 unchanged lines hidden (view full) --- 126extern int buf_flush PROTO((struct buffer *, int)); 127extern int set_nonblock PROTO((struct buffer *)); 128extern int set_block PROTO((struct buffer *)); 129extern int buf_send_counted PROTO((struct buffer *)); 130extern int buf_send_special_count PROTO((struct buffer *, int)); 131extern void buf_append_data PROTO((struct buffer *, 132 struct buffer_data *, 133 struct buffer_data *)); |
134extern void buf_append_buffer PROTO((struct buffer *, struct buffer *)); |
|
130extern int buf_read_file PROTO((FILE *, long, struct buffer_data **, 131 struct buffer_data **)); 132extern int buf_read_file_to_eof PROTO((FILE *, struct buffer_data **, 133 struct buffer_data **)); 134extern int buf_input_data PROTO((struct buffer *, int *)); 135extern int buf_read_line PROTO((struct buffer *, char **, int *)); 136extern int buf_read_data PROTO((struct buffer *, int, char **, int *)); 137extern void buf_copy_lines PROTO((struct buffer *, struct buffer *, int)); 138extern int buf_copy_counted PROTO((struct buffer *, struct buffer *, int *)); 139extern int buf_chain_length PROTO((struct buffer_data *)); | 135extern int buf_read_file PROTO((FILE *, long, struct buffer_data **, 136 struct buffer_data **)); 137extern int buf_read_file_to_eof PROTO((FILE *, struct buffer_data **, 138 struct buffer_data **)); 139extern int buf_input_data PROTO((struct buffer *, int *)); 140extern int buf_read_line PROTO((struct buffer *, char **, int *)); 141extern int buf_read_data PROTO((struct buffer *, int, char **, int *)); 142extern void buf_copy_lines PROTO((struct buffer *, struct buffer *, int)); 143extern int buf_copy_counted PROTO((struct buffer *, struct buffer *, int *)); 144extern int buf_chain_length PROTO((struct buffer_data *)); |
145extern int buf_length PROTO((struct buffer *)); |
|
140extern int buf_shutdown PROTO((struct buffer *)); 141 142#ifdef SERVER_FLOWCONTROL 143extern int buf_count_mem PROTO((struct buffer *)); 144#endif /* SERVER_FLOWCONTROL */ 145 146#endif /* defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT) */ | 146extern int buf_shutdown PROTO((struct buffer *)); 147 148#ifdef SERVER_FLOWCONTROL 149extern int buf_count_mem PROTO((struct buffer *)); 150#endif /* SERVER_FLOWCONTROL */ 151 152#endif /* defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT) */ |