static void left(struct sel *sel) { switch(sel->page) { case PAGE_CLIENT_LIST: break; case PAGE_BACKUP_LIST: sel->page=PAGE_CLIENT_LIST; break; case PAGE_BACKUP_LOGS: sel->page=PAGE_BACKUP_LIST; break; case PAGE_VIEW_LOG: if(sel->offset>0) { // Allow log lines to be scrolled left. sel->offset--; break; } sel->page=PAGE_BACKUP_LOGS; llines_free(&sel->llines); sel->lline=NULL; break; } }
static int input_end_array(void *ctx) { if(in_backups && !in_flags && !in_counters && !in_logslist) { in_backups=0; if(add_to_bu_list()) return 0; // Now may have two lists. Want to keep the old one is intact // as possible, so that we can keep a pointer to its entries // in the ncurses stuff. // Merge the new list into the old. merge_bu_lists(); bu_list=NULL; if(cnew) { if(cstat_add_to_list(cslist, cnew)) return -1; cnew=NULL; } current=NULL; } else if(in_flags) { in_flags=0; } else if(in_counters) { in_counters=0; } else if(in_logslist) { in_logslist=0; } else if(in_log_content) { in_log_content=0; llines_free(sllines); *sllines=ll_list; ll_list=NULL; } return 1; }