summaryrefslogtreecommitdiff
path: root/dselect/kt.c
diff options
context:
space:
mode:
authorIan Jackson <ian@chiark.chu.cam.ac.uk>1996-04-04 01:58:40 +0100
committerIan Jackson <ian@chiark.chu.cam.ac.uk>1996-04-04 01:58:40 +0100
commit1b80fb16c22db72457d7a456ffbf1f70a8dfc0a5 (patch)
treec0ee53eba4e71f4c246ee9e45fbd90e931bbd1f9 /dselect/kt.c
downloaddpkg-1b80fb16c22db72457d7a456ffbf1f70a8dfc0a5.tar.gz
dpkg (1.1.4); priority=MEDIUM
* Allow overwriting of conflicting packages being removed. (Bug#2614.) * a.out control file says Pre-Depends: libc4 | libc. (Bug#2640.) * ELF control file and libc dependencies changed to use finalised scheme. * ELF control file and libc dependencies for i386 only. (Bug#2617.) * Guidelines say use only released libraries and compilers. * Install wishlist as /usr/doc/dpkg/WISHLIST. * Remove spurious entries for Guidelines in info dir file. * dpkg-deb --build checks permissions on control (DEBIAN) directory. * Spaces in control file fields not copied by dpkg-split. (Bug#2633.) * Spaces in split file part control data ignore. (Bug#2633.) * Portability fixes, including patch from Richard Kettlewell. * Fixed minor configure.in bug causing mangled GCC -W options. -- Ian Jackson <ian@chiark.chu.cam.ac.uk> Thu, 4 Apr 1996 01:58:40 +0100
Diffstat (limited to 'dselect/kt.c')
-rw-r--r--dselect/kt.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/dselect/kt.c b/dselect/kt.c
new file mode 100644
index 000000000..d322c68bf
--- /dev/null
+++ b/dselect/kt.c
@@ -0,0 +1,30 @@
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <ncurses/curses.h>
+
+struct kd { int v; const char *n; } kds[]= {
+#include "curkeys.inc"
+};
+
+int main(int argc, char **argv) {
+ int n=0, c, y,x;
+ struct kd *kdp;
+
+ initscr(); cbreak(); noecho(); nonl();
+ keypad(stdscr,TRUE);
+ getmaxyx(stdscr,y,x);
+ mvprintw(5,5,"q to quit; b to beep; (y%d x%d)",y,x);
+
+ for (;;) {
+ refresh();
+ c= getch(); if (c==ERR) { endwin(); perror("err"); exit(1); }
+ for (kdp=kds; kdp->v != -1 && kdp->v != c; kdp++);
+ n++; mvprintw(10 + (n%4),10,"n %10d keycode %4d %-10s F0 + %4d",n,c,
+ kdp->n ? kdp->n : "<none>", c-KEY_F0);
+ if (c == 'q') break;
+ if (c == 'b') beep();
+ }
+ endwin();
+ return 0;
+}