Move SIGWINCH setup in the display file
The SIGWINCH signal handler calls a display function. For this
we exported the handler in powerdebug.c.
That does not make sense, let's move the signal setup in display.c
directly.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
diff --git a/display.c b/display.c
index eada839..f7f90f4 100644
--- a/display.c
+++ b/display.c
@@ -20,6 +20,7 @@
*/
#include <stdio.h>
+#include <signal.h>
#include <string.h>
#define _GNU_SOURCE
#include <strings.h>
@@ -558,6 +559,8 @@
current_win = 1 << (ffs(options->flags & DEFAULT_OPTION) - 1);
+ signal(SIGWINCH, sigwinch_handler);
+
if (mainloop_add(0, display_keystroke, NULL))
return -1;