X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=gui_common.c;h=6ca226e6e0d468e953f3e1aac6cab52364f94ffb;hp=26c3d61b73feacd5b77d45e86767944ef5680564;hb=f6f50d03a09d6bc423324206d274336e9905bbb4;hpb=ff0c6db3410021e48196ce018760a5bc0be547ed diff --git a/gui_common.c b/gui_common.c index 26c3d61b..6ca226e6 100644 --- a/gui_common.c +++ b/gui_common.c @@ -1,4 +1,5 @@ #include "para.h" +#include "string.h" #include "fd.h" extern const char *status_item_list[NUM_STAT_ITEMS]; @@ -17,7 +18,7 @@ int para_open_audiod_pipe(char *cmd) return ret; } -int read_audiod_pipe(int fd, void (*line_handler)(char *) ) +int read_audiod_pipe(int fd, line_handler_t *line_handler) { static char buf[4096]; const ssize_t bufsize = sizeof(buf) - 1; @@ -30,7 +31,7 @@ int read_audiod_pipe(int fd, void (*line_handler)(char *) ) if (ret > 0) { loaded += ret; buf[loaded] = '\0'; - loaded = for_each_line(buf, loaded, line_handler); + loaded = for_each_line(buf, loaded, line_handler, NULL); } return ret; }