* major code cleanup (part 2)
authorChristoph Hohmann <reboot@gmx.ch>
Sun, 29 Sep 2002 13:43:33 +0000 (13:43 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Sun, 29 Sep 2002 13:43:33 +0000 (13:43 +0000)
        - unused variables removed
        - unused functions removed
        - uninitialized variables checked
        - missing return statements added
        - missing function return types added
        - added parentheses around assignment
  when suggested by gcc

30 files changed:
ChangeLog.claws
configure.in
src/account.c
src/addrbook.c
src/addrclip.c
src/addressbook.c
src/compose.c
src/crash.c
src/enriched.c
src/exporthtml.c
src/filtering.c
src/folder.c
src/gtksctree.c
src/gtkshruler.c
src/inc.c
src/mainwindow.c
src/matcher.c
src/matcher_parser_lex.l
src/matcher_parser_parse.y
src/mbox_folder.c
src/mh.c
src/mh.h
src/news.h
src/prefs_account.c
src/prefs_common.c
src/prefs_toolbar.c
src/quote_fmt_parse.y
src/send.c
src/stringtable.c
src/summaryview.c

index 3b36037..e0a0628 100644 (file)
@@ -1,3 +1,15 @@
+2002-09-29 [christoph] 0.8.3claws34
+
+       * major code cleanup (part 2)
+       
+               - unused variables removed
+               - unused functions removed
+               - uninitialized variables checked
+               - missing return statements added
+               - missing function return types added
+               - added parentheses around assignment
+                 when suggested by gcc
+
 2002-09-29 [alfons]    0.8.3claws33
 
        * src/logwindow.c
@@ -15,9 +27,9 @@
 2002-09-27 [christoph] 0.8.3claws31
 
        * doc-src/readme.txt
-       * doc-src/rfc1806.txt
-       * doc-src/rfc2183.txt
-       * doc-src/rfc2980.txt
+       * doc-src/rfc1806.txt   ** REMOVED **
+       * doc-src/rfc2183.txt   ** NEW FILE **
+       * doc-src/rfc2980.txt   ** NEW FILE **
                update rfcs
 
 2002-09-27 [melvin]    0.8.3claws30
index e4c8584..4b4d2bc 100644 (file)
@@ -10,7 +10,7 @@ MINOR_VERSION=8
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws33
+EXTRA_VERSION=claws34
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index ab54d7c..bdd2ad0 100644 (file)
@@ -669,6 +669,8 @@ static gboolean account_delete_references_func(GNode *node, gpointer data)
        item->prefs->enable_default_account = FALSE;
        item->prefs->default_account = 0;
        prefs_folder_item_save_config(item);
+
+       return FALSE;
 }
 
 static void account_delete(void)
index 89e4506..3fbef00 100644 (file)
@@ -1366,22 +1366,6 @@ ItemPerson *addrbook_add_address_list( AddressBookFile *book, ItemFolder *folder
        return person;
 }
 
-/*
-* Load hash table visitor function.
-*/
-static void addrbook_load_hash_table_email_vis( gpointer key, gpointer value, gpointer data ) {
-       AddrItemObject *obj = ( AddrItemObject * ) value;
-
-       if( ADDRITEM_TYPE(obj) == ITEMTYPE_EMAIL ) {
-               GHashTable *table = ( GHashTable * ) data;
-               gchar *newKey = g_strdup( key );
-               ItemEMail *email = ( ItemEMail * ) obj;
-               if( ! g_hash_table_lookup( table, newKey ) ) {
-                       g_hash_table_insert( table, newKey, email );
-               }
-       }
-}
-
 /*
 * Build available email list visitor function.
 */
index 4fd7896..32d7049 100644 (file)
@@ -161,13 +161,6 @@ void addrclip_add_item(
        }
 }
 
-static void addrclip_print( AddrSelectItem *item, FILE *stream ) {
-       fprintf( stream, "Select Record\n" );
-       fprintf( stream, "obj type: %d\n", item->objectType );
-       fprintf( stream, "     uid: %s\n", item->uid );
-       fprintf( stream, "---\n" );
-}
-
 /*
 * Show clipboard contents.
 * Enter: clipBoard Clipboard.
@@ -284,79 +277,6 @@ static GList *addrclip_cache_add_person(
        return copyList;
 }
 
-/*
- * Paste unattached email into cache.
- * Enter: cache    Address cache to paste into.
- *        folder   Folder to store
- *        email    EMail to add.
- *        copyList List of email addresses pasted.
- * Return: Update list of email addresses pasted.
- */
-static GList *addrclip_cache_add_email(
-       AddressCache *cache, ItemFolder *folder, ItemEMail *email,
-       GList *copyList )
-{
-       ItemPerson *newPerson;
-       ItemEMail *newEMail;
-       AddrClip_EMail *em;
-
-       /* Create a person */
-       newPerson = addritem_create_item_person();
-       addritem_person_set_common_name( newPerson, "" );
-       addrcache_id_person( cache, newPerson );
-       addrcache_folder_add_person( cache, folder, newPerson );
-
-       /* Copy email addresses */
-       newEMail = addritem_copy_item_email( email );
-       addrcache_id_email( cache, newEMail );
-       addrcache_person_add_email( cache, newPerson, newEMail );
-
-       /* Take a copy of the original */
-       em = g_new0( AddrClip_EMail, 1 );
-       em->original = email;
-       em->copy = newEMail;
-       copyList = g_list_append( copyList, em );
-
-       return copyList;
-}
-
-/*
- * Test whether specified E-Mail address object is already in clipboard and
- * owned by an ItemPerson objects.
- * Enter: email  E-Mail to test.
- * Return: TRUE if duplicate found.
- */
-static gboolean addrclip_test_email(
-       AddressClipboard *clipBoard, ItemEMail *testEMail )
-{
-       ItemPerson *person;
-       ItemEMail *email;
-       GList *node, *nodeMail;
-       AddrSelectItem *item;
-       AddrItemObject *aio;
-       AddressCache *cache;
-
-       node = clipBoard->objectList;
-       while( node ) {
-               item = node->data;
-               cache = addrindex_get_cache( clipBoard->addressIndex, item->cacheID );
-               aio = addrcache_get_object( cache, item->uid );
-               if( aio ) {
-                       if( ADDRITEM_TYPE(aio) == ITEMTYPE_PERSON ) {
-                               person = ( ItemPerson * ) aio;
-                               nodeMail = person->listEMail;
-                               while( nodeMail ) {
-                                       email = nodeMail->data;
-                                       if( email == testEMail ) return TRUE;
-                                       nodeMail = g_list_next( nodeMail );
-                               }
-                       }
-               }
-               node = g_list_next( node );
-       }
-       return FALSE;
-}
-
 /*
  * Search for new email record in copied email list.
  * Enter: copyList  List of copied email address mappings.
@@ -973,7 +893,7 @@ static gint addrclip_person_move_email(
        GList *node;
 
        cnt = 0;
-       while( node = fromPerson->listEMail ) {
+       while( (node = fromPerson->listEMail) != NULL ) {
                ItemEMail *email;
 
                email = node->data;
index 23e53c0..ab55463 100644 (file)
@@ -3304,13 +3304,13 @@ static void addressbook_lup_clicked( GtkButton *button, gpointer data ) {
 ItemObjectType addressbook_type2item( AddressObjectType abType ) {
        ItemObjectType ioType;
 
-       ioType = ITEMTYPE_NONE;
        switch( abType ) {
                case ADDR_ITEM_PERSON: ioType = ITEMTYPE_PERSON;     break;
                case ADDR_ITEM_EMAIL:  ioType = ITEMTYPE_EMAIL;      break;
                case ADDR_ITEM_FOLDER: ioType = ITEMTYPE_FOLDER;     break;
                case ADDR_ITEM_GROUP:  ioType = ITEMTYPE_GROUP;      break;
                case ADDR_DATASOURCE:  ioType = ITEMTYPE_DATASOURCE; break;
+               default:               ioType = ITEMTYPE_NONE;       break;
        }
        return ioType;
 }
index 40619ba..10a4052 100644 (file)
@@ -3752,6 +3752,9 @@ static void compose_write_attach(Compose *compose, FILE *fp)
                                fputc('\n', fp);
                        }
                        break;
+               default:
+                       debug_print("Tried to write attachment in unsupported encoding type\n");
+                       break;
                }
 
                fclose(attach_fp);
index 134e572..8efa1b5 100644 (file)
@@ -27,6 +27,8 @@
 #include <stdlib.h>
 #include <signal.h>
 #include <time.h>
+#include <sys/types.h>
+#include <sys/wait.h>
 
 #include <errno.h>
 #include <fcntl.h>
@@ -62,7 +64,7 @@
 
 static GtkWidget       *crash_dialog_show              (const gchar *text, 
                                                         const gchar *debug_output);
-static gboolean                 crash_create_debugger_file     (void);
+static void             crash_create_debugger_file     (void);
 static void             crash_save_crash_log           (GtkButton *, const gchar *);
 static void             crash_create_bug_report        (GtkButton *, const gchar *);
 static void             crash_debug                    (unsigned long crash_pid, 
@@ -171,9 +173,6 @@ static GtkWidget *crash_dialog_show(const gchar *text, const gchar *debug_output
        GtkWidget *button3;
        GtkWidget *button4;
        GtkWidget *button5;
-       GtkWidget *pixwid;
-       GdkPixmap *pix;
-       GdkBitmap *msk;
        gchar     *crash_report;
 
        window1 = gtk_window_new(GTK_WINDOW_TOPLEVEL);
@@ -279,7 +278,7 @@ static GtkWidget *crash_dialog_show(const gchar *text, const gchar *debug_output
  *             all the other options (creating temp files) looked too 
  *             convoluted.
  */
-static gboolean crash_create_debugger_file(void)
+static void crash_create_debugger_file(void)
 {
        gchar *filespec = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, DEBUGGERRC, NULL);
        
index e387ee5..ded4125 100644 (file)
@@ -32,9 +32,6 @@
 static ERTFState ertf_read_line                (ERTFParser     *parser);
 static void ertf_append_char           (ERTFParser     *parser,
                                         gchar           ch);
-static void ertf_append_str            (ERTFParser     *parser,
-                                        const gchar    *str,
-                                        gint            len);
 
 static ERTFState ertf_parse_tag                (ERTFParser     *parser);
 static void ertf_get_parenthesis       (ERTFParser     *parser, 
@@ -166,33 +163,6 @@ static void ertf_append_char(ERTFParser *parser, gchar ch)
                parser->newline = FALSE;
 }
 
-static void ertf_append_str(ERTFParser *parser, const gchar *str, gint len)
-{
-       GString *string = parser->str;
-
-       if (!parser->pre && parser->space) {
-               g_string_append_c(string, ' ');
-               parser->space = FALSE;
-       }
-
-       if (len == 0) return;
-       if (len < 0)
-               g_string_append(string, str);
-       else {
-               gchar *s;
-               Xstrndup_a(s, str, len, return);
-               g_string_append(string, s);
-       }
-
-       parser->empty_line = FALSE;
-       if (string->len > 0 && string->str[string->len - 1] == '\n') {
-               parser->newline = TRUE;
-               if (string->len > 1 && string->str[string->len - 2] == '\n')
-                       parser->empty_line = TRUE;
-       } else
-               parser->newline = FALSE;
-}
-
 static ERTFState ertf_parse_tag(ERTFParser *parser)
 {
        gchar buf[ERTFBUFSIZE];
index 7f7a106..08915d4 100644 (file)
@@ -1019,7 +1019,7 @@ void exporthtml_process(
 
        tt = time( NULL );
        fprintf( htmlFile, "<p>%s</p>\n", ctime( &tt ) );
-       fprintf( htmlFile, "<hr width=\"100\%\"></hr>\n" );
+       fprintf( htmlFile, "<hr width=\"100%%\"></hr>\n" );
 
        fprintf( htmlFile, "</body>\n" );
        fprintf( htmlFile, "</html>\n" );
index 01a03f7..e35c780 100644 (file)
@@ -258,8 +258,9 @@ static gboolean filteringaction_apply(FilteringAction * action, MsgInfo * info,
                return TRUE;
 
        default:
-               return FALSE;
+               break;
        }
+       return FALSE;
 }
 
 static gboolean filtering_match_condition(FilteringProp *filtering, MsgInfo *info)
@@ -271,7 +272,6 @@ static gboolean filtering_apply_rule(FilteringProp *filtering, MsgInfo *info,
                                     GHashTable *foldertable)
 {
        gboolean result;
-       gchar    actionstr;
        gchar    buf[50];
 
        if (FALSE == (result = filteringaction_apply(filtering->action, info, foldertable))) {
index 56f62db..71a780e 100644 (file)
@@ -429,6 +429,8 @@ gboolean folder_scan_tree_func(GNode *node, gpointer data)
        FolderItem *item = (FolderItem *)node->data;
        
        folder_item_restore_persist_prefs(item, pptable);
+
+       return FALSE;
 }
 
 void folder_scan_tree(Folder *folder)
@@ -790,33 +792,35 @@ gchar *folder_get_path(Folder *folder)
 
        g_return_val_if_fail(folder != NULL, NULL);
 
-       if (FOLDER_TYPE(folder) == F_MH)
-               path = g_strdup(LOCAL_FOLDER(folder)->rootpath);
-       else if (FOLDER_TYPE(folder) == F_MBOX) {
-               path = mbox_get_virtual_path(folder);
-               if (path == NULL)
-                       return NULL;
-               path = g_strconcat(get_mbox_cache_dir(),
-                                         G_DIR_SEPARATOR_S, path, NULL);
-               return path;
-       }
-       else if (FOLDER_TYPE(folder) == F_IMAP) {
-               g_return_val_if_fail(folder->account != NULL, NULL);
-               path = g_strconcat(get_imap_cache_dir(),
-                                  G_DIR_SEPARATOR_S,
-                                  folder->account->recv_server,
-                                  G_DIR_SEPARATOR_S,
-                                  folder->account->userid,
-                                  NULL);
-       } else if (FOLDER_TYPE(folder) == F_NEWS) {
-               g_return_val_if_fail(folder->account != NULL, NULL);
-               path = g_strconcat(get_news_cache_dir(),
-                                  G_DIR_SEPARATOR_S,
-                                  folder->account->nntp_server,
-                                  NULL);
-       } else
-               path = NULL;
+       switch(FOLDER_TYPE(folder)) {
+
+               case F_MH:
+                       path = g_strdup(LOCAL_FOLDER(folder)->rootpath);
+                       break;
+
+               case F_IMAP:
+                       g_return_val_if_fail(folder->account != NULL, NULL);
+                       path = g_strconcat(get_imap_cache_dir(),
+                                          G_DIR_SEPARATOR_S,
+                                          folder->account->recv_server,
+                                          G_DIR_SEPARATOR_S,
+                                          folder->account->userid,
+                                          NULL);
+                       break;
+
+               case F_NEWS:
+                       g_return_val_if_fail(folder->account != NULL, NULL);
+                       path = g_strconcat(get_news_cache_dir(),
+                                          G_DIR_SEPARATOR_S,
+                                          folder->account->nntp_server,
+                                          NULL);
+                       break;
 
+               default:
+                       path = NULL;
+                       break;
+       }
+       
        return path;
 }
 
@@ -827,26 +831,37 @@ gchar *folder_item_get_path(FolderItem *item)
 
        g_return_val_if_fail(item != NULL, NULL);
 
-       folder_path = folder_get_path(item->folder);
-       g_return_val_if_fail(folder_path != NULL, NULL);
+       if(FOLDER_TYPE(item->folder) != F_MBOX) {
+               folder_path = folder_get_path(item->folder);
+               g_return_val_if_fail(folder_path != NULL, NULL);
 
-       if (folder_path[0] == G_DIR_SEPARATOR) {
-               if (item->path)
-                       path = g_strconcat(folder_path, G_DIR_SEPARATOR_S,
-                                          item->path, NULL);
-               else
-                       path = g_strdup(folder_path);
+               if (folder_path[0] == G_DIR_SEPARATOR) {
+                       if (item->path)
+                               path = g_strconcat(folder_path, G_DIR_SEPARATOR_S,
+                                                  item->path, NULL);
+                       else
+                               path = g_strdup(folder_path);
+               } else {
+                       if (item->path)
+                               path = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
+                                                  folder_path, G_DIR_SEPARATOR_S,
+                                                  item->path, NULL);
+                       else
+                               path = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
+                                                  folder_path, NULL);
+               }
+
+               g_free(folder_path);
        } else {
-               if (item->path)
-                       path = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
-                                          folder_path, G_DIR_SEPARATOR_S,
-                                          item->path, NULL);
-               else
-                       path = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
-                                          folder_path, NULL);
-       }
+               gchar *itempath;
 
-       g_free(folder_path);
+               itempath = mbox_get_virtual_path(item);
+               if (itempath == NULL)
+                       return NULL;
+               path = g_strconcat(get_mbox_cache_dir(),
+                                         G_DIR_SEPARATOR_S, itempath, NULL);
+               g_free(itempath);
+       }
        return path;
 }
 
index 5b216e0..4914518 100644 (file)
@@ -40,7 +40,6 @@ static void gtk_sctree_collapse (GtkCTree *ctree, GtkCTreeNode *node);
        
 static void tree_sort (GtkCTree *ctree, GtkCTreeNode  *node, gpointer data);
 void gtk_sctree_sort_node (GtkCTree *ctree, GtkCTreeNode *node);
-static void real_sort_list (GtkCList *clist);
 void gtk_sctree_sort_recursive (GtkCTree *ctree, GtkCTreeNode *node);
 
 static void gtk_ctree_link (GtkCTree *ctree,
@@ -719,12 +718,6 @@ gtk_sctree_sort_recursive (GtkCTree     *ctree,
        gtk_clist_thaw (clist);
 }
 
-static void
-real_sort_list (GtkCList *clist)
-{
-       gtk_sctree_sort_recursive (GTK_CTREE (clist), NULL);
-}
-
 void
 gtk_sctree_sort_node (GtkCTree     *ctree, 
                     GtkCTreeNode *node)
index 0cc442d..091c190 100644 (file)
@@ -43,8 +43,6 @@
 
 static void gtk_shruler_class_init     (GtkSHRulerClass *klass);
 static void gtk_shruler_init           (GtkSHRuler      *hruler);
-static gint gtk_shruler_motion_notify  (GtkWidget       *widget,
-                                        GdkEventMotion  *event);
 static void gtk_shruler_draw_ticks     (GtkRuler        *ruler);
 #if 0
 static void gtk_shruler_draw_pos       (GtkRuler        *ruler);
index f39bc5a..673de66 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -270,6 +270,9 @@ static gint inc_account_mail(PrefsAccount *account, MainWindow *mainwin)
        case A_LOCAL:
                inc_spool_account(account);
                return 1;
+
+       default:
+               break;
        }
        return 0;
 }
index be48271..aa314ac 100644 (file)
@@ -455,9 +455,6 @@ static void create_filter_cb         (MainWindow    *mainwin,
 static void prefs_common_open_cb       (MainWindow     *mainwin,
                                         guint           action,
                                         GtkWidget      *widget);
-static void prefs_filter_open_cb       (MainWindow     *mainwin,
-                                        guint           action,
-                                        GtkWidget      *widget);
 static void prefs_template_open_cb     (MainWindow     *mainwin,
                                         guint           action,
                                         GtkWidget      *widget);
@@ -3445,12 +3442,6 @@ static void prefs_common_open_cb(MainWindow *mainwin, guint action,
        prefs_common_open();
 }
 
-static void prefs_filter_open_cb(MainWindow *mainwin, guint action,
-                                GtkWidget *widget)
-{
-       prefs_filter_open(NULL, NULL);
-}
-
 static void prefs_scoring_open_cb(MainWindow *mainwin, guint action,
                                  GtkWidget *widget)
 {
index 3ee7d22..b9288ce 100644 (file)
@@ -834,10 +834,6 @@ gchar * matcherprop_to_string(MatcherProp * matcher)
        gchar * criteria_str;
        gchar * matchtype_str;
        int i;
-       gchar * p;
-       gint count;
-       gchar * expr_str;
-       gchar * out;
 
        criteria_str = NULL;
        for(i = 0 ; i < (int) (sizeof(matchparser_tab) / sizeof(MatchParser)) ;
@@ -1208,8 +1204,6 @@ void prefs_matcher_write_config(void)
 {
        gchar *rcpath;
        PrefFile *pfile;
-       GSList *cur;
-       ScoringProp * prop;
 
        debug_print("Writing matcher configuration...\n");
 
index 7f4c845..8c33ee1 100644 (file)
@@ -1,7 +1,9 @@
 %{
+#include <string.h>
+#include <glib.h>
+
 #include "matcher_parser_lex.h"
 #include "matcher_parser_parse.h"
-#include <glib.h>
 
 #define MAX_STR_CONST 512
 
index 79aff3d..635aa8f 100644 (file)
@@ -169,7 +169,7 @@ int matcher_parserwrap(void)
 
 %token <str> MATCHER_STRING
 %token <str> MATCHER_SECTION
-%token <value> MATCHER_INTEGER
+%token <str> MATCHER_INTEGER
 
 %%
 
index 879ede7..7f786e2 100644 (file)
@@ -92,7 +92,7 @@ static void mbox_folder_init(Folder *folder, const gchar *name, const gchar *pat
                                    = mbox_check_msgnum_validity;
 }
 
-static gchar * mbox_folder_create_parent(const gchar * path)
+static void mbox_folder_create_parent(const gchar * path)
 {
        if (!is_file_exist(path)) {
                gchar * new_path;
@@ -758,11 +758,6 @@ static void mbox_cache_init()
        mbox_cache_table = g_hash_table_new(g_str_hash, g_str_equal);
 }
 
-static void mbox_cache_done()
-{
-       g_hash_table_destroy(mbox_cache_table);
-}
-
 static void mbox_cache_free_mbox(mboxcache * cache)
 {
        g_hash_table_remove(mbox_cache_table, cache->filename);
@@ -907,16 +902,6 @@ static gint mbox_cache_get_count(gchar * filename)
        return cache->mf->count;
 }
 
-static gint mbox_cache_get_mtime(gchar * filename)
-{
-       mboxcache * cache;
-
-       cache = mbox_cache_get_mbox(filename);
-       if (cache == NULL)
-               return -1;
-       return cache->mtime;
-}
-
 static GList * mbox_cache_get_msg_list(gchar * filename)
 {
        mboxcache * cache;
@@ -982,8 +967,6 @@ static void mbox_cache_synchronize(gchar * filename, gboolean sync)
        }
 
        if (scan_new) {
-               GList * l;
-
                /*              
                if (strstr(filename, "trash") == 0)
                        printf("old_cache: %p %s\n", old_cache, filename);
@@ -1648,9 +1631,6 @@ gint mbox_copy_msg(Folder *folder, FolderItem *dest, MsgInfo *msginfo)
        Folder * src_folder;
        gchar * filename;
        gint num;
-       gchar * destdir;
-       gchar * mbox_path;
-       struct _message * msg;
        CopyFlagsInfo * flags_info;
 
        src_folder = msginfo->folder->folder;
index 12bfe68..6187ca0 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -119,7 +119,7 @@ Folder *mh_folder_new(const gchar *name, const gchar *path)
        return folder;
 }
 
-void mh_folder_destroy(MHFolder *folder)
+void mh_folder_destroy(Folder *folder)
 {
        folder_local_folder_destroy(LOCAL_FOLDER(folder));
 }
index 69e2870..8f5cdb9 100644 (file)
--- a/src/mh.h
+++ b/src/mh.h
@@ -36,6 +36,6 @@ struct _MHFolder
 
 Folder *mh_folder_new          (const gchar    *name,
                                 const gchar    *path);
-void     mh_folder_destroy     (MHFolder       *folder);
+void     mh_folder_destroy     (Folder         *folder);
 
 #endif /* __MH_H__ */
index 33652ef..fec7348 100644 (file)
@@ -80,6 +80,7 @@ void news_remove_group_list_cache     (Folder         *folder);
 gint news_post                         (Folder         *folder,
                                         const gchar    *file);
 
-gint news_cancel_article(Folder * folder, MsgInfo * msginfo);
+gint news_cancel_article               (Folder         *folder,
+                                        MsgInfo        *msginfo);
 
 #endif /* __NEWS_H__ */
index 9f81c77..543ab36 100644 (file)
@@ -217,8 +217,6 @@ static void prefs_account_nntpauth_toggled(GtkToggleButton *button,
                                           gpointer user_data);
 static void prefs_account_mailcmd_toggled(GtkToggleButton *button,
                                          gpointer user_data);
-static void prefs_account_smtp_userid_cb(GtkEditable *editable,
-                                        gpointer smtp_passwd);
 
 static PrefParam param[] = {
        /* Basic */
index 37f7c20..2d296de 100644 (file)
@@ -819,7 +819,6 @@ static void prefs_common_create             (void);
 static void prefs_receive_create       (void);
 static void prefs_send_create          (void);
 static void prefs_compose_create       (void);
-static void prefs_spelling_create      (void);
 static void prefs_quote_create         (void);
 static void prefs_display_create       (void);
 static void prefs_message_create       (void);
index a31b94f..0c93e94 100644 (file)
@@ -302,7 +302,6 @@ static void prefs_toolbar_save(void)
        gint row = 0;
        GtkCList *clist = GTK_CLIST(toolbar.clist_set);
        gchar *entry = NULL;
-       GSList *toolbar_list = NULL;
        
        toolbar_clear_list(toolbar.source);
 
index 1249528..fa871f4 100644 (file)
@@ -68,13 +68,6 @@ static void add_buffer(const gchar *s)
        bufsize += len;
 }
 
-static void flush_buffer(void)
-{
-       if (buffer != NULL)
-               *buffer = '\0';
-       bufsize = 0;
-}
-
 gchar *quote_fmt_get_buffer(void)
 {
        if (error != 0)
@@ -579,7 +572,7 @@ insert:
                        FILE *file;
                        char buffer[256];
                        
-                       if(file = fopen($3, "rb")) {
+                       if((file = fopen($3, "rb")) != NULL) {
                                while(fgets(buffer, sizeof(buffer), file)) {
                                        INSERT(buffer);
                                }
@@ -593,7 +586,7 @@ insert:
                        FILE *file;
                        char buffer[256];
 
-                       if(file = popen($3, "r")) {
+                       if((file = popen($3, "r")) != NULL) {
                                while(fgets(buffer, sizeof(buffer), file)) {
                                        INSERT(buffer);
                                }
index 485fc26..5a8de4b 100644 (file)
@@ -51,6 +51,7 @@
 #include "utils.h"
 #include "gtkutils.h"
 #include "statusbar.h"
+#include "inc.h"
 
 typedef struct _SendProgressDialog     SendProgressDialog;
 
index 9015953..b584ff6 100644 (file)
@@ -49,15 +49,6 @@ static StringEntry *string_entry_new(const gchar *str)
        return entry;
 }
 
-static void string_entry_free(StringEntry *entry)
-{
-       g_return_if_fail(entry != NULL);
-       g_return_if_fail(entry->string);
-
-       g_free(entry->string);
-       g_free(entry);
-}
-
 StringTable *string_table_new(void)
 {
        StringTable *strtable;
index 2f810f3..9d6967f 100644 (file)
@@ -84,6 +84,7 @@
 #include "filtering.h"
 #include "string_match.h"
 #include "toolbar.h"
+#include "news.h"
 
 #define SUMMARY_COL_MARK_WIDTH         10
 #define SUMMARY_COL_UNREAD_WIDTH       13