rationnalize includes a lot:
authorPierre Habouzit <madcoder@debian.org>
Fri, 17 Nov 2006 00:35:01 +0000 (01:35 +0100)
committerPierre Habouzit <madcoder@debian.org>
Fri, 17 Nov 2006 00:35:01 +0000 (01:35 +0100)
that's very dirty, but lib-lib/lib-lib.h has a lot of commonly used
includes.

that saves a lot of things from the rest of the code.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
127 files changed:
account.c
alias.c
attach.c
base64.c
browser.c
buffy.c
charset.c
commands.c
compose.c
compress.c
copy.c
dotlock.c
editmsg.c
extlib.c
flags.c
from.c
handler.c
hcache.c
headers.c
help.c
hook.c
imap/auth.c
imap/auth_anon.c
imap/auth_cram.c
imap/auth_gss.c
imap/auth_login.c
imap/auth_sasl.c
imap/browse.c
imap/command.c
imap/imap.c
imap/message.c
imap/mx_imap.c
imap/utf7.c
imap/util.c
init.c
keymap.c
lib-crypt/crypt-gpgme.c
lib-crypt/crypt-mod-pgp-gpgme.c
lib-crypt/crypt-mod-smime-gpgme.c
lib-crypt/crypt-mod.c
lib-crypt/crypt.c
lib-crypt/cryptglue.c
lib-crypt/gnupgparse.c
lib-crypt/pgp.c
lib-crypt/pgpinvoke.c
lib-crypt/pgpkey.c
lib-crypt/pgplib.c
lib-crypt/pgpmicalg.c
lib-crypt/pgppacket.c
lib-crypt/smime.c
lib-hash/sha1.c
lib-lib/ascii.c
lib-lib/buffer.c
lib-lib/buffer.h
lib-lib/date.c
lib-lib/date.h
lib-lib/file.c
lib-lib/file.h
lib-lib/hash.c
lib-lib/lib-lib.h
lib-lib/list.c
lib-lib/list.h
lib-lib/mapping.c
lib-lib/mem.h
lib-lib/rx.c
lib-lib/rx.h
lib-lib/str.c
lib-lib/str.h
lib-lib/url.c
lib-lib/url.h
lib-mime/rfc1524.c
lib-mime/rfc2047.c
lib-mime/rfc2231.c
lib-mime/rfc3676.c
lib-mime/rfc822address.c
lib-mime/rfc822parse.c
lib-sys/exit.c
lib-sys/filter.c
lib-sys/mutt_signal.c
lib-sys/mutt_socket.c
lib-sys/mutt_ssl.c
lib-sys/mutt_ssl_gnutls.c
lib-sys/mutt_tunnel.c
lib-sys/unix.c
lib-ui/color.c
lib-ui/complete.c
lib-ui/curs_lib.c
lib-ui/curs_main.c
lib-ui/enter.c
lib-ui/hdrline.c
lib-ui/history.c
lib-ui/menu.c
lib-ui/query.c
lib-ui/resize.c
lib-ui/sidebar.c
lib-ui/status.c
lib.c
lib/list.c
main.c
makedoc.c
mbox.c
mh.c
mutt_idna.c
mutt_libesmtp.c
mutt_sasl.c
muttlib.c
mx.c
nntp/mx_nntp.c
nntp/newsrc.c
nntp/nntp.c
pager.c
pattern.c
pgppubring.c
pop/mx_pop.c
pop/pop.c
pop/pop_auth.c
pop/pop_lib.c
postpone.c
recvattach.c
recvcmd.c
remailer.c
score.c
send.c
sendlib.c
sort.c
state.c
thread.c

index f13831e..73a036a 100644 (file)
--- a/account.c
+++ b/account.c
@@ -9,10 +9,6 @@
 
 /* remote host account manipulation (POP/IMAP) */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 #include <lib-ui/enter.h>
 
diff --git a/alias.c b/alias.c
index 907e743..70b3331 100644 (file)
--- a/alias.c
+++ b/alias.c
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <ctype.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-sys/unix.h>
index a66665c..d32f80c 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -8,19 +8,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-sys/unix.h>
index a5e6cf3..9fdf037 100644 (file)
--- a/base64.c
+++ b/base64.c
  * 
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
+#include <lib-lib/lib-lib.h>
 #include <lib-mime/mime.h>
 
 #include "mutt.h"
index 0db6801..09b85d1 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -7,22 +7,12 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
-#include <stdlib.h>
 #include <dirent.h>
-#include <string.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <errno.h>
 #include <pwd.h>
 #include <grp.h>
 
-#include <lib-lib/lib-lib.h>
-
 #include <lib-ui/curses.h>
 #include <lib-ui/enter.h>
 #include <lib-ui/menu.h>
diff --git a/buffy.c b/buffy.c
index 2ada9b4..0db6026 100644 (file)
--- a/buffy.c
+++ b/buffy.c
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <sys/stat.h>
+#include <lib-lib/lib-lib.h>
 #include <dirent.h>
 #include <utime.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdio.h>
-
-#include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
 #include <lib-ui/sidebar.h>
index 8e79d13..32317b1 100644 (file)
--- a/charset.c
+++ b/charset.c
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <ctype.h>
+#include <lib-lib/lib-lib.h>
 
 #include <sys/types.h>
-#include <dirent.h>
-#include <unistd.h>
-#include <errno.h>
 #ifdef HAVE_LANGINFO_CODESET
 #  include <langinfo.h>
 #endif
 
-#include <lib-lib/lib-lib.h>
-
 #include "mutt.h"
 #include "charset.h"
 
index 280a3fd..b649356 100644 (file)
@@ -8,20 +8,8 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <utime.h>
-
 #include <lib-lib/lib-lib.h>
+#include <utime.h>
 
 #include <lib-mime/mime.h>
 
index d93dbfd..08a95c8 100644 (file)
--- a/compose.c
+++ b/compose.c
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <errno.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <stdlib.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-sys/unix.h>
index ed5da3e..6c801e8 100644 (file)
@@ -7,11 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/stat.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-sys/mutt_signal.h>
diff --git a/copy.c b/copy.c
index 94d5d28..3a010d4 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -7,15 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <unistd.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
index 118f531..3f55d40 100644 (file)
--- a/dotlock.c
+++ b/dotlock.c
@@ -8,23 +8,9 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <lib-lib/lib-lib.h>
 
-#include <unistd.h>
-#include <dirent.h>
-#include <sys/file.h>
-#include <sys/stat.h>
 #include <sys/utsname.h>
-#include <errno.h>
-#include <time.h>
-#include <fcntl.h>
-#include <limits.h>
 
 #ifndef _POSIX_PATH_MAX
 #include <posix1_lim.h>
 
 # endif
 
-# ifndef HAVE_SNPRINTF
-extern int snprintf (char *, size_t, const char *, ...);
-# endif
-
-#include <lib-lib/lib-lib.h>
-
 static int DotlockFlags;
 static int Retry = MAXLOCKATTEMPT;
 
index 123ce7e..9dd05e1 100644 (file)
--- a/editmsg.c
+++ b/editmsg.c
@@ -9,22 +9,12 @@
 
 /* simple, editor-based message editing */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
 #include "copy.h"
 #include "mx.h"
 
-
-#include <sys/stat.h>
-#include <errno.h>
-
-#include <time.h>
-
 /*
  * return value:
  * 
index 9a80e4d..ea984e6 100644 (file)
--- a/extlib.c
+++ b/extlib.c
 #define WHERE
 #define _EXTLIB_C
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdlib.h>
+#include <lib-lib/lib-lib.h>
 #include "lib.h"
 
 void (*mutt_error) (const char *, ...) = mutt_nocurses_error;
diff --git a/flags.c b/flags.c
index 232508a..e00dc88 100644 (file)
--- a/flags.c
+++ b/flags.c
@@ -7,10 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
diff --git a/from.c b/from.c
index f71e8a0..5931789 100644 (file)
--- a/from.c
+++ b/from.c
@@ -7,13 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <ctype.h>
-#include <string.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
index 26d1a99..7f24f9d 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -7,17 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
index 3902812..953e70f 100644 (file)
--- a/hcache.c
+++ b/hcache.c
@@ -8,22 +8,13 @@
  * 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 /* HAVE_CONFIG_H */
+
+#include <lib-lib/lib-lib.h>
 
 #ifdef USE_HCACHE
 
 #define MUTTNG_HCACHE_ID        "0x004"
 
-# ifdef HAVE_INTTYPES_H
-#  include <inttypes.h>
-# else
-#  ifdef HAVE_STDINT_H
-#   include <stdint.h>
-#  endif
-# endif
-
 #if defined(HAVE_QDBM)
 #include <depot.h>
 #include <cabin.h>
 #include <db.h>
 #endif
 
-#include <errno.h>
-#include <fcntl.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
-#include <lib-lib/lib-lib.h>
 #include <lib-hash/hash.h>
-
 #include <lib-mime/mime.h>
 
 #include "charset.h"
index 058ec94..2446041 100644 (file)
--- a/headers.c
+++ b/headers.c
@@ -7,14 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <sys/stat.h>
-#include <string.h>
-#include <ctype.h>
-
 #include <lib-lib/lib-lib.h>
 #include <lib-ui/curses.h>
 
diff --git a/help.c b/help.c
index 4bd1b01..0fa80c1 100644 (file)
--- a/help.c
+++ b/help.c
@@ -9,15 +9,6 @@
 
 #define HELP_C
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <wctype.h>
-#include <wchar.h>
-#include <ctype.h>
-#include <string.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
diff --git a/hook.c b/hook.c
index 0a1084c..9bb2386 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -7,16 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <limits.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <unistd.h>
-
 #include <lib-lib/lib-lib.h>
 #include <lib-ui/curses.h>
 
index 8fae85b..143fde0 100644 (file)
 
 /* IMAP login/authentication code */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
index 7ae029f..47ccf40 100644 (file)
@@ -9,16 +9,12 @@
 
 /* IMAP login/authentication code */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
 #include "imap_private.h"
 #include "auth.h"
 
-#include <lib-lib/lib-lib.h>
-
 /* this is basically a stripped-down version of the cram-md5 method. */
 imap_auth_res_t imap_auth_anon (IMAP_DATA * idata, const char *method __attribute__ ((unused)))
 {
index 9ef4bb8..7e00d6c 100644 (file)
@@ -9,9 +9,7 @@
 
 /* IMAP login/authentication code */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
 #include "imap_private.h"
@@ -20,7 +18,6 @@
 #define MD5_BLOCK_LEN 64
 #define MD5_DIGEST_LEN 16
 
-#include <lib-lib/lib-lib.h>
 #include <lib-hash/hash.h>
 
 /* forward declarations */
index a2783f9..e05062b 100644 (file)
@@ -9,14 +9,10 @@
 
 /* GSS login/authentication code */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
 #ifdef USE_GSS
 
-#include <lib-lib/lib-lib.h>
-
 #include <netinet/in.h>
 
 #ifdef HAVE_HEIMDAL
index 2770331..cb3f5bb 100644 (file)
@@ -9,10 +9,6 @@
 
 /* plain LOGIN support */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
index 20a39b9..54c972b 100644 (file)
@@ -9,10 +9,6 @@
 
 /* SASL login/authentication code */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
index 96eb8b9..46730fd 100644 (file)
 
 /* Mutt browser support routines */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <ctype.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/enter.h>
 
-
 #include "mutt.h"
 #include "imap_private.h"
 
index e53d378..83ebbe7 100644 (file)
 /* command.c: routines for sending commands to an IMAP server and parsing
  *  responses */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
index da965d9..3bb4f8a 100644 (file)
 
 /* Support for IMAP4rev1, with the occasional nod to IMAP 4. */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <unistd.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
index 466d2dc..8412c61 100644 (file)
 
 /* message parsing/updating functions */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <ctype.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
 #include "pgp.h"
 #endif
 
-#if HAVE_STDINT_H
-#include <stdint.h>
-#elif HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-
 static void flush_buffer (char *buf, size_t * len, CONNECTION * conn);
 static int msg_fetch_header (CONTEXT * ctx, IMAP_HEADER * h, char *buf,
                              FILE * fp);
index 0ee9d63..2d9e333 100644 (file)
@@ -3,11 +3,6 @@
  * It's licensed under the GNU General Public License,
  * please see the file GPL in the top level source directory.
  */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/stat.h>
 
 #include <lib-lib/lib-lib.h>
 
index d1419e3..b21149b 100644 (file)
@@ -7,10 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
index cce8594..d7837e1 100644 (file)
 
 /* general IMAP utility functions */
 
-#include "config.h"
-
 #include <lib-lib/lib-lib.h>
+#include <signal.h>
+#include <netdb.h>
 
 #include "mutt.h"
 #include "mx.h"                 /* for M_IMAP */
 #include "imap_private.h"
 #include <lib-sys/mutt_ssl.h>
 
-#include <lib-lib/lib-lib.h>
-
-#include <stdlib.h>
-#include <ctype.h>
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <signal.h>
-#include <netdb.h>
-#include <netinet/in.h>
-
-#include <errno.h>
-
 /* -- public functions -- */
 
 /* imap_expand_path: IMAP implementation of mutt_expand_path. Rewrite
diff --git a/init.c b/init.c
index 7e7b455..bf5c64a 100644 (file)
--- a/init.c
+++ b/init.c
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/utsname.h>
-#include <errno.h>
-#include <sys/wait.h>
-
 #include <lib-lib/lib-lib.h>
+#include <sys/utsname.h>
 
 #include <lib-sys/unix.h>
 #include <lib-sys/mutt_ssl.h>
index e80e5a3..51a296f 100644 (file)
--- a/keymap.c
+++ b/keymap.c
@@ -7,10 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
 #include "keymap.h"
 #include <lib-crypt/crypt.h>
 
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
 #define MUTT_FUNCTIONS_VALUES
 #include "functions.def"
 
index e6ad538..2711dd7 100644 (file)
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
 #ifdef CRYPT_BACKEND_GPGME
 
-#include <sys/wait.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <ctype.h>
-
 #ifdef HAVE_LOCALE_H
 #  include <locale.h>
 #endif
 #ifdef HAVE_LANGINFO_D_T_FMT
 #  include <langinfo.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-#  include <sys/time.h>
-#endif
 #ifdef HAVE_SYS_RESOURCE_H
 #  include <sys/resource.h>
 #endif
 
 #include <gpgme.h>
 
-#include <lib-lib/lib-lib.h>
-
 #include <lib-mime/mime.h>
 
 #include <lib-ui/curses.h>
index 977a8c1..f05487c 100644 (file)
@@ -11,9 +11,7 @@
     This is a crytpo module wrapping the gpgme based pgp code.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
 #ifdef CRYPT_BACKEND_GPGME
 
index 31e882f..9d24f04 100644 (file)
@@ -11,9 +11,7 @@
     This is a crytpo module wrapping the gpgme based smime code.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
 #ifdef CRYPT_BACKEND_GPGME
 
index eb406f4..d853535 100644 (file)
@@ -7,10 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include "crypt-mod.h"
index 36fbcda..f5953bc 100644 (file)
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <sys/wait.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <ctype.h>
+#include <lib-lib/lib-lib.h>
 
 #ifdef HAVE_LOCALE_H
 #  include <locale.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-#  include <sys/time.h>
-#endif
 #ifdef HAVE_SYS_RESOURCE_H
 #  include <sys/resource.h>
 #endif
 
-#include <lib-lib/lib-lib.h>
-
 #include <lib-mime/mime.h>
 
 #include <lib-ui/curses.h>
index 019a339..860f8af 100644 (file)
    contained in this file and the functions implemented by the crypto
    modules.  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
 #include "crypt.h"
-
-
 #include "crypt-mod.h"
 
 /*
index 3db2f90..5943467 100644 (file)
  * 
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <time.h>
-#include <ctype.h>
-
 #include <lib-lib/lib-lib.h>
+
 #include <lib-mime/mime.h>
 #include <lib-sys/unix.h>
 #include <lib-ui/curses.h>
@@ -42,7 +28,6 @@
 #include "pgp.h"
 #include "charset.h"
 
-
 /****************
  * Read the GNUPG keys.  For now we read the complete keyring by
  * calling gnupg in a special mode.
index 289ffc8..8875ed9 100644 (file)
  * a message.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
+#ifdef HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
 #include <lib-mime/mime.h>
 
 #include <lib-ui/curses.h>
 #include "copy.h"
 #include "attach.h"
 
-
-#include <sys/wait.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <ctype.h>
-
-#ifdef HAVE_LOCALE_H
-#include <locale.h>
-#endif
-
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-
-#ifdef HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
 #include "crypt.h"
 
 
index 3235fae..1428e47 100644 (file)
  * is almost entirely format based.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <time.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-sys/unix.h>
index 76b39b8..ddb8f1c 100644 (file)
@@ -8,10 +8,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
 #include "pager.h"
 #include "sort.h"
 
-
-#include <string.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-
-#include <locale.h>
-
 struct pgp_cache {
   char *what;
   char *dflt;
index 2532db5..923aa14 100644 (file)
@@ -9,16 +9,6 @@
 
 /* Generally useful, pgp-related functions. */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <time.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
index a2d89db..c070173 100644 (file)
@@ -11,9 +11,7 @@
  * algorithm.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
 #include "handler.h"
 #include "pgppacket.h"
 #include "charset.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include <lib-lib/lib-lib.h>
 #include <lib-ui/curses.h>
 
 #include <lib-mime/mime.h>
index 518c11e..d003154 100644 (file)
@@ -7,16 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <time.h>
-
 #include <lib-lib/lib-lib.h>
 #include <lib-hash/hash.h>
 
index 7932525..24ed09a 100644 (file)
@@ -9,30 +9,12 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <sys/wait.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <ctype.h>
+#include <lib-lib/lib-lib.h>
 
-#ifdef HAVE_LOCALE_H
-#  include <locale.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#  include <sys/time.h>
-#endif
 #ifdef HAVE_SYS_RESOURCE_H
 #  include <sys/resource.h>
 #endif
 
-#include <lib-lib/lib-lib.h>
-
 #include <lib-mime/mime.h>
 
 #include <lib-ui/curses.h>
index 4a5bedb..90a16db 100644 (file)
  34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
 */
 
+#include <lib-lib/lib-lib.h>
 #define SHA1HANDSOFF
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-
 #include "sha1.h"
 
 #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
index bdc63a5..73ffbc8 100644 (file)
@@ -25,9 +25,7 @@
  * Versions of the string comparison functions which are locale-insensitive.
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include "ascii.h"
+#include "lib-lib.h"
 
 int ascii_strcasecmp(const char *a, const char *b)
 {
index e1327c8..f186bfd 100644 (file)
  * please see the file GPL in the top level source directory.
  */
 
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "mem.h"
-#include "str.h"
-#include "ascii.h"
-#include "buffer.h"
-#include "file.h"
+#include "lib-lib.h"
 
 /*
  * Creates and initializes a BUFFER*. If passed an existing BUFFER*,
index f459618..a0c4588 100644 (file)
@@ -29,8 +29,6 @@
 #ifndef MUTT_LIB_LIB_BUFFER_H
 #define MUTT_LIB_LIB_BUFFER_H
 
-#include "str.h"
-
 typedef struct {
     char *data;          /* pointer to data */
     char *dptr;          /* current read/write position */
index 4bc6873..8fa90c6 100644 (file)
@@ -26,7 +26,7 @@
  * please see the file GPL in the top level source directory.
  */
 
-#include "date.h"
+#include "lib-lib.h"
 
 /* returns the seconds east of UTC given `g' and its corresponding gmtime()
    representation */
index b31800a..a1182f4 100644 (file)
@@ -20,8 +20,6 @@
 #ifndef MUTT_LIB_LIB_DATE_H
 #define MUTT_LIB_LIB_DATE_H
 
-#include <time.h>
-
 time_t mutt_local_tz(time_t);
 time_t mutt_mktime(struct tm *, int);
 void mutt_normalize_time(struct tm *);
index 67b1d74..66a2028 100644 (file)
  * please see the file GPL in the top level source directory.
  */
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-#include <limits.h>
-
-#include "macros.h"
-#include "mem.h"
-#include "str.h"
-#include "file.h"
+#include "lib-lib.h"
 
 #ifndef O_NOFOLLOW
 #  define O_NOFOLLOW  0
index 9d6ca73..c73f78e 100644 (file)
@@ -33,9 +33,6 @@
 #ifndef MUTT_LIB_LIB_FILE_H
 #define MUTT_LIB_LIB_FILE_H
 
-#include <stdio.h>
-#include <stdlib.h>
-
 /****************************************************************************/
 /* fd ops                                                                   */
 /****************************************************************************/
index 61e2e4f..5520389 100644 (file)
  * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
  */
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "mem.h"
-#include "str.h"
-#include "hash.h"
+#include "lib-lib.h"
 
 #define SOMEPRIME 149711
 
index 5f8974d..e969bb5 100644 (file)
 #ifndef MUTT_LIB_LIB_LIB_LIB_H
 #define MUTT_LIB_LIB_LIB_LIB_H
 
+#if HAVE_CONFIG_H
+# include "../config.h"
+#endif
+
+#include <assert.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <regex.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <time.h>
+#include <wchar.h>
+#include <wctype.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#if HAVE_STDINT_H
+# include <stdint.h>
+#elif HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+
 #include "macros.h"
 #include "mem.h"
 
 #include "ascii.h"
+#include "str.h"
 #include "buffer.h"
 #include "date.h"
 #include "file.h"
@@ -31,7 +72,6 @@
 #include "list.h"
 #include "mapping.h"
 #include "rx.h"
-#include "str.h"
 #include "url.h"
 
 #endif
index 83123a5..c2c4f77 100644 (file)
  * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
  */
 
-#include <stdlib.h>
-#include <string.h>
-
-#include "mem.h"
-#include "str.h"
-#include "list.h"
+#include "lib-lib.h"
 
 string_list_t *string_list_dup(const string_list_t *p) {
     string_list_t *res = NULL;
index 2dac0f8..b1b612e 100644 (file)
@@ -25,9 +25,6 @@
 #ifndef MUTT_LIB_LIB_LIST_H
 #define MUTT_LIB_LIB_LIST_H
 
-#include "mem.h"
-#include "str.h"
-
 #define DO_SLIST(type, prefix, dtor)                                         \
     static inline type *prefix##_list_pop(type **list) {                     \
         if (*list) {                                                         \
index d8d8200..f446ffd 100644 (file)
  * please see the file GPL in the top level source directory.
  */
 
-#include <stdlib.h>
-
-#include "mapping.h"
-#include "ascii.h"
+#include "lib-lib.h"
 
 const char *mutt_getnamebyvalue(int val, const struct mapping_t *map)
 {
index 9ff2589..ca9712b 100644 (file)
 #ifndef MUTT_LIB_LIB_MEM_H
 #define MUTT_LIB_LIB_MEM_H
 
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
 #define ssizeof(foo)            (ssize_t)sizeof(foo)
 #define countof(foo)            (ssizeof(foo) / ssizeof(foo[0]))
 
index f2b6720..521376f 100644 (file)
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <lib-lib/lib-lib.h>
+#include "lib-lib.h"
 
 rx_t *rx_compile(const char *s, int flags)
 {
index 0341a19..d12fe85 100644 (file)
@@ -29,9 +29,6 @@
 #ifndef MUTT_LIB_LIB_RX_H
 #define MUTT_LIB_LIB_RX_H
 
-#include <sys/types.h>
-#include <regex.h>
-
 #include "../lib/list.h"
 
 /* this is a non-standard option supported by Solaris 2.5.x which allows
index a5333e4..f55aa45 100644 (file)
@@ -17,8 +17,7 @@
  *  Copyright Â© 2006 Pierre Habouzit
  */
 
-#include "macros.h"
-#include "str.h"
+#include "lib-lib.h"
 
 #define XX 255
 unsigned char const __m_strdigits[128] = {
index 4786d27..c9c8c90 100644 (file)
 #ifndef MUTT_LIB_LIB_STR_H
 #define MUTT_LIB_LIB_STR_H
 
-#include <string.h>
-#include <ctype.h>
-
-#include "mem.h"
-
 #define HUGE_STRING     5120
 #define LONG_STRING     1024
 #define STRING          256
index a5ee410..4829aa5 100644 (file)
  * A simple URL parser.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-
-#include <lib-lib/lib-lib.h>
+#include "lib-lib.h"
 
 static struct mapping_t UrlMap[] = {
     {"file",   U_FILE},
index 3078ebd..74a0e2a 100644 (file)
@@ -25,8 +25,6 @@
 #ifndef MUTT_LIB_LIB_URL_H
 #define MUTT_LIB_LIB_URL_H
 
-#include <unistd.h>
-
 typedef enum url_scheme {
     U_FILE,
     U_POP,
index de7ec11..456e04c 100644 (file)
  * rfc1524.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <unistd.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-sys/unix.h>
index 5b68921..208d932 100644 (file)
 #include "charset.h"
 #include "thread.h"
 
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 /* If you are debugging this file, comment out the following line. */
 /*#define NDEBUG*/
 
index 6bbd39a..e28be69 100644 (file)
  *
  */
 
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
index 1868091..7350188 100644 (file)
@@ -9,17 +9,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
index cf88c95..6c11e63 100644 (file)
  * please see the file GPL in the top level source directory.
  */
 
-#include <string.h>
-#include <ctype.h>
-#include <stdlib.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt_idna.h"
index e399bb7..65b03b4 100644 (file)
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "recvattach.h"
index 01a23e5..d762cf9 100644 (file)
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
-#include <stdlib.h>
 #ifdef HAVE_SYSEXITS_H
 #include <sysexits.h>
 #else /* Make sure EX_OK is defined <philiph@pobox.com> */
 #define EX_OK 0
 #endif
 
-#include <lib-lib/lib-lib.h>
 
 #include "exit.h"
 
index e324a94..75e21b8 100644 (file)
@@ -7,15 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/wait.h>
-#include <stdio.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt_signal.h"
index 55b3f02..4807fa1 100644 (file)
@@ -7,15 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <signal.h>
-#include <string.h>
-#include <sys/wait.h>
-#include <errno.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
index f6319f0..fa054ae 100644 (file)
@@ -9,21 +9,12 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
-#include <unistd.h>
 #include <netinet/in.h>
 #include <netdb.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <sys/types.h>
 #include <sys/socket.h>
-#include <string.h>
-#include <errno.h>
 
-#include <lib-lib/lib-lib.h>
 #include <lib-ui/curses.h>
 
 #include "mutt.h"
index 1557a8f..9d658d4 100644 (file)
@@ -7,9 +7,7 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
 #ifdef USE_SSL
 
 #include <openssl/err.h>
 #include <openssl/rand.h>
 
-#include <string.h>
-
-#include <lib-lib/lib-lib.h>
-
 #include <lib-ui/curses.h>
 #include <lib-ui/menu.h>
 
index 7fc5eda..cd48e19 100644 (file)
@@ -8,9 +8,7 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
 #ifdef USE_GNUTLS
 
@@ -20,8 +18,6 @@
 #include <gnutls/openssl.h>
 #endif
 
-#include <lib-lib/lib-lib.h>
-
 #include <lib-ui/curses.h>
 #include <lib-ui/menu.h>
 
index 4d58591..fab888f 100644 (file)
@@ -8,18 +8,12 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
 #include <netinet/in.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/wait.h>
-#include <fcntl.h>
-#include <errno.h>
 
-#include <lib-lib/lib-lib.h>
 #include <lib-ui/curses.h>
 
 #include "mutt.h"
index 30a75dc..62a2f1e 100644 (file)
@@ -8,12 +8,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#include <errno.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "unix.h"
index ff90ff1..21b93f4 100644 (file)
@@ -7,14 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "curses.h"
index 06e70c3..bb0976c 100644 (file)
@@ -7,16 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <dirent.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
index de14e59..fb65b64 100644 (file)
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
-#include <wchar.h>
-#include <wctype.h>
 #include <termios.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <ctype.h>
-
 #ifdef HAVE_LANGINFO_YESEXPR
 #include <langinfo.h>
 #endif
 
-#include <lib-lib/lib-lib.h>
-
 #include <lib-sys/unix.h>
 #include <lib-sys/mutt_signal.h>
 
index 5edd752..bc868e3 100644 (file)
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <errno.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/sidebar.h>
index 39e0100..7623212 100644 (file)
@@ -8,13 +8,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <wctype.h>
-#include <wchar.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "curses.h"
index 5797c22..25ccce1 100644 (file)
@@ -7,15 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <locale.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
index a50c00c..b70dd90 100644 (file)
@@ -7,10 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
index b125d3c..a99646f 100644 (file)
@@ -7,14 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-#include <wchar.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "curses.h"
index 11fa388..b76eb18 100644 (file)
@@ -7,15 +7,8 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
 #include <lib-lib/lib-lib.h>
+
 #include <lib-sys/unix.h>
 
 #include <lib-ui/menu.h>
index 82fe316..74cd58c 100644 (file)
@@ -7,29 +7,20 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
 #if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
 
-#include <lib-ui/curses.h>
-
-#include "mutt.h"
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
 #include <termios.h>
-
 #ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#else
-# ifdef HAVE_IOCTL_H
-# include <ioctl.h>
-# endif
+#  include <sys/ioctl.h>
+#elif defined(HAVE_IOCTL_H)
+#  include <ioctl.h>
 #endif
 
+#include <lib-ui/curses.h>
+#include "mutt.h"
+
 /* this routine should be called after receiving SIGWINCH */
 void mutt_resize_screen (void)
 {
index 1a45558..464a5c4 100644 (file)
  * please see the file GPL in the top level source directory.
  */
 
-#include <libgen.h>
-#include <ctype.h>
-
 #include <lib-lib/lib-lib.h>
+#include <libgen.h>
 
 #include <lib-ui/curses.h>
 #include <lib-ui/menu.h>
index 0f918fd..2dbf7e7 100644 (file)
@@ -7,10 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
 #include "mx.h"
 #include "buffy.h"
 
-
-#include <string.h>
-#include <ctype.h>
-#include <unistd.h>
-
 #define SW              (option(OPTMBOXPANE)?SidebarWidth:0)
 
 static char *get_sort_str (char *buf, ssize_t buflen, int method)
diff --git a/lib.c b/lib.c
index 7dd53a0..2bc65ce 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -8,12 +8,7 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdarg.h>
+#include <lib-lib/lib-lib.h>
 
 #include "lib.h"
 
index c3c9952..0b852e0 100644 (file)
@@ -7,14 +7,9 @@
  * please see the file GPL in the top level source directory.
  */
 
-#include <stddef.h>
-#include <string.h>
-
 #include <lib-lib/lib-lib.h>
-
 #include "list.h"
 
-
 list2_t* list_new (void) {
   return p_new(list2_t, 1);
 }
diff --git a/main.c b/main.c
index e097503..4551a3d 100644 (file)
--- a/main.c
+++ b/main.c
 
 #define MAIN_C 1
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
-#include <string.h>
-#include <stdlib.h>
-#include <locale.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/stat.h>
 #include <sys/utsname.h>
 
-#include <lib-lib/lib-lib.h>
-
 #include <lib-sys/mutt_signal.h>
 
 #include <lib-mime/mime.h>
index 0363a46..98fd035 100644 (file)
--- a/makedoc.c
+++ b/makedoc.c
  **
  **/
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include <errno.h>
 #include <lib-lib/lib-lib.h>
 
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
 #ifdef HAVE_GETOPT_H
 # include <getopt.h>
 #endif
diff --git a/mbox.c b/mbox.c
index d4125b0..9663888 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -9,22 +9,9 @@
 
 /* This file contains code to parse ``mbox'' and ``mmdf'' style mailboxes */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <sys/stat.h>
-#include <dirent.h>
-#include <string.h>
-#include <utime.h>
-#include <sys/file.h>
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-
 #include <lib-lib/lib-lib.h>
-#include <lib-ui/curses.h>
 
+#include <lib-ui/curses.h>
 #include <lib-sys/mutt_signal.h>
 
 #include "mutt.h"
diff --git a/mh.c b/mh.c
index e03762a..f40bbd1 100644 (file)
--- a/mh.c
+++ b/mh.c
  * mailboxes.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <limits.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
+#include <lib-lib/lib-lib.h>
 #include <utime.h>
 
-#if HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
-#include <lib-lib/lib-lib.h>
 #include <lib-ui/curses.h>
 
 #include "mutt.h"
index acfb102..4f2db0f 100644 (file)
@@ -7,16 +7,12 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
 #ifdef HAVE_LIBIDN
 #include <idna.h>
 #endif
 
-#include <lib-lib/lib-lib.h>
-
 #include "mutt.h"
 #include "charset.h"
 #include "mutt_idna.h"
index fe256f6..98533e7 100644 (file)
  * 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 <stdarg.h>
 
 #include <lib-lib/lib-lib.h>
 
@@ -27,8 +22,6 @@
 #include <openssl/ssl.h>
 #endif
 
-#include <errno.h>
-
 #include <auth-client.h>
 #include <libesmtp.h>
 
index 126504c..4ff580a 100644 (file)
@@ -9,17 +9,13 @@
 
 /* common SASL helper routines */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
-#include <errno.h>
 #include <netdb.h>
 #include <sasl/sasl.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 
-#include <lib-lib/lib-lib.h>
 #include <lib-ui/curses.h>
 #include <lib-sys/mutt_socket.h>
 
index 0e396e6..8a9e34d 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -8,26 +8,12 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
 #include <grp.h>
 #include <pwd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <time.h>
-#include <unistd.h>
 #include <utime.h>
 
-#include <lib-lib/lib-lib.h>
-
 #include <lib-mime/mime.h>
 
 #include <lib-ui/curses.h>
diff --git a/mx.c b/mx.c
index 8b9eedd..1d5a750 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -8,27 +8,12 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
-#include <dirent.h>
-#include <fcntl.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
 #include <utime.h>
 
-#include <lib-lib/lib-lib.h>
-
 #include <lib-sys/unix.h>
-
 #include <lib-mime/mime.h>
-
 #include <lib-ui/sidebar.h>
 
 #include "mutt.h"
index 20d55d8..8943c9f 100644 (file)
@@ -3,11 +3,6 @@
  * It's licensed under the GNU General Public License,
  * please see the file GPL in the top level source directory.
  */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/stat.h>
 
 #include <lib-lib/lib-lib.h>
 
@@ -17,8 +12,6 @@
 #include "mx.h"
 #include "mx_nntp.h"
 
-
-
 static int nntp_is_magic (const char* path, struct stat* st) {
   url_scheme_t s = url_check_scheme (NONULL (path));
   return ((s == U_NNTP || s == U_NNTPS) ? M_NNTP : -1);
index 1a868bd..1499ba8 100644 (file)
@@ -9,21 +9,11 @@
  * please see the file GPL in the top level source directory.
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include <lib-lib/lib-lib.h>
 
-#include <unistd.h>
-#include <string.h>
-#include <ctype.h>
-#include <stdlib.h>
 #include <libgen.h>
-#include <sys/stat.h>
-
-#include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
-
 #include <lib-ui/curses.h>
 
 #include "mutt.h"
index 93ad37b..4f3c812 100644 (file)
@@ -9,19 +9,9 @@
  * please see the file GPL in the top level source directory.
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <unistd.h>
-#include <string.h>
-#include <ctype.h>
-#include <stdlib.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
-
 #include <lib-ui/curses.h>
 #include <lib-ui/sidebar.h>
 
diff --git a/pager.c b/pager.c
index b486021..cbdc8fa 100644 (file)
--- a/pager.c
+++ b/pager.c
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <wchar.h>
-#include <wctype.h>
-#include <sys/stat.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
index 26b8375..392a4a6 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -7,21 +7,9 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <stdarg.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
-
 #include <lib-ui/enter.h>
 #include <lib-ui/curses.h>
 
index 2f2433c..cbac932 100644 (file)
  *
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
+
 #include <lib-hash/hash.h>
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <time.h>
 #ifdef HAVE_GETOPT_H
 # include <getopt.h>
 #else
 extern char *optarg;
 extern int optind;
 #endif
-#include <errno.h>
 
 short Umask;   /* dirty hack because we need Umask in lib.c but don't want globals.h there */
 
index 0c11d64..fd4ab46 100644 (file)
@@ -3,17 +3,11 @@
  * It's licensed under the GNU General Public License,
  * please see the file GPL in the top level source directory.
  */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/stat.h>
 
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
 #include "pop.h"
-
 #include "mx.h"
 #include "mx_pop.h"
 
index 8610713..b00274a 100644 (file)
--- a/pop/pop.c
+++ b/pop/pop.c
@@ -7,13 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <unistd.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
index cca0e0c..2743910 100644 (file)
@@ -7,21 +7,14 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
+
 #include <lib-hash/hash.h>
 
 #include "mutt.h"
 #include "mx.h"
 #include "pop.h"
 
-
-#include <string.h>
-#include <unistd.h>
-
 #ifdef USE_SASL
 #include <sasl/sasl.h>
 #include <sasl/saslutil.h>
index e780215..02c8060 100644 (file)
@@ -7,14 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
index 9b4e0a6..5fa0971 100644 (file)
@@ -8,15 +8,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <ctype.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/stat.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
index c2fec5e..07905f9 100644 (file)
@@ -8,10 +8,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
 #include <lib-crypt/crypt.h>
 
 
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <errno.h>
-
 static const char *Mailbox_is_read_only = N_("Mailbox is read-only.");
 static char LastSaveFolder[_POSIX_PATH_MAX] = "";
 
index d7234f9..4e37015 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -7,10 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
index fa23865..a7b385b 100644 (file)
  * Mixmaster support for Mutt
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/file.h>
-#include <fcntl.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-sys/unix.h>
-
 #include <lib-ui/curses.h>
 #include <lib-ui/menu.h>
 
diff --git a/score.c b/score.c
index 061d84c..f782391 100644 (file)
--- a/score.c
+++ b/score.c
@@ -7,18 +7,11 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
 #include "sort.h"
 
-#include <string.h>
-#include <stdlib.h>
-
 typedef struct score_t {
   char *str;
   pattern_t *pat;
diff --git a/send.c b/send.c
index 4039463..27db967 100644 (file)
--- a/send.c
+++ b/send.c
@@ -7,27 +7,11 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <dirent.h>
-#include <time.h>
-#include <sys/types.h>
-#include <utime.h>
-
 #include <lib-lib/lib-lib.h>
+#include <utime.h>
 
 #include <lib-mime/mime.h>
 #include <lib-mime/rfc3676.h>
-
 #include <lib-ui/curses.h>
 #include <lib-ui/enter.h>
 
index 3759212..ef2b9da 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -9,28 +9,14 @@
 
 #define _SENDLIB_C 1
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
 
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-#include <ctype.h>
-#include <sys/stat.h>
 #include <signal.h>
-#include <sys/wait.h>
-#include <fcntl.h>
 #include <sys/utsname.h>
 
-#include <lib-lib/lib-lib.h>
-
 #include <lib-sys/exit.h>
 #include <lib-sys/mutt_signal.h>
-
 #include <lib-mime/mime.h>
-
 #include <lib-ui/curses.h>
 
 #include "mutt.h"
diff --git a/sort.c b/sort.c
index 2b70001..e758174 100644 (file)
--- a/sort.c
+++ b/sort.c
@@ -7,15 +7,6 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <unistd.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
diff --git a/state.c b/state.c
index 2f0c8f7..1d41017 100644 (file)
--- a/state.c
+++ b/state.c
@@ -6,13 +6,8 @@
  * 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 <stdlib.h>
-#include <stdio.h>
-#include <stdarg.h>
+#include <lib-lib/lib-lib.h>
 
 #include <lib-mime/rfc3676.h>
 
index 57cfada..09bd915 100644 (file)
--- a/thread.c
+++ b/thread.c
@@ -7,20 +7,12 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
 #include "sort.h"
 #include "thread.h"
 
-
-#include <string.h>
-#include <ctype.h>
-
 #define VISIBLE(hdr, ctx) (hdr->virtual >= 0 || (hdr->collapsed && (!ctx->pattern || hdr->limited)))
 
 /* determine whether a is a descendant of b */