Merge branch 'pu'
[jungerl.git] / lib / slang / demo / ex2.c
blobbbfa980bda05439b243a51312f4e0820a5aa3044
1 #include <stdio.h>
2 #include <slang.h>
4 int main ()
6 int abort_char = 7; /* For MSDOS, use 34 as scan code */
7 unsigned int ch;
9 if (-1 == SLang_init_tty (abort_char, 0, 1))
11 fprintf (stderr, "Unable to initialize the terminal.\n");
12 exit (-1);
14 SLang_set_abort_signal (NULL);
16 fflush (stdout);
18 ch = SLang_getkey ();
20 printf("<< %c >> %d ",ch, SLang_Error);
22 SLang_reset_tty ();
23 return 0;