bin_PROGRAMS = madmutt madmutt_dotlock pgpringng pgpewrapng smime_keysng
madmutt_SOURCES = $(BUILT_SOURCES) \
alias.c attach.c base64.c browser.c buffy.c \
- charset.c compress.c commands.c complete.c \
- compose.c copy.c editmsg.c \
+ charset.c compress.c commands.c complete.c \
+ compose.c copy.c editmsg.c init.c keymap.c lib.c \
flags.c filter.c from.c getdomain.c \
handler.c hcache.c hdrline.c headers.c help.c history.c hook.c \
- init.c keymap.c lib.c \
main.c mbox.c mbyte.c mh.c muttlib.c mutt_idna.c mx.c \
pager.c pattern.c postpone.c query.c \
recvattach.c recvcmd.c rfc1524.c rfc3676.c \
- score.c send.c sendlib.c sidebar.c signal.c sort.c state.c status.c system.c \
+ score.c send.c sendlib.c sidebar.c sort.c state.c status.c system.c \
thread.c url.c utf8.c wcwidth.c account.c
madmutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
#include <lib-lib/file.h>
#include <lib-lib/debug.h>
+#include <lib-sys/mutt_signal.h>
+
#include <lib-ui/curses.h>
#include "mutt.h"
# include "config.h"
#endif
-#include "mutt.h"
-
#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>
+#include <lib-sys/mutt_signal.h>
+
+#include "mutt.h"
+
/* Invokes a commmand on a pipe and optionally connects its stdin and stdout
* to the specified handles.
*/
#include <lib-lib/debug.h>
#include <lib-lib/rx.h>
+#include <lib-sys/unix.h>
+
#include <lib-ui/curses.h>
#include "mutt.h"
#include <stdlib.h>
#include "mapping.h"
+#include "ascii.h"
const char *mutt_getnamebyvalue(int val, const struct mapping_t *map)
{
noinst_LIBRARIES = libsys.a
-libsys_a_SOURCES = exit.h unix.h \
- exit.c unix.c \
+libsys_a_SOURCES = exit.h unix.h mutt_signal.h \
+ exit.c unix.c mutt_signal.c \
$(___networking_part____) \
mutt_socket.h mutt_tunnel.c mutt_ssl.h \
mutt_socket.c mutt_tunnel.h mutt_ssl.c mutt_ssl_gnutls.c
# include "config.h"
#endif
-#include <lib-lib/macros.h>
-
-#include <lib-ui/curses.h>
-
-#include "mutt.h"
-
#include <signal.h>
#include <string.h>
#include <sys/wait.h>
#include <errno.h>
+#include <lib-lib/macros.h>
+
+#include <lib-ui/curses.h>
+
+#include "mutt_signal.h"
+
static sigset_t Sigset;
static sigset_t SigsetSys;
static struct sigaction SysOldInt;
{
curs_set (1);
endwin (); /* just to be safe */
-#if SYS_SIGLIST_DECLARED
+#ifdef SYS_SIGLIST_DECLARED
printf (_("%s... Exiting.\n"), sys_siglist[sig]);
#else
-#if (__sun__ && __svr4__)
+#if defined(__sun__) && defined(__svr4__)
printf (_("Caught %s... Exiting.\n"), _sys_siglist[sig]);
#else
-#if (__alpha && __osf__)
+#if defined(__alpha) && defined(__osf__)
printf (_("Caught %s... Exiting.\n"), __sys_siglist[sig]);
#else
printf (_("Caught signal %d... Exiting.\n"), sig);
exit (0);
}
-RETSIGTYPE chld_handler (int sig)
+RETSIGTYPE chld_handler(int sig __attribute__((unused)))
{
/* empty */
}
}
#endif /* USE_SLANG_CURSES */
-void mutt_signal_init (void)
+void mutt_signal_initialize (void)
{
struct sigaction act;
--- /dev/null
+/*
+ * 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_SYS_SIGNAL_H
+#define MUTT_LIB_SYS_SIGNAL_H
+
+void mutt_signal_initialize(void);
+
+void mutt_block_signals(void);
+void mutt_unblock_signals(void);
+void mutt_block_signals_system(void);
+void mutt_unblock_signals_system(int);
+
+void mutt_allow_interrupt(int);
+
+#endif
# include "config.h"
#endif
+#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/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include "mutt.h"
#include "globals.h"
+
#include "mutt_socket.h"
#include "mutt_tunnel.h"
-#if defined(USE_SSL) || defined(USE_GNUTLS)
-# include "mutt_ssl.h"
-#endif
+#include "mutt_signal.h"
+#include "mutt_ssl.h"
#include "mutt_idna.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>
-
/* support for multiple socket connections */
static CONNECTION *Connections = NULL;
#include "exit.h"
#include "mutt_socket.h"
#include "mutt_tunnel.h"
+#include "mutt_signal.h"
/* -- data types -- */
typedef struct {
#include <lib-lib/file.h>
#include <lib-lib/debug.h>
+#include <lib-sys/mutt_signal.h>
+
#include "curses.h"
#include "menu.h"
#include "enter.h"
#include <lib-lib/file.h>
#include <lib-lib/debug.h>
+#include <lib-sys/mutt_signal.h>
+
#include <lib-ui/curses.h>
#include "mutt.h"
#else
/* should come before initscr() so that ncurses 4.2 doesn't try to install
its own SIGWINCH handler */
- mutt_signal_init ();
+ mutt_signal_initialize ();
#endif
if (initscr () == NULL) {
puts _("Error initializing terminal.");
exit (1);
}
-#if 1 /* USE_SLANG_CURSES - commenting out suggested in #455. */
- /* slang requires the signal handlers to be set after initializing */
- mutt_signal_init ();
-#endif
+ mutt_signal_initialize ();
ci_start_color ();
keypad (stdscr, TRUE);
cbreak ();
#include <lib-lib/file.h>
#include <lib-lib/debug.h>
+#include <lib-sys/mutt_signal.h>
+
#include "mutt.h"
#include "mx.h"
#include "buffy.h"
void mutt_add_to_reference_headers (ENVELOPE * env, ENVELOPE * curenv,
LIST *** pp, LIST *** qq);
void mutt_adv_mktemp (const char*, char*, size_t);
-void mutt_allow_interrupt (int);
-void mutt_block_signals (void);
-void mutt_block_signals_system (void);
int mutt_bounce_message (FILE * fp, HEADER *, address_t *);
void mutt_canonical_charset (char *, size_t, const char *);
void mutt_check_rescore (CONTEXT *);
void mutt_set_followup_to (ENVELOPE *);
void mutt_shell_escape (void);
void mutt_show_error (void);
-void mutt_signal_init (void);
void mutt_stamp_attachment (BODY * a);
void mutt_tabs_to_spaces (char *);
void mutt_tag_set_flag (int, int);
-void mutt_unblock_signals (void);
-void mutt_unblock_signals_system (int);
void mutt_update_encoding (BODY * a);
void mutt_version (void);
void mutt_write_references (LIST *, FILE *);
#include <lib-lib/debug.h>
#include <lib-sys/exit.h>
+#include <lib-sys/mutt_signal.h>
#include <lib-mime/mime.h>
# include "config.h"
#endif
-#include "mutt.h"
-#include <imap/imap.h>
-
#include <errno.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/wait.h>
#include <unistd.h>
+#include <lib-sys/mutt_signal.h>
+
+#include "mutt.h"
+#include <imap/imap.h>
+
int _mutt_system (const char *cmd, int flags)
{
int rc = -1;