static void write_end_of_flist(int f, int send_io_error)
{
	if (xfer_flags_as_varint) {
		write_varint(f, 0);
		write_varint(f, send_io_error ? io_error : 0);
	} else if (send_io_error) {
		write_shortint(f, XMIT_EXTENDED_FLAGS|XMIT_IO_ERROR_ENDLIST);
		write_varint(f, io_error);
	} else
		write_byte(f, 0);
}
static void write_end_of_flist(int f, int send_io_error)
{
	if (xfer_flags_as_varint) {
		write_varint(f, 0);
		write_varint(f, send_io_error ? io_error : 0);
	} else if (send_io_error) {
		write_shortint(f, XMIT_EXTENDED_FLAGS|XMIT_IO_ERROR_ENDLIST);
		write_varint(f, io_error);
	} else
		write_byte(f, 0);
}