summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles@rebelbase.com>2001-10-02 21:21:41 +0000
committerTov Are Jacobsen <charles@src.gnome.org>2001-10-02 21:21:41 +0000
commitc961de9c9fd8e8f7441eedb8b32e25f13b0c5d64 (patch)
treeef5222b8b039206e1e98ab98f99e16ae84d5fe6f
parent9e2a5839b55880218b62eee041e38c735f9fa842 (diff)
downloadgmime-c961de9c9fd8e8f7441eedb8b32e25f13b0c5d64.tar.gz
include <string.h> to pick up memcpy prototype. same. same. same.
2001-10-01 Charles Kerr <charles@rebelbase.com> * gmime-filter.c: include <string.h> to pick up memcpy prototype. * gmime-stream-mem.c: same. * gmime-stream-buffer.c: same. * gmime-stream-filter.c: same. * gmime-stream-mem.c (stream_flush): added a retval of 0. * gmime-filter-crlf.h (g_mime_filter_crlf_new_type): renamed prototype as g_mime_filter_crlf_new to sync with .c * gmime-part.h: added g_mime_part_set_content_object() prototype. * gmime-content-type.h: Replaced <> with "" in #include <gmime-param.h> * pan-mime-parser.c: added #include gmime-stream-buffer.h to pick up prototype for g_mime_stream_buffer_gets. * pan-mime-parser.c (g_strstrbound): removed unused func. * gmime-utils.c: on calls to ctype functions, explicitly upcast the char arguments as ints to shut up gcc warnings on Solaris. * gmime-param.c: same.
-rw-r--r--ChangeLog24
-rw-r--r--gmime-content-type.h2
-rw-r--r--gmime-filter-crlf.c2
-rw-r--r--gmime-filter-crlf.h2
-rw-r--r--gmime-param.c2
-rw-r--r--gmime-part.h1
-rw-r--r--gmime-stream-buffer.c4
-rw-r--r--gmime-stream-filter.c6
-rw-r--r--gmime-stream-mem.c3
-rw-r--r--gmime-utils.c10
-rw-r--r--gmime/gmime-content-type.h2
-rw-r--r--gmime/gmime-filter-crlf.c2
-rw-r--r--gmime/gmime-filter-crlf.h2
-rw-r--r--gmime/gmime-param.c2
-rw-r--r--gmime/gmime-part.h1
-rw-r--r--gmime/gmime-stream-buffer.c4
-rw-r--r--gmime/gmime-stream-filter.c6
-rw-r--r--gmime/gmime-stream-mem.c3
-rw-r--r--gmime/gmime-utils.c10
-rw-r--r--pan-mime-parser.c24
20 files changed, 59 insertions, 53 deletions
diff --git a/ChangeLog b/ChangeLog
index 1cdebe08..9687df62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2001-10-01 Charles Kerr <charles@rebelbase.com>
+
+ * gmime-filter.c: include <string.h> to pick up memcpy prototype.
+ * gmime-stream-mem.c: same.
+ * gmime-stream-buffer.c: same.
+ * gmime-stream-filter.c: same.
+
+ * gmime-stream-mem.c (stream_flush): added a retval of 0.
+
+ * gmime-filter-crlf.h (g_mime_filter_crlf_new_type): renamed
+ prototype as g_mime_filter_crlf_new to sync with .c
+
+ * gmime-part.h: added g_mime_part_set_content_object() prototype.
+
+ * gmime-content-type.h: Replaced <> with "" in #include <gmime-param.h>
+
+ * pan-mime-parser.c: added #include gmime-stream-buffer.h to
+ pick up prototype for g_mime_stream_buffer_gets.
+ * pan-mime-parser.c (g_strstrbound): removed unused func.
+
+ * gmime-utils.c: on calls to ctype functions, explicitly upcast the
+ char arguments as ints to shut up gcc warnings on Solaris.
+ * gmime-param.c: same.
+
2001-09-29 Jeffrey Stedfast <fejj@ximian.com>
* pan-mime-parser.c: New parser (with exactly the same API as
diff --git a/gmime-content-type.h b/gmime-content-type.h
index 25ac3067..46dc6e6c 100644
--- a/gmime-content-type.h
+++ b/gmime-content-type.h
@@ -29,7 +29,7 @@ extern "C" {
#endif /* __cplusplus }*/
#include <glib.h>
-#include <gmime-param.h>
+#include "gmime-param.h"
struct _GMimeContentType {
gchar *type;
diff --git a/gmime-filter-crlf.c b/gmime-filter-crlf.c
index 5954ad3d..4c1c671c 100644
--- a/gmime-filter-crlf.c
+++ b/gmime-filter-crlf.c
@@ -45,7 +45,7 @@ static GMimeFilter template = {
/**
- * g_mime_filter_crlf_new_type:
+ * g_mime_filter_crlf_new:
* @direction:
* @mode:
*
diff --git a/gmime-filter-crlf.h b/gmime-filter-crlf.h
index 52bcb5cc..954debd0 100644
--- a/gmime-filter-crlf.h
+++ b/gmime-filter-crlf.h
@@ -51,7 +51,7 @@ typedef struct _GMimeFilterCRLF {
gboolean saw_dot;
} GMimeFilterCRLF;
-GMimeFilter *g_mime_filter_crlf_new_type (GMimeFilterCRLFDirection direction, GMimeFilterCRLFMode mode);
+GMimeFilter *g_mime_filter_crlf_new (GMimeFilterCRLFDirection direction, GMimeFilterCRLFMode mode);
#ifdef __cplusplus
}
diff --git a/gmime-param.c b/gmime-param.c
index 7acaeb12..69a00153 100644
--- a/gmime-param.c
+++ b/gmime-param.c
@@ -69,7 +69,7 @@ g_mime_param_new_from_string (const gchar *string)
g_strstrip (name);
/* skip any whitespace */
- for (ptr = eptr + 1; *ptr && isspace (*ptr); ptr++);
+ for (ptr = eptr + 1; *ptr && isspace ((int)*ptr); ptr++);
if (*ptr == '"') {
/* value is in quotes */
diff --git a/gmime-part.h b/gmime-part.h
index 398b40bc..f24a894f 100644
--- a/gmime-part.h
+++ b/gmime-part.h
@@ -115,6 +115,7 @@ void g_mime_part_set_pre_encoded_content (GMimePart *mime_part, const char *cont
void g_mime_part_set_content_stream (GMimePart *mime_part, GMimeStream *content);
+void g_mime_part_set_content_object (GMimePart *mime_part, GMimeDataWrapper *content);
const GMimeDataWrapper *g_mime_part_get_content_object (const GMimePart *mime_part);
const char *g_mime_part_get_content (const GMimePart *mime_part, guint *len);
diff --git a/gmime-stream-buffer.c b/gmime-stream-buffer.c
index f6313fd7..f213d0e4 100644
--- a/gmime-stream-buffer.c
+++ b/gmime-stream-buffer.c
@@ -20,7 +20,7 @@
*
*/
-
+#include <string.h>
#include "gmime-stream-buffer.h"
#define BLOCK_BUFFER_LEN 4096
@@ -253,7 +253,7 @@ static off_t
stream_seek (GMimeStream *stream, off_t offset, GMimeSeekWhence whence)
{
/* FIXME: implement me */
- GMimeStreamBuffer *buffer = (GMimeStreamBuffer *) stream;
+ /*xGMimeStreamBuffer *buffer = (GMimeStreamBuffer *) stream;*/
return -1;
}
diff --git a/gmime-stream-filter.c b/gmime-stream-filter.c
index 37951725..d95854d4 100644
--- a/gmime-stream-filter.c
+++ b/gmime-stream-filter.c
@@ -20,7 +20,7 @@
*
*/
-
+#include <string.h>
#include "gmime-stream-filter.h"
#define READ_PAD (64) /* bytes padded before buffer */
@@ -252,7 +252,7 @@ stream_reset (GMimeStream *stream)
static off_t
stream_seek (GMimeStream *stream, off_t offset, GMimeSeekWhence whence)
{
- GMimeStreamFilter *filter = (GMimeStreamFilter *) stream;
+ /*GMimeStreamFilter *filter = (GMimeStreamFilter *) stream;*/
return -1;
}
@@ -274,7 +274,7 @@ stream_substream (GMimeStream *stream, off_t start, off_t end)
{
GMimeStreamFilter *filter = (GMimeStreamFilter *) stream;
GMimeStreamFilter *sub;
- struct _filter *f, *fn;
+ /*struct _filter *f, *fn;*/
sub = g_new (GMimeStreamFilter, 1);
sub->source = filter->source;
diff --git a/gmime-stream-mem.c b/gmime-stream-mem.c
index 453ab077..32223f68 100644
--- a/gmime-stream-mem.c
+++ b/gmime-stream-mem.c
@@ -20,7 +20,7 @@
*
*/
-
+#include <string.h>
#include "gmime-stream-mem.h"
static void stream_destroy (GMimeStream *stream);
@@ -103,6 +103,7 @@ static int
stream_flush (GMimeStream *stream)
{
/* no-op */
+ return 0;
}
static int
diff --git a/gmime-utils.c b/gmime-utils.c
index 336e346a..f55b2d65 100644
--- a/gmime-utils.c
+++ b/gmime-utils.c
@@ -160,10 +160,10 @@ datetok (const gchar *date)
start = (gchar *) date;
while (*start) {
/* kill leading whitespace */
- for ( ; *start && isspace (*start); start++);
+ for ( ; *start && isspace ((int)*start); start++);
/* find the end of this token */
- for (end = start; *end && !isspace (*end); end++);
+ for (end = start; *end && !isspace ((int)*end); end++);
token = g_strndup (start, (end - start));
@@ -233,7 +233,7 @@ get_mday (gchar *str)
g_return_val_if_fail (str != NULL, -1);
for (p = str; *p; p++)
- if (!isdigit (*p))
+ if (!isdigit ((int)*p))
return -1;
mday = atoi (str);
@@ -265,7 +265,7 @@ get_year (const gchar *str)
const gchar * p;
for (p = str; *p; p++)
- if (!isdigit (*p))
+ if (!isdigit ((int)*p))
return -1;
year = atoi (str);
@@ -289,7 +289,7 @@ get_time (const gchar *in, gint *hour, gint *min, gint *sec)
for (p = in; *p && digits; p++) {
if (*p == ':')
colons++;
- else if (!isdigit (*p))
+ else if (!isdigit ((int)*p))
digits = FALSE;
}
diff --git a/gmime/gmime-content-type.h b/gmime/gmime-content-type.h
index 25ac3067..46dc6e6c 100644
--- a/gmime/gmime-content-type.h
+++ b/gmime/gmime-content-type.h
@@ -29,7 +29,7 @@ extern "C" {
#endif /* __cplusplus }*/
#include <glib.h>
-#include <gmime-param.h>
+#include "gmime-param.h"
struct _GMimeContentType {
gchar *type;
diff --git a/gmime/gmime-filter-crlf.c b/gmime/gmime-filter-crlf.c
index 5954ad3d..4c1c671c 100644
--- a/gmime/gmime-filter-crlf.c
+++ b/gmime/gmime-filter-crlf.c
@@ -45,7 +45,7 @@ static GMimeFilter template = {
/**
- * g_mime_filter_crlf_new_type:
+ * g_mime_filter_crlf_new:
* @direction:
* @mode:
*
diff --git a/gmime/gmime-filter-crlf.h b/gmime/gmime-filter-crlf.h
index 52bcb5cc..954debd0 100644
--- a/gmime/gmime-filter-crlf.h
+++ b/gmime/gmime-filter-crlf.h
@@ -51,7 +51,7 @@ typedef struct _GMimeFilterCRLF {
gboolean saw_dot;
} GMimeFilterCRLF;
-GMimeFilter *g_mime_filter_crlf_new_type (GMimeFilterCRLFDirection direction, GMimeFilterCRLFMode mode);
+GMimeFilter *g_mime_filter_crlf_new (GMimeFilterCRLFDirection direction, GMimeFilterCRLFMode mode);
#ifdef __cplusplus
}
diff --git a/gmime/gmime-param.c b/gmime/gmime-param.c
index 7acaeb12..69a00153 100644
--- a/gmime/gmime-param.c
+++ b/gmime/gmime-param.c
@@ -69,7 +69,7 @@ g_mime_param_new_from_string (const gchar *string)
g_strstrip (name);
/* skip any whitespace */
- for (ptr = eptr + 1; *ptr && isspace (*ptr); ptr++);
+ for (ptr = eptr + 1; *ptr && isspace ((int)*ptr); ptr++);
if (*ptr == '"') {
/* value is in quotes */
diff --git a/gmime/gmime-part.h b/gmime/gmime-part.h
index 398b40bc..f24a894f 100644
--- a/gmime/gmime-part.h
+++ b/gmime/gmime-part.h
@@ -115,6 +115,7 @@ void g_mime_part_set_pre_encoded_content (GMimePart *mime_part, const char *cont
void g_mime_part_set_content_stream (GMimePart *mime_part, GMimeStream *content);
+void g_mime_part_set_content_object (GMimePart *mime_part, GMimeDataWrapper *content);
const GMimeDataWrapper *g_mime_part_get_content_object (const GMimePart *mime_part);
const char *g_mime_part_get_content (const GMimePart *mime_part, guint *len);
diff --git a/gmime/gmime-stream-buffer.c b/gmime/gmime-stream-buffer.c
index f6313fd7..f213d0e4 100644
--- a/gmime/gmime-stream-buffer.c
+++ b/gmime/gmime-stream-buffer.c
@@ -20,7 +20,7 @@
*
*/
-
+#include <string.h>
#include "gmime-stream-buffer.h"
#define BLOCK_BUFFER_LEN 4096
@@ -253,7 +253,7 @@ static off_t
stream_seek (GMimeStream *stream, off_t offset, GMimeSeekWhence whence)
{
/* FIXME: implement me */
- GMimeStreamBuffer *buffer = (GMimeStreamBuffer *) stream;
+ /*xGMimeStreamBuffer *buffer = (GMimeStreamBuffer *) stream;*/
return -1;
}
diff --git a/gmime/gmime-stream-filter.c b/gmime/gmime-stream-filter.c
index 37951725..d95854d4 100644
--- a/gmime/gmime-stream-filter.c
+++ b/gmime/gmime-stream-filter.c
@@ -20,7 +20,7 @@
*
*/
-
+#include <string.h>
#include "gmime-stream-filter.h"
#define READ_PAD (64) /* bytes padded before buffer */
@@ -252,7 +252,7 @@ stream_reset (GMimeStream *stream)
static off_t
stream_seek (GMimeStream *stream, off_t offset, GMimeSeekWhence whence)
{
- GMimeStreamFilter *filter = (GMimeStreamFilter *) stream;
+ /*GMimeStreamFilter *filter = (GMimeStreamFilter *) stream;*/
return -1;
}
@@ -274,7 +274,7 @@ stream_substream (GMimeStream *stream, off_t start, off_t end)
{
GMimeStreamFilter *filter = (GMimeStreamFilter *) stream;
GMimeStreamFilter *sub;
- struct _filter *f, *fn;
+ /*struct _filter *f, *fn;*/
sub = g_new (GMimeStreamFilter, 1);
sub->source = filter->source;
diff --git a/gmime/gmime-stream-mem.c b/gmime/gmime-stream-mem.c
index 453ab077..32223f68 100644
--- a/gmime/gmime-stream-mem.c
+++ b/gmime/gmime-stream-mem.c
@@ -20,7 +20,7 @@
*
*/
-
+#include <string.h>
#include "gmime-stream-mem.h"
static void stream_destroy (GMimeStream *stream);
@@ -103,6 +103,7 @@ static int
stream_flush (GMimeStream *stream)
{
/* no-op */
+ return 0;
}
static int
diff --git a/gmime/gmime-utils.c b/gmime/gmime-utils.c
index 336e346a..f55b2d65 100644
--- a/gmime/gmime-utils.c
+++ b/gmime/gmime-utils.c
@@ -160,10 +160,10 @@ datetok (const gchar *date)
start = (gchar *) date;
while (*start) {
/* kill leading whitespace */
- for ( ; *start && isspace (*start); start++);
+ for ( ; *start && isspace ((int)*start); start++);
/* find the end of this token */
- for (end = start; *end && !isspace (*end); end++);
+ for (end = start; *end && !isspace ((int)*end); end++);
token = g_strndup (start, (end - start));
@@ -233,7 +233,7 @@ get_mday (gchar *str)
g_return_val_if_fail (str != NULL, -1);
for (p = str; *p; p++)
- if (!isdigit (*p))
+ if (!isdigit ((int)*p))
return -1;
mday = atoi (str);
@@ -265,7 +265,7 @@ get_year (const gchar *str)
const gchar * p;
for (p = str; *p; p++)
- if (!isdigit (*p))
+ if (!isdigit ((int)*p))
return -1;
year = atoi (str);
@@ -289,7 +289,7 @@ get_time (const gchar *in, gint *hour, gint *min, gint *sec)
for (p = in; *p && digits; p++) {
if (*p == ':')
colons++;
- else if (!isdigit (*p))
+ else if (!isdigit ((int)*p))
digits = FALSE;
}
diff --git a/pan-mime-parser.c b/pan-mime-parser.c
index d8be10bc..c368cf32 100644
--- a/pan-mime-parser.c
+++ b/pan-mime-parser.c
@@ -28,6 +28,7 @@
#include "gmime-utils.h"
#include "gmime-header.h"
#include "gmime-stream-mem.h"
+#include "gmime-stream-buffer.h"
#include <string.h>
#include <ctype.h>
@@ -114,29 +115,6 @@ special_header (const char *field)
return (!g_strcasecmp (field, "MIME-Version:") || content_header (field) != -1);
}
-static const char *
-g_strstrbound (const char *haystack, const char *needle, const char *end)
-{
- gboolean matches = FALSE;
- const char *ptr;
- guint nlen;
-
- nlen = strlen (needle);
- ptr = haystack;
-
- while (ptr + nlen <= end) {
- if (!strncmp (ptr, needle, nlen)) {
- matches = TRUE;
- break;
- }
- ptr++;
- }
-
- if (matches)
- return ptr;
- else
- return NULL;
-}
static void
parser_readln (GMimeStream *stream, GByteArray *buffer)