Replace status item STATUS_BAR to BASENAME.
[paraslash.git] / gui.c
diff --git a/gui.c b/gui.c
index 37d0d8e9ec205f0f3992d21b3a97519b277fc7af..7dab4466beb0e4b1ecb7f5d007ed0f7bf89db9d6 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -6,6 +6,9 @@
 
 /** \file gui.c ncurses-based interface for paraslash */
 
+#include <signal.h>
+#include <sys/types.h>
+#include <dirent.h>
 #include "gui.cmdline.h"
 #include "para.h"
 #include "gui.h"
@@ -14,6 +17,8 @@
 #include "gui_common.h"
 #include "fd.h"
 #include "error.h"
+#include "list.h"
+#include "sched.h"
 #include "signal.h"
 
 /** define the array of error lists needed by para_gui */
@@ -721,10 +726,11 @@ static void init_curses(void)
 
 static void check_sigchld(void)
 {
+       int ret;
        pid_t pid;
 reap_next_child:
-       pid = para_reap_child();
-       if (pid <= 0)
+       ret = para_reap_child(&pid);
+       if (ret <= 0)
                return;
        if (pid == cmd_pid) {
                cmd_pid = 0;
@@ -912,8 +918,8 @@ repeat:
                        close(audiod_pipe);
                        audiod_pipe = -1;
                        clear_all_items();
-                       free(stat_content[SI_STATUS_BAR]);
-                       stat_content[SI_STATUS_BAR] =
+                       free(stat_content[SI_BASENAME]);
+                       stat_content[SI_BASENAME] =
                                para_strdup("audiod not running!?");
                        print_all_items();
                }