delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / apps / konsole / tests / audit.c
blobbc8a5718d7438d2fe9b6ae6b8367f8979a4bc4bd
1 /*
3 This is a tiny test program that can be used to track down
4 strange effects of the emulation.
6 Make:
8 - gcc -o audit audit.c
10 Usage:
12 - In TEShell.C let syslog be stdout.
13 - konsole > ttt
14 - produce the effect in question.
15 - run this program.
16 pressing any key advances the audit
17 ^C terminates.
19 You need to make sure that the size of the screen matches
20 the one being debugged.
22 This code was written by Lars Doelle <lars.doelle@on-line.de>.
23 This code is in the public domain.
28 #include <stdio.h>
29 #include <termios.h>
30 #include <unistd.h>
32 struct termios save;
33 struct termios curr;
35 #define HERE fprintf(stderr,"%s(%d): here.\n",__FILE__,__LINE__)
37 main()
38 { int cc;
39 FILE* sysin = fopen("ttt","r");
40 tcgetattr(0, &save);
41 tcgetattr(0, &curr);
42 cfmakeraw(&curr);
43 tcsetattr(0, TCSANOW, &curr);
44 cc = fgetc(sysin);
45 while( cc > 0 )
46 { int tmp;
47 while (cc > 0)
49 fputc(cc,stdout); cc = fgetc(sysin);
50 if (cc == 0x1b) break;
52 tmp = fgetc(stdin);
53 if (tmp == 3) break;
55 tcsetattr(0, TCSANOW, &save);