/* Returns: TRUE on success, FALSE if there was an error  */
gboolean g_output_stream_vprintf(GOutputStream *stream, gsize *bytes_written, GCancellable *cancellable, GError **error, const gchar *format, va_list args)
/* Returns: TRUE on success, FALSE if there was an error  */
gboolean g_output_stream_vprintf(GOutputStream *stream, gsize *bytes_written, GCancellable *cancellable, GError **error, const gchar *format, va_list args)
{
  gchar    *text;
  gboolean  success;
  g_return_val_if_fail (G_IS_OUTPUT_STREAM (stream), FALSE);
  g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (stream), FALSE);
  g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
  g_return_val_if_fail (format != NULL, FALSE);
  text = g_strdup_vprintf (format, args);
  success = g_output_stream_write_all (stream,
                                       text, strlen (text),
                                       bytes_written, cancellable, error);
  g_free (text);
  return success;
}