/* * Display the marker which precedes the workspace */ void showMARK(int col) { int marks, units; int y, x; char value[20]; getyx(stdscr, y, x); move(mark_W, 0); marks = COLS; units = (col % 10); col /= 10; while (marks > 0) { int ys, xs; int limit = ((marks > 10) ? 10 : marks) - units; int first; if (limit <= 0) break; getyx(stdscr, ys, xs); addchnstr(bar_ruler + units, limit); FORMAT(value, "%d", ++col); first = 10 - units - (int) strlen(value); if (first < limit) { move(ys, xs + first); PRINTW("%.*s", limit - first, value); } marks -= (10 - units); units = 0; } move(y, x); }
static void restoreOutputArea(void) { int i = 0; for(; i < OUTPUT_AREA_ROW_SIZE; ++i) { move(oldNbRow + i + 1, 0); addchnstr(buffer + (i * MAX_WIDTH), MAX_WIDTH); } }
static void outputAreaNewLine(void) { chtype tmpBuffer[MAX_WIDTH]; int i = 1; for(; i < OUTPUT_AREA_ROW_SIZE; ++i) { move(oldNbRow + i + 1, 0); inchnstr(tmpBuffer, MAX_WIDTH); move(oldNbRow + i, 0); addchnstr(tmpBuffer, MAX_WIDTH); } move(oldNbRow + OUTPUT_AREA_ROW_SIZE, 0); clrtoeol(); }