changeset 208:6c5d136b6e6a

Use curses KEY_F(n) macros for defining function keys instead of hardcoded values.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 20 Nov 2010 21:15:53 +0200
parents e0c085426b91
children e1bfd5227a24
files nnchat.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/nnchat.c	Sat Nov 20 21:15:06 2010 +0200
+++ b/nnchat.c	Sat Nov 20 21:15:53 2010 +0200
@@ -1289,17 +1289,17 @@
                 update = TRUE;
                 break;
             
-            case 0x10a: /* F2 = Clear editbuffer */
+            case KEY_F(2): /* F2 = Clear editbuffer */
                 nn_editbuf_clear(editBuf);
                 update = TRUE;
                 break;
 
-            case 0x10d: /* F5 = Ignore mode */
+            case KEY_F(5): /* F5 = Ignore mode */
                 setIgnoreMode = !setIgnoreMode;
                 printMsg("Ignore mode = %s\n", setIgnoreMode ? "ON" : "OFF");
                 break;
             
-            case 0x10f: /* F7 = Clear PRV target */
+            case KEY_F(7): /* F7 = Clear PRV target */
                 if (setTarget) {
                     printMsg("Cleared PRV target.\n");
                     setPrvMode = FALSE;
@@ -1309,7 +1309,7 @@
                 }
                 break;
 
-            case 0x110: /* F8 = switch between PRV */
+            case KEY_F(8): /* F8 = switch between PRV */
                 if (setPrvMode)
                     setPrvMode = FALSE;
                 else {
@@ -1320,7 +1320,7 @@
                 break;
             
             case 0x03: /* ^C = quit */
-            case 0x111: /* F9 = Quit */
+            case KEY_F(9): /* F9 = Quit */
                 printMsg("Quitting per user request.\n");
                 exitProg = TRUE;
                 break;