diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-07-11 23:31:15 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-07-12 10:25:06 +0800 |
commit | eb29179da623f9cf4abd663577395a085452ca18 (patch) | |
tree | a7eec4690f254d4cb9048ca87a5e7f401a2e74ae /plugins | |
parent | beb8e74577f695d0d3c2efea52dc10c2136f0135 (diff) | |
download | gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.gz gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.bz2 gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.lz gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.xz gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.zst gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/audio-inline/audio-inline.c | 2 | ||||
-rw-r--r-- | plugins/dbx-import/dbx-importer.c | 43 | ||||
-rw-r--r-- | plugins/groupwise-features/camel-gw-listener.c | 6 | ||||
-rw-r--r-- | plugins/publish-calendar/publish-location.c | 11 | ||||
-rw-r--r-- | plugins/sa-junk-plugin/em-junk-filter.c | 12 |
5 files changed, 38 insertions, 36 deletions
diff --git a/plugins/audio-inline/audio-inline.c b/plugins/audio-inline/audio-inline.c index 802490ab0e..46f345974f 100644 --- a/plugins/audio-inline/audio-inline.c +++ b/plugins/audio-inline/audio-inline.c @@ -295,7 +295,7 @@ org_gnome_audio_inline_format (gpointer ep, EMFormatHookTarget *t) struct _org_gnome_audio_inline_pobject *pobj; gchar *classid = g_strdup_printf ("org-gnome-audio-inline-button-panel-%d", org_gnome_audio_class_id_counter); - org_gnome_audio_class_id_counter ++; + org_gnome_audio_class_id_counter++; d(printf ("audio inline formatter: format classid %s\n", classid)); diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c index 608a981a46..d09c97b248 100644 --- a/plugins/dbx-import/dbx-importer.c +++ b/plugins/dbx-import/dbx-importer.c @@ -122,16 +122,15 @@ typedef struct { gint current_item; } DbxImporter; - -static unsigned char oe56_mbox_sig[16] = { +static guchar oe56_mbox_sig[16] = { 0xcf, 0xad, 0x12, 0xfe, 0xc5, 0xfd, 0x74, 0x6f, 0x66, 0xe3, 0xd1, 0x11, 0x9a, 0x4e, 0x00, 0xc0 }; -static unsigned char oe56_flist_sig[16] = { +static guchar oe56_flist_sig[16] = { 0xcf, 0xad, 0x12, 0xfe, 0xc6, 0xfd, 0x74, 0x6f, 0x66, 0xe3, 0xd1, 0x11, 0x9a, 0x4e, 0x00, 0xc0 }; -static unsigned char oe4_mbox_sig[8] = { +static guchar oe4_mbox_sig[8] = { 0x4a, 0x4d, 0x46, 0x36, 0x03, 0x00, 0x01, 0x00 }; @@ -174,7 +173,7 @@ org_gnome_evolution_readdbx_supported (EPlugin *epl, EImportTarget *target) } } close (fd); - } + } return ret; } @@ -258,10 +257,10 @@ struct _dbx_tableindexstruct { guint32 unknown1; guint32 anotherTablePtr; guint32 parent; - char unknown2; - char ptrCount; - char reserve3; - char reserve4; + gchar unknown2; + gchar ptrCount; + gchar reserve3; + gchar reserve4; guint32 indexCount; }; @@ -274,26 +273,24 @@ struct _dbx_indexstruct { #define INDEX_POINTER 0xE4 #define ITEM_COUNT 0xC4 - struct _dbx_email_headerstruct { guint32 self; guint32 size; - unsigned short int u1; - unsigned char count; - unsigned char u2; + gushort u1; + guchar count; + guchar u2; }; - struct _dbx_block_hdrstruct { guint32 self; guint32 nextaddressoffset; - unsigned short blocksize; - unsigned char intcount; - unsigned char unknown1; + gushort blocksize; + guchar intcount; + guchar unknown1; guint32 nextaddress; }; -static int dbx_pread(gint fd, void *buf, guint32 count, guint32 offset) +static gint dbx_pread(gint fd, gpointer buf, guint32 count, guint32 offset) { if (lseek(fd, offset, SEEK_SET) != offset) return -1; @@ -332,7 +329,7 @@ static gboolean dbx_load_index_table(DbxImporter *m, guint32 pos, guint32 *index if (!dbx_load_index_table(m, tindex.anotherTablePtr, index_ofs)) return FALSE; } - + d(printf("Index at %x has ptrCount %d\n", pos, tindex.ptrCount)); pos += sizeof(tindex); @@ -348,7 +345,7 @@ static gboolean dbx_load_index_table(DbxImporter *m, guint32 pos, guint32 *index index.indexptr = GUINT32_FROM_LE(index.indexptr); index.anotherTablePtr = GUINT32_FROM_LE(index.anotherTablePtr); index.indexCount = GUINT32_FROM_LE(index.indexCount); - + if (*index_ofs == m->index_count) { g_set_error ( &m->base.error, @@ -477,7 +474,7 @@ dbx_read_email (DbxImporter *m, guint32 offset, gint bodyfd, gint *flags) struct _dbx_email_headerstruct hdr; guchar *buffer; guint32 dataptr = 0; - int i; + gint i; if (dbx_pread(m->dbx_fd, &hdr, sizeof(hdr), offset) != sizeof(hdr)) { g_set_error ( @@ -511,7 +508,7 @@ dbx_read_email (DbxImporter *m, guint32 offset, gint bodyfd, gint *flags) guchar type = buffer[i*4]; gint val = buffer[i*4 + 1] + (buffer[i*4 + 2] << 8) + (buffer[i*4 + 3] << 16); - switch(type) { + switch (type) { case 0x01: *flags = buffer[hdr.count*4 + val]; d(printf("Got type 0x01 flags %02x\n", *flags)); @@ -594,7 +591,7 @@ dbx_import_file (DbxImporter *m) camel_operation_progress(NULL, 100 * i / m->index_count); camel_operation_progress(m->status, 100 * i / m->index_count); - + if (!dbx_read_email(m, m->indices[i], tmpfile, &dbx_flags)) { d(printf("Cannot read email index %d at %x\n", i, m->indices[i])); diff --git a/plugins/groupwise-features/camel-gw-listener.c b/plugins/groupwise-features/camel-gw-listener.c index 17d904b549..3539d253cd 100644 --- a/plugins/groupwise-features/camel-gw-listener.c +++ b/plugins/groupwise-features/camel-gw-listener.c @@ -107,7 +107,7 @@ finalize (GObject *object) g_free (config_listener->priv); } - for ( list = g_list_first (groupwise_accounts); list; list = g_list_next (list) ) { + for (list = g_list_first (groupwise_accounts); list; list = g_list_next (list)) { info = (GwAccountInfo *) (list->data); @@ -494,7 +494,7 @@ get_addressbook_names_from_server (gchar *source_url) cnc = NULL; do { - count ++; + count++; /*we have to uncache the password before prompting again*/ if (failed_auth) { e_passwords_forget_password ("Groupwise", key); @@ -986,7 +986,7 @@ camel_gw_listener_construct (CamelGwListener *config_listener) config_listener->priv->account_list = e_account_list_new (config_listener->priv->gconf_client); - for ( iter = e_list_get_iterator (E_LIST ( config_listener->priv->account_list) ); e_iterator_is_valid (iter); e_iterator_next (iter) ) { + for (iter = e_list_get_iterator (E_LIST ( config_listener->priv->account_list) ); e_iterator_is_valid (iter); e_iterator_next (iter)) { account = E_ACCOUNT (e_iterator_get (iter)); diff --git a/plugins/publish-calendar/publish-location.c b/plugins/publish-calendar/publish-location.c index 98a8247725..d22bc4fa47 100644 --- a/plugins/publish-calendar/publish-location.c +++ b/plugins/publish-calendar/publish-location.c @@ -40,7 +40,9 @@ migrateURI (const gchar *xml, xmlDocPtr doc) EUri *euri; client = gconf_client_get_default (); - uris = gconf_client_get_list (client, "/apps/evolution/calendar/publish/uris", GCONF_VALUE_STRING, NULL); + uris = gconf_client_get_list ( + client, "/apps/evolution/calendar/publish/uris", + GCONF_VALUE_STRING, NULL); l = uris; while (l && l->data) { gchar *str = l->data; @@ -100,7 +102,9 @@ migrateURI (const gchar *xml, xmlDocPtr doc) uri->events = events; uris = g_slist_prepend (uris, e_publish_uri_to_xml (uri)); - gconf_client_set_list (client, "/apps/evolution/calendar/publish/uris", GCONF_VALUE_STRING, uris, NULL); + gconf_client_set_list ( + client, "/apps/evolution/calendar/publish/uris", + GCONF_VALUE_STRING, uris, NULL); g_slist_foreach (uris, (GFunc) g_free, NULL); g_slist_free (uris); g_object_unref (client); @@ -236,7 +240,8 @@ e_publish_uri_to_xml (EPublishUri *uri) else xmlSetProp (root, (xmlChar *)"fb_duration_type", (xmlChar *)"weeks"); - for (calendars = uri->events; calendars != NULL; calendars = g_slist_next (calendars)) { + for (calendars = uri->events; calendars != NULL; + calendars = g_slist_next (calendars)) { xmlNodePtr node; node = xmlNewChild (root, NULL, (const guchar *)"event", NULL); xmlSetProp (node, (const guchar *)"uid", calendars->data); diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c index edfb896107..9918fa0967 100644 --- a/plugins/sa-junk-plugin/em-junk-filter.c +++ b/plugins/sa-junk-plugin/em-junk-filter.c @@ -368,7 +368,7 @@ em_junk_sa_run_spamd (const gchar *binary) time_req.tv_sec = 0; time_req.tv_nsec = 50000000; - for (i = 0; i < 100; i ++) { + for (i = 0; i < 100; i++) { if (stat (em_junk_sa_get_socket_path (), &stat_buf) == 0) { d(fprintf (stderr, "socket created\n")); break; @@ -395,7 +395,7 @@ em_junk_sa_start_own_daemon () em_junk_sa_socket_path = e_mktemp ("spamd-socket-path-XXXXXX"); em_junk_sa_spamd_pidfile = e_mktemp ("spamd-pid-file-XXXXXX"); - for (b = 0; em_junk_sa_spamd_binaries [b]; b ++) { + for (b = 0; em_junk_sa_spamd_binaries [b]; b++) { em_junk_sa_use_spamc = em_junk_sa_run_spamd (em_junk_sa_spamd_binaries [b]); if (em_junk_sa_use_spamc) { em_junk_sa_new_daemon_started = TRUE; @@ -411,7 +411,7 @@ em_junk_sa_find_spamc () gint b; em_junk_sa_use_spamc = FALSE; - for (b = 0; em_junk_sa_spamc_binaries [b]; b ++) { + for (b = 0; em_junk_sa_spamc_binaries [b]; b++) { em_junk_sa_spamc_binary = em_junk_sa_spamc_binaries [b]; if (em_junk_sa_test_spamd_running (em_junk_sa_spamc_binary, FALSE)) { em_junk_sa_use_spamc = TRUE; @@ -456,7 +456,7 @@ em_junk_sa_test_spamd (void) /* try to use sytem spamd first */ if (try_system_spamd) { - for (b = 0; em_junk_sa_spamc_binaries [b]; b ++) { + for (b = 0; em_junk_sa_spamc_binaries [b]; b++) { em_junk_sa_spamc_binary = em_junk_sa_spamc_binaries [b]; if (em_junk_sa_test_spamd_running (em_junk_sa_spamc_binary, TRUE)) { em_junk_sa_use_spamc = TRUE; @@ -468,7 +468,7 @@ em_junk_sa_test_spamd (void) /* if there's no system spamd running, try to use user one with user specified socket */ if (!em_junk_sa_use_spamc && em_junk_sa_preferred_socket_path) { - for (b = 0; em_junk_sa_spamc_binaries [b]; b ++) { + for (b = 0; em_junk_sa_spamc_binaries [b]; b++) { em_junk_sa_spamc_binary = em_junk_sa_spamc_binaries [b]; if (em_junk_sa_test_spamd_running (em_junk_sa_spamc_binary, FALSE)) { em_junk_sa_use_spamc = TRUE; @@ -532,7 +532,7 @@ em_junk_sa_check_respawn_too_fast () rv = FALSE; em_junk_sa_spamd_restarts [em_junk_sa_spamd_restarts_count % SPAMD_RESTARTS_SIZE] = time_now; - em_junk_sa_spamd_restarts_count ++; + em_junk_sa_spamd_restarts_count++; G_UNLOCK (spamd_restart); |