aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-file-utils.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-02-28 10:28:12 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-02-28 10:28:12 +0800
commite1fa571225dcf92a75e3ff4a84c7153e32b3664f (patch)
tree39c9b03cde721b756f11925e5c411b557e883321 /camel/camel-file-utils.c
parent7ac88d86319e2ef5b43ad7413f759bd1423ecd21 (diff)
downloadgsoc2013-evolution-e1fa571225dcf92a75e3ff4a84c7153e32b3664f.tar.gz
gsoc2013-evolution-e1fa571225dcf92a75e3ff4a84c7153e32b3664f.tar.zst
gsoc2013-evolution-e1fa571225dcf92a75e3ff4a84c7153e32b3664f.zip
Don't #include camel-mime-filter-save.h, we don't use it.
2002-02-27 Jeffrey Stedfast <fejj@ximian.com> * camel-folder-summary.h: Don't #include camel-mime-filter-save.h, we don't use it. * camel-file-utils.c: Fixed a few 'might be used uninitialized' warnings which were real problems. * camel-mime-part-utils.c (camel_mime_part_construct_content_from_parser): Save the raw mime stream for any/all signed parts. * camel-mime-part.c (camel_mime_part_init): Initialize our raw stream to NULL. (camel_mime_part_finalize): Unref our raw stream, if we have one. (write_to_stream): If we have a raw stream, write that out instead of re-encoding. * camel-mime-filter-save.[c,h]: Rewritten to save to a stream rather than a file. svn path=/trunk/; revision=15867
Diffstat (limited to 'camel/camel-file-utils.c')
-rw-r--r--camel/camel-file-utils.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/camel/camel-file-utils.c b/camel/camel-file-utils.c
index eed36f1383..0b909f3e82 100644
--- a/camel/camel-file-utils.c
+++ b/camel/camel-file-utils.c
@@ -22,6 +22,10 @@
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "camel-file-utils.h"
#include "camel-url.h"
@@ -34,6 +38,10 @@
#include <netinet/in.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+
/**
* camel_file_util_encode_uint32:
* @out: file to output to
@@ -165,7 +173,8 @@ int
camel_file_util_decode_time_t (FILE *in, time_t *dest)
{
time_t save = 0;
- int v, i = sizeof (time_t) - 1;
+ int i = sizeof (time_t) - 1;
+ int v = EOF;
while (i >= 0 && (v = fgetc (in)) != EOF) {
save |= ((time_t)v) << (i * 8);
@@ -211,7 +220,8 @@ int
camel_file_util_decode_off_t (FILE *in, off_t *dest)
{
off_t save = 0;
- int v, i = sizeof(off_t) - 1;
+ int i = sizeof(off_t) - 1;
+ int v = EOF;
while (i >= 0 && (v = fgetc (in)) != EOF) {
save |= ((off_t)v) << (i * 8);