static void request_move_right(void) { if (y < NAMES_PER_COL(page) - 1 && PXY2N(page,0,y+1) < rl.cur_entries && (x == NAMES_PER_LINE(page) - 1 || PXY2N(page,x+1,y) > rl.cur_entries -1) ) { request_move_to_sol(); request_move_down(); } else if (y == NAMES_PER_COL(page) - 1 && x == NAMES_PER_LINE(page) - 1 && PXY2N(page+1,0,0) < rl.cur_entries) { normalize(PXY2N(page+1,0,0)); } else if (PXY2N(page,x,y) + DX(page) < rl.cur_entries ) { normalize(PXY2N(page,x,y) + DX(page)); } }
void request_move_inc_down(void) { if (x == NAMES_PER_LINE(page) - 1) { if (y == NAMES_PER_COL(page) - 1) request_move_to_eof(); else request_next_page(); } else request_move_to_eol(); }
static void print_strings() { const int dx = rl.max_entry_len + 1 + (rl.suffix ? 1 : 0); set_attr(0); for(int row = 0; row < max_names_per_col; row++) { move_cursor(row, 0); clear_to_eol(); if (row < NAMES_PER_COL(page)) { for(int col = 0; col < NAMES_PER_LINE(page); col++) { if (PXY2N(page,col,row) < rl.cur_entries) { move_cursor(row, col * dx); const char * const p = rl.entries[PXY2N(page,col,row)]; if (rl.suffix) set_attr(p[strlen(p) - 1] == rl.suffix ? BOLD : 0); output_string(p, io_utf8); } } } } }
static void print_strings() { int row,col; const char *p; set_attr(0); for(row = 0; row < max_names_per_col; row++) { move_cursor(row, 0); clear_to_eol(); if (row < NAMES_PER_COL(page)) { for(col = 0; col < NAMES_PER_LINE(page); col++) { if (PXY2N(page,col,row) < num_entries) { move_cursor(row, col * max_name_len); p = entries[PXY2N(page,col,row)]; if (mark_char) set_attr(p[strlen(p) - 1] == mark_char ? BOLD : 0); output_string(p, io_utf8); } } } } }