| 2134 | } |
| 2135 | |
| 2136 | void io_flush(int flush_type) |
| 2137 | { |
| 2138 | if (iobuf.out.len > iobuf.out_empty_len) { |
| 2139 | if (flush_type == FULL_FLUSH) /* flush everything in the output buffers */ |
| 2140 | perform_io(iobuf.out.size - iobuf.out_empty_len, PIO_NEED_OUTROOM); |
| 2141 | else if (flush_type == NORMAL_FLUSH) /* flush at least 1 byte */ |
| 2142 | perform_io(iobuf.out.size - iobuf.out.len + 1, PIO_NEED_OUTROOM); |
| 2143 | /* MSG_FLUSH: flush iobuf.msg only */ |
| 2144 | } |
| 2145 | if (iobuf.msg.len) |
| 2146 | perform_io(iobuf.msg.size, PIO_NEED_MSGROOM); |
| 2147 | } |
| 2148 | |
| 2149 | void write_shortint(int f, unsigned short x) |
| 2150 | { |
no test coverage detected