| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function ansi_clear_screen() { |
| print("\033[1;1H\033[J") |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function ansi_set_color(fg:long) { |
| printf("\033[%dm", fg) |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function ansi_set_color(fg:long, bg:long) { |
| printf("\033[%d;%dm", bg, fg) |
| } |
| function ansi_set_color2(fg:long, bg:long) { |
| ansi_set_color(fg, bg); |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function ansi_set_color(fg:long, bg:long, attr:long) { |
| attr_str = attr ? sprintf(";%dm", attr) : "m" |
| printf("\033[%d;%d%s", bg, fg, attr_str) |
| } |
| function ansi_set_color3(fg:long, bg:long, attr:long) { |
| ansi_set_color(fg, bg, attr); |
| } |
| |
| |
| |
| |
| |
| |
| |
| function ansi_reset_color() { |
| ansi_set_color(0, 0, 0) |
| } |
| |
| |
| |
| |
| |
| |
| function ansi_new_line() { |
| printf("\12") |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function ansi_cursor_move(x:long, y:long) { |
| printf("\033[%d;%dH", y, x) |
| } |
| |
| |
| |
| |
| |
| |
| function ansi_cursor_hide() { |
| print("\033[>5I") |
| } |
| |
| |
| |
| |
| |
| |
| function ansi_cursor_save() { |
| print("\033[s") |
| } |
| |
| |
| |
| |
| |
| |
| |
| function ansi_cursor_restore() { |
| print("\033[u") |
| } |
| |
| |
| |
| |
| |
| |
| function ansi_cursor_show() { |
| print("\033[>5h") |
| } |