diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 4aed2c8219774f5d797760606b8489a92ddc5163 (patch) | |
tree | 3f8c130f7d269626bf6a9447407ef6c35954426a /konsole/tests/audit.c | |
download | tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konsole/tests/audit.c')
-rw-r--r-- | konsole/tests/audit.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/konsole/tests/audit.c b/konsole/tests/audit.c new file mode 100644 index 000000000..7a98e9b30 --- /dev/null +++ b/konsole/tests/audit.c @@ -0,0 +1,53 @@ +/* + + This is a tiny test program that can be used to track down + strange effects of the emulation. + + Make: + + - gcc -o audit audit.c + + Usage: + + - In TEShell.C let syslog be stdout. + - konsole > ttt + - produce the effect in question. + - run this program. + pressing any key advances the audit + ^C terminates. + + You need to make sure that the size of the screen matches + the one being debugged. + +*/ + + +#include <stdio.h> +#include <termios.h> +#include <unistd.h> + +struct termios save; +struct termios curr; + +#define HERE fprintf(stderr,"%s(%d): here.\n",__FILE__,__LINE__) + +main() +{ int cc; + FILE* sysin = fopen("ttt","r"); + tcgetattr(0, &save); + tcgetattr(0, &curr); + cfmakeraw(&curr); + tcsetattr(0, TCSANOW, &curr); + cc = fgetc(sysin); + while( cc > 0 ) + { int tmp; + while (cc > 0) + { + fputc(cc,stdout); cc = fgetc(sysin); + if (cc == 0x1b) break; + } + tmp = fgetc(stdin); + if (tmp == 3) break; + } + tcsetattr(0, TCSANOW, &save); +} |