return !i_stream_have_bytes_left(stream);
}
+uoff_t i_stream_get_absolute_offset(struct istream *stream)
+{
+ return stream->real_stream->abs_start_offset + stream->v_offset;
+}
+
static char *i_stream_next_line_finish(struct istream_private *stream, size_t i)
{
char *ret;
bool i_stream_have_bytes_left(const struct istream *stream) ATTR_PURE;
/* Returns TRUE if there are no bytes buffered and read() returns EOF. */
bool i_stream_is_eof(struct istream *stream);
+/* Returns the absolute offset of the stream. This is the stream's current
+ v_offset + the parent's absolute offset when the stream was created. */
+uoff_t i_stream_get_absolute_offset(struct istream *stream);
/* Gets the next line from stream and returns it, or NULL if more data is
needed to make a full line. i_stream_set_return_partial_line() specifies