]> git.ipfire.org Git - thirdparty/newt.git/blame - showchars.c
install python modules to purelib and platlib
[thirdparty/newt.git] / showchars.c
CommitLineData
139f06bc 1#include <slang.h>
6fb96a3f 2
3void printall(int offset) {
4 int n = 0;
5 int i, j;
6
7 SLsmg_gotorc(0, offset);
8 SLsmg_write_string(" 0 1 2 3 4 5 6 7 8 9 A B C D E F");
9 for (i = 0; i < 16; i++) {
6f481af2 10 SLsmg_gotorc(i + 1, offset);
11 SLsmg_printf("%x", i);
12 for (j = 0; j < 16; j++) {
13 SLsmg_gotorc(i + 1, (j + 1) * 2 + offset);
14 SLsmg_write_char(n++);
15 }
6fb96a3f 16 }
17}
18
19int main(void) {
6fb96a3f 20 SLtt_get_terminfo();
21
22 SLtt_Use_Ansi_Colors = 1;
23
24 SLsmg_init_smg();
25 SLang_init_tty(4, 0, 0);
26
27 SLsmg_cls();
28
29 printall(0);
30 SLsmg_set_char_set(1);
31 printall(40);
32
33 SLsmg_refresh();
34 SLang_getkey();
35
36 SLsmg_gotorc(SLtt_Screen_Rows - 1, 0);
37 SLsmg_refresh();
38 SLsmg_reset_smg();
39 SLang_reset_tty();
40
41 return 0;
42}