diff options
author | Frederic Culot <calcurse@culot.org> | 2008-12-28 13:13:58 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2008-12-28 13:13:58 +0000 |
commit | 5352496984d550bd441b12a082d5a382c168cbe2 (patch) | |
tree | 8a61b0785ba0d2f9edde566bef372360244949e3 /src/sigs.c | |
parent | a63c74892085e6bd5ea8b88712f44d1567ce7ed3 (diff) | |
download | calcurse-5352496984d550bd441b12a082d5a382c168cbe2.zip |
Added wrappers around libc's memory management functions, to easily debug memory usage
Diffstat (limited to 'src/sigs.c')
-rwxr-xr-x | src/sigs.c | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -1,4 +1,4 @@ -/* $calcurse: sigs.c,v 1.6 2008/04/12 21:14:03 culot Exp $ */ +/* $calcurse: sigs.c,v 1.7 2008/12/28 13:13:59 culot Exp $ */ /* * Calcurse - text-based organizer @@ -26,12 +26,10 @@ #include <sys/types.h> #include <sys/wait.h> -#include <stdlib.h> #include <signal.h> #include "i18n.h" -#include "vars.h" -#include "wins.h" +#include "utils.h" /* * General signal handling routine. @@ -50,7 +48,7 @@ signal_handler (int sig) break; case SIGWINCH: clearok (curscr, TRUE); - ungetch (KEY_RESIZE); + (void)ungetch (KEY_RESIZE); break; } } @@ -64,8 +62,8 @@ sigs_init (struct sigaction *sa) sigemptyset (&sa->sa_mask); if (sigaction (SIGCHLD, sa, NULL) != 0) { - perror ("sigaction"); - exit (EXIT_FAILURE); + ERROR_MSG (_("Error handling SIGCHLD signal")); + exit_calcurse (1); } sa->sa_handler = signal_handler; @@ -73,8 +71,8 @@ sigs_init (struct sigaction *sa) sigemptyset (&sa->sa_mask); if (sigaction (SIGWINCH, sa, NULL) != 0) { - perror ("sigaction"); - exit (EXIT_FAILURE); + ERROR_MSG (_("Error handling SIGWINCH signal")); + exit_calcurse (1); } sa->sa_handler = SIG_IGN; @@ -82,7 +80,7 @@ sigs_init (struct sigaction *sa) sigemptyset (&(sa->sa_mask)); if (sigaction (SIGINT, sa, NULL) != 0) { - perror ("sigaction"); - exit (EXIT_FAILURE); + ERROR_MSG (_("Error handling SIGINT signal")); + exit_calcurse (1); } } |