istream-sized.c revision 032964c7cc6788188b63ae6270fc26cbd4a3ca26
/* Copyright (c) 2003-2012 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream-private.h"
#include "istream-sized.h"
struct sized_istream {
struct istream_private istream;
};
{
struct sized_istream *sstream =
(struct sized_istream *)stream;
return -1;
}
ret = 0;
else do {
return -2;
/* still more to read */
/* lost the file */
} else {
i_error("%s smaller than expected "
}
(ret == 0 ? 0 : -1);
return ret;
}
static const struct stat *
{
/* parent stream may be base64-decoder. don't waste time decoding the
entire stream, since we already know what the size is supposed
to be. */
return NULL;
}
{
struct sized_istream *sstream;
}