]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/keynames.c
ncurses 5.3
[ncurses.git] / test / keynames.c
index 827709c45cbeb4987c7350ced21b91677f179957..ee8fac89f9ec921356b4be52e81b6c28f2e3a9af 100644 (file)
@@ -1,14 +1,17 @@
 /*
- * $Id: keynames.c,v 1.1 1997/10/25 18:41:04 tom Exp $
+ * $Id: keynames.c,v 1.4 2002/09/01 19:42:42 tom Exp $
  */
 
 #include <test.priv.h>
 
-int main(int argc, char *argv[])
+int
+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
 {
-       int n;
-       for (n = -1; n < 512; n++) {
-               printf("%d(%5o):%s\n", n, n, keyname(n));
-       }
-       return EXIT_SUCCESS;
+    int n;
+    for (n = -1; n < 512; n++) {
+       char *result = keyname(n);
+       if (result != 0)
+           printf("%d(%5o):%s\n", n, n, result);
+    }
+    ExitProgram(EXIT_SUCCESS);
 }