static int tst_display(MENU_ARGS) { int d, c = -1; vt_move(1, 1); display_head(stdout); println(""); println("Press any key to display its soft-character. Repeat a key to quit."); set_tty_raw(TRUE); set_tty_echo(FALSE); do { d = c; c = inchar(); vt_move(6, 1); vt_clear(0); if (display_char(stdout, c)) { println(""); printf("Render: %cN%c", ESC, c); /* use SS2 to invoke G2 into GL */ } } while (c != d); restore_ttymodes(); return MENU_NOHOLD; }
int sapin(int n) { int max_stars; max_stars = my_max_stars(n); display_head(max_stars); if (n > 1) display_body(n, max_stars); display_trunk(n, max_stars); return (0); }