3 * JDB Module implementing ANSI/vt100 functions
30 #include "jdb_screen.h"
34 Jdb::cursor( Direction d, unsigned n = 1)
36 printf("\033[%u%c", n, (char)d);
42 Jdb::cursor (unsigned int row=0, unsigned int col=0)
45 printf ("\033[%u;%uH", row, col);
47 printf ("\033[%u;%uH", 1, 1);
50 PUBLIC static inline NEEDS[<cstdio>]
52 Jdb::blink_cursor (unsigned int row, unsigned int col)
54 printf ("\033[%d;%df", row, col);
57 PUBLIC static inline NEEDS[<simpleio.h>]
64 PUBLIC static inline NEEDS[<simpleio.h>]
71 PUBLIC static inline NEEDS[<simpleio.h>]
80 Jdb::screen_scroll (unsigned int start, unsigned int end)
83 printf ("\033[%u;%ur", start, end);
88 PUBLIC static inline NEEDS[<simpleio.h>]
95 // preserve the history of the serial console if fancy != 0
98 Jdb::clear_screen(int fancy=FANCY)
102 cursor(Jdb_screen::height(), 1);
103 for (unsigned i=0; i<Jdb_screen::height(); i++)
112 for (unsigned i=0; i<Jdb_screen::height()-1; i++)