istream.c revision 904f9d5654b9c39edcdf32883e5e88771faf4d69
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen/* Copyright (c) 2002-2003 Timo Sirainen */
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen _io_stream_ref(&stream->real_stream->iostream);
2271d1a3dfc7191e610f039e86b9245bbc5dfb8cTimo Sirainen struct _istream *_stream = (*stream)->real_stream;
9865d9e7c5713e41db939222ed9c0225a11fb99eTimo Sirainen _io_stream_unref(&(*stream)->real_stream->iostream);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen struct _istream *_stream = stream->real_stream;
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen _io_stream_close(&stream->real_stream->iostream);
dd4f30895ebbddd77e000472fbadcb3128ae2883Timo Sirainenvoid i_stream_set_max_buffer_size(struct istream *stream, size_t max_size)
b9f564d00b7a115f465ffd6840341c7b8f9bfc8aTimo Sirainen _io_stream_set_max_buffer_size(&stream->real_stream->iostream,
5b62dea2f88165f3f4d87bba9011343f3ff415ffTimo Sirainen struct _istream *_stream = stream->real_stream;
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenvoid i_stream_skip(struct istream *stream, uoff_t count)
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen struct _istream *_stream = stream->real_stream;
b9f564d00b7a115f465ffd6840341c7b8f9bfc8aTimo Sirainen /* within buffer */
48d8312488089dc1a8360991f0881d91095c21eaTimo Sirainen /* have to seek forward */
return NULL;
char *ret;
end = i;
return ret;
char *ret_buf;
size_t i;
return NULL;
return NULL;
return ret_buf;
char *line;
return line;
return line;
*size_r = 0;
return NULL;
*size_r = 0;
return NULL;
if (ret > 0)
} while (ret > 0);
static const struct stat *
#ifdef STREAM_TEST
/* gcc istream.c -o teststream liblib.a -Wall -DHAVE_CONFIG_H -DSTREAM_TEST -g */
#include <fcntl.h>
#include <unistd.h>
#include "ostream.h"
size_t i;
for (i = 0; i < size; i++)
int main(void)
const unsigned char *data;
lib_init();
if (fd1 < 0)
if (fd2 < 0)
for (i = 0; i < sizeof(buf); i++)