[evolution-data-server] Coding style and whitespace cleanup.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Coding style and whitespace cleanup.
- Date: Sat, 1 Sep 2012 12:19:10 +0000 (UTC)
commit 39603416770563ea0222deba4310aa9c2cb7ecdb
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Aug 25 08:53:38 2012 -0400
Coding style and whitespace cleanup.
.../backends/google/e-book-backend-google.c | 2 +-
calendar/backends/caldav/e-cal-backend-caldav.c | 4 +-
calendar/backends/http/e-cal-backend-http.c | 2 +-
camel/camel-block-file.c | 39 +++---
camel/camel-charset-map.c | 21 ++-
camel/camel-data-wrapper.c | 5 +-
camel/camel-db.c | 108 ++++++++-------
camel/camel-disco-diary.c | 31 +++--
camel/camel-filter-driver.c | 140 ++++++++++++++------
camel/camel-folder-summary.c | 40 ++++--
camel/camel-folder-thread.c | 21 ++-
camel/camel-folder.c | 10 +-
camel/camel-gpg-context.c | 26 ++--
camel/camel-memchunk.c | 5 +-
camel/camel-mime-filter-charset.c | 9 +-
camel/camel-mime-filter-tohtml.c | 63 ++++++---
camel/camel-mime-filter-windows.c | 6 +-
camel/camel-mime-message.c | 18 ++-
camel/camel-mime-parser.c | 19 ++-
camel/camel-mime-part.c | 13 +-
camel/camel-mime-utils.c | 47 ++++---
camel/camel-movemail.c | 10 +-
camel/camel-msgport.c | 12 +-
camel/camel-multipart.c | 18 ++-
camel/camel-object-bag.c | 3 +-
camel/camel-partition-table.c | 9 +-
camel/camel-provider.c | 14 +-
camel/camel-sasl-digest-md5.c | 14 +-
camel/camel-sasl-gssapi.c | 14 ++-
camel/camel-sasl-ntlm.c | 50 +++++---
camel/camel-sasl-popb4smtp.c | 6 +-
camel/camel-search-sql-sexp.c | 9 +-
camel/camel-sexp.c | 4 +-
camel/camel-smime-context.c | 66 +++++----
camel/camel-stream-mem.c | 3 +-
camel/camel-stream-process.c | 24 +++-
camel/camel-tcp-stream-raw.c | 40 ++++--
camel/camel-tcp-stream-ssl.c | 45 ++++---
camel/camel-text-index.c | 22 ++--
camel/camel-trie.c | 5 +-
camel/camel-url-scanner.c | 3 +-
camel/camel-url.c | 21 ++--
camel/camel-vee-data-cache.c | 6 +-
camel/camel-vee-folder.c | 6 +-
camel/camel-vee-store.c | 26 +++-
camel/camel-vee-summary.c | 29 +++--
camel/camel.c | 21 ++-
camel/providers/imap/camel-imap-command.c | 16 ++-
camel/providers/imap/camel-imap-folder.c | 115 ++++++++++-------
camel/providers/imap/camel-imap-journal.c | 20 ++-
camel/providers/imap/camel-imap-message-cache.c | 5 +-
camel/providers/imap/camel-imap-search.c | 10 +-
camel/providers/imap/camel-imap-store.c | 73 ++++++----
camel/providers/imap/camel-imap-utils.c | 4 +-
camel/providers/imap/camel-imap-wrapper.c | 7 +-
camel/providers/local/camel-local-summary.c | 28 +++-
camel/providers/local/camel-maildir-store.c | 2 +-
camel/providers/local/camel-mbox-folder.c | 6 +-
camel/providers/local/camel-mbox-summary.c | 33 ++++--
camel/providers/local/camel-mh-store.c | 2 +-
camel/providers/local/camel-spool-summary.c | 6 +-
camel/providers/nntp/camel-nntp-store.c | 16 ++-
camel/providers/pop3/camel-pop3-folder.c | 89 +++++++++----
camel/providers/pop3/camel-pop3-store.c | 10 +-
.../providers/sendmail/camel-sendmail-transport.c | 6 +-
camel/providers/smtp/camel-smtp-transport.c | 4 +-
camel/tests/folder/test3.c | 3 +-
camel/tests/folder/test8.c | 3 +-
camel/tests/folder/test9.c | 3 +-
camel/tests/lib/folders.c | 28 +++--
camel/tests/lib/messages.c | 7 +-
camel/tests/message/test2.c | 5 +-
camel/tests/message/test3.c | 45 ++++---
camel/tests/mime-filter/test-charset.c | 12 +-
camel/tests/mime-filter/test-crlf.c | 12 +-
camel/tests/mime-filter/test-tohtml.c | 12 +-
camel/tests/misc/split.c | 10 +-
camel/tests/misc/url-scan.c | 3 +-
camel/tests/misc/url.c | 5 +-
camel/tests/smime/pkcs7.c | 10 +-
libedataserver/e-time-utils.c | 2 +-
81 files changed, 1062 insertions(+), 659 deletions(-)
---
diff --git a/addressbook/backends/google/e-book-backend-google.c b/addressbook/backends/google/e-book-backend-google.c
index ef901cd..3d946e2 100644
--- a/addressbook/backends/google/e-book-backend-google.c
+++ b/addressbook/backends/google/e-book-backend-google.c
@@ -880,7 +880,7 @@ _create_group (const gchar *category_name,
static void
refresh_local_cache_cb (ESource *source,
- gpointer user_data)
+ gpointer user_data)
{
EBookBackend *backend = user_data;
diff --git a/calendar/backends/caldav/e-cal-backend-caldav.c b/calendar/backends/caldav/e-cal-backend-caldav.c
index f4b7f3b..405faea 100644
--- a/calendar/backends/caldav/e-cal-backend-caldav.c
+++ b/calendar/backends/caldav/e-cal-backend-caldav.c
@@ -2297,7 +2297,7 @@ is_google_uri (const gchar *uri)
static void
time_to_refresh_caldav_calendar_cb (ESource *source,
- gpointer user_data)
+ gpointer user_data)
{
ECalBackendCalDAV *cbdav = user_data;
@@ -4933,7 +4933,7 @@ e_cal_backend_caldav_dispose (GObject *object)
g_signal_handlers_disconnect_by_func (G_OBJECT (source), caldav_source_changed_cb, object);
if (priv->refresh_id) {
- e_source_refresh_remove_timeout (source, priv->refresh_id);
+ e_source_refresh_remove_timeout (source, priv->refresh_id);
priv->refresh_id = 0;
}
}
diff --git a/calendar/backends/http/e-cal-backend-http.c b/calendar/backends/http/e-cal-backend-http.c
index 62a503e..53f0867 100644
--- a/calendar/backends/http/e-cal-backend-http.c
+++ b/calendar/backends/http/e-cal-backend-http.c
@@ -809,7 +809,7 @@ source_changed_cb (ESource *source,
static void
http_cal_reload_cb (ESource *source,
- gpointer user_data)
+ gpointer user_data)
{
ECalBackendHttp *cbhttp = user_data;
diff --git a/camel/camel-block-file.c b/camel/camel-block-file.c
index cba9be0..e1e939b 100644
--- a/camel/camel-block-file.c
+++ b/camel/camel-block-file.c
@@ -84,13 +84,27 @@ block_file_validate_root (CamelBlockFile *bs)
d (printf ("Validate root: '%s'\n", bs->path));
d (printf ("version: %.8s (%.8s)\n", bs->root->version, bs->version));
- d (printf ("block size: %d (%d)%s\n", br->block_size, bs->block_size,
+ d (printf (
+ "block size: %d (%d)%s\n",
+ br->block_size, bs->block_size,
br->block_size != bs->block_size ? " BAD":" OK"));
- d (printf ("free: %ld (%d add size < %ld)%s\n", (glong) br->free, br->free / bs->block_size * bs->block_size, (glong) st.st_size,
- (br->free > st.st_size) || (br->free % bs->block_size) != 0 ? " BAD":" OK"));
- d (printf ("last: %ld (%d and size: %ld)%s\n", (glong) br->last, br->last / bs->block_size * bs->block_size, (glong) st.st_size,
- (br->last != st.st_size) || ((br->last % bs->block_size) != 0) ? " BAD": " OK"));
- d (printf ("flags: %s\n", (br->flags & CAMEL_BLOCK_FILE_SYNC)?"SYNC":"unSYNC"));
+ d (printf (
+ "free: %ld (%d add size < %ld)%s\n",
+ (glong) br->free,
+ br->free / bs->block_size * bs->block_size,
+ (glong) st.st_size,
+ (br->free > st.st_size) ||
+ (br->free % bs->block_size) != 0 ? " BAD":" OK"));
+ d (printf (
+ "last: %ld (%d and size: %ld)%s\n",
+ (glong) br->last,
+ br->last / bs->block_size * bs->block_size,
+ (glong) st.st_size,
+ (br->last != st.st_size) ||
+ ((br->last % bs->block_size) != 0) ? " BAD": " OK"));
+ d (printf (
+ "flags: %s\n",
+ (br->flags & CAMEL_BLOCK_FILE_SYNC) ? "SYNC" : "unSYNC"));
if (br->last == 0
|| memcmp (bs->root->version, bs->version, 8) != 0
@@ -101,19 +115,6 @@ block_file_validate_root (CamelBlockFile *bs)
|| st.st_size != br->last
|| br->free > st.st_size
|| (br->flags & CAMEL_BLOCK_FILE_SYNC) == 0) {
-#if 0
- if (retval != -1 && st.st_size > 0) {
- g_warning ("Invalid root: '%s'", bs->path);
- g_warning ("version: %.8s (%.8s)", bs->root->version, bs->version);
- g_warning ("block size: %d (%d)%s", br->block_size, bs->block_size,
- br->block_size != bs->block_size ? " BAD":" OK");
- g_warning ("free: %ld (%d add size < %ld)%s", (glong) br->free, br->free / bs->block_size * bs->block_size, (glong) st.st_size,
- (br->free > st.st_size) || (br->free % bs->block_size) != 0 ? " BAD":" OK");
- g_warning ("last: %ld (%d and size: %ld)%s", (glong) br->last, br->last / bs->block_size * bs->block_size, (glong) st.st_size,
- (br->last != st.st_size) || ((br->last % bs->block_size) != 0) ? " BAD": " OK");
- g_warning ("flags: %s", (br->flags & CAMEL_BLOCK_FILE_SYNC)?"SYNC":"unSYNC");
- }
-#endif
return -1;
}
diff --git a/camel/camel-charset-map.c b/camel/camel-charset-map.c
index cb67f94..145dffb 100644
--- a/camel/camel-charset-map.c
+++ b/camel/camel-charset-map.c
@@ -156,9 +156,10 @@ gint main (gint argc, gchar **argv)
inbuf++;
inleft--;
} else {
- g_warning ("iconv (%s->UCS4, ..., %d, ..., %d): %s",
- tables[j].name, inleft, outleft,
- g_strerror (errno));
+ g_warning (
+ "iconv (%s->UCS4, ..., %d, ..., %d): %s",
+ tables[j].name, inleft, outleft,
+ g_strerror (errno));
exit (1);
}
}
@@ -276,9 +277,15 @@ gint main (gint argc, gchar **argv)
}
printf ("\n};\n\n");
- printf ("static const struct {\n\tconst gchar *name;\n\tguint bit;\n} camel_charinfo[] = {\n");
+ printf (
+ "static const struct {\n"
+ "\tconst gchar *name;\n"
+ "\tguint bit;\n"
+ "} camel_charinfo[] = {\n");
for (j = 0; tables[j].name; j++)
- printf ("\t{ \"%s\", 0x%08x },\n", tables[j].name, tables[j].bit);
+ printf (
+ "\t{ \"%s\", 0x%08x },\n",
+ tables[j].name, tables[j].bit);
printf ("};\n\n");
printf ("#define charset_mask(x) \\\n");
@@ -288,7 +295,9 @@ gint main (gint argc, gchar **argv)
else
printf ("\t");
- printf ("(camel_charmap[(x) >> 8].bits%d ? camel_charmap[(x) >> 8].bits%d[(x) & 0xff] << %d : 0)",
+ printf (
+ "(camel_charmap[(x) >> 8].bits%d ? "
+ "camel_charmap[(x) >> 8].bits%d[(x) & 0xff] << %d : 0)",
k, k, k * 8);
if (k < bytes - 1)
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c
index 649bde1..5c25faf 100644
--- a/camel/camel-data-wrapper.c
+++ b/camel/camel-data-wrapper.c
@@ -202,8 +202,9 @@ data_wrapper_decode_to_stream_sync (CamelDataWrapper *data_wrapper,
}
if (!(camel_content_type_is (data_wrapper->mime_type, "text", "pdf")) && camel_content_type_is (data_wrapper->mime_type, "text", "*")) {
- filter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_DECODE,
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
+ filter = camel_mime_filter_crlf_new (
+ CAMEL_MIME_FILTER_CRLF_DECODE,
+ CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
camel_stream_filter_add (CAMEL_STREAM_FILTER (fstream), filter);
g_object_unref (filter);
}
diff --git a/camel/camel-db.c b/camel/camel-db.c
index 87fac3d..3ca8b29 100644
--- a/camel/camel-db.c
+++ b/camel/camel-db.c
@@ -1515,41 +1515,50 @@ write_mir (CamelDB *cdb,
/* NB: UGLIEST Hack. We can't modify the schema now. We are using dirty (an unsed one to notify of FLAGGED/Dirty infos */
- ins_query = sqlite3_mprintf ("INSERT OR REPLACE INTO %Q VALUES (%Q, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %lld, %lld, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, strftime(\"%%s\", 'now'), strftime(\"%%s\", 'now') )",
- folder_name, record->uid, record->flags,
- record->msg_type, record->read, record->deleted, record->replied,
- record->important, record->junk, record->attachment, record->dirty,
- record->size, (gint64) record->dsent, (gint64) record->dreceived,
- record->subject, record->from, record->to,
- record->cc, record->mlist, record->followup_flag,
- record->followup_completed_on, record->followup_due_by,
- record->part, record->labels, record->usertags,
- record->cinfo, record->bdata);
-
- /* if (delete_old_record)
- del_query = sqlite3_mprintf ("DELETE FROM %Q WHERE uid = %Q", folder_name, record->uid); */
-
-#if 0
- gchar *upd_query;
-
- upd_query = g_strdup_printf ("IMPLEMENT AND THEN TRY");
- camel_db_command (cdb, upd_query, ex);
- g_free (upd_query);
-#else
-
- /* if (delete_old_record)
- ret = camel_db_add_to_transaction (cdb, del_query, ex); */
- ret = camel_db_add_to_transaction (cdb, ins_query, error);
+ ins_query = sqlite3_mprintf (
+ "INSERT OR REPLACE INTO %Q VALUES ("
+ "%Q, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, "
+ "%lld, %lld, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, "
+ "%Q, %Q, %Q, %Q, %Q, "
+ "strftime(\"%%s\", 'now'), "
+ "strftime(\"%%s\", 'now') )",
+ folder_name,
+ record->uid,
+ record->flags,
+ record->msg_type,
+ record->read,
+ record->deleted,
+ record->replied,
+ record->important,
+ record->junk,
+ record->attachment,
+ record->dirty,
+ record->size,
+ (gint64) record->dsent,
+ (gint64) record->dreceived,
+ record->subject,
+ record->from,
+ record->to,
+ record->cc,
+ record->mlist,
+ record->followup_flag,
+ record->followup_completed_on,
+ record->followup_due_by,
+ record->part,
+ record->labels,
+ record->usertags,
+ record->cinfo,
+ record->bdata);
-#endif
+ ret = camel_db_add_to_transaction (cdb, ins_query, error);
- /* if (delete_old_record)
- sqlite3_free (del_query); */
sqlite3_free (ins_query);
if (ret == 0) {
- ins_query = sqlite3_mprintf ("INSERT OR REPLACE INTO '%q_bodystructure' VALUES (%Q, %Q )",
- folder_name, record->uid, record->bodystructure);
+ ins_query = sqlite3_mprintf (
+ "INSERT OR REPLACE INTO "
+ "'%q_bodystructure' VALUES (%Q, %Q )",
+ folder_name, record->uid, record->bodystructure);
ret = camel_db_add_to_transaction (cdb, ins_query, error);
sqlite3_free (ins_query);
}
@@ -1600,35 +1609,36 @@ camel_db_write_folder_info_record (CamelDB *cdb,
gchar *del_query;
gchar *ins_query;
- ins_query = sqlite3_mprintf ("INSERT INTO folders VALUES ( %Q, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %Q ) ",
- record->folder_name, record->version,
- record->flags, record->nextuid, record->time,
- record->saved_count, record->unread_count,
- record->deleted_count, record->junk_count, record->visible_count, record->jnd_count, record->bdata);
-
- del_query = sqlite3_mprintf ("DELETE FROM folders WHERE folder_name = %Q", record->folder_name);
-
-#if 0
- gchar *upd_query;
-
- upd_query = g_strdup_printf ("UPDATE folders SET version = %d, flags = %d, nextuid = %d, time = 143, saved_count = %d, unread_count = %d, deleted_count = %d, junk_count = %d, bdata = %s, WHERE folder_name = %Q", record->version, record->flags, record->nextuid, record->saved_count, record->unread_count, record->deleted_count, record->junk_count, "PROVIDER SPECIFIC DATA", record->folder_name );
- camel_db_command (cdb, upd_query, ex);
- g_free (upd_query);
-#else
+ ins_query = sqlite3_mprintf (
+ "INSERT INTO folders VALUES ("
+ "%Q, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %Q ) ",
+ record->folder_name,
+ record->version,
+ record->flags,
+ record->nextuid,
+ record->time,
+ record->saved_count,
+ record->unread_count,
+ record->deleted_count,
+ record->junk_count,
+ record->visible_count,
+ record->jnd_count,
+ record->bdata);
+
+ del_query = sqlite3_mprintf (
+ "DELETE FROM folders WHERE folder_name = %Q",
+ record->folder_name);
ret = camel_db_add_to_transaction (cdb, del_query, error);
ret = camel_db_add_to_transaction (cdb, ins_query, error);
-#endif
-
sqlite3_free (del_query);
sqlite3_free (ins_query);
return ret;
}
-struct ReadFirData
-{
+struct ReadFirData {
GHashTable *columns_hash;
CamelFIRecord *record;
};
diff --git a/camel/camel-disco-diary.c b/camel/camel-disco-diary.c
index 86126b0..47202ef 100644
--- a/camel/camel-disco-diary.c
+++ b/camel/camel-disco-diary.c
@@ -196,16 +196,21 @@ camel_disco_diary_log (CamelDiscoDiary *diary,
lose:
if (status == -1) {
+ CamelService *service;
+ CamelSession *session;
gchar *msg;
- msg = g_strdup_printf (_("Could not write log entry: %s\n"
- "Further operations on this server "
- "will not be replayed when you\n"
- "reconnect to the network."),
- g_strerror (errno));
- camel_session_alert_user (camel_service_get_session (CAMEL_SERVICE (diary->store)),
- CAMEL_SESSION_ALERT_ERROR,
- msg, NULL);
+ service = CAMEL_SERVICE (diary->store);
+ session = camel_service_get_session (service);
+
+ msg = g_strdup_printf (
+ _("Could not write log entry: %s\n"
+ "Further operations on this server "
+ "will not be replayed when you\n"
+ "reconnect to the network."),
+ g_strerror (errno));
+ camel_session_alert_user (
+ session, CAMEL_SESSION_ALERT_ERROR, msg, NULL);
g_free (msg);
fclose (diary->file);
@@ -264,8 +269,8 @@ diary_decode_folder (CamelDiscoDiary *diary,
else {
msg = g_strdup_printf (
_("Could not open '%s':\n%s\n"
- "Changes made to this folder "
- "will not be resynchronized."),
+ "Changes made to this folder "
+ "will not be resynchronized."),
name, error->message);
g_error_free (error);
camel_session_alert_user (
@@ -489,8 +494,10 @@ camel_disco_diary_uidmap_add (CamelDiscoDiary *diary,
const gchar *old_uid,
const gchar *new_uid)
{
- g_hash_table_insert (diary->uidmap, g_strdup (old_uid),
- g_strdup (new_uid));
+ g_hash_table_insert (
+ diary->uidmap,
+ g_strdup (old_uid),
+ g_strdup (new_uid));
}
const gchar *
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index 34c4a66..83303cd 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -644,13 +644,17 @@ do_move (struct _CamelSExp *f,
if (driver->priv->error == NULL) {
driver->priv->moved = TRUE;
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Move to folder %s", folder);
+ camel_filter_driver_log (
+ driver, FILTER_LOG_ACTION,
+ "Move to folder %s", folder);
}
}
}
/* implicit 'stop' with 'move' */
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Stopped processing");
+ camel_filter_driver_log (
+ driver, FILTER_LOG_ACTION,
+ "Stopped processing");
driver->priv->terminated = TRUE;
return NULL;
@@ -662,7 +666,9 @@ do_stop (struct _CamelSExp *f,
struct _CamelSExpResult **argv,
CamelFilterDriver *driver)
{
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Stopped processing");
+ camel_filter_driver_log (
+ driver, FILTER_LOG_ACTION,
+ "Stopped processing");
d (fprintf (stderr, "terminating message processing\n"));
driver->priv->terminated = TRUE;
@@ -696,7 +702,9 @@ do_label (struct _CamelSExp *f,
camel_folder_set_message_user_flag (driver->priv->source, driver->priv->uid, label, TRUE);
else
camel_message_info_set_user_flag (driver->priv->info, label, TRUE);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set label to %s", label);
+ camel_filter_driver_log (
+ driver, FILTER_LOG_ACTION,
+ "Set label to %s", label);
}
return NULL;
@@ -719,7 +727,9 @@ do_color (struct _CamelSExp *f,
camel_folder_set_message_user_tag (driver->priv->source, driver->priv->uid, "color", color);
else
camel_message_info_set_user_tag (driver->priv->info, "color", color);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set color to %s", color ? color : "None");
+ camel_filter_driver_log (
+ driver, FILTER_LOG_ACTION,
+ "Set color to %s", color ? color : "None");
}
return NULL;
@@ -737,7 +747,9 @@ do_score (struct _CamelSExp *f,
value = g_strdup_printf ("%d", argv[0]->value.number);
camel_message_info_set_user_tag (driver->priv->info, "score", value);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set score to %d", argv[0]->value.number);
+ camel_filter_driver_log (
+ driver, FILTER_LOG_ACTION,
+ "Set score to %d", argv[0]->value.number);
g_free (value);
}
@@ -759,7 +771,10 @@ do_adjust_score (struct _CamelSExp *f,
old = value ? atoi (value) : 0;
value = g_strdup_printf ("%d", old + argv[0]->value.number);
camel_message_info_set_user_tag (driver->priv->info, "score", value);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Adjust score (%d) to %s", argv[0]->value.number, value);
+ camel_filter_driver_log (
+ driver, FILTER_LOG_ACTION,
+ "Adjust score (%d) to %s",
+ argv[0]->value.number, value);
g_free (value);
}
@@ -784,7 +799,9 @@ set_flag (struct _CamelSExp *f,
camel_message_info_set_flags (
driver->priv->info, flags |
CAMEL_MESSAGE_FOLDER_FLAGGED, ~0);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set %s flag", argv[0]->value.string);
+ camel_filter_driver_log (
+ driver, FILTER_LOG_ACTION,
+ "Set %s flag", argv[0]->value.string);
}
return NULL;
@@ -808,7 +825,9 @@ unset_flag (struct _CamelSExp *f,
camel_message_info_set_flags (
driver->priv->info, flags |
CAMEL_MESSAGE_FOLDER_FLAGGED, 0);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Unset %s flag", argv[0]->value.string);
+ camel_filter_driver_log (
+ driver, FILTER_LOG_ACTION,
+ "Unset %s flag", argv[0]->value.string);
}
return NULL;
@@ -991,7 +1010,9 @@ pipe_message (struct _CamelSExp *f,
return NULL;
}
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Piping message to %s", argv[0]->value.string);
+ camel_filter_driver_log (
+ driver, FILTER_LOG_ACTION,
+ "Piping message to %s", argv[0]->value.string);
pipe_to_system (f, argc, argv, driver);
return NULL;
@@ -1028,8 +1049,9 @@ do_shell (struct _CamelSExp *f,
if (driver->priv->shellfunc && argc >= 1) {
driver->priv->shellfunc (driver, argc, (gchar **) args->pdata, driver->priv->shelldata);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Executing shell command: [%s]",
- command->str);
+ camel_filter_driver_log (
+ driver, FILTER_LOG_ACTION,
+ "Executing shell command: [%s]", command->str);
}
done:
@@ -1066,7 +1088,8 @@ play_sound (struct _CamelSExp *f,
if (driver->priv->playfunc && argc == 1 && argv[0]->type == CAMEL_SEXP_RES_STRING) {
driver->priv->playfunc (driver, argv[0]->value.string, driver->priv->playdata);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Play sound");
+ camel_filter_driver_log (
+ driver, FILTER_LOG_ACTION, "Play sound");
}
return NULL;
@@ -1081,8 +1104,10 @@ do_only_once (struct _CamelSExp *f,
d (fprintf (stderr, "only once\n"));
if (argc == 2 && !g_hash_table_lookup (driver->priv->only_once, argv[0]->value.string))
- g_hash_table_insert (driver->priv->only_once, g_strdup (argv[0]->value.string),
- g_strdup (argv[1]->value.string));
+ g_hash_table_insert (
+ driver->priv->only_once,
+ g_strdup (argv[0]->value.string),
+ g_strdup (argv[1]->value.string));
return NULL;
}
@@ -1138,14 +1163,19 @@ close_folder (gpointer key,
g_object_unref (folder);
}
- report_status (driver, CAMEL_FILTER_STATUS_PROGRESS, g_hash_table_size (driver->priv->folders)* 100 / driver->priv->closed, _("Syncing folders"));
+ report_status (
+ driver, CAMEL_FILTER_STATUS_PROGRESS,
+ g_hash_table_size (driver->priv->folders) * 100 /
+ driver->priv->closed, _("Syncing folders"));
}
/* flush/close all folders */
static gint
close_folders (CamelFilterDriver *driver)
{
- report_status (driver, CAMEL_FILTER_STATUS_PROGRESS, 0, _("Syncing folders"));
+ report_status (
+ driver, CAMEL_FILTER_STATUS_PROGRESS,
+ 0, _("Syncing folders"));
driver->priv->closed = 0;
g_hash_table_foreach (driver->priv->folders, close_folder, driver);
@@ -1198,8 +1228,12 @@ camel_filter_driver_log (CamelFilterDriver *driver,
time (&t);
strftime (date, 49, "%a, %d %b %Y %H:%M:%S", localtime (&t));
- fprintf (driver->priv->logfile, "Applied filter \"%s\" to message from %s - \"%s\" at %s\n",
- str, from ? from : "unknown", subject ? subject : "", date);
+ fprintf (
+ driver->priv->logfile,
+ "Applied filter \"%s\" to "
+ "message from %s - \"%s\" at %s\n",
+ str, from ? from : "unknown",
+ subject ? subject : "", date);
break;
}
@@ -1376,14 +1410,18 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver,
if (st.st_size > 0)
pc = (gint)(100.0 * ((double) camel_mime_parser_tell (mp) / (double) st.st_size));
- report_status (driver, CAMEL_FILTER_STATUS_START, pc, _("Getting message %d (%d%%)"), i, pc);
+ report_status (
+ driver, CAMEL_FILTER_STATUS_START,
+ pc, _("Getting message %d (%d%%)"), i, pc);
message = camel_mime_message_new ();
mime_part = CAMEL_MIME_PART (message);
if (!camel_mime_part_construct_from_parser_sync (
mime_part, mp, cancellable, error)) {
- report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed on message %d"), i);
+ report_status (
+ driver, CAMEL_FILTER_STATUS_END,
+ 100, _("Failed on message %d"), i);
g_object_unref (message);
goto fail;
}
@@ -1404,8 +1442,8 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver,
g_object_unref (message);
if (local_error != NULL || status == -1) {
report_status (
- driver, CAMEL_FILTER_STATUS_END, 100,
- _("Failed on message %d"), i);
+ driver, CAMEL_FILTER_STATUS_END,
+ 100, _("Failed on message %d"), i);
camel_message_info_free (info);
g_propagate_error (error, local_error);
goto fail;
@@ -1420,7 +1458,9 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver,
}
if (driver->priv->defaultfolder) {
- report_status (driver, CAMEL_FILTER_STATUS_PROGRESS, 100, _("Syncing folder"));
+ report_status (
+ driver, CAMEL_FILTER_STATUS_PROGRESS,
+ 100, _("Syncing folder"));
camel_folder_synchronize_sync (
driver->priv->defaultfolder, FALSE, cancellable, NULL);
}
@@ -1484,8 +1524,10 @@ camel_filter_driver_filter_folder (CamelFilterDriver *driver,
gint pc = (100 * i) / uids->len;
GError *local_error = NULL;
- report_status (driver, CAMEL_FILTER_STATUS_START, pc, _("Getting message %d of %d"), i + 1,
- uids->len);
+ report_status (
+ driver, CAMEL_FILTER_STATUS_START,
+ pc, _("Getting message %d of %d"),
+ i + 1, uids->len);
if (camel_folder_has_summary_capability (folder))
info = camel_folder_get_message_info (folder, uids->pdata[i]);
@@ -1526,13 +1568,17 @@ camel_filter_driver_filter_folder (CamelFilterDriver *driver,
camel_uid_cache_save (cache);
if (driver->priv->defaultfolder) {
- report_status (driver, CAMEL_FILTER_STATUS_PROGRESS, 100, _("Syncing folder"));
+ report_status (
+ driver, CAMEL_FILTER_STATUS_PROGRESS,
+ 100, _("Syncing folder"));
camel_folder_synchronize_sync (
driver->priv->defaultfolder, FALSE, cancellable, NULL);
}
if (i == uids->len)
- report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Complete"));
+ report_status (
+ driver, CAMEL_FILTER_STATUS_END,
+ 100, _("Complete"));
if (freeuids)
camel_folder_free_uids (folder, uids);
@@ -1693,19 +1739,28 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver,
goto error;
case CAMEL_SEARCH_MATCHED:
filtered = TRUE;
- camel_filter_driver_log (driver, FILTER_LOG_START, "%s", rule->name);
+ camel_filter_driver_log (
+ driver, FILTER_LOG_START,
+ "%s", rule->name);
if (camel_debug (":filter"))
- printf ("filtering '%s' applying rule %s\n",
- camel_message_info_subject (info) ? camel_message_info_subject (info):"?no subject?", rule->name);
+ printf (
+ "filtering '%s' applying rule %s\n",
+ camel_message_info_subject (info) ?
+ camel_message_info_subject (info) :
+ "?no subject?", rule->name);
/* perform necessary filtering actions */
- camel_sexp_input_text (driver->priv->eval, rule->action, strlen (rule->action));
+ camel_sexp_input_text (
+ driver->priv->eval,
+ rule->action, strlen (rule->action));
if (camel_sexp_parse (driver->priv->eval) == -1) {
g_set_error (
- error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+ error, CAMEL_ERROR,
+ CAMEL_ERROR_GENERIC,
_("Error parsing filter: %s: %s"),
- camel_sexp_error (driver->priv->eval), rule->action);
+ camel_sexp_error (driver->priv->eval),
+ rule->action);
goto error;
}
r = camel_sexp_eval (driver->priv->eval);
@@ -1714,9 +1769,11 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver,
if (r == NULL) {
g_set_error (
- error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+ error, CAMEL_ERROR,
+ CAMEL_ERROR_GENERIC,
_("Error executing filter: %s: %s"),
- camel_sexp_error (driver->priv->eval), rule->action);
+ camel_sexp_error (driver->priv->eval),
+ rule->action);
goto error;
}
camel_sexp_result_free (driver->priv->eval, r);
@@ -1743,12 +1800,15 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver,
if (!(driver->priv->copied && driver->priv->deleted) && !driver->priv->moved && driver->priv->defaultfolder) {
/* copy it to the default inbox */
filtered = TRUE;
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Copy to default folder");
+ camel_filter_driver_log (
+ driver, FILTER_LOG_ACTION,
+ "Copy to default folder");
if (camel_debug (":filter"))
- printf ("filtering '%s' copy %s to default folder\n",
- camel_message_info_subject (info) ? camel_message_info_subject (info):"?no subject?",
- driver->priv->modified?"modified message":"");
+ printf (
+ "filtering '%s' copy %s to default folder\n",
+ camel_message_info_subject (info) ? camel_message_info_subject (info):"?no subject?",
+ driver->priv->modified?"modified message":"");
if (!driver->priv->modified && driver->priv->uid && driver->priv->source && camel_folder_has_summary_capability (driver->priv->source)) {
GPtrArray *uids;
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index a5b1a85..34e59ba 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -940,7 +940,8 @@ camel_folder_summary_replace_flags (CamelFolderSummary *summary,
changed = folder_summary_update_counts_by_flags (summary, added_flags, UPDATE_COUNTS_ADD_WITHOUT_TOTAL) || changed;
/* update current flags on the summary */
- g_hash_table_insert (summary->priv->uids,
+ g_hash_table_insert (
+ summary->priv->uids,
(gpointer) camel_pstring_strdup (camel_message_info_uid (info)),
GUINT_TO_POINTER (new_flags));
@@ -1904,13 +1905,17 @@ message_info_from_uid (CamelFolderSummary *summary,
folder_name = camel_folder_get_full_name (summary->priv->folder);
if (is_in_memory_summary (summary)) {
- camel_folder_summary_unlock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
- g_warning ("%s: Tried to load uid '%s' from DB on in-memory summary of '%s'",
+ camel_folder_summary_unlock (
+ summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
+ g_warning (
+ "%s: Tried to load uid '%s' "
+ "from DB on in-memory summary of '%s'",
G_STRFUNC, uid, folder_name);
return NULL;
}
- parent_store = camel_folder_get_parent_store (summary->priv->folder);
+ parent_store =
+ camel_folder_get_parent_store (summary->priv->folder);
cdb = parent_store->cdb_r;
data.columns_hash = NULL;
@@ -1924,7 +1929,8 @@ message_info_from_uid (CamelFolderSummary *summary,
g_hash_table_destroy (data.columns_hash);
if (ret != 0) {
- camel_folder_summary_unlock (summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
+ camel_folder_summary_unlock (
+ summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
return NULL;
}
@@ -2145,8 +2151,10 @@ cfs_schedule_info_release_timer (CamelFolderSummary *summary)
/* FIXME[disk-summary] LRU please and not timeouts */
if (can_do) {
- summary->priv->timeout_handle = g_timeout_add_seconds (SUMMARY_CACHE_DROP,
- (GSourceFunc) cfs_try_release_memory, g_object_ref (summary));
+ summary->priv->timeout_handle = g_timeout_add_seconds (
+ SUMMARY_CACHE_DROP,
+ (GSourceFunc) cfs_try_release_memory,
+ g_object_ref (summary));
}
}
@@ -2982,7 +2990,8 @@ camel_folder_summary_add (CamelFolderSummary *summary,
base_info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
base_info->dirty = TRUE;
- g_hash_table_insert (summary->priv->uids,
+ g_hash_table_insert (
+ summary->priv->uids,
(gpointer) camel_pstring_strdup (camel_message_info_uid (info)),
GUINT_TO_POINTER (camel_message_info_flags (info)));
@@ -3018,7 +3027,8 @@ camel_folder_summary_insert (CamelFolderSummary *summary,
base_info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
base_info->dirty = TRUE;
- g_hash_table_insert (summary->priv->uids,
+ g_hash_table_insert (
+ summary->priv->uids,
(gpointer) camel_pstring_strdup (camel_message_info_uid (info)),
GUINT_TO_POINTER (camel_message_info_flags (info)));
@@ -4819,12 +4829,18 @@ camel_content_info_dump (CamelMessageContentInfo *ci,
}
if (ci->type)
- printf ("%scontent-type: %s/%s\n", p, ci->type->type ? ci->type->type : "(null)",
+ printf (
+ "%scontent-type: %s/%s\n",
+ p, ci->type->type ? ci->type->type : "(null)",
ci->type->subtype ? ci->type->subtype : "(null)");
else
printf ("%scontent-type: <unset>\n", p);
- printf ("%scontent-transfer-encoding: %s\n", p, ci->encoding ? ci->encoding : "(null)");
- printf ("%scontent-description: %s\n", p, ci->description ? ci->description : "(null)");
+ printf (
+ "%scontent-transfer-encoding: %s\n",
+ p, ci->encoding ? ci->encoding : "(null)");
+ printf (
+ "%scontent-description: %s\n",
+ p, ci->description ? ci->description : "(null)");
printf ("%ssize: %lu\n", p, (gulong) ci->size);
ci = ci->childs;
while (ci) {
diff --git a/camel/camel-folder-thread.c b/camel/camel-folder-thread.c
index aebbe7e..6c18a7b 100644
--- a/camel/camel-folder-thread.c
+++ b/camel/camel-folder-thread.c
@@ -109,9 +109,11 @@ prune_empty (CamelFolderThread *thread,
c = lastc->next;
prune_empty (thread, &c->child);
- d (printf ("checking message %p %p (%08x%08x)\n", c,
- c->message, c->message ? c->message->message_id.id.part.hi : 0,
- c->message ? c->message->message_id.id.part.lo : 0));
+ d (printf (
+ "checking message %p %p (%08x%08x)\n", c,
+ c->message,
+ c->message ? c->message->message_id.id.part.hi : 0,
+ c->message ? c->message->message_id.id.part.lo : 0));
if (c->message == NULL) {
if (c->child == NULL) {
d (printf ("removing empty node\n"));
@@ -340,8 +342,12 @@ dump_tree_rec (struct _tree_info *info,
g_hash_table_insert (info->visited, c, c);
}
if (c->message) {
- printf ("%s %p Subject: %s <%08x%08x>\n", p, (gpointer) c, camel_message_info_subject (c->message),
- camel_message_info_message_id (c->message)->id.part.hi, camel_message_info_message_id (c->message)->id.part.lo);
+ printf (
+ "%s %p Subject: %s <%08x%08x>\n",
+ p, (gpointer) c,
+ camel_message_info_subject (c->message),
+ camel_message_info_message_id (c->message)->id.part.hi,
+ camel_message_info_message_id (c->message)->id.part.lo);
count += 1;
} else {
printf ("%s %p <empty>\n", p, (gpointer) c);
@@ -589,8 +595,9 @@ thread_summary (CamelFolderThread *thread,
gettimeofday (&end, NULL);
diff = end.tv_sec * 1000 + end.tv_usec / 1000;
diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
- printf ("Message threading %d messages took %ld.%03ld seconds\n",
- summary->len, diff / 1000, diff % 1000);
+ printf (
+ "Message threading %d messages took %ld.%03ld seconds\n",
+ summary->len, diff / 1000, diff % 1000);
#endif
}
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index a0da36e..a262b02 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -1696,9 +1696,10 @@ folder_changed (CamelFolder *folder,
if ((folder->folder_flags & (CAMEL_FOLDER_FILTER_RECENT | CAMEL_FOLDER_FILTER_JUNK))
&& p->uid_filter->len > 0)
- driver = camel_session_get_filter_driver (session,
- (folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT)
- ? "incoming":"junktest", NULL);
+ driver = camel_session_get_filter_driver (
+ session,
+ (folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT)
+ ? "incoming" : "junktest", NULL);
if (driver) {
recents = g_ptr_array_new ();
@@ -3645,7 +3646,8 @@ camel_folder_get_message_sync (CamelFolder *folder,
camel_operation_pop_message (cancellable);
if (message != NULL && camel_debug_start (":folder")) {
- printf ("CamelFolder:get_message ('%s', '%s') =\n",
+ printf (
+ "CamelFolder:get_message ('%s', '%s') =\n",
camel_folder_get_full_name (folder), message_uid);
camel_mime_message_dump (message, FALSE);
camel_debug_end ();
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c
index 11afa3d..4e92488 100644
--- a/camel/camel-gpg-context.c
+++ b/camel/camel-gpg-context.c
@@ -828,11 +828,11 @@ gpg_ctx_parse_status (struct _GpgCtx *gpg,
if (!strncmp ((gchar *) status, "passphrase.pin.ask", 18)) {
prompt = g_markup_printf_escaped (
_("You need a PIN to unlock the key for your\n"
- "SmartCard: \"%s\""), name);
+ "SmartCard: \"%s\""), name);
} else if (!strncmp ((gchar *) status, "passphrase.enter", 16)) {
prompt = g_markup_printf_escaped (
_("You need a passphrase to unlock the key for\n"
- "user: \"%s\""), name);
+ "user: \"%s\""), name);
} else {
next_token ((gchar *) status, &prompt);
g_set_error (
@@ -846,9 +846,13 @@ gpg_ctx_parse_status (struct _GpgCtx *gpg,
if (gpg->anonymous_recipient) {
gchar *tmp = prompt;
- prompt = g_strconcat (tmp, "\n",
- _("Note the encrypted content doesn't contain information about a recipient,"
- " thus there will be a password prompt for each of stored private key."), NULL);
+ /* FIXME Reword prompt message. */
+ prompt = g_strconcat (
+ tmp, "\n",
+ _("Note the encrypted content doesn't contain "
+ "information about a recipient, thus there "
+ "will be a password prompt for each of stored "
+ "private key."), NULL);
g_free (tmp);
}
@@ -898,7 +902,7 @@ gpg_ctx_parse_status (struct _GpgCtx *gpg,
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
_("Failed to unlock secret key: "
- "3 bad passphrases given."));
+ "3 bad passphrases given."));
return -1;
}
}
@@ -1717,7 +1721,7 @@ gpg_verify_sync (CamelCipherContext *context,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Cannot verify message signature: "
- "Incorrect message format"));
+ "Incorrect message format"));
return NULL;
}
@@ -1725,7 +1729,7 @@ gpg_verify_sync (CamelCipherContext *context,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Cannot verify message signature: "
- "Incorrect message format"));
+ "Incorrect message format"));
return NULL;
}
@@ -1733,7 +1737,7 @@ gpg_verify_sync (CamelCipherContext *context,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Cannot verify message signature: "
- "Incorrect message format"));
+ "Incorrect message format"));
g_object_unref (istream);
return NULL;
}
@@ -1753,7 +1757,7 @@ gpg_verify_sync (CamelCipherContext *context,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Cannot verify message signature: "
- "Incorrect message format"));
+ "Incorrect message format"));
return NULL;
}
@@ -2049,7 +2053,7 @@ gpg_decrypt_sync (CamelCipherContext *context,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Failed to decrypt MIME part: "
- "protocol error"));
+ "protocol error"));
return NULL;
}
diff --git a/camel/camel-memchunk.c b/camel/camel-memchunk.c
index 5b095eb..b0a6298 100644
--- a/camel/camel-memchunk.c
+++ b/camel/camel-memchunk.c
@@ -48,8 +48,9 @@ time_end (const gchar *desc)
gettimeofday (&end, NULL);
diff = end.tv_sec * 1000 + end.tv_usec / 1000;
diff -= timeit_start.tv_sec * 1000 + timeit_start.tv_usec / 1000;
- printf ("%s took %ld.%03ld seconds\n",
- desc, diff / 1000, diff % 1000);
+ printf (
+ "%s took %ld.%03ld seconds\n",
+ desc, diff / 1000, diff % 1000);
}
#else
#define time_start(x)
diff --git a/camel/camel-mime-filter-charset.c b/camel/camel-mime-filter-charset.c
index 02a2936..1929db9 100644
--- a/camel/camel-mime-filter-charset.c
+++ b/camel/camel-mime-filter-charset.c
@@ -287,10 +287,11 @@ camel_mime_filter_charset_new (const gchar *from_charset,
priv->ic = camel_iconv_open (to_charset, from_charset);
if (priv->ic == (iconv_t) -1) {
- w (g_warning ("Cannot create charset conversion from %s to %s: %s",
- from_charset ? from_charset : "(null)",
- to_charset ? to_charset : "(null)",
- g_strerror (errno)));
+ w (g_warning (
+ "Cannot create charset conversion from %s to %s: %s",
+ from_charset ? from_charset : "(null)",
+ to_charset ? to_charset : "(null)",
+ g_strerror (errno)));
g_object_unref (new);
new = NULL;
} else {
diff --git a/camel/camel-mime-filter-tohtml.c b/camel/camel-mime-filter-tohtml.c
index 044326f..b87a325 100644
--- a/camel/camel-mime-filter-tohtml.c
+++ b/camel/camel-mime-filter-tohtml.c
@@ -314,8 +314,12 @@ html_convert (CamelMimeFilter *mime_filter,
do {
if (camel_url_scanner_scan (priv->scanner, start, len - (len > 0 && start[len - 1] == 0 ? 1 : 0), &match)) {
/* write out anything before the first regex match */
- outptr = writeln (mime_filter, (const guchar *) start, (const guchar *) start + match.um_so,
- outptr, &outend);
+ outptr = writeln (
+ mime_filter,
+ (const guchar *) start,
+ (const guchar *) start +
+ match.um_so,
+ outptr, &outend);
start += match.um_so;
len -= match.um_so;
@@ -325,35 +329,53 @@ html_convert (CamelMimeFilter *mime_filter,
/* write out the href tag */
outptr = append_string_verbatim (mime_filter, "<a href=\"", outptr, &outend);
/* prefix shouldn't need escaping, but let's be safe */
- outptr = writeln (mime_filter,
- (const guchar *) match.prefix,
- (const guchar *) match.prefix + strlen (match.prefix),
- outptr, &outend);
- outptr = writeln (mime_filter,
- (const guchar *) start,
- (const guchar *) start + matchlen,
- outptr, &outend);
- outptr = append_string_verbatim (mime_filter, "\">", outptr, &outend);
+ outptr = writeln (
+ mime_filter,
+ (const guchar *) match.prefix,
+ (const guchar *) match.prefix +
+ strlen (match.prefix),
+ outptr, &outend);
+ outptr = writeln (
+ mime_filter,
+ (const guchar *) start,
+ (const guchar *) start +
+ matchlen,
+ outptr, &outend);
+ outptr = append_string_verbatim (
+ mime_filter, "\">",
+ outptr, &outend);
/* now write the matched string */
- outptr = writeln (mime_filter,
- (const guchar *) start,
- (const guchar *) start + matchlen,
- outptr, &outend);
+ outptr = writeln (
+ mime_filter,
+ (const guchar *) start,
+ (const guchar *) start +
+ matchlen,
+ outptr, &outend);
priv->column += matchlen;
start += matchlen;
len -= matchlen;
/* close the href tag */
- outptr = append_string_verbatim (mime_filter, "</a>", outptr, &outend);
+ outptr = append_string_verbatim (
+ mime_filter, "</a>",
+ outptr, &outend);
} else {
/* nothing matched so write out the remainder of this line buffer */
- outptr = writeln (mime_filter, (const guchar *) start, (const guchar *) start + len, outptr, &outend);
+ outptr = writeln (
+ mime_filter,
+ (const guchar *) start,
+ (const guchar *) start + len,
+ outptr, &outend);
break;
}
} while (len > 0);
} else {
- outptr = writeln (mime_filter, (const guchar *) start, (const guchar *) inptr, outptr, &outend);
+ outptr = writeln (
+ mime_filter,
+ (const guchar *) start,
+ (const guchar *) inptr,
+ outptr, &outend);
}
if ((priv->flags & CAMEL_MIME_FILTER_TOHTML_MARK_CITATION) && depth > 0) {
@@ -526,8 +548,9 @@ camel_text_to_html (const gchar *in,
filter = camel_mime_filter_tohtml_new (flags, color);
- camel_mime_filter_complete (filter, (gchar *) in, strlen (in), 0,
- &outbuf, &outlen, &outpre);
+ camel_mime_filter_complete (
+ filter, (gchar *) in, strlen (in), 0,
+ &outbuf, &outlen, &outpre);
outbuf = g_strndup (outbuf, outlen);
diff --git a/camel/camel-mime-filter-windows.c b/camel/camel-mime-filter-windows.c
index 145b01e..e67809d 100644
--- a/camel/camel-mime-filter-windows.c
+++ b/camel/camel-mime-filter-windows.c
@@ -81,8 +81,10 @@ mime_filter_windows_filter (CamelMimeFilter *mime_filter,
register guchar c = *inptr++;
if (c >= 128 && c <= 159) {
- w (g_warning ("Encountered Windows charset masquerading as %s",
- priv->claimed_charset));
+ w (g_warning (
+ "Encountered Windows "
+ "charset masquerading as %s",
+ priv->claimed_charset));
priv->is_windows = TRUE;
break;
}
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index ea1b0b1..8e48636 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -1038,8 +1038,9 @@ best_encoding (CamelMimeMessage *msg,
gchar *newct;
/* FIXME: ick, the part content_type interface needs fixing bigtime */
- camel_content_type_set_param (((CamelDataWrapper *) part)->mime_type, "charset",
- charset ? charset : "us-ascii");
+ camel_content_type_set_param (
+ ((CamelDataWrapper *) part)->mime_type, "charset",
+ charset ? charset : "us-ascii");
newct = camel_content_type_format (((CamelDataWrapper *) part)->mime_type);
if (newct) {
d (printf ("Setting content-type to %s\n", newct));
@@ -1211,10 +1212,15 @@ camel_mime_message_build_mbox_from (CamelMimeMessage *message)
thetime = camel_header_decode_date (tmp, &offset);
thetime += ((offset / 100) * (60 * 60)) + (offset % 100) * 60;
gmtime_r (&thetime, &tm);
- g_string_append_printf (out, " %s %s %2d %02d:%02d:%02d %4d\n",
- tz_days[tm.tm_wday], tz_months[tm.tm_mon],
- tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec,
- tm.tm_year + 1900);
+ g_string_append_printf (
+ out, " %s %s %2d %02d:%02d:%02d %4d\n",
+ tz_days[tm.tm_wday],
+ tz_months[tm.tm_mon],
+ tm.tm_mday,
+ tm.tm_hour,
+ tm.tm_min,
+ tm.tm_sec,
+ tm.tm_year + 1900);
ret = out->str;
g_string_free (out, FALSE);
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
index bb88ac7..c491a78 100644
--- a/camel/camel-mime-parser.c
+++ b/camel/camel-mime-parser.c
@@ -1402,8 +1402,6 @@ folder_scan_content (struct _header_scan_state *s,
}
}
- c (printf ("ran out of input, dumping what i have (%d) bytes midline = %s\n",
- inptr - start, s->midline?"TRUE":"FALSE"));
goto content;
}
newatleast = 1;
@@ -1709,8 +1707,10 @@ tail_recurse:
if (*datalength > 0) {
while (f) {
- camel_mime_filter_filter (f->filter, *databuffer, *datalength, presize,
- databuffer, datalength, &presize);
+ camel_mime_filter_filter (
+ f->filter,
+ *databuffer, *datalength, presize,
+ databuffer, datalength, &presize);
d (fwrite (*databuffer, sizeof (gchar), *datalength, stdout));
d (printf ("'\n"));
f = f->next;
@@ -1721,8 +1721,9 @@ tail_recurse:
/* check for any filter completion data */
while (f) {
- camel_mime_filter_complete (f->filter, *databuffer, *datalength, presize,
- databuffer, datalength, &presize);
+ camel_mime_filter_complete (
+ f->filter, *databuffer, *datalength, presize,
+ databuffer, datalength, &presize);
f = f->next;
}
@@ -1748,8 +1749,10 @@ tail_recurse:
if (*datalength > 0) {
/* instead of a new state, we'll just store it locally and provide
* an accessor function */
- d (printf ("Multipart %s Content %p: '%.*s'\n",
- h->prestage > 0?"post":"pre", h, *datalength, *databuffer));
+ d (printf (
+ "Multipart %s Content %p: '%.*s'\n",
+ h->prestage > 0 ? "post" : "pre",
+ h, *datalength, *databuffer));
if (h->prestage > 0) {
if (h->posttext == NULL)
h->posttext = g_byte_array_new ();
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index f39c8d3..e2b9ade 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -543,10 +543,10 @@ mime_part_write_to_stream_sync (CamelDataWrapper *dw,
struct _camel_header_raw *h = mp->headers;
gchar *val;
gssize (*writefn) (CamelStream *stream,
- const gchar *name,
- const gchar *value,
- GCancellable *cancellable,
- GError **error);
+ const gchar *name,
+ const gchar *value,
+ GCancellable *cancellable,
+ GError **error);
/* fold/write the headers. But dont fold headers that are already formatted
* (e.g. ones with parameter-lists, that we know about, and have created) */
@@ -647,8 +647,9 @@ mime_part_write_to_stream_sync (CamelDataWrapper *dw,
/* we only re-do crlf on encoded blocks */
if (filter && camel_content_type_is (dw->mime_type, "text", "*")) {
- CamelMimeFilter *crlf = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE,
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
+ CamelMimeFilter *crlf = camel_mime_filter_crlf_new (
+ CAMEL_MIME_FILTER_CRLF_ENCODE,
+ CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
camel_stream_filter_add (
CAMEL_STREAM_FILTER (filter_stream), crlf);
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index c00a720..1a614b7 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -1162,9 +1162,11 @@ rfc2047_decode_word (const gchar *in,
charset = camel_iconv_charset_name (charset);
if (!charset[0] || (cd = camel_iconv_open ("UTF-8", charset)) == (iconv_t) -1) {
- w (g_warning ("Cannot convert from %s to UTF-8, header display may "
- "be corrupt: %s", charset[0] ? charset : "unspecified charset",
- g_strerror (errno)));
+ w (g_warning (
+ "Cannot convert from %s to UTF-8, "
+ "header display may be corrupt: %s",
+ charset[0] ? charset : "unspecified charset",
+ g_strerror (errno)));
return decode_8bit ((gchar *) decoded, declen, default_charset);
}
@@ -1175,8 +1177,9 @@ rfc2047_decode_word (const gchar *in,
if (buf != NULL)
return buf;
- w (g_warning ("Failed to convert \"%.*s\" to UTF-8, display may be "
- "corrupt: %s", declen, decoded, g_strerror (errno)));
+ w (g_warning (
+ "Failed to convert \"%.*s\" to UTF-8, display may be "
+ "corrupt: %s", declen, decoded, g_strerror (errno)));
return decode_8bit ((gchar *) decoded, declen, charset);
}
@@ -1575,8 +1578,10 @@ header_encode_string_rfc2047 (const guchar *in,
newinptr = g_utf8_next_char (inptr);
c = g_utf8_get_char ((gchar *) inptr);
if (newinptr == NULL || !g_unichar_validate (c)) {
- w (g_warning ("Invalid UTF-8 sequence encountered (pos %d, gchar '%c'): %s",
- (inptr - in), inptr[0], in));
+ w (g_warning (
+ "Invalid UTF-8 sequence encountered "
+ "(pos %d, gchar '%c'): %s",
+ (inptr - in), inptr[0], in));
inptr++;
continue;
}
@@ -1755,8 +1760,10 @@ header_encode_phrase_get_words (const guchar *in)
c = g_utf8_get_char ((gchar *) inptr);
if (!g_unichar_validate (c)) {
- w (g_warning ("Invalid UTF-8 sequence encountered (pos %d, gchar '%c'): %s",
- (inptr - in), inptr[0], in));
+ w (g_warning (
+ "Invalid UTF-8 sequence encountered "
+ "(pos %d, gchar '%c'): %s",
+ (inptr - in), inptr[0], in));
inptr++;
continue;
}
@@ -2324,13 +2331,13 @@ camel_content_type_is (CamelContentType *ct,
if (ct == NULL || (ct->type == NULL && ct->subtype == NULL)) {
return (!g_ascii_strcasecmp (type, "text")
&& (!g_ascii_strcasecmp (subtype, "plain")
- || !strcmp (subtype, "*")));
+ || !strcmp (subtype, "*")));
}
return (ct->type != NULL
&& (!g_ascii_strcasecmp (ct->type, type)
- && ((ct->subtype != NULL
- && !g_ascii_strcasecmp (ct->subtype, subtype))
+ && ((ct->subtype != NULL
+ && !g_ascii_strcasecmp (ct->subtype, subtype))
|| !strcmp ("*", subtype))));
}
@@ -3866,12 +3873,16 @@ camel_header_format_date (time_t date,
gmtime_r (&date, &tm);
- return g_strdup_printf ("%s, %02d %s %04d %02d:%02d:%02d %+05d",
- tm_days[tm.tm_wday],
- tm.tm_mday, tm_months[tm.tm_mon],
- tm.tm_year + 1900,
- tm.tm_hour, tm.tm_min, tm.tm_sec,
- tz_offset);
+ return g_strdup_printf (
+ "%s, %02d %s %04d %02d:%02d:%02d %+05d",
+ tm_days[tm.tm_wday],
+ tm.tm_mday,
+ tm_months[tm.tm_mon],
+ tm.tm_year + 1900,
+ tm.tm_hour,
+ tm.tm_min,
+ tm.tm_sec,
+ tz_offset);
}
/* This is where it gets ugly... */
diff --git a/camel/camel-movemail.c b/camel/camel-movemail.c
index e69df29..4a5d9fb 100644
--- a/camel/camel-movemail.c
+++ b/camel/camel-movemail.c
@@ -391,14 +391,16 @@ camel_movemail_copy_filter (gint fromfd,
/* check for 'end of file' */
if (towrite == 0) {
d (printf ("end of file?\n"));
- camel_mime_filter_complete (filter, buffer + PRE_SIZE, towrite, PRE_SIZE,
- &filterbuffer, &filterlen, &filterpre);
+ camel_mime_filter_complete (
+ filter, buffer + PRE_SIZE, towrite, PRE_SIZE,
+ &filterbuffer, &filterlen, &filterpre);
towrite = filterlen;
if (towrite == 0)
break;
} else {
- camel_mime_filter_filter (filter, buffer + PRE_SIZE, towrite, PRE_SIZE,
- &filterbuffer, &filterlen, &filterpre);
+ camel_mime_filter_filter (
+ filter, buffer + PRE_SIZE, towrite, PRE_SIZE,
+ &filterbuffer, &filterlen, &filterpre);
towrite = filterlen;
}
diff --git a/camel/camel-msgport.c b/camel/camel-msgport.c
index 23bdf75..0c42dfe 100644
--- a/camel/camel-msgport.c
+++ b/camel/camel-msgport.c
@@ -214,7 +214,8 @@ msgport_sync_with_pipe (gint fd)
if (MP_READ (fd, buffer, 1) > 0)
break;
else if (!MP_IS_STATUS_INTR ()) {
- g_warning ("%s: Failed to read from pipe: %s",
+ g_warning (
+ "%s: Failed to read from pipe: %s",
G_STRFUNC, g_strerror (errno));
break;
}
@@ -232,7 +233,8 @@ msgport_sync_with_prpipe (PRFileDesc *prfd)
else if (PR_GetError () != PR_PENDING_INTERRUPT_ERROR) {
gchar *text = g_alloca (PR_GetErrorTextLength ());
PR_GetErrorText (text);
- g_warning ("%s: Failed to read from NSPR pipe: %s",
+ g_warning (
+ "%s: Failed to read from NSPR pipe: %s",
G_STRFUNC, text);
break;
}
@@ -349,7 +351,8 @@ camel_msgport_push (CamelMsgPort *msgport,
msg->flags |= MSG_FLAG_SYNC_WITH_PIPE;
break;
} else if (!MP_IS_STATUS_INTR ()) {
- g_warning ("%s: Failed to write to pipe: %s",
+ g_warning (
+ "%s: Failed to write to pipe: %s",
G_STRFUNC, g_strerror (errno));
break;
}
@@ -363,7 +366,8 @@ camel_msgport_push (CamelMsgPort *msgport,
} else if (PR_GetError () != PR_PENDING_INTERRUPT_ERROR) {
gchar *text = g_alloca (PR_GetErrorTextLength ());
PR_GetErrorText (text);
- g_warning ("%s: Failed to write to NSPR pipe: %s",
+ g_warning (
+ "%s: Failed to write to NSPR pipe: %s",
G_STRFUNC, text);
break;
}
diff --git a/camel/camel-multipart.c b/camel/camel-multipart.c
index 272af89..8599701 100644
--- a/camel/camel-multipart.c
+++ b/camel/camel-multipart.c
@@ -200,8 +200,9 @@ multipart_remove_part_at (CamelMultipart *multipart,
link = g_list_nth (multipart->parts, index);
if (link == NULL) {
- g_warning ("CamelMultipart::remove_part_at: "
- "part to remove is NULL\n");
+ g_warning (
+ "CamelMultipart::remove_part_at: "
+ "part to remove is NULL\n");
return NULL;
}
removed_part = CAMEL_MIME_PART (link->data);
@@ -255,9 +256,11 @@ multipart_set_boundary (CamelMultipart *multipart,
GChecksum *checksum;
/* Generate a fairly random boundary string. */
- bgen = g_strdup_printf ("%p:%lu:%lu", (gpointer) multipart,
- (gulong) getpid (),
- (gulong) time (NULL));
+ bgen = g_strdup_printf (
+ "%p:%lu:%lu",
+ (gpointer) multipart,
+ (gulong) getpid (),
+ (gulong) time (NULL));
checksum = g_checksum_new (G_CHECKSUM_MD5);
g_checksum_update (checksum, (guchar *) bgen, -1);
@@ -303,8 +306,9 @@ multipart_construct_from_parser (CamelMultipart *multipart,
d (printf ("Creating multi-part\n"));
content_type = camel_mime_parser_content_type (mp);
- camel_multipart_set_boundary (multipart,
- camel_content_type_param (content_type, "boundary"));
+ camel_multipart_set_boundary (
+ multipart,
+ camel_content_type_param (content_type, "boundary"));
while (camel_mime_parser_step (mp, &buf, &len) != CAMEL_MIME_PARSER_STATE_MULTIPART_END) {
camel_mime_parser_unstep (mp);
diff --git a/camel/camel-object-bag.c b/camel/camel-object-bag.c
index a904bf7..31215d1 100644
--- a/camel/camel-object-bag.c
+++ b/camel/camel-object-bag.c
@@ -370,7 +370,8 @@ camel_object_bag_add (CamelObjectBag *bag,
g_hash_table_insert (bag->object_table, copied_key, object);
object_bag_unreserve (bag, key);
- g_object_add_toggle_ref (G_OBJECT (object),
+ g_object_add_toggle_ref (
+ G_OBJECT (object),
object_bag_toggle_notify, bag);
}
diff --git a/camel/camel-partition-table.c b/camel/camel-partition-table.c
index a3ecd5b..7bafd18 100644
--- a/camel/camel-partition-table.c
+++ b/camel/camel-partition-table.c
@@ -754,10 +754,11 @@ camel_key_table_add (CamelKeyTable *ki,
if (kblast->used > 0) {
/*left = &kblast->u.keydata[kblast->u.keys[kblast->used-1].offset] - (gchar *)(&kblast->u.keys[kblast->used+1]);*/
left = kblast->u.keys[kblast->used - 1].offset - sizeof (kblast->u.keys[0]) * (kblast->used + 1);
- d (printf ("key '%s' used = %d (%d), filled = %d, left = %d len = %d?\n",
- key, kblast->used, kblast->used * sizeof (kblast->u.keys[0]),
- sizeof (kblast->u.keydata) - kblast->u.keys[kblast->used - 1].offset,
- left, len));
+ d (printf (
+ "key '%s' used = %d (%d), filled = %d, left = %d len = %d?\n",
+ key, kblast->used, kblast->used * sizeof (kblast->u.keys[0]),
+ sizeof (kblast->u.keydata) - kblast->u.keys[kblast->used - 1].offset,
+ left, len));
if (left < len) {
next = camel_block_file_new_block (ki->blocks);
if (next == NULL) {
diff --git a/camel/camel-provider.c b/camel/camel-provider.c
index 78b0e06..42f0fff 100644
--- a/camel/camel-provider.c
+++ b/camel/camel-provider.c
@@ -119,8 +119,9 @@ camel_provider_init (void)
dir = g_dir_open (CAMEL_PROVIDERDIR, 0, NULL);
if (!dir) {
- g_warning ("Could not open camel provider directory (%s): %s",
- CAMEL_PROVIDERDIR, g_strerror (errno));
+ g_warning (
+ "Could not open camel provider directory (%s): %s",
+ CAMEL_PROVIDERDIR, g_strerror (errno));
return;
}
@@ -134,8 +135,9 @@ camel_provider_init (void)
name = g_strdup_printf ("%s/%s", CAMEL_PROVIDERDIR, entry);
fp = g_fopen (name, "r");
if (!fp) {
- g_warning ("Could not read provider info file %s: %s",
- name, g_strerror (errno));
+ g_warning (
+ "Could not read provider info file %s: %s",
+ name, g_strerror (errno));
g_free (name);
continue;
}
@@ -191,7 +193,7 @@ camel_provider_load (const gchar *path,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Could not load %s: Module loading "
- "not supported on this system."), path);
+ "not supported on this system."), path);
return FALSE;
}
@@ -209,7 +211,7 @@ camel_provider_load (const gchar *path,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Could not load %s: No initialization "
- "code in module."), path);
+ "code in module."), path);
g_module_close (module);
return FALSE;
}
diff --git a/camel/camel-sasl-digest-md5.c b/camel/camel-sasl-digest-md5.c
index 773665a..bf81570 100644
--- a/camel/camel-sasl-digest-md5.c
+++ b/camel/camel-sasl-digest-md5.c
@@ -599,9 +599,11 @@ generate_response (struct _DigestChallenge *challenge,
resp->nonce = g_strdup (challenge->nonce);
/* generate the cnonce */
- bgen = g_strdup_printf ("%p:%lu:%lu", (gpointer) resp,
- (gulong) getpid (),
- (gulong) time (NULL));
+ bgen = g_strdup_printf (
+ "%p:%lu:%lu",
+ (gpointer) resp,
+ (gulong) getpid (),
+ (gulong) time (NULL));
checksum = g_checksum_new (G_CHECKSUM_MD5);
g_checksum_update (checksum, (guchar *) bgen, -1);
g_checksum_get_digest (checksum, digest, &length);
@@ -870,7 +872,7 @@ sasl_digest_md5_challenge_sync (CamelSasl *sasl,
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
_("Server challenge contained invalid "
- "\"Quality of Protection\" token"));
+ "\"Quality of Protection\" token"));
goto exit;
}
@@ -903,7 +905,7 @@ sasl_digest_md5_challenge_sync (CamelSasl *sasl,
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
_("Server response did not contain "
- "authorization data"));
+ "authorization data"));
goto exit;
}
@@ -924,7 +926,7 @@ sasl_digest_md5_challenge_sync (CamelSasl *sasl,
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
_("Server response contained incomplete "
- "authorization data"));
+ "authorization data"));
goto exit;
}
diff --git a/camel/camel-sasl-gssapi.c b/camel/camel-sasl-gssapi.c
index 642086e..68d2dd9 100644
--- a/camel/camel-sasl-gssapi.c
+++ b/camel/camel-sasl-gssapi.c
@@ -346,11 +346,15 @@ sasl_gssapi_challenge_sync (CamelSasl *sasl,
input_token = &inbuf;
challenge:
- major = gss_init_sec_context (&minor, GSS_C_NO_CREDENTIAL, &priv->ctx, priv->target,
- GSS_C_OID_KRBV5_DES, GSS_C_MUTUAL_FLAG |
- GSS_C_REPLAY_FLAG | GSS_C_SEQUENCE_FLAG,
- 0, GSS_C_NO_CHANNEL_BINDINGS,
- input_token, &mech, &outbuf, &flags, &time);
+ major = gss_init_sec_context (
+ &minor, GSS_C_NO_CREDENTIAL,
+ &priv->ctx, priv->target,
+ GSS_C_OID_KRBV5_DES,
+ GSS_C_MUTUAL_FLAG |
+ GSS_C_REPLAY_FLAG |
+ GSS_C_SEQUENCE_FLAG,
+ 0, GSS_C_NO_CHANNEL_BINDINGS,
+ input_token, &mech, &outbuf, &flags, &time);
switch (major) {
case GSS_S_COMPLETE:
diff --git a/camel/camel-sasl-ntlm.c b/camel/camel-sasl-ntlm.c
index 1b3ef79..b90949e 100644
--- a/camel/camel-sasl-ntlm.c
+++ b/camel/camel-sasl-ntlm.c
@@ -743,10 +743,13 @@ sasl_ntlm_challenge_sync (CamelSasl *sasl,
string = g_strdup_printf ("TT %s\n", type2);
if (camel_stream_write_string (
priv->helper_stream, string, NULL, NULL) >= 0 &&
- (s = camel_stream_read (priv->helper_stream, buf,
- sizeof (buf), cancellable, NULL)) > 4 &&
- buf[0] == 'K' && buf[1] == 'K' && buf[2] == ' ' &&
- buf[s - 1] == '\n') {
+ (s = camel_stream_read (
+ priv->helper_stream, buf,
+ sizeof (buf), cancellable, NULL)) > 4 &&
+ buf[0] == 'K' &&
+ buf[1] == 'K' &&
+ buf[2] == ' ' &&
+ buf[s - 1] == '\n') {
buf[s - 1] = 0;
data = g_base64_decode (buf + 3, &length);
g_byte_array_append (ret, data, length);
@@ -793,7 +796,8 @@ sasl_ntlm_challenge_sync (CamelSasl *sasl,
memset (lm_resp + 8, 0, 16);
/* Session nonce is client nonce + server nonce */
- memcpy (sess_nonce.srv,
+ memcpy (
+ sess_nonce.srv,
token->data + NTLM_CHALLENGE_NONCE_OFFSET, 8);
/* Take MD5 of session nonce */
@@ -832,24 +836,31 @@ sasl_ntlm_challenge_sync (CamelSasl *sasl,
/* Don't jump to 'fail' label after this point. */
g_byte_array_set_size (ret, NTLM_RESPONSE_BASE_SIZE);
memset (ret->data, 0, NTLM_RESPONSE_BASE_SIZE);
- memcpy (ret->data, NTLM_RESPONSE_HEADER,
+ memcpy (
+ ret->data, NTLM_RESPONSE_HEADER,
sizeof (NTLM_RESPONSE_HEADER) - 1);
- memcpy (ret->data + NTLM_RESPONSE_FLAGS_OFFSET,
+ memcpy (
+ ret->data + NTLM_RESPONSE_FLAGS_OFFSET,
NTLM_RESPONSE_FLAGS, sizeof (NTLM_RESPONSE_FLAGS) - 1);
/* Mask in the NTLM2SESSION flag */
ret->data[NTLM_RESPONSE_FLAGS_OFFSET + 2] |=
token->data[NTLM_CHALLENGE_FLAGS_OFFSET + 2] & 8;
- ntlm_set_string (ret, NTLM_RESPONSE_DOMAIN_OFFSET,
- domain->str, domain->len);
- ntlm_set_string (ret, NTLM_RESPONSE_USER_OFFSET,
- real_user, strlen (real_user));
- ntlm_set_string (ret, NTLM_RESPONSE_HOST_OFFSET,
- "UNKNOWN", sizeof ("UNKNOWN") - 1);
- ntlm_set_string (ret, NTLM_RESPONSE_LM_RESP_OFFSET,
- (const gchar *) lm_resp, sizeof (lm_resp));
- ntlm_set_string (ret, NTLM_RESPONSE_NT_RESP_OFFSET,
- (const gchar *) nt_resp, sizeof (nt_resp));
+ ntlm_set_string (
+ ret, NTLM_RESPONSE_DOMAIN_OFFSET,
+ domain->str, domain->len);
+ ntlm_set_string (
+ ret, NTLM_RESPONSE_USER_OFFSET,
+ real_user, strlen (real_user));
+ ntlm_set_string (
+ ret, NTLM_RESPONSE_HOST_OFFSET,
+ "UNKNOWN", sizeof ("UNKNOWN") - 1);
+ ntlm_set_string (
+ ret, NTLM_RESPONSE_LM_RESP_OFFSET,
+ (const gchar *) lm_resp, sizeof (lm_resp));
+ ntlm_set_string (
+ ret, NTLM_RESPONSE_NT_RESP_OFFSET,
+ (const gchar *) nt_resp, sizeof (nt_resp));
camel_sasl_set_authenticated (sasl, TRUE);
@@ -860,8 +871,9 @@ sasl_ntlm_challenge_sync (CamelSasl *sasl,
fail:
/* If the challenge is malformed, restart authentication.
* XXX A malicious server could make this loop indefinitely. */
- g_byte_array_append (ret, (guint8 *) NTLM_REQUEST,
- sizeof (NTLM_REQUEST) - 1);
+ g_byte_array_append (
+ ret, (guint8 *) NTLM_REQUEST,
+ sizeof (NTLM_REQUEST) - 1);
exit:
g_free (user);
diff --git a/camel/camel-sasl-popb4smtp.c b/camel/camel-sasl-popb4smtp.c
index f9e387f..61e8fe6 100644
--- a/camel/camel-sasl-popb4smtp.c
+++ b/camel/camel-sasl-popb4smtp.c
@@ -94,7 +94,7 @@ sasl_popb4smtp_challenge_sync (CamelSasl *sasl,
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
_("POP Before SMTP authentication "
- "using an unknown transport"));
+ "using an unknown transport"));
g_free (pop_uid);
return NULL;
}
@@ -106,7 +106,7 @@ sasl_popb4smtp_challenge_sync (CamelSasl *sasl,
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
_("POP Before SMTP authentication attempted "
- "with a %s service"), type_name);
+ "with a %s service"), type_name);
goto exit;
}
@@ -115,7 +115,7 @@ sasl_popb4smtp_challenge_sync (CamelSasl *sasl,
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
_("POP Before SMTP authentication attempted "
- "with a %s service"), type_name);
+ "with a %s service"), type_name);
goto exit;
}
diff --git a/camel/camel-search-sql-sexp.c b/camel/camel-search-sql-sexp.c
index 48e15a5..356c78e 100644
--- a/camel/camel-search-sql-sexp.c
+++ b/camel/camel-search-sql-sexp.c
@@ -161,8 +161,8 @@ func_not (CamelSExp *f,
if (g_strcmp0 (r1->value.string, "( (usertags LIKE '%completed-on 0%' AND usertags LIKE '%completed-on%') )") == 0)
r->value.string = g_strdup ("( (not (usertags LIKE '%completed-on 0%')) AND usertags LIKE '%completed-on%' )");
else
- r->value.string = g_strdup_printf ("(NOT (%s))",
- r1->value.string);
+ r->value.string = g_strdup_printf (
+ "(NOT (%s))", r1->value.string);
}
camel_sexp_result_free (f, r1);
@@ -724,8 +724,9 @@ camel_sexp_to_sql_sexp (const gchar *sql)
camel_sexp_add_ifunction (sexp, 0, symbols[i].name,
(CamelSExpIFunc) symbols[i].func, NULL);
else
- camel_sexp_add_function (sexp, 0, symbols[i].name,
- symbols[i].func, NULL);
+ camel_sexp_add_function (
+ sexp, 0, symbols[i].name,
+ symbols[i].func, NULL);
}
camel_sexp_input_text (sexp, sql, strlen (sql));
diff --git a/camel/camel-sexp.c b/camel/camel-sexp.c
index ced24ea..c4fc6c7 100644
--- a/camel/camel-sexp.c
+++ b/camel/camel-sexp.c
@@ -1150,8 +1150,8 @@ camel_sexp_term_evaluate_occur_times (CamelSExp *sexp,
argv = alloca (sizeof (argv[0]) * argc);
for (i = 0; i < term->value.func.termcount; i++) {
- argv[i] = camel_sexp_term_evaluate_occur_times (sexp, term->value.func.terms[i],
- start, end);
+ argv[i] = camel_sexp_term_evaluate_occur_times (
+ sexp, term->value.func.terms[i], start, end);
}
if (is_time_function (term->value.func.sym->name)) {
diff --git a/camel/camel-smime-context.c b/camel/camel-smime-context.c
index f529121..07a8ba3 100644
--- a/camel/camel-smime-context.c
+++ b/camel/camel-smime-context.c
@@ -658,9 +658,10 @@ sm_verify_cmsg (CamelCipherContext *context,
cn = NSS_CMSSignerInfo_GetSignerCommonName (si);
em = NSS_CMSSignerInfo_GetSignerEmailAddress (si);
- g_string_append_printf (description, _("Signer: %s <%s>: %s\n"),
- cn ? cn:"<unknown>", em ? em:"<unknown>",
- sm_status_description (status));
+ g_string_append_printf (
+ description, _("Signer: %s <%s>: %s\n"),
+ cn ? cn:"<unknown>", em ? em:"<unknown>",
+ sm_status_description (status));
camel_cipher_validity_add_certinfo_ex (
valid, CAMEL_CIPHER_VALIDITY_SIGN, cn, em,
@@ -832,12 +833,13 @@ smime_context_sign_sync (CamelCipherContext *context,
goto fail;
}
- enc = NSS_CMSEncoder_Start (cmsg,
- sm_write_stream, ostream, /* DER output callback */
- NULL, NULL, /* destination storage */
- NULL, NULL, /* password callback */
- NULL, NULL, /* decrypt key callback */
- NULL, NULL ); /* detached digests */
+ enc = NSS_CMSEncoder_Start (
+ cmsg,
+ sm_write_stream, ostream, /* DER output callback */
+ NULL, NULL, /* destination storage */
+ NULL, NULL, /* password callback */
+ NULL, NULL, /* decrypt key callback */
+ NULL, NULL ); /* detached digests */
if (!enc) {
set_nss_error (error, _("Cannot create encoder context"));
goto fail;
@@ -955,7 +957,7 @@ smime_context_verify_sync (CamelCipherContext *context,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Cannot verify message signature: "
- "Incorrect message format"));
+ "Incorrect message format"));
goto fail;
}
@@ -969,7 +971,7 @@ smime_context_verify_sync (CamelCipherContext *context,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Cannot verify message signature: "
- "Incorrect message format"));
+ "Incorrect message format"));
goto fail;
}
} else if (camel_content_type_is (ct, "application", "x-pkcs7-mime")) {
@@ -978,14 +980,15 @@ smime_context_verify_sync (CamelCipherContext *context,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Cannot verify message signature: "
- "Incorrect message format"));
+ "Incorrect message format"));
goto fail;
}
- dec = NSS_CMSDecoder_Start (NULL,
- NULL, NULL, /* content callback */
- NULL, NULL, /* password callback */
- NULL, NULL); /* decrypt key callback */
+ dec = NSS_CMSDecoder_Start (
+ NULL,
+ NULL, NULL, /* content callback */
+ NULL, NULL, /* password callback */
+ NULL, NULL); /* decrypt key callback */
camel_data_wrapper_decode_to_stream_sync (
camel_medium_get_content (
@@ -1120,12 +1123,13 @@ smime_context_encrypt_sync (CamelCipherContext *context,
/* dump it out */
ostream = camel_stream_mem_new ();
- enc = NSS_CMSEncoder_Start (cmsg,
- sm_write_stream, ostream,
- NULL, NULL,
- NULL, NULL,
- sm_decrypt_key, bulkkey,
- NULL, NULL);
+ enc = NSS_CMSEncoder_Start (
+ cmsg,
+ sm_write_stream, ostream,
+ NULL, NULL,
+ NULL, NULL,
+ sm_decrypt_key, bulkkey,
+ NULL, NULL);
if (enc == NULL) {
set_nss_error (error, _("Cannot create encoder context"));
goto fail;
@@ -1226,10 +1230,11 @@ smime_context_decrypt_sync (CamelCipherContext *context,
g_seekable_seek (G_SEEKABLE (istream), 0, G_SEEK_SET, NULL, NULL);
- dec = NSS_CMSDecoder_Start (NULL,
- sm_write_stream, ostream, /* content callback */
- NULL, NULL,
- NULL, NULL); /* decrypt key callback */
+ dec = NSS_CMSDecoder_Start (
+ NULL,
+ sm_write_stream, ostream, /* content callback */
+ NULL, NULL,
+ NULL, NULL); /* decrypt key callback */
if (NSS_CMSDecoder_Update (dec, (gchar *) buffer->data, buffer->len) != SECSuccess) {
cmsg = NULL;
@@ -1381,10 +1386,11 @@ camel_smime_context_describe_part (CamelSMIMEContext *context,
g_seekable_seek (
G_SEEKABLE (istream), 0, G_SEEK_SET, NULL, NULL);
- dec = NSS_CMSDecoder_Start (NULL,
- NULL, NULL,
- NULL, NULL, /* password callback */
- NULL, NULL); /* decrypt key callback */
+ dec = NSS_CMSDecoder_Start (
+ NULL,
+ NULL, NULL,
+ NULL, NULL, /* password callback */
+ NULL, NULL); /* decrypt key callback */
NSS_CMSDecoder_Update (dec, (gchar *) buffer->data, buffer->len);
g_object_unref (istream);
diff --git a/camel/camel-stream-mem.c b/camel/camel-stream-mem.c
index 293dacb..6e0c6f6 100644
--- a/camel/camel-stream-mem.c
+++ b/camel/camel-stream-mem.c
@@ -196,8 +196,7 @@ stream_mem_seek (GSeekable *seekable,
if (position > priv->buffer->len) {
gint oldlen = priv->buffer->len;
g_byte_array_set_size (priv->buffer, position);
- memset (priv->buffer->data + oldlen, 0,
- position - oldlen);
+ memset (priv->buffer->data + oldlen, 0, position - oldlen);
}
priv->position = position;
diff --git a/camel/camel-stream-process.c b/camel/camel-stream-process.c
index f3842a7..c25eb9d 100644
--- a/camel/camel-stream-process.c
+++ b/camel/camel-stream-process.c
@@ -93,8 +93,10 @@ stream_process_close (CamelStream *object,
CamelStreamProcess *stream = CAMEL_STREAM_PROCESS (object);
if (camel_verbose_debug)
- fprintf (stderr, "Process stream close. sockfd %d, childpid %d\n",
- stream->sockfd, stream->childpid);
+ fprintf (
+ stderr,
+ "Process stream close. sockfd %d, childpid %d\n",
+ stream->sockfd, stream->childpid);
if (stream->sockfd != -1) {
close (stream->sockfd);
@@ -106,21 +108,27 @@ stream_process_close (CamelStream *object,
for (i = 0; i < 4; i++) {
ret = waitpid (stream->childpid, NULL, WNOHANG);
if (camel_verbose_debug)
- fprintf (stderr, "waitpid() for pid %d returned %d (errno %d)\n",
- stream->childpid, ret, ret == -1 ? errno : 0);
+ fprintf (
+ stderr,
+ "waitpid() for pid %d returned %d (errno %d)\n",
+ stream->childpid, ret, ret == -1 ? errno : 0);
if (ret == stream->childpid || errno == ECHILD)
break;
switch (i) {
case 0:
if (camel_verbose_debug)
- fprintf (stderr, "Sending SIGTERM to pid %d\n",
- stream->childpid);
+ fprintf (
+ stderr,
+ "Sending SIGTERM to pid %d\n",
+ stream->childpid);
kill (stream->childpid, SIGTERM);
break;
case 2:
if (camel_verbose_debug)
- fprintf (stderr, "Sending SIGKILL to pid %d\n",
- stream->childpid);
+ fprintf (
+ stderr,
+ "Sending SIGKILL to pid %d\n",
+ stream->childpid);
kill (stream->childpid, SIGKILL);
break;
case 1:
diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c
index 2b84eb9..05f41f3 100644
--- a/camel/camel-tcp-stream-raw.c
+++ b/camel/camel-tcp-stream-raw.c
@@ -643,8 +643,10 @@ connect_to_socks4_proxy (CamelTcpStreamRaw *raw,
d (g_print (" reading SOCKS4 reply\n"));
if (read_from_prfd (fd, reply, sizeof (reply), cancellable, error) != sizeof (reply)) {
d (g_print (" failed: %d\n", errno));
- g_set_error (error, CAMEL_PROXY_ERROR, CAMEL_PROXY_ERROR_PROXY_NOT_SUPPORTED,
- _("The proxy host does not support SOCKS4"));
+ g_set_error (
+ error, CAMEL_PROXY_ERROR,
+ CAMEL_PROXY_ERROR_PROXY_NOT_SUPPORTED,
+ _("The proxy host does not support SOCKS4"));
goto error;
}
@@ -654,8 +656,10 @@ connect_to_socks4_proxy (CamelTcpStreamRaw *raw,
#else
errno = ECONNREFUSED;
#endif
- g_set_error (error, CAMEL_PROXY_ERROR, CAMEL_PROXY_ERROR_PROXY_NOT_SUPPORTED,
- _("The proxy host does not support SOCKS4"));
+ g_set_error (
+ error, CAMEL_PROXY_ERROR,
+ CAMEL_PROXY_ERROR_PROXY_NOT_SUPPORTED,
+ _("The proxy host does not support SOCKS4"));
goto error;
}
@@ -665,9 +669,11 @@ connect_to_socks4_proxy (CamelTcpStreamRaw *raw,
#else
errno = ECONNREFUSED;
#endif
- g_set_error (error, CAMEL_PROXY_ERROR, CAMEL_PROXY_ERROR_CANT_AUTHENTICATE,
- _("The proxy host denied our request: code %d"),
- reply[1]);
+ g_set_error (
+ error, CAMEL_PROXY_ERROR,
+ CAMEL_PROXY_ERROR_CANT_AUTHENTICATE,
+ _("The proxy host denied our request: code %d"),
+ reply[1]);
goto error;
}
@@ -761,21 +767,27 @@ socks5_initiate_and_request_authentication (CamelTcpStreamRaw *raw,
if (read_from_prfd (fd, reply, sizeof (reply), cancellable, error) != sizeof (reply)) {
d (g_print (" failed: %d\n", errno));
g_clear_error (error);
- g_set_error (error, CAMEL_PROXY_ERROR, CAMEL_PROXY_ERROR_PROXY_NOT_SUPPORTED,
- _("The proxy host does not support SOCKS5"));
+ g_set_error (
+ error, CAMEL_PROXY_ERROR,
+ CAMEL_PROXY_ERROR_PROXY_NOT_SUPPORTED,
+ _("The proxy host does not support SOCKS5"));
return FALSE;
}
if (reply[0] != 5) { /* server supports SOCKS5 */
- g_set_error (error, CAMEL_PROXY_ERROR, CAMEL_PROXY_ERROR_PROXY_NOT_SUPPORTED,
- _("The proxy host does not support SOCKS5"));
+ g_set_error (
+ error, CAMEL_PROXY_ERROR,
+ CAMEL_PROXY_ERROR_PROXY_NOT_SUPPORTED,
+ _("The proxy host does not support SOCKS5"));
return FALSE;
}
if (reply[1] != 0) { /* and it grants us no authentication (see request[2]) */
- g_set_error (error, CAMEL_PROXY_ERROR, CAMEL_PROXY_ERROR_CANT_AUTHENTICATE,
- _("Could not find a suitable authentication type: code 0x%x"),
- reply[1]);
+ g_set_error (
+ error, CAMEL_PROXY_ERROR,
+ CAMEL_PROXY_ERROR_CANT_AUTHENTICATE,
+ _("Could not find a suitable authentication type: code 0x%x"),
+ reply[1]);
return FALSE;
}
diff --git a/camel/camel-tcp-stream-ssl.c b/camel/camel-tcp-stream-ssl.c
index 09e0f1d..ecea419 100644
--- a/camel/camel-tcp-stream-ssl.c
+++ b/camel/camel-tcp-stream-ssl.c
@@ -168,14 +168,15 @@ ssl_get_client_auth (gpointer data,
CERTCertNicknames *names;
gint i;
- names = CERT_GetCertNicknames (CERT_GetDefaultCertDB (),
- SEC_CERT_NICKNAMES_USER,
- proto_win);
+ names = CERT_GetCertNicknames (
+ CERT_GetDefaultCertDB (),
+ SEC_CERT_NICKNAMES_USER,
+ proto_win);
if (names != NULL) {
for (i = 0; i < names->numnicknames; i++) {
- cert = PK11_FindCertFromNickname (names->nicknames[i],
- proto_win);
+ cert = PK11_FindCertFromNickname (
+ names->nicknames[i], proto_win);
if (!cert)
continue;
@@ -224,8 +225,9 @@ ssl_auth_cert (gpointer data,
cert = SSL_PeerCertificate (sockfd);
pinarg = SSL_RevealPinArg (sockfd);
- status = CERT_VerifyCertNow ((CERTCertDBHandle *) data, cert,
- checksig, certUsageSSLClient, pinarg);
+ status = CERT_VerifyCertNow (
+ (CERTCertDBHandle *) data, cert,
+ checksig, certUsageSSLClient, pinarg);
if (status != SECSuccess)
return SECFailure;
@@ -499,18 +501,23 @@ ssl_bad_cert (gpointer data,
status = CERT_VerifyCertNow (cert->dbhandle, cert, TRUE, certUsageSSLClient, NULL);
fingerprint = cert_fingerprint (cert);
- cert_str = g_strdup_printf (_(" Issuer: %s\n"
- " Subject: %s\n"
- " Fingerprint: %s\n"
- " Signature: %s"),
- CERT_NameToAscii (&cert->issuer),
- CERT_NameToAscii (&cert->subject),
- fingerprint, status == SECSuccess?_("GOOD"):_("BAD"));
+ cert_str = g_strdup_printf (_(
+ " Issuer: %s\n"
+ " Subject: %s\n"
+ " Fingerprint: %s\n"
+ " Signature: %s"),
+ CERT_NameToAscii (&cert->issuer),
+ CERT_NameToAscii (&cert->subject),
+ fingerprint,
+ status == SECSuccess ? _("GOOD") : _("BAD"));
g_free (fingerprint);
/* construct our user prompt */
- prompt = g_strdup_printf (_("SSL Certificate for '%s' is not trusted. Do you wish to accept it?\n\nDetailed information about the certificate:\n%s"),
- ssl->priv->expected_host, cert_str);
+ prompt = g_strdup_printf (
+ _("SSL Certificate for '%s' is not trusted. "
+ "Do you wish to accept it?\n\n"
+ "Detailed information about the certificate:\n%s"),
+ ssl->priv->expected_host, cert_str);
g_free (cert_str);
button_captions = g_slist_append (button_captions, _("_Reject"));
@@ -804,9 +811,9 @@ tcp_stream_ssl_connect (CamelTcpStream *stream,
CamelTcpStreamSSL *ssl = CAMEL_TCP_STREAM_SSL (stream);
gint retval;
- retval = CAMEL_TCP_STREAM_CLASS (camel_tcp_stream_ssl_parent_class)->
- connect (stream, host, service,
- fallback_port, cancellable, error);
+ retval = CAMEL_TCP_STREAM_CLASS (
+ camel_tcp_stream_ssl_parent_class)->connect (
+ stream, host, service, fallback_port, cancellable, error);
if (retval != 0)
return retval;
diff --git a/camel/camel-text-index.c b/camel/camel-text-index.c
index df1acb6..1d76e3b 100644
--- a/camel/camel-text-index.c
+++ b/camel/camel-text-index.c
@@ -251,13 +251,15 @@ text_index_add_name_to_word (CamelIndex *idx,
data = 0;
wordid = camel_key_table_add (p->word_index, word, 0, 0);
if (wordid == 0) {
- g_warning ("Could not create key entry for word '%s': %s\n",
- word, g_strerror (errno));
+ g_warning (
+ "Could not create key entry for word '%s': %s\n",
+ word, g_strerror (errno));
return;
}
if (camel_partition_table_add (p->word_hash, word, wordid) == -1) {
- g_warning ("Could not create hash entry for word '%s': %s\n",
- word, g_strerror (errno));
+ g_warning (
+ "Could not create hash entry for word '%s': %s\n",
+ word, g_strerror (errno));
return;
}
rb->words++;
@@ -265,8 +267,9 @@ text_index_add_name_to_word (CamelIndex *idx,
} else {
data = camel_key_table_lookup (p->word_index, wordid, NULL, NULL);
if (data == 0) {
- g_warning ("Could not find key entry for word '%s': %s\n",
- word, g_strerror (errno));
+ g_warning (
+ "Could not find key entry for word '%s': %s\n",
+ word, g_strerror (errno));
return;
}
}
@@ -1205,9 +1208,10 @@ dump_raw (GHashTable *map,
else
len = k->u.keys[i - 1].offset;
len -= k->u.keys[i].offset;
- printf ("[%03d]: %08x %5d %06x %3d '%.*s'\n", i,
- k->u.keys[i].data, k->u.keys[i].offset, k->u.keys[i].flags,
- len, len, k->u.keydata + k->u.keys[i].offset);
+ printf (
+ "[%03d]: %08x %5d %06x %3d '%.*s'\n", i,
+ k->u.keys[i].data, k->u.keys[i].offset, k->u.keys[i].flags,
+ len, len, k->u.keydata + k->u.keys[i].offset);
}
} break;
case PARTITION_MAP: {
diff --git a/camel/camel-trie.c b/camel/camel-trie.c
index 8170840..3ca00e6 100644
--- a/camel/camel-trie.c
+++ b/camel/camel-trie.c
@@ -207,8 +207,9 @@ dump_trie (struct _trie_state *s,
memset (p, ' ', depth * 2);
p[depth * 2] = '\0';
- fprintf (stderr, "%s[state] %p: final=%d; pattern-id=%d; fail=%p\n",
- p, s, s->final, s->id, s->fail);
+ fprintf (
+ stderr, "%s[state] %p: final=%d; pattern-id=%d; fail=%p\n",
+ p, s, s->final, s->id, s->fail);
m = s->match;
while (m) {
fprintf (stderr, " %s'%c' -> %p\n", p, m->c, m->state);
diff --git a/camel/camel-url-scanner.c b/camel/camel-url-scanner.c
index 191166f..0e1c484 100644
--- a/camel/camel-url-scanner.c
+++ b/camel/camel-url-scanner.c
@@ -544,7 +544,8 @@ gint main (gint argc, gchar **argv)
printf ("static guchar url_scanner_table[256] = {");
for (i = 0; i < 256; i++) {
- printf ("%s%3d%s", (i % 16) ? "" : "\n\t",
+ printf (
+ "%s%3d%s", (i % 16) ? "" : "\n\t",
url_scanner_table[i], i != 255 ? "," : "\n");
}
printf ("};\n\n");
diff --git a/camel/camel-url.c b/camel/camel-url.c
index 5b3d081..17d8043 100644
--- a/camel/camel-url.c
+++ b/camel/camel-url.c
@@ -138,8 +138,8 @@ camel_url_new_with_base (CamelURL *base,
semi = strchr (url_string, ';');
if (semi && semi < colon &&
!g_ascii_strncasecmp (semi, ";auth=", 6)) {
- url->authmech = g_strndup (semi + 6,
- colon - semi - 6);
+ url->authmech = g_strndup (
+ semi + 6, colon - semi - 6);
camel_url_decode (url->authmech);
} else {
url->authmech = NULL;
@@ -170,8 +170,8 @@ camel_url_new_with_base (CamelURL *base,
question = memchr (url_string, '?', end - url_string);
if (question) {
if (question[1]) {
- url->query = g_strndup (question + 1,
- end - (question + 1));
+ url->query = g_strndup (
+ question + 1, end - (question + 1));
camel_url_decode (url->query);
}
end = question;
@@ -198,8 +198,8 @@ camel_url_new_with_base (CamelURL *base,
value = g_strdup ("");
}
camel_url_decode (name);
- g_datalist_set_data_full (&url->params, name,
- value, g_free);
+ g_datalist_set_data_full (
+ &url->params, name, value, g_free);
g_free (name);
}
}
@@ -241,10 +241,11 @@ camel_url_new_with_base (CamelURL *base,
* i.e. like "http://example.com" (this expected only "http://example.com/") */
last = base->path ? strrchr (base->path, '/') : NULL;
if (last) {
- newpath = g_strdup_printf ("%.*s/%s",
- (gint)(last - base->path),
- base->path,
- url->path);
+ newpath = g_strdup_printf (
+ "%.*s/%s",
+ (gint)(last - base->path),
+ base->path,
+ url->path);
} else
newpath = g_strdup_printf ("/%s", url->path);
diff --git a/camel/camel-vee-data-cache.c b/camel/camel-vee-data-cache.c
index 72f652a..4b42987 100644
--- a/camel/camel-vee-data-cache.c
+++ b/camel/camel-vee-data-cache.c
@@ -456,7 +456,8 @@ camel_vee_data_cache_add_subfolder (CamelVeeDataCache *data_cache,
hash_data->orig_message_uid = camel_vee_message_info_data_get_orig_message_uid (mi_data);
g_hash_table_insert (data_cache->priv->orig_message_uid_hash, hash_data, mi_data);
- g_hash_table_insert (data_cache->priv->vee_message_uid_hash,
+ g_hash_table_insert (
+ data_cache->priv->vee_message_uid_hash,
(gpointer) camel_vee_message_info_data_get_vee_message_uid (mi_data),
mi_data);
}
@@ -640,7 +641,8 @@ camel_vee_data_cache_get_message_info_data (CamelVeeDataCache *data_cache,
hash_data->orig_message_uid = camel_vee_message_info_data_get_orig_message_uid (res);
g_hash_table_insert (data_cache->priv->orig_message_uid_hash, hash_data, res);
- g_hash_table_insert (data_cache->priv->vee_message_uid_hash,
+ g_hash_table_insert (
+ data_cache->priv->vee_message_uid_hash,
(gpointer) camel_vee_message_info_data_get_vee_message_uid (res),
res);
}
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index 461d689..8b40a02 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -1498,7 +1498,8 @@ camel_vee_folder_add_vuid (CamelVeeFolder *vfolder,
if (g_list_find (vfolder->priv->subfolders, subfolder)) {
/* postpone addition to the Unmatched folder, if the change was done
* in the Unmatched folder itself or auto-update is disabled */
- g_hash_table_insert (vfolder->priv->unmatched_add_changed,
+ g_hash_table_insert (
+ vfolder->priv->unmatched_add_changed,
g_object_ref (mi_data), GINT_TO_POINTER (1));
}
@@ -1549,7 +1550,8 @@ camel_vee_folder_remove_vuid (CamelVeeFolder *vfolder,
if (g_list_find (vfolder->priv->subfolders, subfolder)) {
/* postpone removal from the Unmatched folder, if the change was done
* in the Unmatched folder itself or auto-update is disabled */
- g_hash_table_insert (vfolder->priv->unmatched_remove_changed,
+ g_hash_table_insert (
+ vfolder->priv->unmatched_remove_changed,
g_object_ref (mi_data), GINT_TO_POINTER (1));
}
diff --git a/camel/camel-vee-store.c b/camel/camel-vee-store.c
index ff9ea68..077b27d 100644
--- a/camel/camel-vee-store.c
+++ b/camel/camel-vee-store.c
@@ -659,8 +659,10 @@ add_to_unmatched_folder_cb (CamelVeeMessageInfoData *mi_data,
g_return_if_fail (atud != NULL);
vuid = camel_vee_message_info_data_get_vee_message_uid (mi_data);
- g_hash_table_insert (atud->vuid_usage_counts,
- (gpointer) camel_pstring_strdup (vuid), GINT_TO_POINTER (0));
+ g_hash_table_insert (
+ atud->vuid_usage_counts,
+ (gpointer) camel_pstring_strdup (vuid),
+ GINT_TO_POINTER (0));
if (atud->unmatched_enabled)
camel_vee_folder_add_vuid (atud->unmatched_folder, mi_data, atud->changes);
@@ -693,7 +695,9 @@ camel_vee_store_note_subfolder_used (CamelVeeStore *vstore,
counts = GPOINTER_TO_INT (g_hash_table_lookup (vstore->priv->subfolder_usage_counts, subfolder));
counts++;
- g_hash_table_insert (vstore->priv->subfolder_usage_counts, subfolder, GINT_TO_POINTER (counts));
+ g_hash_table_insert (
+ vstore->priv->subfolder_usage_counts,
+ subfolder, GINT_TO_POINTER (counts));
if (counts == 1) {
struct AddToUnmatchedData atud;
@@ -784,7 +788,9 @@ camel_vee_store_note_subfolder_unused (CamelVeeStore *vstore,
camel_vee_data_cache_remove_subfolder (vstore->priv->vee_data_cache, subfolder);
} else {
- g_hash_table_insert (vstore->priv->subfolder_usage_counts, subfolder, GINT_TO_POINTER (counts));
+ g_hash_table_insert (
+ vstore->priv->subfolder_usage_counts,
+ subfolder, GINT_TO_POINTER (counts));
}
g_mutex_unlock (vstore->priv->sf_counts_mutex);
@@ -827,8 +833,10 @@ camel_vee_store_note_vuid_used (CamelVeeStore *vstore,
counts = GPOINTER_TO_INT (g_hash_table_lookup (vstore->priv->vuid_usage_counts, vuid));
counts++;
- g_hash_table_insert (vstore->priv->vuid_usage_counts,
- (gpointer) camel_pstring_strdup (vuid), GINT_TO_POINTER (counts));
+ g_hash_table_insert (
+ vstore->priv->vuid_usage_counts,
+ (gpointer) camel_pstring_strdup (vuid),
+ GINT_TO_POINTER (counts));
if (counts == 1 && camel_vee_store_get_unmatched_enabled (vstore)) {
CamelFolderChangeInfo *changes;
@@ -888,8 +896,10 @@ camel_vee_store_note_vuid_unused (CamelVeeStore *vstore,
return;
}
- g_hash_table_insert (vstore->priv->vuid_usage_counts,
- (gpointer) camel_pstring_strdup (vuid), GINT_TO_POINTER (counts));
+ g_hash_table_insert (
+ vstore->priv->vuid_usage_counts,
+ (gpointer) camel_pstring_strdup (vuid),
+ GINT_TO_POINTER (counts));
if (counts == 0 && camel_vee_store_get_unmatched_enabled (vstore)) {
CamelFolderChangeInfo *changes;
diff --git a/camel/camel-vee-summary.c b/camel/camel-vee-summary.c
index c003b57..0de3ae1 100644
--- a/camel/camel-vee-summary.c
+++ b/camel/camel-vee-summary.c
@@ -41,9 +41,13 @@
#define d(x)
-struct _CamelVeeSummaryPrivate
-{
- GHashTable *vuids_by_subfolder; /* CamelFolder * => GHashTable * of gchar *vuid */
+#define CAMEL_VEE_SUMMARY_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), CAMEL_TYPE_VEE_SUMMARY, CamelVeeSummaryPrivate))
+
+struct _CamelVeeSummaryPrivate {
+ /* CamelFolder * => GHashTable * of gchar *vuid */
+ GHashTable *vuids_by_subfolder;
};
G_DEFINE_TYPE (CamelVeeSummary, camel_vee_summary, CAMEL_TYPE_FOLDER_SUMMARY)
@@ -289,7 +293,8 @@ message_info_from_uid (CamelFolderSummary *s,
* Otherwise, the first byte itself would return in strcmp, saving the CPU.
*/
if (!camel_folder_summary_check_uid (s, uid)) {
- d (g_message ("Unable to find %s in the summary of %s", uid,
+ d (
+ g_message ("Unable to find %s in the summary of %s", uid,
camel_folder_get_full_name (camel_folder_summary_get_folder (s->folder))));
return NULL;
}
@@ -318,9 +323,11 @@ message_info_from_uid (CamelFolderSummary *s,
static void
vee_summary_finalize (GObject *object)
{
- CamelVeeSummary *vsummary = CAMEL_VEE_SUMMARY (object);
+ CamelVeeSummaryPrivate *priv;
+
+ priv = CAMEL_VEE_SUMMARY_GET_PRIVATE (object);
- g_hash_table_destroy (vsummary->priv->vuids_by_subfolder);
+ g_hash_table_destroy (priv->vuids_by_subfolder);
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (camel_vee_summary_parent_class)->finalize (object);
@@ -356,11 +363,13 @@ camel_vee_summary_class_init (CamelVeeSummaryClass *class)
static void
camel_vee_summary_init (CamelVeeSummary *vee_summary)
{
- vee_summary->priv = G_TYPE_INSTANCE_GET_PRIVATE (vee_summary,
- CAMEL_TYPE_VEE_SUMMARY, CamelVeeSummaryPrivate);
+ vee_summary->priv = CAMEL_VEE_SUMMARY_GET_PRIVATE (vee_summary);
- vee_summary->priv->vuids_by_subfolder =
- g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) g_hash_table_destroy);
+ vee_summary->priv->vuids_by_subfolder = g_hash_table_new_full (
+ (GHashFunc) g_direct_hash,
+ (GEqualFunc) g_direct_equal,
+ (GDestroyNotify) NULL,
+ (GDestroyNotify) g_hash_table_destroy);
}
/**
diff --git a/camel/camel.c b/camel/camel.c
index d5d59ad..42e47e2 100644
--- a/camel/camel.c
+++ b/camel/camel.c
@@ -127,15 +127,19 @@ camel_init (const gchar *configdir,
* to prevent camel from bailing out on first run. */
#ifdef G_OS_WIN32
g_mkdir_with_parents (configdir, 0700);
- nss_sql_configdir = g_strconcat ("sql:", nss_configdir, NULL);
+ nss_sql_configdir = g_strconcat (
+ "sql:", nss_configdir, NULL);
#else
- gchar *user_nss_dir = g_build_filename ( g_get_home_dir (),
- ".pki/nssdb", NULL );
+ gchar *user_nss_dir = g_build_filename (
+ g_get_home_dir (), ".pki/nssdb", NULL );
if (g_mkdir_with_parents (user_nss_dir, 0700))
- g_warning ("Failed to create SQL database directory %s: %s\n",
- user_nss_dir, strerror (errno));
+ g_warning (
+ "Failed to create SQL "
+ "database directory %s: %s\n",
+ user_nss_dir, strerror (errno));
- nss_sql_configdir = g_strconcat ("sql:", user_nss_dir, NULL);
+ nss_sql_configdir = g_strconcat (
+ "sql:", user_nss_dir, NULL);
g_free (user_nss_dir);
#endif
}
@@ -155,8 +159,9 @@ camel_init (const gchar *configdir,
0); /* flags */
if (status == SECFailure) {
- g_warning ("Failed to initialize NSS SQL database in %s: NSS error %d",
- nss_sql_configdir, PORT_GetError ());
+ g_warning (
+ "Failed to initialize NSS SQL database in %s: NSS error %d",
+ nss_sql_configdir, PORT_GetError ());
/* Fall back to opening the old DBM database */
}
#endif
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c
index a92ef68..aca7ee5 100644
--- a/camel/providers/imap/camel-imap-command.c
+++ b/camel/providers/imap/camel-imap-command.c
@@ -503,8 +503,9 @@ imap_read_response (CamelImapStore *store,
* for that matter. Well, we could get BAD, treat as NO.
*/
if (!p || (g_ascii_strncasecmp (p, " NO", 3) != 0 && g_ascii_strncasecmp (p, " BAD", 4)) ) {
- g_warning ("Unexpected response from IMAP server: %s",
- respbuf);
+ g_warning (
+ "Unexpected response from IMAP server: %s",
+ respbuf);
g_set_error (
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_UNAVAILABLE,
@@ -721,8 +722,8 @@ camel_imap_response_free (CamelImapStore *store,
|| !g_ascii_strcasecmp (p, " XGWMOVE")) {
/* XGWMOVE response is the same as an EXPUNGE response */
if (!expunged) {
- expunged = g_array_new (FALSE, FALSE,
- sizeof (gint));
+ expunged = g_array_new (
+ FALSE, FALSE, sizeof (gint));
}
g_array_append_val (expunged, number);
}
@@ -819,7 +820,7 @@ camel_imap_response_extract (CamelImapStore *store,
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_UNAVAILABLE,
_("IMAP server response did not "
- "contain %s information"), type);
+ "contain %s information"), type);
}
camel_imap_response_free (store, response);
@@ -929,8 +930,9 @@ imap_command_strdup_vprintf (CamelImapStore *store,
start = p;
break;
default:
- g_warning ("camel-imap-command is not printf. I don't "
- "know what '%%%c' means.", *p);
+ g_warning (
+ "camel-imap-command is not printf. "
+ "I don't know what '%%%c' means.", *p);
start = *p ? p + 1 : p;
break;
}
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 0c444d4..b70e98c 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -1238,7 +1238,8 @@ imap_rescan (CamelFolder *folder,
info = camel_folder_summary_get (folder->summary, uid);
if (!info) {
if (g_getenv ("CRASH_IMAP")) { /* Debug logs to tackle on hard to get imap crasher */
- printf ("CRASH: %s: %s",
+ printf (
+ "CRASH: %s: %s",
camel_folder_get_full_name (folder), uid);
g_assert (0);
} else
@@ -1728,9 +1729,12 @@ imap_synchronize_sync (CamelFolder *folder,
* loop here to flush all the matching uids because
* they will be scooped up later by our parent loop (I
* think?). -- Jeff */
- matches = get_matching (folder, info->info.flags & (folder->permanent_flags | CAMEL_MESSAGE_FOLDER_FLAGGED),
- folder->permanent_flags | CAMEL_MESSAGE_FOLDER_FLAGGED, (CamelMessageInfo *) info, &set, summary,
- deleted_uids, junked_uids);
+ matches = get_matching (
+ folder, info->info.flags &
+ (folder->permanent_flags | CAMEL_MESSAGE_FOLDER_FLAGGED),
+ folder->permanent_flags | CAMEL_MESSAGE_FOLDER_FLAGGED,
+ (CamelMessageInfo *) info, &set, summary,
+ deleted_uids, junked_uids);
if (matches == NULL) {
camel_message_info_free (info);
continue;
@@ -1768,9 +1772,11 @@ imap_synchronize_sync (CamelFolder *folder,
g_free (flaglist);
flaglist = strdup ("(\\Seen)");
- response = camel_imap_command (store, folder, cancellable, &local_error,
- "UID STORE %s +FLAGS.SILENT %s",
- set, flaglist);
+ response = camel_imap_command (
+ store, folder,
+ cancellable, &local_error,
+ "UID STORE %s +FLAGS.SILENT %s",
+ set, flaglist);
if (response)
camel_imap_response_free (store, response);
@@ -1783,9 +1789,10 @@ imap_synchronize_sync (CamelFolder *folder,
/* Note: to 'unset' flags, use -FLAGS.SILENT (<flag list>) */
if (local_error == NULL) {
- response = camel_imap_command (store, folder, cancellable, &local_error,
- "UID STORE %s %sFLAGS.SILENT %s",
- set, unset ? "-" : "", flaglist);
+ response = camel_imap_command (
+ store, folder, cancellable, &local_error,
+ "UID STORE %s %sFLAGS.SILENT %s",
+ set, unset ? "-" : "", flaglist);
}
g_free (set);
@@ -1929,8 +1936,9 @@ imap_expunge_uids_offline (CamelFolder *folder,
g_list_free (list);
camel_folder_summary_save_to_db (folder->summary, NULL);
- camel_imap_journal_log (CAMEL_IMAP_FOLDER (folder)->journal,
- CAMEL_IMAP_JOURNAL_ENTRY_EXPUNGE, uids);
+ camel_imap_journal_log (
+ CAMEL_IMAP_FOLDER (folder)->journal,
+ CAMEL_IMAP_JOURNAL_ENTRY_EXPUNGE, uids);
camel_folder_changed (folder, changes);
camel_folder_change_info_free (changes);
@@ -1975,9 +1983,9 @@ imap_expunge_uids_online (CamelFolder *folder,
while (uid < uids->len) {
set = imap_uid_array_to_set (folder->summary, uids, uid, UID_SET_LIMIT, &uid);
- response = camel_imap_command (store, folder, cancellable, error,
- "UID STORE %s +FLAGS.SILENT (\\Deleted)",
- set);
+ response = camel_imap_command (
+ store, folder, cancellable, error,
+ "UID STORE %s +FLAGS.SILENT (\\Deleted)", set);
if (response)
camel_imap_response_free (store, response);
else {
@@ -2150,8 +2158,9 @@ camel_imap_expunge_uids_resyncing (CamelFolder *folder,
/* Parse SEARCH response */
for (uid = strtok_r (result + 9, " ", &lasts); uid; uid = strtok_r (NULL, " ", &lasts))
g_ptr_array_add (keep_uids, uid);
- qsort (keep_uids->pdata, keep_uids->len,
- sizeof (gpointer), uid_compar);
+ qsort (
+ keep_uids->pdata, keep_uids->len,
+ sizeof (gpointer), uid_compar);
/* Fill in "mark_uids", empty out "keep_uids" as needed */
for (ei = ki = 0; ei < uids->len; ei++) {
@@ -2187,9 +2196,10 @@ camel_imap_expunge_uids_resyncing (CamelFolder *folder,
while (uid < keep_uids->len) {
uidset = imap_uid_array_to_set (folder->summary, keep_uids, uid, UID_SET_LIMIT, &uid);
- response = camel_imap_command (store, folder, cancellable, error,
- "UID STORE %s -FLAGS.SILENT (\\Deleted)",
- uidset);
+ response = camel_imap_command (
+ store, folder, cancellable, error,
+ "UID STORE %s -FLAGS.SILENT (\\Deleted)",
+ uidset);
g_free (uidset);
@@ -2210,9 +2220,10 @@ camel_imap_expunge_uids_resyncing (CamelFolder *folder,
while (uid < mark_uids->len) {
uidset = imap_uid_array_to_set (folder->summary, mark_uids, uid, UID_SET_LIMIT, &uid);
- response = camel_imap_command (store, folder, cancellable, error,
- "UID STORE %s +FLAGS.SILENT (\\Deleted)",
- uidset);
+ response = camel_imap_command (
+ store, folder, cancellable, error,
+ "UID STORE %s +FLAGS.SILENT (\\Deleted)",
+ uidset);
g_free (uidset);
@@ -2241,9 +2252,10 @@ camel_imap_expunge_uids_resyncing (CamelFolder *folder,
while (uid < keep_uids->len) {
uidset = imap_uid_array_to_set (folder->summary, keep_uids, uid, UID_SET_LIMIT, &uid);
- response = camel_imap_command (store, folder, cancellable, NULL,
- "UID STORE %s +FLAGS.SILENT (\\Deleted)",
- uidset);
+ response = camel_imap_command (
+ store, folder, cancellable, NULL,
+ "UID STORE %s +FLAGS.SILENT (\\Deleted)",
+ uidset);
g_free (uidset);
if (response)
@@ -2291,9 +2303,10 @@ get_temp_uid (void)
G_LOCK_DEFINE_STATIC (lock);
G_LOCK (lock);
- res = g_strdup_printf ("tempuid-%lx-%d",
- (gulong) time (NULL),
- counter++);
+ res = g_strdup_printf (
+ "tempuid-%lx-%d",
+ (gulong) time (NULL),
+ counter++);
G_UNLOCK (lock);
return res;
@@ -2324,8 +2337,9 @@ imap_append_offline (CamelFolder *folder,
camel_folder_changed (folder, changes);
camel_folder_change_info_free (changes);
- camel_imap_journal_log (CAMEL_IMAP_FOLDER (folder)->journal,
- CAMEL_IMAP_JOURNAL_ENTRY_APPEND, uid);
+ camel_imap_journal_log (
+ CAMEL_IMAP_FOLDER (folder)->journal,
+ CAMEL_IMAP_JOURNAL_ENTRY_APPEND, uid);
if (appended_uid)
*appended_uid = uid;
else
@@ -2550,8 +2564,9 @@ camel_imap_append_resyncing (CamelFolder *folder,
const gchar *olduid = camel_message_info_uid (info);
CAMEL_IMAP_FOLDER_REC_LOCK (imap_folder, cache_lock);
- camel_imap_message_cache_copy (imap_folder->cache, olduid,
- imap_folder->cache, uid);
+ camel_imap_message_cache_copy (
+ imap_folder->cache, olduid,
+ imap_folder->cache, uid);
CAMEL_IMAP_FOLDER_REC_UNLOCK (imap_folder, cache_lock);
if (appended_uid)
@@ -2687,8 +2702,9 @@ handle_copyuid (CamelImapResponse *response,
*/
CAMEL_IMAP_FOLDER_REC_LOCK (source, cache_lock);
for (i = 0; i < src->len; i++) {
- camel_imap_message_cache_copy (scache, src->pdata[i],
- dcache, dest->pdata[i]);
+ camel_imap_message_cache_copy (
+ scache, src->pdata[i],
+ dcache, dest->pdata[i]);
imap_folder_add_ignore_recent (CAMEL_IMAP_FOLDER (destination), dest->pdata[i]);
}
@@ -3413,7 +3429,8 @@ get_message (CamelImapFolder *imap_folder,
part_spec = content_info_get_part_spec (ci);
d (printf ("get message '%s'\n", part_spec));
- section_text = g_strdup_printf ("%s%s%s", part_spec, *part_spec ? "." : "",
+ section_text = g_strdup_printf (
+ "%s%s%s", part_spec, *part_spec ? "." : "",
store->server_level >= IMAP_LEVEL_IMAP4REV1 ? "HEADER" : "0");
stream = camel_imap_folder_fetch_data (imap_folder, uid, section_text, FALSE, cancellable, error);
@@ -3466,8 +3483,9 @@ get_message_simple (CamelImapFolder *imap_folder,
gboolean success;
if (!stream) {
- stream = camel_imap_folder_fetch_data (imap_folder, uid, "",
- FALSE, cancellable, error);
+ stream = camel_imap_folder_fetch_data (
+ imap_folder, uid, "",
+ FALSE, cancellable, error);
if (!stream)
return NULL;
}
@@ -4132,8 +4150,9 @@ imap_update_summary (CamelFolder *folder,
gchar *uidset;
gint uid = 0;
- qsort (needheaders->pdata, needheaders->len,
- sizeof (gpointer), uid_compar);
+ qsort (
+ needheaders->pdata, needheaders->len,
+ sizeof (gpointer), uid_compar);
camel_operation_push_message (
cancellable,
@@ -4270,7 +4289,7 @@ imap_update_summary (CamelFolder *folder,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Incomplete server response: "
- "no information provided for message %d"),
+ "no information provided for message %d"),
i + first);
continue;
}
@@ -4280,7 +4299,7 @@ imap_update_summary (CamelFolder *folder,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Incomplete server response: "
- "no UID provided for message %d"),
+ "no UID provided for message %d"),
i + first);
continue;
}
@@ -4663,17 +4682,19 @@ parse_fetch_response (CamelImapFolder *imap_folder,
stream = camel_stream_mem_new_with_buffer (body, body_len);
} else {
CAMEL_IMAP_FOLDER_REC_LOCK (imap_folder, cache_lock);
- stream = camel_imap_message_cache_insert (imap_folder->cache,
- uid, part_spec,
- body, body_len, NULL, NULL);
+ stream = camel_imap_message_cache_insert (
+ imap_folder->cache,
+ uid, part_spec,
+ body, body_len, NULL, NULL);
CAMEL_IMAP_FOLDER_REC_UNLOCK (imap_folder, cache_lock);
if (stream == NULL)
stream = camel_stream_mem_new_with_buffer (body, body_len);
}
if (stream)
- g_datalist_set_data_full (&data, "BODY_PART_STREAM", stream,
- (GDestroyNotify) g_object_unref);
+ g_datalist_set_data_full (
+ &data, "BODY_PART_STREAM", stream,
+ (GDestroyNotify) g_object_unref);
}
return data;
diff --git a/camel/providers/imap/camel-imap-journal.c b/camel/providers/imap/camel-imap-journal.c
index a481c9e..e743253 100644
--- a/camel/providers/imap/camel-imap-journal.c
+++ b/camel/providers/imap/camel-imap-journal.c
@@ -304,13 +304,19 @@ journal_decode_folder (CamelIMAPJournal *journal,
folder = camel_store_get_folder_sync (
parent_store, name, 0, cancellable, &local_error);
if (folder)
- g_hash_table_insert (journal->folders, (gchar *) name, folder);
+ g_hash_table_insert (
+ journal->folders,
+ (gchar *) name, folder);
else {
- msg = g_strdup_printf (_("Could not open '%s':\n%s\nChanges made to this folder will not be resynchronized."),
- name, local_error->message);
+ msg = g_strdup_printf (
+ _("Could not open '%s':\n%s\n"
+ "Changes made to this folder "
+ "will not be resynchronized."),
+ name, local_error->message);
g_clear_error (&local_error);
camel_session_alert_user (
- camel_service_get_session (CAMEL_SERVICE (parent_store)),
+ camel_service_get_session (
+ CAMEL_SERVICE (parent_store)),
CAMEL_SESSION_ALERT_WARNING,
msg, NULL);
g_free (msg);
@@ -491,8 +497,10 @@ camel_imap_journal_uidmap_add (CamelIMAPJournal *journal,
const gchar *old_uid,
const gchar *new_uid)
{
- g_hash_table_insert (journal->uidmap, g_strdup (old_uid),
- g_strdup (new_uid));
+ g_hash_table_insert (
+ journal->uidmap,
+ g_strdup (old_uid),
+ g_strdup (new_uid));
}
const gchar *
diff --git a/camel/providers/imap/camel-imap-message-cache.c b/camel/providers/imap/camel-imap-message-cache.c
index 888279c..643c5b7 100644
--- a/camel/providers/imap/camel-imap-message-cache.c
+++ b/camel/providers/imap/camel-imap-message-cache.c
@@ -696,8 +696,9 @@ camel_imap_message_cache_filter_cached (CamelImapMessageCache *cache,
* read the message).
*/
part_find.found = 0;
- part_find.disk_part_name = g_strdup_printf ("%s" BASE_PART_SUFFIX,
- (gchar *) uids->pdata[i]);
+ part_find.disk_part_name = g_strdup_printf (
+ "%s" BASE_PART_SUFFIX,
+ (gchar *) uids->pdata[i]);
g_ptr_array_foreach (parts_list, _match_part, &part_find);
g_free (part_find.disk_part_name);
if (part_find.found)
diff --git a/camel/providers/imap/camel-imap-search.c b/camel/providers/imap/camel-imap-search.c
index cc142f4..e6daeca 100644
--- a/camel/providers/imap/camel-imap-search.c
+++ b/camel/providers/imap/camel-imap-search.c
@@ -361,15 +361,17 @@ sync_match (CamelImapSearch *is,
/* We only try search using utf8 if its non us-ascii text? */
if ((words->type & CAMEL_SEARCH_WORD_8BIT) && (store->capabilities & IMAP_CAPABILITY_utf8_search)) {
- response = camel_imap_command (store, folder, NULL, NULL,
- "UID SEARCH CHARSET UTF-8 %s", search->str);
+ response = camel_imap_command (
+ store, folder, NULL, NULL,
+ "UID SEARCH CHARSET UTF-8 %s", search->str);
/* We can't actually tell if we got a NO response, so assume always */
if (response == NULL)
store->capabilities &= ~IMAP_CAPABILITY_utf8_search;
}
if (response == NULL)
- response = camel_imap_command (store, folder, NULL, NULL,
- "UID SEARCH %s", search->str);
+ response = camel_imap_command (
+ store, folder, NULL, NULL,
+ "UID SEARCH %s", search->str);
g_string_free (search, TRUE);
if (!response)
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 3a63fba..41a4ba4 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -187,9 +187,10 @@ parse_capability (CamelImapStore *store,
for (capa = strtok_r (capa, " ", &lasts); capa; capa = strtok_r (NULL, " ", &lasts)) {
if (!strncmp (capa, "AUTH=", 5)) {
- g_hash_table_insert (store->authtypes,
- g_strdup (capa + 5),
- GINT_TO_POINTER (1));
+ g_hash_table_insert (
+ store->authtypes,
+ g_strdup (capa + 5),
+ GINT_TO_POINTER (1));
continue;
}
for (i = 0; capabilities[i].name; i++) {
@@ -734,7 +735,8 @@ imap_auth_loop (CamelService *service,
if (store->preauthed) {
if (camel_verbose_debug)
- fprintf (stderr, "Server %s has preauthenticated us.\n",
+ fprintf (
+ stderr, "Server %s has preauthenticated us.\n",
host);
goto exit;
}
@@ -745,7 +747,7 @@ imap_auth_loop (CamelService *service,
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
_("IMAP server %s does not support %s "
- "authentication"), host, mechanism);
+ "authentication"), host, mechanism);
success = FALSE;
goto exit;
}
@@ -1445,8 +1447,9 @@ imap_store_subscribe_folder_sync (CamelSubscribable *subscribable,
if (!camel_imap_store_connected (imap_store, error))
return FALSE;
- response = camel_imap_command (imap_store, NULL, cancellable, error,
- "SUBSCRIBE %F", folder_name);
+ response = camel_imap_command (
+ imap_store, NULL, cancellable, error,
+ "SUBSCRIBE %F", folder_name);
if (!response)
return FALSE;
@@ -1492,8 +1495,9 @@ imap_store_unsubscribe_folder_sync (CamelSubscribable *subscribable,
if (!camel_imap_store_connected (imap_store, error))
return FALSE;
- response = camel_imap_command (imap_store, NULL, cancellable, error,
- "UNSUBSCRIBE %F", folder_name);
+ response = camel_imap_command (
+ imap_store, NULL, cancellable, error,
+ "UNSUBSCRIBE %F", folder_name);
if (!response)
return FALSE;
@@ -1697,8 +1701,8 @@ imap_check_folder_still_extant (CamelImapStore *imap_store,
{
CamelImapResponse *response;
- response = camel_imap_command (imap_store, NULL, NULL, NULL, "LIST \"\" %F",
- full_name);
+ response = camel_imap_command (
+ imap_store, NULL, NULL, NULL, "LIST \"\" %F", full_name);
if (response) {
gboolean stillthere = response->untagged->len != 0;
@@ -1920,10 +1924,9 @@ get_folder_status (CamelImapStore *imap_store,
/* FIXME: we assume the server is STATUS-capable */
- response = camel_imap_command (imap_store, NULL, NULL, NULL,
- "STATUS %F (%s)",
- folder_name,
- type);
+ response = camel_imap_command (
+ imap_store, NULL, NULL, NULL,
+ "STATUS %F (%s)", folder_name, type);
if (!response) {
if (imap_check_folder_still_extant (imap_store, folder_name, NULL) == FALSE) {
@@ -2150,8 +2153,10 @@ imap_store_get_folder_sync (CamelStore *store,
/* add the dirsep to the end of parent_name */
name = g_strdup_printf ("%s%c", parent_real, imap_store->dir_sep);
- response = camel_imap_command (imap_store, NULL, cancellable, error, "CREATE %G",
- name);
+ response = camel_imap_command (
+ imap_store, NULL,
+ cancellable, error,
+ "CREATE %G", name);
g_free (name);
if (!response) {
@@ -2446,8 +2451,10 @@ imap_store_rename_folder_sync (CamelStore *store,
/* So do we care if this didn't work? Its just a cache? */
if (g_rename (oldpath, newpath) == -1) {
- g_warning ("Could not rename message cache '%s' to '%s': %s: cache reset",
- oldpath, newpath, g_strerror (errno));
+ g_warning (
+ "Could not rename message cache "
+ "'%s' to '%s': %s: cache reset",
+ oldpath, newpath, g_strerror (errno));
}
if (CAMEL_STORE (imap_store)->folders) {
@@ -2532,8 +2539,9 @@ imap_store_create_folder_sync (CamelStore *store,
}
need_convert = FALSE;
- response = camel_imap_command (imap_store, NULL, cancellable, error, "LIST \"\" %G",
- parent_real);
+ response = camel_imap_command (
+ imap_store, NULL, cancellable, error,
+ "LIST \"\" %G", parent_real);
if (!response) /* whoa, this is bad */ {
g_free (parent_real);
return NULL;
@@ -2589,8 +2597,9 @@ imap_store_create_folder_sync (CamelStore *store,
/* add the dirsep to the end of parent_name */
name = g_strdup_printf ("%s%c", parent_real, imap_store->dir_sep);
- response = camel_imap_command (imap_store, NULL, cancellable, error, "CREATE %G",
- name);
+ response = camel_imap_command (
+ imap_store, NULL, cancellable, error,
+ "CREATE %G", name);
g_free (name);
if (!response) {
@@ -2606,7 +2615,9 @@ imap_store_create_folder_sync (CamelStore *store,
real_name = camel_imap_store_summary_path_to_full (imap_store->summary, folder_name, imap_store->dir_sep);
full_name = imap_concat (imap_store, parent_real, real_name);
g_free (real_name);
- response = camel_imap_command (imap_store, NULL, cancellable, error, "CREATE %G", full_name);
+ response = camel_imap_command (
+ imap_store, NULL, cancellable, error,
+ "CREATE %G", full_name);
if (response) {
CamelImapStoreInfo *si;
@@ -2790,9 +2801,12 @@ get_folders_sync (CamelImapStore *imap_store,
}
for (j = 0; j < 2; j++) {
- response = camel_imap_command (imap_store, NULL, cancellable, first_namespace ? error : NULL,
- "%s \"\" %G", j == 1 ? "LSUB" : "LIST",
- pattern);
+ response = camel_imap_command (
+ imap_store, NULL, cancellable,
+ first_namespace ? error : NULL,
+ "%s \"\" %G",
+ j == 1 ? "LSUB" : "LIST",
+ pattern);
if (!response) {
/* do not worry if checking in some namespace fails */
if (!ppattern)
@@ -2957,7 +2971,8 @@ refresh_refresh (CamelSession *session,
g_object_unref (settings);
- camel_operation_push_message (cancellable,
+ camel_operation_push_message (
+ cancellable,
_("Retrieving list of folders at '%s'"),
camel_service_get_display_name (service));
@@ -3263,7 +3278,7 @@ camel_imap_store_connected (CamelImapStore *store,
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_UNAVAILABLE,
_("You must be working online "
- "to complete this operation"));
+ "to complete this operation"));
return FALSE;
}
diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c
index 1718a14..c8ab152 100644
--- a/camel/providers/imap/camel-imap-utils.c
+++ b/camel/providers/imap/camel-imap-utils.c
@@ -1493,8 +1493,8 @@ find_folders_recursive (const gchar *physical_path,
if (dirent == NULL)
break;
- file_path = g_strdup_printf ("%s/%s", subfolder_directory_path,
- dirent);
+ file_path = g_strdup_printf (
+ "%s/%s", subfolder_directory_path, dirent);
if (g_stat (file_path, &file_stat) < 0 ||
!S_ISDIR (file_stat.st_mode)) {
diff --git a/camel/providers/imap/camel-imap-wrapper.c b/camel/providers/imap/camel-imap-wrapper.c
index defd169..04191ed 100644
--- a/camel/providers/imap/camel-imap-wrapper.c
+++ b/camel/providers/imap/camel-imap-wrapper.c
@@ -200,9 +200,10 @@ camel_imap_wrapper_new (CamelImapFolder *imap_folder,
/* Don't ref this, it's our parent. */
imap_wrapper->part = part;
- /* Download the attachments if sync_offline is set, else skip them by checking only in cache */
- stream = camel_imap_folder_fetch_data (imap_folder, uid, part_spec,
- !sync_offline, NULL, NULL);
+ /* Download the attachments if sync_offline is
+ * set, else skip them by checking only in cache. */
+ stream = camel_imap_folder_fetch_data (
+ imap_folder, uid, part_spec, !sync_offline, NULL, NULL);
if (stream) {
imap_wrapper_hydrate (imap_wrapper, stream, NULL, NULL);
diff --git a/camel/providers/local/camel-local-summary.c b/camel/providers/local/camel-local-summary.c
index cb1f902..224ea1b 100644
--- a/camel/providers/local/camel-local-summary.c
+++ b/camel/providers/local/camel-local-summary.c
@@ -300,12 +300,28 @@ camel_local_summary_check (CamelLocalSummary *cls,
camel_folder_summary_free_array (known_uids);
printf ("\nMemory used by summary:\n\n");
- printf ("Total of %d messages\n", camel_folder_summary_count (s));
- printf ("Total: %d bytes (ave %f)\n", stats.citotal + stats.mitotal,
- (double)(stats.citotal + stats.mitotal) / (double) camel_folder_summary_count (s));
- printf ("Message Info: %d (ave %f)\n", stats.mitotal, (double) stats.mitotal / (double) stats.micount);
- printf ("Content Info; %d (ave %f) count %d\n", stats.citotal, (double) stats.citotal / (double) stats.cicount, stats.cicount);
- printf ("message id's: %d (ave %f) count %d\n", stats.msgid, (double) stats.msgid / (double) stats.msgcount, stats.msgcount);
+ printf (
+ "Total of %d messages\n",
+ camel_folder_summary_count (s));
+ printf (
+ "Total: %d bytes (ave %f)\n",
+ stats.citotal + stats.mitotal,
+ (gdouble) (stats.citotal + stats.mitotal) /
+ (gdouble) camel_folder_summary_count (s));
+ printf (
+ "Message Info: %d (ave %f)\n",
+ stats.mitotal,
+ (gdouble) stats.mitotal / (gdouble) stats.micount);
+ printf (
+ "Content Info; %d (ave %f) count %d\n",
+ stats.citotal,
+ (gdouble) stats.citotal / (gdouble) stats.cicount,
+ stats.cicount);
+ printf (
+ "message id's: %d (ave %f) count %d\n",
+ stats.msgid,
+ (gdouble) stats.msgid / (gdouble) stats.msgcount,
+ stats.msgcount);
}
#endif
return ret;
diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c
index b89f2a1..0e757f9 100644
--- a/camel/providers/local/camel-maildir-store.c
+++ b/camel/providers/local/camel-maildir-store.c
@@ -110,7 +110,7 @@ maildir_store_create_folder_sync (CamelStore *store,
error, CAMEL_STORE_ERROR,
CAMEL_STORE_ERROR_NO_FOLDER,
_("Cannot create folder: %s: "
- "Folder name cannot contain a dot"),
+ "Folder name cannot contain a dot"),
folder_name);
goto exit;
}
diff --git a/camel/providers/local/camel-mbox-folder.c b/camel/providers/local/camel-mbox-folder.c
index 81a75bd..b8e38c8 100644
--- a/camel/providers/local/camel-mbox-folder.c
+++ b/camel/providers/local/camel-mbox-folder.c
@@ -361,9 +361,9 @@ retry:
|| camel_mime_parser_tell_start_from (parser) != frompos) {
g_warning ("Summary doesn't match the folder contents! eek!\n"
- " expecting offset %ld got %ld, state = %d", (glong) frompos,
- (glong) camel_mime_parser_tell_start_from (parser),
- camel_mime_parser_state (parser));
+ " expecting offset %ld got %ld, state = %d", (glong) frompos,
+ (glong) camel_mime_parser_tell_start_from (parser),
+ camel_mime_parser_state (parser));
g_object_unref (parser);
parser = NULL;
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index b00e6c3..7ca10e5 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -488,7 +488,7 @@ summary_update (CamelLocalSummary *cls,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Fatal mail parser error near position %s "
- "in folder %s"), pos_str, cls->folder_path);
+ "in folder %s"), pos_str, cls->folder_path);
g_free (pos_str);
ok = -1;
break;
@@ -858,8 +858,9 @@ mbox_summary_sync_quick (CamelMboxSummary *mbs,
}
if (camel_mime_parser_tell_start_from (mp) != info->frompos) {
- g_warning ("Didn't get the next message where I expected (%d) got %d instead",
- (gint) info->frompos, (gint) camel_mime_parser_tell_start_from (mp));
+ g_warning (
+ "Didn't get the next message where I expected (%d) got %d instead",
+ (gint) info->frompos, (gint) camel_mime_parser_tell_start_from (mp));
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Summary and folder mismatch, even after a sync"));
@@ -1104,22 +1105,32 @@ camel_mbox_summary_sync_mbox (CamelMboxSummary *cls,
if (!info)
continue;
- d (printf ("Looking at message %s\n", camel_message_info_uid (info)));
+ d (printf (
+ "Looking at message %s\n",
+ camel_message_info_uid (info)));
+
+ d (printf (
+ "seeking (%s) to %d\n",
+ ((CamelMessageInfo *) info)->uid,
+ (gint) info->frompos));
- d (printf ("seeking (%s) to %d\n", ((CamelMessageInfo *) info)->uid, (gint) info->frompos));
if (lastdel)
camel_mime_parser_seek (mp, info->frompos, SEEK_SET);
if (camel_mime_parser_step (mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_FROM) {
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
- _("MBOX file is corrupted, please fix it. (Expected a From line, but didn't get it.)"));
+ _("MBOX file is corrupted, please fix it. "
+ "(Expected a From line, but didn't get it.)"));
goto error;
}
if (camel_mime_parser_tell_start_from (mp) != info->frompos) {
- g_warning ("Didn't get the next message where I expected (%d) got %d instead",
- (gint) info->frompos, (gint) camel_mime_parser_tell_start_from (mp));
+ g_warning (
+ "Didn't get the next message where "
+ "I expected (%d) got %d instead",
+ (gint) info->frompos,
+ (gint) camel_mime_parser_tell_start_from (mp));
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Summary and folder mismatch, even after a sync"));
@@ -1215,8 +1226,10 @@ camel_mbox_summary_sync_mbox (CamelMboxSummary *cls,
goto error;
}
- d (printf ("we are now at %d, from = %d\n", (gint) camel_mime_parser_tell (mp),
- (gint) camel_mime_parser_tell_start_from (mp)));
+ d (printf (
+ "we are now at %d, from = %d\n",
+ (gint) camel_mime_parser_tell (mp),
+ (gint) camel_mime_parser_tell_start_from (mp)));
camel_mime_parser_unstep (mp);
camel_message_info_free ((CamelMessageInfo *) info);
info = NULL;
diff --git a/camel/providers/local/camel-mh-store.c b/camel/providers/local/camel-mh-store.c
index 1c40d37..d0c8e8a 100644
--- a/camel/providers/local/camel-mh-store.c
+++ b/camel/providers/local/camel-mh-store.c
@@ -529,7 +529,7 @@ mh_store_get_folder_sync (CamelStore *store,
error, CAMEL_STORE_ERROR,
CAMEL_STORE_ERROR_NO_FOLDER,
_("Cannot get folder '%s': "
- "folder does not exist."),
+ "folder does not exist."),
folder_name);
goto exit;
}
diff --git a/camel/providers/local/camel-spool-summary.c b/camel/providers/local/camel-spool-summary.c
index 5649a44..de89424 100644
--- a/camel/providers/local/camel-spool-summary.c
+++ b/camel/providers/local/camel-spool-summary.c
@@ -242,7 +242,7 @@ spool_summary_sync_full (CamelMboxSummary *cls,
error, G_IO_ERROR,
g_io_error_from_errno (errno),
_("Could not synchronize spool folder %s: %s\n"
- "Folder may be corrupt, copy saved in '%s'"),
+ "Folder may be corrupt, copy saved in '%s'"),
((CamelLocalSummary *) cls)->folder_path,
g_strerror (errno), tmpname);
/* so we dont delete it */
@@ -261,7 +261,7 @@ spool_summary_sync_full (CamelMboxSummary *cls,
error, G_IO_ERROR,
g_io_error_from_errno (errno),
_("Could not synchronize spool folder %s: %s\n"
- "Folder may be corrupt, copy saved in '%s'"),
+ "Folder may be corrupt, copy saved in '%s'"),
((CamelLocalSummary *) cls)->folder_path,
g_strerror (errno), tmpname);
tmpname[0] = '\0';
@@ -274,7 +274,7 @@ spool_summary_sync_full (CamelMboxSummary *cls,
error, G_IO_ERROR,
g_io_error_from_errno (errno),
_("Could not synchronize spool folder %s: %s\n"
- "Folder may be corrupt, copy saved in '%s'"),
+ "Folder may be corrupt, copy saved in '%s'"),
((CamelLocalSummary *) cls)->folder_path,
g_strerror (errno), tmpname);
tmpname[0] = '\0';
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index be3e2df..ebdc1b4 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -1097,7 +1097,8 @@ nntp_get_folder_info (CamelStore *store,
CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
CamelFolderInfo *first = NULL;
- dd (printf ("g_f_i: fast %d subscr %d recursive %d online %d top \"%s\"\n",
+ dd (printf (
+ "g_f_i: fast %d subscr %d recursive %d online %d top \"%s\"\n",
flags & CAMEL_STORE_FOLDER_INFO_FAST,
flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED,
flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE,
@@ -1108,7 +1109,8 @@ nntp_get_folder_info (CamelStore *store,
first = nntp_store_get_subscribed_folder_info (
nntp_store, top, flags, cancellable, error);
else
- first = nntp_store_get_folder_info_all (nntp_store, top, flags, online, cancellable, error);
+ first = nntp_store_get_folder_info_all (
+ nntp_store, top, flags, online, cancellable, error);
return first;
}
@@ -1148,7 +1150,7 @@ nntp_store_create_folder_sync (CamelStore *store,
error, CAMEL_FOLDER_ERROR,
CAMEL_FOLDER_ERROR_INVALID,
_("You cannot create a folder in a News store: "
- "subscribe instead."));
+ "subscribe instead."));
return NULL;
}
@@ -1187,7 +1189,7 @@ nntp_store_delete_folder_sync (CamelStore *store,
error, CAMEL_FOLDER_ERROR,
CAMEL_FOLDER_ERROR_INVALID,
_("You cannot remove a folder in a News store: "
- "unsubscribe instead."));
+ "unsubscribe instead."));
return FALSE;
}
@@ -1386,8 +1388,8 @@ nntp_store_subscribe_folder_sync (CamelSubscribable *subscribable,
error, CAMEL_FOLDER_ERROR,
CAMEL_FOLDER_ERROR_INVALID,
_("You cannot subscribe to this newsgroup:\n\n"
- "No such newsgroup. The selected item is a "
- "probably a parent folder."));
+ "No such newsgroup. The selected item is a "
+ "probably a parent folder."));
success = FALSE;
} else {
if (!(si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED)) {
@@ -1434,7 +1436,7 @@ nntp_store_unsubscribe_folder_sync (CamelSubscribable *subscribable,
error, CAMEL_FOLDER_ERROR,
CAMEL_FOLDER_ERROR_INVALID,
_("You cannot unsubscribe to this newsgroup:\n\n"
- "newsgroup does not exist!"));
+ "newsgroup does not exist!"));
success = FALSE;
} else {
if (fitem->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) {
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index 9101e11..6eb6398 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -181,9 +181,16 @@ cmd_list (CamelPOP3Engine *pe,
fi->id = id;
fi->index = ((CamelPOP3Folder *) folder)->uids->len;
if ((pop3_store->engine->capa & CAMEL_POP3_CAP_UIDL) == 0)
- fi->cmd = camel_pop3_engine_command_new (pe, CAMEL_POP3_COMMAND_MULTI, cmd_builduid, fi, cancellable, NULL, "TOP %u 0\r\n", id);
+ fi->cmd = camel_pop3_engine_command_new (
+ pe,
+ CAMEL_POP3_COMMAND_MULTI,
+ cmd_builduid, fi,
+ cancellable, NULL,
+ "TOP %u 0\r\n", id);
g_ptr_array_add (pop3_folder->uids, fi);
- g_hash_table_insert (pop3_folder->uids_id, GINT_TO_POINTER (id), fi);
+ g_hash_table_insert (
+ pop3_folder->uids_id,
+ GINT_TO_POINTER (id), fi);
}
}
} while (ret > 0);
@@ -563,22 +570,35 @@ pop3_folder_get_message_sync (CamelFolder *folder,
/* ref it, the cache storage routine unref's when done */
fi->stream = g_object_ref (stream);
- pcr = camel_pop3_engine_command_new (pop3_store->engine, CAMEL_POP3_COMMAND_MULTI, cmd_tocache, fi, cancellable, NULL, "RETR %u\r\n", fi->id);
-
- /* Also initiate retrieval of some of the following messages, assume we'll be receiving them */
+ pcr = camel_pop3_engine_command_new (
+ pop3_store->engine,
+ CAMEL_POP3_COMMAND_MULTI,
+ cmd_tocache, fi,
+ cancellable, NULL,
+ "RETR %u\r\n", fi->id);
+
+ /* Also initiate retrieval of some of the following
+ * messages, assume we'll be receiving them. */
if (auto_fetch && pop3_store->cache != NULL) {
- /* This should keep track of the last one retrieved, also how many are still
- * oustanding incase of random access on large folders */
+ /* This should keep track of the last one retrieved,
+ * also how many are still oustanding incase of random
+ * access on large folders. */
i = fi->index + 1;
last = MIN (i + 10, pop3_folder->uids->len);
for (; i < last; i++) {
CamelPOP3FolderInfo *pfi = pop3_folder->uids->pdata[i];
if (pfi->uid && pfi->cmd == NULL) {
- pfi->stream = camel_data_cache_add (pop3_store->cache, "cache", pfi->uid, NULL);
+ pfi->stream = camel_data_cache_add (
+ pop3_store->cache,
+ "cache", pfi->uid, NULL);
if (pfi->stream) {
- pfi->cmd = camel_pop3_engine_command_new (pop3_store->engine, CAMEL_POP3_COMMAND_MULTI,
- cmd_tocache, pfi, cancellable, NULL, "RETR %u\r\n", pfi->id);
+ pfi->cmd = camel_pop3_engine_command_new (
+ pop3_store->engine,
+ CAMEL_POP3_COMMAND_MULTI,
+ cmd_tocache, pfi,
+ cancellable, NULL,
+ "RETR %u\r\n", pfi->id);
}
}
}
@@ -697,9 +717,19 @@ pop3_folder_refresh_info_sync (CamelFolder *folder,
/* only used during setup */
pop3_folder->uids_id = g_hash_table_new (NULL, NULL);
- pcl = camel_pop3_engine_command_new (pop3_store->engine, CAMEL_POP3_COMMAND_MULTI, cmd_list, folder, cancellable, &local_error, "LIST\r\n");
+ pcl = camel_pop3_engine_command_new (
+ pop3_store->engine,
+ CAMEL_POP3_COMMAND_MULTI,
+ cmd_list, folder,
+ cancellable, &local_error,
+ "LIST\r\n");
if (!local_error && (pop3_store->engine->capa & CAMEL_POP3_CAP_UIDL) != 0)
- pcu = camel_pop3_engine_command_new (pop3_store->engine, CAMEL_POP3_COMMAND_MULTI, cmd_uidl, folder, cancellable, &local_error, "UIDL\r\n");
+ pcu = camel_pop3_engine_command_new (
+ pop3_store->engine,
+ CAMEL_POP3_COMMAND_MULTI,
+ cmd_uidl, folder,
+ cancellable, &local_error,
+ "UIDL\r\n");
while ((i = camel_pop3_engine_iterate (pop3_store->engine, NULL, cancellable, error)) > 0)
;
@@ -859,13 +889,11 @@ pop3_folder_synchronize_sync (CamelFolder *folder,
}
if (fi->flags & CAMEL_MESSAGE_DELETED) {
- fi->cmd = camel_pop3_engine_command_new (pop3_store->engine,
- 0,
- NULL,
- NULL,
- cancellable, NULL,
- "DELE %u\r\n",
- fi->id);
+ fi->cmd = camel_pop3_engine_command_new (
+ pop3_store->engine,
+ 0, NULL, NULL,
+ cancellable, NULL,
+ "DELE %u\r\n", fi->id);
/* also remove from cache */
if (pop3_store->cache && fi->uid)
@@ -1084,8 +1112,11 @@ camel_pop3_delete_old (CamelFolder *folder,
gdouble time_diff = difftime (temp,message_time);
gint day_lag = time_diff / (60 * 60 * 24);
- d (printf ("%s(%d): message_time= [%ld]\n", __FILE__, __LINE__, message_time));
- d (printf ("%s(%d): day_lag=[%d] \t days_to_delete=[%d]\n",
+ d (printf (
+ "%s(%d): message_time= [%ld]\n",
+ __FILE__, __LINE__, message_time));
+ d (printf (
+ "%s(%d): day_lag=[%d] \t days_to_delete=[%d]\n",
__FILE__, __LINE__, day_lag, days_to_delete));
if (day_lag > days_to_delete) {
@@ -1097,14 +1128,14 @@ camel_pop3_delete_old (CamelFolder *folder,
camel_pop3_engine_command_free (pop3_store->engine, fi->cmd);
fi->cmd = NULL;
}
- d (printf ("%s(%d): Deleting old messages\n", __FILE__, __LINE__));
- fi->cmd = camel_pop3_engine_command_new (pop3_store->engine,
- 0,
- NULL,
- NULL,
- cancellable, NULL,
- "DELE %u\r\n",
- fi->id);
+ d (printf (
+ "%s(%d): Deleting old messages\n",
+ __FILE__, __LINE__));
+ fi->cmd = camel_pop3_engine_command_new (
+ pop3_store->engine,
+ 0, NULL, NULL,
+ cancellable, NULL,
+ "DELE %u\r\n", fi->id);
/* also remove from cache */
if (pop3_store->cache && fi->uid) {
camel_data_cache_remove (pop3_store->cache, "cache", fi->uid, NULL);
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 3475d3b..e934e7a 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -296,7 +296,7 @@ try_sasl (CamelPOP3Store *store,
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
_("Cannot login to POP server %s: "
- "SASL Protocol error"), host);
+ "SASL Protocol error"), host);
result = CAMEL_AUTHENTICATION_ERROR;
goto exit;
}
@@ -544,8 +544,8 @@ pop3_store_authenticate_sync (CamelService *service,
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_URL_INVALID,
_("Unable to connect to POP server %s: "
- "Invalid APOP ID received. Impersonation "
- "attack suspected. Please contact your admin."),
+ "Invalid APOP ID received. Impersonation "
+ "attack suspected. Please contact your admin."),
host);
result = CAMEL_AUTHENTICATION_ERROR;
@@ -596,7 +596,7 @@ pop3_store_authenticate_sync (CamelService *service,
g_prefix_error (
error,
_("Unable to connect to POP server %s.\n"
- "Error sending password: "), host);
+ "Error sending password: "), host);
result = CAMEL_AUTHENTICATION_ERROR;
} else if (pcu && pcu->state != CAMEL_POP3_COMMAND_OK) {
@@ -611,7 +611,7 @@ pop3_store_authenticate_sync (CamelService *service,
/* Translators: Last %s is an optional explanation
* beginning with ": " separator. */
_("Unable to connect to POP server %s.\n"
- "Error sending username%s"),
+ "Error sending username%s"),
host, (tmp != NULL) ? tmp : "");
g_free (tmp);
result = CAMEL_AUTHENTICATION_ERROR;
diff --git a/camel/providers/sendmail/camel-sendmail-transport.c b/camel/providers/sendmail/camel-sendmail-transport.c
index b437dce..1b4c626 100644
--- a/camel/providers/sendmail/camel-sendmail-transport.c
+++ b/camel/providers/sendmail/camel-sendmail-transport.c
@@ -124,7 +124,7 @@ sendmail_send_to_sync (CamelTransport *transport,
error, G_IO_ERROR,
g_io_error_from_errno (errno),
_("Could not create pipe to sendmail: %s: "
- "mail not sent"), g_strerror (errno));
+ "mail not sent"), g_strerror (errno));
/* restore the bcc headers */
header->next = savedbcc;
@@ -146,7 +146,7 @@ sendmail_send_to_sync (CamelTransport *transport,
error, G_IO_ERROR,
g_io_error_from_errno (errno),
_("Could not fork sendmail: %s: "
- "mail not sent"), g_strerror (errno));
+ "mail not sent"), g_strerror (errno));
close (fd[0]);
close (fd[1]);
sigprocmask (SIG_SETMASK, &omask, NULL);
@@ -232,7 +232,7 @@ sendmail_send_to_sync (CamelTransport *transport,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("sendmail exited with status %d: "
- "mail not sent."),
+ "mail not sent."),
WEXITSTATUS (wstat));
}
return FALSE;
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index c30ff83..1efc0fc 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -376,7 +376,7 @@ smtp_transport_connect_sync (CamelService *service,
error, CAMEL_SERVICE_ERROR,
CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
_("SMTP server %s does not support %s "
- "authentication"), host, mechanism);
+ "authentication"), host, mechanism);
success = FALSE;
}
@@ -701,7 +701,7 @@ smtp_transport_send_to_sync (CamelTransport *transport,
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Cannot send message: "
- "one or more invalid recipients"));
+ "one or more invalid recipients"));
camel_operation_pop_message (cancellable);
smtp_transport->need_rset = TRUE;
return FALSE;
diff --git a/camel/tests/folder/test3.c b/camel/tests/folder/test3.c
index 6e414db..3ee3be9 100644
--- a/camel/tests/folder/test3.c
+++ b/camel/tests/folder/test3.c
@@ -211,7 +211,8 @@ main (gint argc,
push ("creating test message");
msg = test_message_create_simple ();
content = g_strdup_printf ("data%d content\n", j);
- test_message_set_content_simple ((CamelMimePart *) msg, 0, "text/plain",
+ test_message_set_content_simple (
+ (CamelMimePart *) msg, 0, "text/plain",
content, strlen (content));
test_free (content);
subject = g_strdup_printf ("Test%d message%d subject", j, 100 - j);
diff --git a/camel/tests/folder/test8.c b/camel/tests/folder/test8.c
index 2483a3b..e35a135 100644
--- a/camel/tests/folder/test8.c
+++ b/camel/tests/folder/test8.c
@@ -31,7 +31,8 @@ test_add_message (CamelFolder *folder,
push ("creating message %d\n", j);
msg = test_message_create_simple ();
content = g_strdup_printf ("Test message %08x contents\n\n", j);
- test_message_set_content_simple ((CamelMimePart *) msg, 0, "text/plain",
+ test_message_set_content_simple (
+ (CamelMimePart *) msg, 0, "text/plain",
content, strlen (content));
test_free (content);
subject = g_strdup_printf ("Test message %08x subject", j);
diff --git a/camel/tests/folder/test9.c b/camel/tests/folder/test9.c
index 3be2c11..1219c13 100644
--- a/camel/tests/folder/test9.c
+++ b/camel/tests/folder/test9.c
@@ -140,7 +140,8 @@ gint main (gint argc, gchar **argv)
push ("creating test message");
msg = test_message_create_simple ();
content = g_strdup_printf ("data%d content\n", j);
- test_message_set_content_simple ((CamelMimePart *) msg, 0, "text/plain",
+ test_message_set_content_simple (
+ (CamelMimePart *) msg, 0, "text/plain",
content, strlen (content));
test_free (content);
subject = g_strdup_printf ("Test%d message%d subject", j, 100 - j);
diff --git a/camel/tests/lib/folders.c b/camel/tests/lib/folders.c
index 8d439e0..c7faaa5 100644
--- a/camel/tests/lib/folders.c
+++ b/camel/tests/lib/folders.c
@@ -63,8 +63,9 @@ void
test_message_info (CamelMimeMessage *msg,
const CamelMessageInfo *info)
{
- check_msg (safe_strcmp (camel_message_info_subject (info), camel_mime_message_get_subject (msg)) == 0,
- "info->subject = '%s', get_subject () = '%s'", camel_message_info_subject (info), camel_mime_message_get_subject (msg));
+ check_msg (
+ safe_strcmp (camel_message_info_subject (info), camel_mime_message_get_subject (msg)) == 0,
+ "info->subject = '%s', get_subject () = '%s'", camel_message_info_subject (info), camel_mime_message_get_subject (msg));
/* FIXME: testing from/cc/to, etc is more tricky */
@@ -402,7 +403,8 @@ test_folder_message_ops (CamelSession *session,
push ("creating test message");
msg = test_message_create_simple ();
content = g_strdup_printf ("Test message %d contents\n\n", j);
- test_message_set_content_simple ((CamelMimePart *) msg, 0, "text/plain",
+ test_message_set_content_simple (
+ (CamelMimePart *) msg, 0, "text/plain",
content, strlen (content));
test_free (content);
subject = g_strdup_printf ("Test message %d", j);
@@ -443,8 +445,9 @@ test_folder_message_ops (CamelSession *session,
if (uids->len > j) {
info = camel_folder_get_message_info (folder, uids->pdata[j]);
check (info != NULL);
- check_msg (strcmp (camel_message_info_subject (info), subject) == 0,
- "info->subject %s", camel_message_info_subject (info));
+ check_msg (
+ strcmp (camel_message_info_subject (info), subject) == 0,
+ "info->subject %s", camel_message_info_subject (info));
camel_folder_free_message_info (folder, info);
}
camel_folder_free_uids (folder, uids);
@@ -494,8 +497,9 @@ test_folder_message_ops (CamelSession *session,
test_folder_message (folder, uids->pdata[j]);
info = camel_folder_get_message_info (folder, uids->pdata[j]);
- check_msg (strcmp (camel_message_info_subject (info), subject) == 0,
- "info->subject %s", camel_message_info_subject (info));
+ check_msg (
+ strcmp (camel_message_info_subject (info), subject) == 0,
+ "info->subject %s", camel_message_info_subject (info));
test_free (subject);
camel_folder_free_message_info (folder, info);
pull ();
@@ -522,8 +526,9 @@ test_folder_message_ops (CamelSession *session,
test_folder_message (folder, uids->pdata[j]);
info = camel_folder_get_message_info (folder, uids->pdata[j]);
- check_msg (strcmp (camel_message_info_subject (info), subject) == 0,
- "info->subject %s", camel_message_info_subject (info));
+ check_msg (
+ strcmp (camel_message_info_subject (info), subject) == 0,
+ "info->subject %s", camel_message_info_subject (info));
test_free (subject);
camel_folder_free_message_info (folder, info);
pull ();
@@ -552,8 +557,9 @@ test_folder_message_ops (CamelSession *session,
test_folder_message (folder, uids->pdata[j]);
info = camel_folder_get_message_info (folder, uids->pdata[j]);
- check_msg (strcmp (camel_message_info_subject (info), subject) == 0,
- "info->subject %s", camel_message_info_subject (info));
+ check_msg (
+ strcmp (camel_message_info_subject (info), subject) == 0,
+ "info->subject %s", camel_message_info_subject (info));
test_free (subject);
camel_folder_free_message_info (folder, info);
pull ();
diff --git a/camel/tests/lib/messages.c b/camel/tests/lib/messages.c
index f53e4ab..47df14f 100644
--- a/camel/tests/lib/messages.c
+++ b/camel/tests/lib/messages.c
@@ -239,9 +239,10 @@ test_message_compare (CamelMimeMessage *msg)
check_unref (msg2, 1);
- check_msg (byte_array1->len == byte_array2->len,
- "byte_array1->len = %d, byte_array2->len = %d",
- byte_array1->len, byte_array2->len);
+ check_msg (
+ byte_array1->len == byte_array2->len,
+ "byte_array1->len = %d, byte_array2->len = %d",
+ byte_array1->len, byte_array2->len);
check_msg (memcmp (byte_array1->data, byte_array2->data, byte_array1->len) == 0, "msg/stream compare");
diff --git a/camel/tests/message/test2.c b/camel/tests/message/test2.c
index 2d296e3..6456d2d 100644
--- a/camel/tests/message/test2.c
+++ b/camel/tests/message/test2.c
@@ -65,8 +65,9 @@ static gchar *convert (const gchar *in, const gchar *from, const gchar *to)
/* and lets see what camel thinks out optimal charset is */
{
- printf ("Camel thinks the best encoding of '%s' is %s, although we converted from %s\n",
- in, camel_charset_best (out, strlen (out)), from);
+ printf (
+ "Camel thinks the best encoding of '%s' is %s, although we converted from %s\n",
+ in, camel_charset_best (out, strlen (out)), from);
}
fail:
#endif
diff --git a/camel/tests/message/test3.c b/camel/tests/message/test3.c
index 1728570..65f0584 100644
--- a/camel/tests/message/test3.c
+++ b/camel/tests/message/test3.c
@@ -113,12 +113,15 @@ gint main (gint argc, gchar **argv)
check_msg (mp2->postface == NULL || strlen (mp2->postface) == 0, "postface: '%s'", mp2->postface);
camel_test_fatal ();
- test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 0))),
- "content part 1", strlen ("content part 1"));
- test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 1))),
- "content part 3", strlen ("content part 3"));
- test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 2))),
- "content part 2", strlen ("content part 2"));
+ test_message_compare_content (
+ camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 0))),
+ "content part 1", strlen ("content part 1"));
+ test_message_compare_content (
+ camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 1))),
+ "content part 3", strlen ("content part 3"));
+ test_message_compare_content (
+ camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 2))),
+ "content part 2", strlen ("content part 2"));
pull ();
push ("writing again, & re-reading");
@@ -137,12 +140,15 @@ gint main (gint argc, gchar **argv)
check_msg (mp2->postface == NULL || strlen (mp2->postface) == 0, "postface: '%s'", mp2->postface);
- test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 0))),
- "content part 1", strlen ("content part 1"));
- test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 1))),
- "content part 3", strlen ("content part 3"));
- test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 2))),
- "content part 2", strlen ("content part 2"));
+ test_message_compare_content (
+ camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 0))),
+ "content part 1", strlen ("content part 1"));
+ test_message_compare_content (
+ camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 1))),
+ "content part 3", strlen ("content part 3"));
+ test_message_compare_content (
+ camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 2))),
+ "content part 2", strlen ("content part 2"));
pull ();
pull ();
@@ -169,12 +175,15 @@ gint main (gint argc, gchar **argv)
check (strcmp (camel_multipart_get_boundary (mp2), "_=,.XYZ_Kangaroo_Meat_is_!_ABADF00D") == 0);
check (mp2->preface && strcmp (mp2->preface, "pre-text\nLines.") == 0);
check (mp2->postface && strcmp (mp2->postface, "post-text, no lines.\nOne line.\n") == 0);
- test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 0))),
- "content part 1", strlen ("content part 1"));
- test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 1))),
- "content part 3", strlen ("content part 3"));
- test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 2))),
- "content part 2", strlen ("content part 2"));
+ test_message_compare_content (
+ camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 0))),
+ "content part 1", strlen ("content part 1"));
+ test_message_compare_content (
+ camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 1))),
+ "content part 3", strlen ("content part 3"));
+ test_message_compare_content (
+ camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 2))),
+ "content part 2", strlen ("content part 2"));
pull ();
check_unref (msg2, 1);
pull ();
diff --git a/camel/tests/mime-filter/test-charset.c b/camel/tests/mime-filter/test-charset.c
index d2624df..9934138 100644
--- a/camel/tests/mime-filter/test-charset.c
+++ b/camel/tests/mime-filter/test-charset.c
@@ -107,8 +107,8 @@ main (gint argc,
if (delta == 0) {
camel_test_fail ("Chunks are different sizes: correct is %d, "
- "filter is %d, %d bytes into stream",
- comp_correct_chunk, comp_filter_chunk, comp_progress);
+ "filter is %d, %d bytes into stream",
+ comp_correct_chunk, comp_filter_chunk, comp_progress);
}
comp_filter_chunk += delta;
@@ -117,10 +117,10 @@ main (gint argc,
for (i = 0; i < comp_filter_chunk; i++) {
if (comp_correct[i] != comp_filter[i]) {
camel_test_fail ("Difference: correct is %c, filter is %c, "
- "%d bytes into stream",
- comp_correct[i],
- comp_filter[i],
- comp_progress + i);
+ "%d bytes into stream",
+ comp_correct[i],
+ comp_filter[i],
+ comp_progress + i);
}
}
diff --git a/camel/tests/mime-filter/test-crlf.c b/camel/tests/mime-filter/test-crlf.c
index 7928d65..5bc1b6d 100644
--- a/camel/tests/mime-filter/test-crlf.c
+++ b/camel/tests/mime-filter/test-crlf.c
@@ -121,8 +121,8 @@ main (gint argc,
if (delta == 0) {
camel_test_fail ("Chunks are different sizes: correct is %d, "
- "filter is %d, %d bytes into stream",
- comp_correct_chunk, comp_filter_chunk, comp_progress);
+ "filter is %d, %d bytes into stream",
+ comp_correct_chunk, comp_filter_chunk, comp_progress);
}
comp_filter_chunk += delta;
@@ -131,10 +131,10 @@ main (gint argc,
for (comp_i = 0; comp_i < comp_filter_chunk; comp_i++) {
if (comp_correct[comp_i] != comp_filter[comp_i]) {
camel_test_fail ("Difference: correct is %c, filter is %c, "
- "%d bytes into stream",
- comp_correct[comp_i],
- comp_filter[comp_i],
- comp_progress + comp_i);
+ "%d bytes into stream",
+ comp_correct[comp_i],
+ comp_filter[comp_i],
+ comp_progress + comp_i);
}
}
diff --git a/camel/tests/mime-filter/test-tohtml.c b/camel/tests/mime-filter/test-tohtml.c
index 0c5ac58..cb9b2f3 100644
--- a/camel/tests/mime-filter/test-tohtml.c
+++ b/camel/tests/mime-filter/test-tohtml.c
@@ -56,9 +56,9 @@ test_filter (CamelMimeFilter *f,
check (camel_stream_write_to_stream (filter, in, NULL, NULL) > 0);
check_msg (byte_array_in->len == byte_array_out->len
- && memcmp (byte_array_in->data, byte_array_out->data, byte_array_in->len) == 0,
- "Buffer content mismatch, %d != %d, in = '%.*s' != out = '%.*s'", byte_array_in->len, byte_array_out->len,
- byte_array_in->len, byte_array_in->data, byte_array_out->len, byte_array_out->data);
+ && memcmp (byte_array_in->data, byte_array_out->data, byte_array_in->len) == 0,
+ "Buffer content mismatch, %d != %d, in = '%.*s' != out = '%.*s'", byte_array_in->len, byte_array_out->len,
+ byte_array_in->len, byte_array_in->data, byte_array_out->len, byte_array_out->data);
camel_test_pull ();
@@ -86,9 +86,9 @@ test_filter (CamelMimeFilter *f,
check (camel_stream_write_to_stream (indisk, filter, NULL, NULL) > 0);
check (camel_stream_flush (filter, NULL, NULL) == 0);
check_msg (byte_array_in->len == byte_array_out->len
- && memcmp (byte_array_in->data, byte_array_out->data, byte_array_in->len) == 0,
- "Buffer content mismatch, %d != %d, in = '%.*s' != out = '%.*s'", byte_array_in->len, byte_array_out->len,
- byte_array_in->len, byte_array_in->data, byte_array_out->len, byte_array_out->data);
+ && memcmp (byte_array_in->data, byte_array_out->data, byte_array_in->len) == 0,
+ "Buffer content mismatch, %d != %d, in = '%.*s' != out = '%.*s'", byte_array_in->len, byte_array_out->len,
+ byte_array_in->len, byte_array_in->data, byte_array_out->len, byte_array_out->data);
camel_stream_filter_remove ((CamelStreamFilter *) filter, id);
check_unref (filter, 1);
diff --git a/camel/tests/misc/split.c b/camel/tests/misc/split.c
index f37f3f8..1d02fce 100644
--- a/camel/tests/misc/split.c
+++ b/camel/tests/misc/split.c
@@ -68,8 +68,9 @@ main (gint argc,
check_msg (words->len == split_tests[i].count, "words->len = %d, count = %d", words->len, split_tests[i].count);
for (j = 0; j < words->len; j++) {
- check_msg (strcmp (split_tests[i].splits[j].word, words->words[j]->word) == 0,
- "'%s' != '%s'", split_tests[i].splits[j].word, words->words[j]->word);
+ check_msg (
+ strcmp (split_tests[i].splits[j].word, words->words[j]->word) == 0,
+ "'%s' != '%s'", split_tests[i].splits[j].word, words->words[j]->word);
check (split_tests[i].splits[j].type == words->words[j]->type);
}
@@ -92,8 +93,9 @@ main (gint argc,
check_msg (words->len == simple_tests[i].count, "words->len = %d, count = %d", words->len, simple_tests[i].count);
for (j = 0; j < words->len; j++) {
- check_msg (strcmp (simple_tests[i].splits[j].word, words->words[j]->word) == 0,
- "'%s' != '%s'", simple_tests[i].splits[j].word, words->words[j]->word);
+ check_msg (
+ strcmp (simple_tests[i].splits[j].word, words->words[j]->word) == 0,
+ "'%s' != '%s'", simple_tests[i].splits[j].word, words->words[j]->word);
check (simple_tests[i].splits[j].type == words->words[j]->type);
}
diff --git a/camel/tests/misc/url-scan.c b/camel/tests/misc/url-scan.c
index a3381e1..b62c920 100644
--- a/camel/tests/misc/url-scan.c
+++ b/camel/tests/misc/url-scan.c
@@ -111,7 +111,8 @@ gint main (gint argc, gchar **argv)
if ((url && (!url_tests[i].url || strcmp (url, url_tests[i].url) != 0)) ||
(!url && url_tests[i].url)) {
- printf ("FAILED on \"%s\" -> %s\n (got %s)\n\n",
+ printf (
+ "FAILED on \"%s\" -> %s\n (got %s)\n\n",
url_tests[i].text,
url_tests[i].url ? url_tests[i].url : "(nothing)",
url ? url : "(nothing)");
diff --git a/camel/tests/misc/url.c b/camel/tests/misc/url.c
index 44e4840..4833f76 100644
--- a/camel/tests/misc/url.c
+++ b/camel/tests/misc/url.c
@@ -93,8 +93,9 @@ main (gint argc,
camel_test_push ("base URL unparsing");
url_string = camel_url_to_string (base_url, 0);
if (strcmp (url_string, base) != 0) {
- camel_test_fail ("URL <%s> unparses to <%s>\n",
- base, url_string);
+ camel_test_fail (
+ "URL <%s> unparses to <%s>\n",
+ base, url_string);
}
camel_test_pull ();
g_free (url_string);
diff --git a/camel/tests/smime/pkcs7.c b/camel/tests/smime/pkcs7.c
index 1f56c5b..3c141d4 100644
--- a/camel/tests/smime/pkcs7.c
+++ b/camel/tests/smime/pkcs7.c
@@ -112,8 +112,9 @@ gint main (gint argc, gchar **argv)
stream2 = camel_stream_mem_new ();
camel_test_push ("PKCS7 signing");
- camel_smime_sign (ctx, "smime xtorshun org", CAMEL_CIPHER_HASH_SHA1,
- stream1, stream2, ex);
+ camel_smime_sign (
+ ctx, "smime xtorshun org", CAMEL_CIPHER_HASH_SHA1,
+ stream1, stream2, ex);
check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
camel_test_pull ();
@@ -143,8 +144,9 @@ gint main (gint argc, gchar **argv)
camel_test_push ("PKCS7 encrypt");
recipients = g_ptr_array_new ();
g_ptr_array_add (recipients, "smime xtorshun org");
- camel_smime_encrypt (ctx, FALSE, "smime xtorshun org", recipients,
- stream1, stream2, ex);
+ camel_smime_encrypt (
+ ctx, FALSE, "smime xtorshun org", recipients,
+ stream1, stream2, ex);
check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
g_ptr_array_free (recipients, TRUE);
camel_test_pull ();
diff --git a/libedataserver/e-time-utils.c b/libedataserver/e-time-utils.c
index 699710c..1b26465 100644
--- a/libedataserver/e-time-utils.c
+++ b/libedataserver/e-time-utils.c
@@ -2093,7 +2093,7 @@ e_time_get_d_fmt_with_4digit_year (void)
res = g_strdup (nl_langinfo (D_FMT) );
#elif defined(G_OS_WIN32)
#define GET_LOCALE_INFO(str, len) \
- GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SLONGDATE, str, len)
+ GetLocaleInfoA (LOCALE_USER_DEFAULT, LOCALE_SLONGDATE, str, len)
gint format_string_length = GET_LOCALE_INFO (NULL, 0);
if (format_string_length > 0) {
gsize format_bytes_read;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]