[evolution-data-server] Remove camel_stream_printf().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Remove camel_stream_printf().
- Date: Wed, 6 Jul 2011 12:20:09 +0000 (UTC)
commit 6188b362cef452f9d55658b00e45a25688a91ce1
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Jul 6 07:39:43 2011 -0400
Remove camel_stream_printf().
GIO streams have no equivalent method, so removing this function forces
our code to look a bit more like it will when we move to GIO streams.
Also, camel_stream_printf() lacks GCancellable and GError arguments,
which inevitably leads to poor error handling in the providers.
libcamel soname has already been bumped for 3.1.4.
camel/camel-stream.c | 37 ---------------------------
camel/camel-stream.h | 3 --
docs/reference/camel/camel-sections.txt | 1 -
docs/reference/camel/tmpl/camel-stream.sgml | 11 --------
4 files changed, 0 insertions(+), 52 deletions(-)
---
diff --git a/camel/camel-stream.c b/camel/camel-stream.c
index 6d3c654..25485ea 100644
--- a/camel/camel-stream.c
+++ b/camel/camel-stream.c
@@ -267,43 +267,6 @@ camel_stream_write_string (CamelStream *stream,
}
/**
- * camel_stream_printf:
- * @stream: a #CamelStream object
- * @fmt: a printf-style format string
- *
- * Write formatted output to a stream.
- *
- * Returns: the number of characters written or %-1 on error.
- **/
-gssize
-camel_stream_printf (CamelStream *stream,
- const gchar *fmt,
- ...)
-{
- va_list args;
- gchar *string;
- gssize ret;
-
- /* XXX This function needs to die. Use a GString to
- * assemble formatted output. */
-
- g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-
- va_start (args, fmt);
- string = g_strdup_vprintf (fmt, args);
- va_end (args);
-
- if (string == NULL)
- return -1;
-
- ret = camel_stream_write (
- stream, string, strlen (string), NULL, NULL);
- g_free (string);
-
- return ret;
-}
-
-/**
* camel_stream_write_to_stream:
* @stream: source #CamelStream object
* @output_stream: destination #CamelStream object
diff --git a/camel/camel-stream.h b/camel/camel-stream.h
index a7ee565..e5ac985 100644
--- a/camel/camel-stream.h
+++ b/camel/camel-stream.h
@@ -109,9 +109,6 @@ gssize camel_stream_write_string (CamelStream *stream,
const gchar *string,
GCancellable *cancellable,
GError **error);
-gssize camel_stream_printf (CamelStream *stream,
- const gchar *fmt,
- ...) G_GNUC_PRINTF (2, 3);
/* Write a whole stream to another stream, until eof or error on
* either stream. */
diff --git a/docs/reference/camel/camel-sections.txt b/docs/reference/camel/camel-sections.txt
index 7bdff15..acea66f 100644
--- a/docs/reference/camel/camel-sections.txt
+++ b/docs/reference/camel/camel-sections.txt
@@ -2118,7 +2118,6 @@ camel_stream_flush
camel_stream_close
camel_stream_eos
camel_stream_write_string
-camel_stream_printf
camel_stream_write_to_stream
<SUBSECTION Standard>
CAMEL_STREAM
diff --git a/docs/reference/camel/tmpl/camel-stream.sgml b/docs/reference/camel/tmpl/camel-stream.sgml
index 186b5d9..7776a6b 100644
--- a/docs/reference/camel/tmpl/camel-stream.sgml
+++ b/docs/reference/camel/tmpl/camel-stream.sgml
@@ -95,17 +95,6 @@ CamelStream
@Returns:
-<!-- ##### FUNCTION camel_stream_printf ##### -->
-<para>
-
-</para>
-
- stream:
- fmt:
- :
- Returns:
-
-
<!-- ##### FUNCTION camel_stream_write_to_stream ##### -->
<para>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]