diff options
author | bertrand <Bertrand.Guiheneuf@aful.org> | 2000-02-15 06:45:13 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 2000-02-15 06:45:13 +0800 |
commit | 8d959d83b20c4e4756bdadb1d379bd79495ee700 (patch) | |
tree | cfbf69cf6a6e878ac30b8d411e40462a0bedf8fb | |
parent | 6cffd8501c17f06066196a19674d6af225ff6381 (diff) | |
download | gsoc2013-evolution-8d959d83b20c4e4756bdadb1d379bd79495ee700.tar gsoc2013-evolution-8d959d83b20c4e4756bdadb1d379bd79495ee700.tar.gz gsoc2013-evolution-8d959d83b20c4e4756bdadb1d379bd79495ee700.tar.bz2 gsoc2013-evolution-8d959d83b20c4e4756bdadb1d379bd79495ee700.tar.lz gsoc2013-evolution-8d959d83b20c4e4756bdadb1d379bd79495ee700.tar.xz gsoc2013-evolution-8d959d83b20c4e4756bdadb1d379bd79495ee700.tar.zst gsoc2013-evolution-8d959d83b20c4e4756bdadb1d379bd79495ee700.zip |
use the eos stream method. (gmime_read_line_from_stream): ditto.
2000-02-14 bertrand <Bertrand.Guiheneuf@aful.org>
* camel/gmime-utils.c (get_header_array_from_stream): use the
eos stream method.
(gmime_read_line_from_stream): ditto.
* camel/camel-stream-fs.h (struct ): add the eof field
cosmetics changes.
* camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
(_read): set eof on end of file.
(_eos): implemented.
* camel/gmime-utils.c (get_header_array_from_stream):
make a blocking version of the header parser.
When the fs stream uses gnome-vfs, this should
be changed.
(gmime_read_line_from_stream): ditto.
svn path=/trunk/; revision=1780
-rw-r--r-- | camel/camel-stream-fs.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/camel/camel-stream-fs.c b/camel/camel-stream-fs.c index 4571687ca7..e9771d8245 100644 --- a/camel/camel-stream-fs.c +++ b/camel/camel-stream-fs.c @@ -481,6 +481,11 @@ _seek (CamelSeekableStream *stream, gint offset, CamelStreamSeekPolicy policy) gint real_offset; CamelStreamFs *stream_fs = CAMEL_STREAM_FS (stream); + /* because we don't know what is going to happen, we + set the eof stream to false so that a reread can + occur */ + stream_fs->eof = FALSE; + switch (policy) { case CAMEL_STREAM_SET: real_offset = MAX (stream_fs->inf_bound + offset, stream_fs->inf_bound); @@ -522,7 +527,8 @@ _seek (CamelSeekableStream *stream, gint offset, CamelStreamSeekPolicy policy) return_position = lseek (stream_fs->fd, real_offset, whence) - stream_fs->inf_bound; CAMEL_SEEKABLE_STREAM (stream)->cur_pos = return_position; - + + return return_position; } |