/* Copyright (c) 2016-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "buffer.h"
#include "ostream-private.h"
#include "test-common.h"
struct test_ostream {
bool flush_pending;
};
{
}
{
return 1;
return 0;
}
static ssize_t
{
unsigned int i;
/* first we need to try to flush the internal buffer */
return ret;
/* append to output_buf until max_output_size is reached */
ret = 0;
for (i = 0; i < iov_count; i++) {
ret += n;
break;
}
}
/* if we've internal_buf, append to it until max_buffer_size is
reached */
return ret;
do {
ret += n;
break;
if (++i < iov_count)
} while (i < iov_count);
return ret;
}
{
int ret;
else
if (!tstream->flush_pending ||
}
{
}
static void
{
/* we have internal data, won't reset flush_pending */
} else {
}
if (set)
}
static size_t
{
}
{
return ostream;
}
{
}
{
}
}
{
}