static int parse_data(struct asfd *asfd, struct sel *sel, int count) { #ifdef HAVE_NCURSES_H if(actg==ACTION_STATUS && asfd->streamtype==ASFD_STREAM_NCURSES_STDIN) return parse_stdin_data(asfd, sel, count); #endif return json_input(asfd, sel); }
static int parse_data(struct asfd *asfd, struct sel *sel, int count) { #ifdef HAVE_NCURSES if(actg==ACTION_STATUS && asfd->streamtype==ASFD_STREAM_NCURSES_STDIN) return parse_stdin_data(asfd, sel, count); #endif switch(json_input(asfd, sel)) { // 0 means carry on. // 1 means it got to the end of the JSON statement. // Anything else means an error. case 0: return 0; case 1: return 0; default: return -1; } }