CURSES
Brandon S. Allbery KB8JRR/AA
allbery at NCoast.ORG
Fri May 3 11:15:07 AEST 1991
As quoted from <1991May1.192004.25227 at msuinfo.cl.msu.edu> by burroak at convex.cl.msu.edu (newell franks):
+---------------
| I'm having a problem with switch(c) while programming with curses. The keys
| don't function as I thought they should. I am by no means an expert C
|
| c = getch();
| switch(c) {
| case KEY_BACKSPACE:
| case KEY_DOWN: field ++;
+---------------
Dumb question: how did you declare "c"? It should be declared as type
"chtype" (declared by curses.h) --- "char" and "unsigned char" are too short,
as the special keys are given values greater than 256.
++Brandon
--
Me: Brandon S. Allbery Ham: KB8JRR/AA 10m,6m,2m,220,440,1.2
Internet: allbery at NCoast.ORG (restricted HF at present)
Delphi: ALLBERY AMPR: kb8jrr.AmPR.ORG [44.70.4.88]
uunet!usenet.ins.cwru.edu!ncoast!allbery KB8JRR @ WA8BXN.OH
More information about the Comp.unix.programmer
mailing list