From 6cffd8501c17f06066196a19674d6af225ff6381 Mon Sep 17 00:00:00 2001 From: bertrand Date: Mon, 14 Feb 2000 22:27:54 +0000 Subject: use the eos stream method. (gmime_read_line_from_stream): ditto. 2000-02-14 bertrand * 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=1779 --- camel/gmime-utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'camel/gmime-utils.c') diff --git a/camel/gmime-utils.c b/camel/gmime-utils.c index 1b1f1aa1e1..7ceb0219ec 100644 --- a/camel/gmime-utils.c +++ b/camel/gmime-utils.c @@ -221,7 +221,8 @@ get_header_array_from_stream (CamelStream *stream) } } else { - if (nb_char_read <0) { + if (camel_stream_eos (stream)) { + end_of_file=TRUE; end_of_header_line = TRUE; @@ -275,7 +276,7 @@ gmime_read_line_from_stream (CamelStream *stream) } } else { - if (nb_char_read <0) + if (camel_stream_eos (stream)) end_of_stream = TRUE; } -- cgit v1.2.3