From f435868132e200bfa71ac155f037cf64bf5414ba Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Sat, 11 Aug 2007 17:42:24 +0200 Subject: [PATCH] Have a lib-ui/lib-ui.h Signed-off-by: Pierre Habouzit --- account.c | 2 +- alias.cpkg | 2 +- attach.c | 2 +- browser.c | 2 +- buffy.cpkg | 2 +- commands.c | 2 +- compose.c | 2 +- copy.c | 2 +- crypt.cpkg | 2 +- editmsg.c | 2 +- flags.c | 2 +- handler.c | 2 +- headers.c | 2 +- help.c | 2 +- hook.c | 2 +- imap/imap_private.h | 2 +- imap/message.c | 2 +- init.c | 2 +- keymap.c | 2 +- lib-lua/madmutt.cpkg | 2 +- lib-mime/rfc3676.c | 2 +- lib-mx/compress.c | 2 +- lib-mx/mbox.c | 2 +- lib-mx/mh.c | 2 +- lib-sys/filter.c | 2 +- lib-sys/mutt_signal.c | 3 +-- lib-sys/mutt_socket.c | 2 +- lib-sys/mutt_ssl.cpkg | 2 +- lib-sys/mutt_tunnel.c | 2 +- lib-ui/color.c | 5 +---- lib-ui/complete.c | 3 +-- lib-ui/curs_lib.c | 3 +-- lib-ui/curs_main.c | 3 +-- lib-ui/curses.h | 11 ----------- lib-ui/enter.c | 3 +-- lib-ui/hdrline.c | 3 +-- lib-ui/history.c | 2 +- lib-ui/lib-ui.h | 37 +++++++++++++++++++++++++++++++++++++ lib-ui/menu.c | 3 +-- lib-ui/query.c | 3 +-- lib-ui/sidebar.c | 3 +-- lib-ui/status.c | 3 +-- main.c | 2 +- mutt_sasl.c | 2 +- muttlib.c | 2 +- nntp.c | 2 +- pager.c | 2 +- pattern.c | 2 +- pop.c | 2 +- pop.h | 2 +- postpone.c | 2 +- recvattach.c | 2 +- recvcmd.c | 2 +- send.c | 2 +- sendlib.c | 2 +- sort.c | 2 +- 56 files changed, 91 insertions(+), 78 deletions(-) create mode 100644 lib-ui/lib-ui.h diff --git a/account.c b/account.c index 0813f20..623786d 100644 --- a/account.c +++ b/account.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include "mutt.h" #include "account.h" diff --git a/alias.cpkg b/alias.cpkg index dc88306..cca09b6 100644 --- a/alias.cpkg +++ b/alias.cpkg @@ -29,7 +29,7 @@ #include -#include +#include #include #include diff --git a/attach.c b/attach.c index c4903b4..4d600f9 100644 --- a/attach.c +++ b/attach.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include diff --git a/browser.c b/browser.c index 2f75821..f17b1f5 100644 --- a/browser.c +++ b/browser.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include #include diff --git a/buffy.cpkg b/buffy.cpkg index 65e20bb..078c2f5 100644 --- a/buffy.cpkg +++ b/buffy.cpkg @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include #include diff --git a/commands.c b/commands.c index cde830d..3870aa8 100644 --- a/commands.c +++ b/commands.c @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include diff --git a/compose.c b/compose.c index 8ad53e8..d23e45f 100644 --- a/compose.c +++ b/compose.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include diff --git a/copy.c b/copy.c index 37e3ef3..a52a4eb 100644 --- a/copy.c +++ b/copy.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include "mutt.h" diff --git a/crypt.cpkg b/crypt.cpkg index 5326fda..ae29cd2 100644 --- a/crypt.cpkg +++ b/crypt.cpkg @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include diff --git a/editmsg.c b/editmsg.c index ec458a5..09f358f 100644 --- a/editmsg.c +++ b/editmsg.c @@ -10,7 +10,7 @@ /* simple, editor-based message editing */ #include -#include +#include #include #include "mutt.h" diff --git a/flags.c b/flags.c index afadb4c..9ef0f6d 100644 --- a/flags.c +++ b/flags.c @@ -9,7 +9,7 @@ #include -#include +#include #include #include #include diff --git a/handler.c b/handler.c index 0746269..5545a8f 100644 --- a/handler.c +++ b/handler.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include diff --git a/headers.c b/headers.c index efd7caf..1215985 100644 --- a/headers.c +++ b/headers.c @@ -8,7 +8,7 @@ */ #include -#include +#include #include "mutt.h" #include "alias.h" diff --git a/help.c b/help.c index c2b50e2..4fee510 100644 --- a/help.c +++ b/help.c @@ -11,7 +11,7 @@ #include -#include +#include #include "mutt.h" #include "charset.h" diff --git a/hook.c b/hook.c index e386053..37eda9e 100644 --- a/hook.c +++ b/hook.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/imap/imap_private.h b/imap/imap_private.h index cebd4ff..bebfc6a 100644 --- a/imap/imap_private.h +++ b/imap/imap_private.h @@ -12,7 +12,7 @@ #define _IMAP_PRIVATE_H 1 #include -#include +#include #include "imap.h" diff --git a/imap/message.c b/imap/message.c index 275d84c..1871be3 100644 --- a/imap/message.c +++ b/imap/message.c @@ -12,7 +12,7 @@ #include -#include +#include #include #include diff --git a/init.c b/init.c index e01ed4d..0f57360 100644 --- a/init.c +++ b/init.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/keymap.c b/keymap.c index 4349989..15ed62d 100644 --- a/keymap.c +++ b/keymap.c @@ -9,7 +9,7 @@ #include -#include +#include #include #include "mutt.h" diff --git a/lib-lua/madmutt.cpkg b/lib-lua/madmutt.cpkg index f134c75..dfb04b5 100644 --- a/lib-lua/madmutt.cpkg +++ b/lib-lua/madmutt.cpkg @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include "../mutt.h" diff --git a/lib-mime/rfc3676.c b/lib-mime/rfc3676.c index 6559cc4..45ce19e 100644 --- a/lib-mime/rfc3676.c +++ b/lib-mime/rfc3676.c @@ -13,7 +13,7 @@ #include -#include +#include #include "state.h" #include "rfc3676.h" diff --git a/lib-mx/compress.c b/lib-mx/compress.c index c28eee6..22fe01e 100644 --- a/lib-mx/compress.c +++ b/lib-mx/compress.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include "mutt.h" diff --git a/lib-mx/mbox.c b/lib-mx/mbox.c index 9729c5e..ae82b66 100644 --- a/lib-mx/mbox.c +++ b/lib-mx/mbox.c @@ -11,7 +11,7 @@ #include -#include +#include #include #include "mutt.h" diff --git a/lib-mx/mh.c b/lib-mx/mh.c index f60cfe5..3e1952b 100644 --- a/lib-mx/mh.c +++ b/lib-mx/mh.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include "mutt.h" #include "mx.h" diff --git a/lib-sys/filter.c b/lib-sys/filter.c index 90d9af2..78e08fb 100644 --- a/lib-sys/filter.c +++ b/lib-sys/filter.c @@ -8,7 +8,7 @@ */ #include -#include +#include #include "mutt_signal.h" #include "unix.h" diff --git a/lib-sys/mutt_signal.c b/lib-sys/mutt_signal.c index 8be8fce..ea86e3b 100644 --- a/lib-sys/mutt_signal.c +++ b/lib-sys/mutt_signal.c @@ -9,7 +9,7 @@ #include -#include +#include #include "mutt_signal.h" @@ -60,7 +60,6 @@ static void sighandler (int sig) case SIGINT: SigInt = 1; break; - } errno = save_errno; } diff --git a/lib-sys/mutt_socket.c b/lib-sys/mutt_socket.c index b6ea846..3976f89 100644 --- a/lib-sys/mutt_socket.c +++ b/lib-sys/mutt_socket.c @@ -15,7 +15,7 @@ #include #include -#include +#include #include "mutt.h" #include "globals.h" diff --git a/lib-sys/mutt_ssl.cpkg b/lib-sys/mutt_ssl.cpkg index 586cd53..3717ba4 100644 --- a/lib-sys/mutt_ssl.cpkg +++ b/lib-sys/mutt_ssl.cpkg @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include "mutt.h" diff --git a/lib-sys/mutt_tunnel.c b/lib-sys/mutt_tunnel.c index fab888f..8af79f8 100644 --- a/lib-sys/mutt_tunnel.c +++ b/lib-sys/mutt_tunnel.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include "mutt.h" diff --git a/lib-ui/color.c b/lib-ui/color.c index 87a8042..98eaa54 100644 --- a/lib-ui/color.c +++ b/lib-ui/color.c @@ -7,10 +7,7 @@ * please see the file GPL in the top level source directory. */ -#include - -#include "curses.h" - +#include #include "pattern.h" #include "mutt.h" diff --git a/lib-ui/complete.c b/lib-ui/complete.c index e337e1e..426da78 100644 --- a/lib-ui/complete.c +++ b/lib-ui/complete.c @@ -7,11 +7,10 @@ * please see the file GPL in the top level source directory. */ -#include +#include #include #include "mutt.h" -#include "curses.h" #include #ifdef USE_NNTP #include "nntp.h" diff --git a/lib-ui/curs_lib.c b/lib-ui/curs_lib.c index 3c0f440..8e15f53 100644 --- a/lib-ui/curs_lib.c +++ b/lib-ui/curs_lib.c @@ -11,7 +11,7 @@ * please see the file GPL in the top level source directory. */ -#include +#include #include #ifdef HAVE_SYS_IOCTL_H @@ -25,7 +25,6 @@ #include #include -#include "curses.h" #include "menu.h" #include "enter.h" diff --git a/lib-ui/curs_main.c b/lib-ui/curs_main.c index 3ba1c56..fa8327b 100644 --- a/lib-ui/curs_main.c +++ b/lib-ui/curs_main.c @@ -10,13 +10,12 @@ * please see the file GPL in the top level source directory. */ -#include +#include #include #include #include "pop.h" -#include "curses.h" #include "menu.h" #include "mutt.h" diff --git a/lib-ui/curses.h b/lib-ui/curses.h index fc9e19f..e8c6055 100644 --- a/lib-ui/curses.h +++ b/lib-ui/curses.h @@ -10,19 +10,8 @@ #ifndef _MUTT_CURSES_H #define _MUTT_CURSES_H -#include #include "mutt.h" -#if defined(HAVE_NCURSESW_NCURSES_H) -#include -#elif defined(HAVE_NCURSES_NCURSES_H) -#include -#elif defined(HAVE_NCURSES_H) -#include -#else -#include -#endif - /* AIX defines ``lines'' in , but it's used as a var name in * various places in Mutt */ diff --git a/lib-ui/enter.c b/lib-ui/enter.c index dcd5bcf..bea29af 100644 --- a/lib-ui/enter.c +++ b/lib-ui/enter.c @@ -8,9 +8,8 @@ * please see the file GPL in the top level source directory. */ -#include +#include -#include "curses.h" #include "enter.h" #include "menu.h" diff --git a/lib-ui/hdrline.c b/lib-ui/hdrline.c index 30b43df..4f5e5e4 100644 --- a/lib-ui/hdrline.c +++ b/lib-ui/hdrline.c @@ -7,10 +7,9 @@ * please see the file GPL in the top level source directory. */ -#include +#include #include -#include #include #include "mutt.h" diff --git a/lib-ui/history.c b/lib-ui/history.c index b70dd90..b27daed 100644 --- a/lib-ui/history.c +++ b/lib-ui/history.c @@ -7,7 +7,7 @@ * please see the file GPL in the top level source directory. */ -#include +#include #include "mutt.h" #include "history.h" diff --git a/lib-ui/lib-ui.h b/lib-ui/lib-ui.h new file mode 100644 index 0000000..c08b293 --- /dev/null +++ b/lib-ui/lib-ui.h @@ -0,0 +1,37 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + * Copyright © 2006 Pierre Habouzit + */ + +#ifndef MUTT_LIB_UI_LIB_UI_H +#define MUTT_LIB_UI_LIB_UI_H + +#include + +#if defined(HAVE_NCURSESW_NCURSES_H) +#include +#elif defined(HAVE_NCURSES_NCURSES_H) +#include +#elif defined(HAVE_NCURSES_H) +#include +#else +#include +#endif + +#include "curses.h" + +#endif diff --git a/lib-ui/menu.c b/lib-ui/menu.c index 9bd9e7b..0371dbc 100644 --- a/lib-ui/menu.c +++ b/lib-ui/menu.c @@ -7,9 +7,8 @@ * please see the file GPL in the top level source directory. */ -#include +#include -#include "curses.h" #include "enter.h" #include "menu.h" diff --git a/lib-ui/query.c b/lib-ui/query.c index 01a9f2d..f9bdc7a 100644 --- a/lib-ui/query.c +++ b/lib-ui/query.c @@ -7,12 +7,11 @@ * please see the file GPL in the top level source directory. */ -#include +#include #include #include -#include #include "mutt.h" #include "alias.h" diff --git a/lib-ui/sidebar.c b/lib-ui/sidebar.c index 4161bdc..238a5dd 100644 --- a/lib-ui/sidebar.c +++ b/lib-ui/sidebar.c @@ -12,10 +12,9 @@ * please see the file GPL in the top level source directory. */ -#include +#include #include -#include #include #include diff --git a/lib-ui/status.c b/lib-ui/status.c index fb61664..af9ba33 100644 --- a/lib-ui/status.c +++ b/lib-ui/status.c @@ -7,9 +7,8 @@ * please see the file GPL in the top level source directory. */ -#include +#include -#include #include #include diff --git a/main.c b/main.c index 75ab623..60c51bb 100644 --- a/main.c +++ b/main.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include "mutt.h" diff --git a/mutt_sasl.c b/mutt_sasl.c index 6d1918f..8938afa 100644 --- a/mutt_sasl.c +++ b/mutt_sasl.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include "mutt.h" diff --git a/muttlib.c b/muttlib.c index bf59e68..8ab32c1 100644 --- a/muttlib.c +++ b/muttlib.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include #include diff --git a/nntp.c b/nntp.c index 4e79ffc..08814ee 100644 --- a/nntp.c +++ b/nntp.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/pager.c b/pager.c index 14ad1f7..e7601db 100644 --- a/pager.c +++ b/pager.c @@ -13,7 +13,7 @@ #include -#include +#include #include #include #include diff --git a/pattern.c b/pattern.c index b29ad17..6e213a2 100644 --- a/pattern.c +++ b/pattern.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/pop.c b/pop.c index b223c31..a066f6e 100644 --- a/pop.c +++ b/pop.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include "crypt.h" #include "mutt.h" diff --git a/pop.h b/pop.h index 74df068..22806cb 100644 --- a/pop.h +++ b/pop.h @@ -10,7 +10,7 @@ #ifndef _POP_H #define _POP_H 1 -#include +#include #include extern mx_t const pop_mx; diff --git a/postpone.c b/postpone.c index 4cabf1d..06b5929 100644 --- a/postpone.c +++ b/postpone.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/recvattach.c b/recvattach.c index de7cee0..ba30804 100644 --- a/recvattach.c +++ b/recvattach.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include #include diff --git a/recvcmd.c b/recvcmd.c index 28cfc16..1f46204 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -11,7 +11,7 @@ #include -#include +#include #include #include #include diff --git a/send.c b/send.c index 62207d2..8659f21 100644 --- a/send.c +++ b/send.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/sendlib.c b/sendlib.c index f191e5c..3196347 100644 --- a/sendlib.c +++ b/sendlib.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include "mutt.h" diff --git a/sort.c b/sort.c index 505679c..3e1e92c 100644 --- a/sort.c +++ b/sort.c @@ -9,7 +9,7 @@ #include -#include +#include #include "mutt.h" #include "alias.h" -- 2.20.1