Rocco Rutte:
authorpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sun, 20 Mar 2005 16:20:44 +0000 (16:20 +0000)
committerpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sun, 20 Mar 2005 16:20:44 +0000 (16:20 +0000)
complete first modularization step

git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@212 e385b8ad-14ed-0310-8656-cc95a2468c6d

83 files changed:
Makefile.am
account.c
addrbook.c
alias.c
attach.c
browser.c
buffy.c
charset.c
color.c
commands.c
complete.c
compose.c
compress.c
copy.c
crypt-gpgme.c
crypt-mod.c
crypt.c
cryptglue.c
curs_lib.c
curs_main.c
edit.c
editmsg.c
enter.c
flags.c
from.c
gnupgparse.c
handler.c
hash.c
hcache.c
hdrline.c
headers.c
help.c
history.c
hook.c
init.c
keymap.c
lib.c
lib/exit.c
lib/mem.c
main.c
mbox.c
mbyte.c
menu.c
mh.c
mutt_idna.c
mutt_libesmtp.c
mutt_sasl.c
mutt_socket.c
mutt_ssl.c
mutt_ssl_gnutls.c
mutt_ssl_nss.c
mutt_tunnel.c
muttlib.c
mx.c
pager.c
parse.c
pattern.c
pgp.c
pgpinvoke.c
pgpkey.c
pgplib.c
pgppacket.c
pgppubring.c
postpone.c
query.c
recvattach.c
recvcmd.c
remailer.c
rfc1524.c
rfc2047.c
rfc2231.c
rfc822.c
score.c
send.c
sendlib.c
sidebar.c
signal.c
smime.c
sort.c
status.c
thread.c
url.c
wcwidth.c

index 2cf711c..db773aa 100644 (file)
@@ -96,7 +96,7 @@ muttng_dotlock_LDADD = @LIBOBJS@
 muttng_dotlock_DEPENDENCIES = @LIBOBJS@
 
 pgpringng_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c md5c.c pgppacket.c ascii.c
-pgpringng_LDADD = @LIBOBJS@ $(INTLLIBS) 
+pgpringng_LDADD = @LIBOBJS@ $(INTLLIBS) -Llib -lsane
 pgpringng_DEPENDENCIES = @LIBOBJS@ $(INTLDEPS)
 
 pgpewrapng_SOURCES = pgpewrap.c
index 9a756a9..ab8bb7e 100644 (file)
--- a/account.c
+++ b/account.c
 #include "account.h"
 #include "url.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 /* mutt_account_match: compare account info (host/port/user) */
 int mutt_account_match (const ACCOUNT * a1, const ACCOUNT * a2)
 {
index cdfe015..df5003c 100644 (file)
 
 #include "mutt_idna.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
diff --git a/alias.c b/alias.c
index a373877..877add8 100644 (file)
--- a/alias.c
+++ b/alias.c
 #include "mutt_curses.h"
 #include "mutt_idna.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <string.h>
 #include <ctype.h>
 
index d23ca34..6976f6e 100644 (file)
--- a/attach.c
+++ b/attach.c
 #include "mx.h"
 #include "mutt_crypt.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <ctype.h>
 #include <stdlib.h>
 #include <unistd.h>
index 08323d3..587fb6b 100644 (file)
--- a/browser.c
+++ b/browser.c
 #endif
 #include "sidebar.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <stdlib.h>
 #include <dirent.h>
 #include <string.h>
diff --git a/buffy.c b/buffy.c
index da3c04e..7d2f1bb 100644 (file)
--- a/buffy.c
+++ b/buffy.c
@@ -26,6 +26,9 @@
 #include "imap.h"
 #endif
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+
 #include <string.h>
 #include <sys/stat.h>
 #include <dirent.h>
index e0f0a8a..1bc0795 100644 (file)
--- a/charset.c
+++ b/charset.c
 #include "mutt.h"
 #include "charset.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #ifndef EILSEQ
 # define EILSEQ EINVAL
 #endif
diff --git a/color.c b/color.c
index f024078..87c7ded 100644 (file)
--- a/color.c
+++ b/color.c
 #include "mutt_curses.h"
 #include "mapping.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
index 7f2c75d..cc157fc 100644 (file)
 #include "buffy.h"
 #endif
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
index f21d9e8..1066b5c 100644 (file)
@@ -20,6 +20,8 @@
 #include "nntp.h"
 #endif
 
+#include "lib/str.h"
+
 #include <dirent.h>
 #include <string.h>
 #include <sys/types.h>
index 5599574..31a72ec 100644 (file)
--- a/compose.c
+++ b/compose.c
 #include "nntp.h"
 #endif
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <errno.h>
 #include <string.h>
 #include <sys/stat.h>
index 928a919..d7c2279 100644 (file)
 #include "mailbox.h"
 #include "mutt_curses.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <errno.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/copy.c b/copy.c
index 2a39ff7..37e69c8 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -20,6 +20,9 @@
 #include "mutt_crypt.h"
 #include "mutt_idna.h"
 
+#include "lib/mem.h"
+#include "lib/str.h"
+
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
index f7343bc..e53b6ee 100644 (file)
 #include "pager.h"
 #include "sort.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <sys/wait.h>
 #include <string.h>
 #include <stdlib.h>
index e8aaa6b..c328116 100644 (file)
@@ -12,6 +12,7 @@
 #endif
 
 #include "crypt-mod.h"
+#include "lib/mem.h"
 
 /* A type an a variable to keep track of registered crypto modules. */
 typedef struct crypt_module *crypt_module_t;
diff --git a/crypt.c b/crypt.c
index d8339fe..2b2412e 100644 (file)
--- a/crypt.c
+++ b/crypt.c
 #include "mutt_crypt.h"
 #include "pgp.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <sys/wait.h>
 #include <string.h>
 #include <stdlib.h>
index 7f05557..ee9f61b 100644 (file)
@@ -26,6 +26,8 @@
 #include "mutt.h"
 #include "mutt_crypt.h"
 
+#include "lib/intl.h"
+
 #include "crypt-mod.h"
 
 /*
index 4eab988..b8b80ad 100644 (file)
 #include "pager.h"
 #include "mbyte.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <termios.h>
 #include <sys/types.h>
 #include <fcntl.h>
index 62c7146..73b22cf 100644 (file)
@@ -39,6 +39,9 @@
 #include "nntp.h"
 #endif
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
 
 #include <ctype.h>
 #include <stdlib.h>
diff --git a/edit.c b/edit.c
index 8a55fee..e2a7aa3 100644 (file)
--- a/edit.c
+++ b/edit.c
 #include "mutt_curses.h"
 #include "mutt_idna.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index b4e28a3..287c72c 100644 (file)
--- a/editmsg.c
+++ b/editmsg.c
@@ -18,6 +18,9 @@
 #include "mailbox.h"
 #include "mx.h"
 
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <sys/stat.h>
 #include <errno.h>
 
diff --git a/enter.c b/enter.c
index 10f0725..793804b 100644 (file)
--- a/enter.c
+++ b/enter.c
@@ -18,6 +18,8 @@
 #include "keymap.h"
 #include "history.h"
 
+#include "lib/mem.h"
+
 #include <string.h>
 
 /* redraw flags for mutt_enter_string() */
diff --git a/flags.c b/flags.c
index c3f14bd..16ae021 100644 (file)
--- a/flags.c
+++ b/flags.c
@@ -22,6 +22,8 @@
 #include "imap_private.h"
 #endif
 
+#include "lib/intl.h"
+
 void _mutt_set_flag (CONTEXT * ctx, HEADER * h, int flag, int bf, int upd_ctx)
 {
   int changed = h->changed;
diff --git a/from.c b/from.c
index e63cac6..33d6e84 100644 (file)
--- a/from.c
+++ b/from.c
 
 #include "mutt.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <ctype.h>
 #include <string.h>
 
index 48a70bc..87cbbbd 100644 (file)
@@ -40,6 +40,9 @@
 /* for hexval */
 #include "mime.h"
 
+#include "lib/mem.h"
+#include "lib/str.h"
+
 /****************
  * Read the GNUPG keys.  For now we read the complete keyring by
  * calling gnupg in a special mode.
index 0617b25..b5c3bda 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -28,6 +28,9 @@
 #include "mutt_crypt.h"
 #include "lib.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
 
 #define BUFI_SIZE 1000
 #define BUFO_SIZE 2000
diff --git a/hash.c b/hash.c
index a8e5236..77fc7e8 100644 (file)
--- a/hash.c
+++ b/hash.c
@@ -17,6 +17,8 @@
 
 #include "mutt.h"
 
+#include "lib/mem.h"
+
 #define SOMEPRIME 149711
 
 int hash_string (const unsigned char *s, int n)
index e5227af..b99a502 100644 (file)
--- a/hcache.c
+++ b/hcache.c
@@ -43,6 +43,8 @@
 #include "lib.h"
 #include "md5.h"
 
+#include "lib/mem.h"
+
 #if HAVE_GDBM
 static struct
   header_cache {
index 81abd4a..5d84cb4 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -18,6 +18,8 @@
 #include "mutt_crypt.h"
 #include "mutt_idna.h"
 
+#include "lib/str.h"
+
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
index f2ffa27..371ca55 100644 (file)
--- a/headers.c
+++ b/headers.c
@@ -15,6 +15,8 @@
 #include "mutt_crypt.h"
 #include "mutt_idna.h"
 
+#include "lib/intl.h"
+
 #include <sys/stat.h>
 #include <string.h>
 #include <ctype.h>
diff --git a/help.c b/help.c
index 9db718b..0cc3b74 100644 (file)
--- a/help.c
+++ b/help.c
@@ -13,6 +13,9 @@
 # include "config.h"
 #endif
 
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include "mutt.h"
 #include "mutt_curses.h"
 #include "keymap.h"
index 7323c77..27c345b 100644 (file)
--- a/history.c
+++ b/history.c
@@ -13,6 +13,7 @@
 
 #include "mutt.h"
 #include "history.h"
+#include "lib/mem.h"
 
 /* global vars used for the string-history routines */
 
diff --git a/hook.c b/hook.c
index e88633e..6c4c83b 100644 (file)
--- a/hook.c
+++ b/hook.c
 #include "compress.h"
 #endif
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <limits.h>
 #include <string.h>
 #include <stdlib.h>
diff --git a/init.c b/init.c
index ffd58e3..a7e5cb9 100644 (file)
--- a/init.c
+++ b/init.c
 #include "mutt_ssl.h"
 #endif
 
-
-
 #include "mx.h"
 #include "init.h"
 #include "mailbox.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <ctype.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -366,7 +368,7 @@ static int add_to_spam_list (SPAM_LIST ** list, const char *pat,
        * the template, and leaving t pointed at the current item.
        */
       t = last;
-      safe_free (&t->template);
+      FREE(t->template);
       break;
     }
     if (!last->next)
@@ -416,8 +418,8 @@ static int remove_from_spam_list (SPAM_LIST ** list, const char *pat)
   if (spam->rx && !mutt_strcmp (spam->rx->pattern, pat)) {
     *list = spam->next;
     mutt_free_regexp (&spam->rx);
-    safe_free (&spam->template);
-    safe_free (&spam);
+    FREE(&spam->template);
+    FREE(&spam);
     return 1;
   }
 
@@ -426,8 +428,8 @@ static int remove_from_spam_list (SPAM_LIST ** list, const char *pat)
     if (!mutt_strcmp (spam->rx->pattern, pat)) {
       prev->next = spam->next;
       mutt_free_regexp (&spam->rx);
-      safe_free (&spam->template);
-      safe_free (&spam);
+      FREE(spam->template);
+      FREE(spam);
       spam = prev->next;
       ++nremoved;
     }
@@ -2175,7 +2177,7 @@ void mutt_init (int skip_sys_rc, LIST * commands)
     if ((f = safe_fopen (SYSCONFDIR "/nntpserver", "r"))) {
       buffer[0] = '\0';
       fgets (buffer, sizeof (buffer), f);
-      p = &buffer;
+      p = (char*) &buffer;
       SKIPWS (p);
       i = p;
       while (*i && (*i != ' ') && (*i != '\t') && (*i != '\r')
index 5d91776..6f71eda 100644 (file)
--- a/keymap.c
+++ b/keymap.c
 #include "mapping.h"
 #include "mutt_crypt.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
diff --git a/lib.c b/lib.c
index 2b15053..937ffcc 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -30,6 +30,9 @@
 
 #include "lib.h"
 
+#include "lib/mem.h"
+#include "lib/str.h"
+
 extern short Umask;
 
 void mutt_nocurses_error (const char *fmt, ...)
index fb46b82..13be19d 100644 (file)
@@ -7,11 +7,11 @@
 #include "intl.h"
 
 /* XXX remove after modularization*/
-extern void mutt_endwin (void*);
+/*extern void mutt_endwin (void*);*/
 
 void exit_fatal (const char* func, const char* msg, int line, 
                  const char* fname, int code) {
-  mutt_endwin (NULL);
+/*  mutt_endwin (NULL);*/
   fprintf (stderr, _("Fatal error in function '%s' called from "
                      "file '%s', line '%d': %s\n"
                      "(please report this error to "
index ba40e98..f978090 100644 (file)
--- a/lib/mem.c
+++ b/lib/mem.c
@@ -66,7 +66,7 @@ void _safe_realloc (void *ptr, size_t siz, int line, const char* fname) {
   *p = r;
 }
 
-void safe_free (void *ptr) {
+void _safe_free (void *ptr) {
   void **p = (void **) ptr;
 
   if (*p) {
diff --git a/main.c b/main.c
index c774283..95c3ddf 100644 (file)
--- a/main.c
+++ b/main.c
 #include "mutt_crypt.h"
 #include "mutt_idna.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <string.h>
 #include <stdlib.h>
 #include <locale.h>
@@ -69,6 +73,7 @@ Copyright (C) 2000-2002 Edmund Grimley Evans <edmundo@rano.org>\n\n\
 Parts were written/modified by:\n\
 Andreas Krennmair <ak@synflood.at>\n\
 Nico Golde <nico@ngolde.de>\n\
+Rocco Rutte <pdmef@cs.tu-berlin.de>\n\
 \n\
 Lots of others not mentioned here contributed lots of code,\n\
 fixes, and suggestions.\n\
diff --git a/mbox.c b/mbox.c
index 3660217..63a8633 100644 (file)
--- a/mbox.c
+++ b/mbox.c
 #include "compress.h"
 #endif
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <sys/stat.h>
 #include <dirent.h>
 #include <string.h>
diff --git a/mbyte.c b/mbyte.c
index fa9d307..7940dc4 100644 (file)
--- a/mbyte.c
+++ b/mbyte.c
@@ -19,6 +19,8 @@
 #include "mbyte.h"
 #include "charset.h"
 
+#include "lib/intl.h"
+
 #include <errno.h>
 
 #include <ctype.h>
diff --git a/menu.c b/menu.c
index ec49550..8f64595 100644 (file)
--- a/menu.c
+++ b/menu.c
 #include "imap.h"
 #endif
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <string.h>
 #include <stdlib.h>
 
diff --git a/mh.c b/mh.c
index aecbc8f..e88ddb5 100644 (file)
--- a/mh.c
+++ b/mh.c
 #include "buffy.h"
 #include "sort.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <dirent.h>
index 1f9da6c..bd7551e 100644 (file)
 #include "charset.h"
 #include "mutt_idna.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 /* The low-level interface we use. */
 
 #ifndef HAVE_LIBIDN
index 26f424c..fd2a05a 100644 (file)
@@ -6,8 +6,16 @@
  * It's licensed under the GNU General Public License,
  * please see the file GPL in the top level source directory.
  */
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "mutt.h"
+
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <errno.h>
 #include <auth-client.h>
 #include <libesmtp.h>
index c52865b..45fbf87 100644 (file)
@@ -18,6 +18,8 @@
 #include "mutt_sasl.h"
 #include "mutt_socket.h"
 
+#include "lib/mem.h"
+
 #ifdef USE_SASL2
 #include <errno.h>
 #include <netdb.h>
index 90ae621..b9532ae 100644 (file)
 
 #include "mutt_idna.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <unistd.h>
 #include <netinet/in.h>
 #include <netdb.h>
index f124b99..0ea28c4 100644 (file)
 #include "mutt_curses.h"
 #include "mutt_ssl.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #if OPENSSL_VERSION_NUMBER >= 0x00904000L
 #define READ_X509_KEY(fp, key) PEM_read_X509(fp, key, NULL, NULL)
 #else
index c799b74..5bf6b5a 100644 (file)
@@ -25,6 +25,9 @@
 #include "mutt_ssl.h"
 #include "mutt_regex.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+
 typedef struct _tlssockdata {
   gnutls_session state;
   gnutls_certificate_credentials xcred;
index 9b1bf50..863f969 100644 (file)
@@ -25,6 +25,9 @@
 #include "mutt_socket.h"
 #include "mutt_curses.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+
 static int MuttNssInitialized = 0;
 
 /* internal data struct we use with the CONNECTION.  this is where NSS-specific
index d306902..6cc092d 100644 (file)
 #include "mutt_socket.h"
 #include "mutt_tunnel.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <netinet/in.h>
 #include <sys/types.h>
 #include <sys/socket.h>
index fbd2243..67326c9 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
 
 #include "mutt_crypt.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <string.h>
 #include <ctype.h>
 #include <unistd.h>
@@ -1336,7 +1340,7 @@ BUFFER *mutt_buffer_init (BUFFER * b)
       return NULL;
   }
   else {
-    safe_free (b->data);
+    FREE(&b->data);
   }
   memset (b, 0, sizeof (BUFFER));
   return b;
@@ -1477,8 +1481,8 @@ void mutt_free_spam_list (SPAM_LIST ** list)
     p = *list;
     *list = (*list)->next;
     mutt_free_regexp (&p->rx);
-    safe_free (&p->template);
-    FREE (&p);
+    FREE(&p->template);
+    FREE(&p);
   }
 }
 
diff --git a/mx.c b/mx.c
index f9ded65..1cf7078 100644 (file)
--- a/mx.c
+++ b/mx.c
 
 #include "mutt_crypt.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <dirent.h>
 #include <fcntl.h>
 #include <sys/file.h>
diff --git a/pager.c b/pager.c
index 98b00f3..8ed08a8 100644 (file)
--- a/pager.c
+++ b/pager.c
 
 #include "mutt_crypt.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <sys/stat.h>
 #include <ctype.h>
 #include <unistd.h>
diff --git a/parse.c b/parse.c
index 584d62b..a09d8dd 100644 (file)
--- a/parse.c
+++ b/parse.c
 #include "mutt_crypt.h"
 #include "url.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <string.h>
 #include <ctype.h>
 #include <sys/stat.h>
index 7144c51..d9e8a2a 100644 (file)
--- a/pattern.c
+++ b/pattern.c
 #include "mailbox.h"
 #include "copy.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
diff --git a/pgp.c b/pgp.c
index 444eefd..ed9a0c8 100644 (file)
--- a/pgp.c
+++ b/pgp.c
 #include "mime.h"
 #include "copy.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <sys/wait.h>
 #include <string.h>
 #include <stdlib.h>
index a3142f7..91d2b00 100644 (file)
 #include "pgp.h"
 #include "rfc822.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 /*
  * The actual command line formatter.
  */
index 8186d2a..daa3a24 100644 (file)
--- a/pgpkey.c
+++ b/pgpkey.c
 #include "pager.h"
 #include "sort.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <string.h>
 #include <ctype.h>
 #include <stdlib.h>
index 7c111bd..d39f076 100644 (file)
--- a/pgplib.c
+++ b/pgplib.c
@@ -23,6 +23,8 @@
 #include "lib.h"
 #include "pgplib.h"
 
+#include "lib/mem.h"
+
 const char *pgp_pkalgbytype (unsigned char type)
 {
   switch (type) {
index 5da38b7..dd241fe 100644 (file)
@@ -22,6 +22,8 @@
 #include "pgplib.h"
 #include "pgppacket.h"
 
+#include "lib/mem.h"
+
 #define CHUNKSIZE 1024
 
 static unsigned char *pbuf = NULL;
index 81d9c47..577db1a 100644 (file)
@@ -26,6 +26,9 @@
 # include "config.h"
 #endif
 
+#include "lib/mem.h"
+#include "lib/str.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 81311e0..30fb2cf 100644 (file)
 #endif
 #include "mutt_crypt.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <ctype.h>
 #include <unistd.h>
 #include <string.h>
diff --git a/query.c b/query.c
index 77bd99a..c3e948d 100644 (file)
--- a/query.c
+++ b/query.c
 #include "mapping.h"
 #include "sort.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
index 2e161ac..1032a0c 100644 (file)
 #include "copy.h"
 #include "mutt_crypt.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <ctype.h>
 #include <stdlib.h>
 #include <unistd.h>
index 8e18ca9..f9f2268 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
 #include "copy.h"
 #include "mutt_idna.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 /* some helper functions to verify that we are exclusively operating
  * on message/rfc822 attachments
  */
index ee5182e..927be73 100644 (file)
 
 #include "remailer.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index 9bab71b..31750b5 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
 #include "mutt.h"
 #include "rfc1524.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
index c670858..b77b60b 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -17,6 +17,9 @@
 #include "charset.h"
 #include "rfc2047.h"
 
+#include "lib/mem.h"
+#include "lib/str.h"
+
 #include <ctype.h>
 #include <errno.h>
 #include <stdio.h>
index 81ac735..15da1f1 100644 (file)
--- a/rfc2231.c
+++ b/rfc2231.c
@@ -27,6 +27,8 @@
 #include "rfc2047.h"
 #include "rfc2231.h"
 
+#include "lib/mem.h"
+
 #include <ctype.h>
 #include <string.h>
 #include <stdlib.h>
index 6f92f73..1075853 100644 (file)
--- a/rfc822.c
+++ b/rfc822.c
 
 #include "mutt_idna.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #define terminate_string(a, b, c) do { if ((b) < (c)) a[(b)] = 0; else \
        a[(c)] = 0; } while (0)
 
diff --git a/score.c b/score.c
index 20523b4..fba01f8 100644 (file)
--- a/score.c
+++ b/score.c
 
 #include "mutt.h"
 #include "sort.h"
+
+#include "lib/mem.h"
+#include "lib/intl.h"
+
 #include <string.h>
 #include <stdlib.h>
 
diff --git a/send.c b/send.c
index a4b52a8..e932ee2 100644 (file)
--- a/send.c
+++ b/send.c
 #include "mutt_idna.h"
 #include "url.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <ctype.h>
 #include <stdlib.h>
 #include <unistd.h>
index b5b4ff1..d5a6093 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
 #include "mutt_crypt.h"
 #include "mutt_idna.h"
 
+#include "lib/mem.h"
+#include "lib/str.h"
+#include "lib/intl.h"
+
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
index 4326d22..8c661f2 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
 #include "mutt_curses.h"
 #include "sidebar.h"
 #include "buffy.h"
-#include <libgen.h>
 #include "keymap.h"
+
+#include "lib/mem.h"
+#include "lib/str.h"
+#include "lib/intl.h"
+
+#include <libgen.h>
 #include <ctype.h>
 
 /*BUFFY *CurBuffy = 0;*/
index fea002c..fe9d7f3 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -14,6 +14,8 @@
 #include "mutt.h"
 #include "mutt_curses.h"
 
+#include "lib/intl.h"
+
 #include <signal.h>
 #include <string.h>
 #include <sys/wait.h>
diff --git a/smime.c b/smime.c
index abd65df..2e39a26 100644 (file)
--- a/smime.c
+++ b/smime.c
 #include "mime.h"
 #include "copy.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <sys/wait.h>
 #include <string.h>
 #include <stdlib.h>
diff --git a/sort.c b/sort.c
index 0bf16e8..60296c3 100644 (file)
--- a/sort.c
+++ b/sort.c
@@ -15,6 +15,8 @@
 #include "sort.h"
 #include "mutt_idna.h"
 
+#include "lib/intl.h"
+
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
index 2a6f70b..df1aa09 100644 (file)
--- a/status.c
+++ b/status.c
 #include "mapping.h"
 #include "mx.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
 #include <string.h>
 #include <ctype.h>
 #include <unistd.h>
index 1cff9e5..bc6f29d 100644 (file)
--- a/thread.c
+++ b/thread.c
@@ -14,6 +14,9 @@
 #include "mutt.h"
 #include "sort.h"
 
+#include "lib/mem.h"
+#include "lib/intl.h"
+
 #include <string.h>
 #include <ctype.h>
 
diff --git a/url.c b/url.c
index 405ed23..1740c24 100644 (file)
--- a/url.c
+++ b/url.c
@@ -21,6 +21,8 @@
 
 #include "mime.h"
 
+#include "lib/mem.h"
+
 #include <ctype.h>
 
 static struct mapping_t UrlMap[] = {
index 5f22b75..89656f8 100644 (file)
--- a/wcwidth.c
+++ b/wcwidth.c
@@ -70,8 +70,6 @@
 
 #include <ctype.h>
 
-#include <wchar.h>
-
 struct interval {
   int first;
   int last;