/* Function for special key combinations */
/* (Ctrl, Alt, function keys. */
-int spec(int i)
+void spec(void)
{
-
-
+ int j = getch();
+
+ if ( ( j == 65 ) ) printf("Up ");
+ else if ( ( j == 66 ) ) printf("Down ");
+ else if ( ( j == 67 ) ) printf("Right ");
+ else if ( ( j == 68 ) ) printf("Left ");
+
}
case (1): break; /* Ctrl a */
case (2): break; /* Ctrl b */
- case (3): break; /* Ctrl c */
+ case (3): getch(); spec(); break; /* Ctrl c */
case (4): printf("%c", i); break; /* Printable chars. */
case (5): delch(b); break;
case (6): break;
int type(int i);
-/* Escape-key handling. */
-int spec(int i);
+/* Special key handling. */
+void spec(void);
+
/* Other funcs. */
void readhistory(char *fname);