Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Save patch for HP-UX
- To: crossfire (at) ifi.uio.no
- Subject: Save patch for HP-UX
- From: "T. Alexander Popiel" <>
- Date: Mon, 08 Feb 1993 12:11:35 -0700
- Cc:
Here is a patch I made to get saving to work on an HP700/RX
xterminal hung off of an HP730 snake, running HP-UX. The
xterminal has a keyboard resembling the IBM-PC clone standard
101-key keyboard. The HP730 console has a traditional HP
keyboard.
Symptoms:
Whenever you save and re-load, the shift keys cause movement.
Specifically, left-shift causes downward movement, and right-
-shift moves you down and to the left. Curiously, this only
affected the xterminals, but not the console display (note the
different keyboards). Also, when reloading, "Old-fasioned
variable" errors appear on STDERR, and if you save multiple
times, the save file gets more and more corrupted.
Solution:
Whenever a keycode would have no symbol, return the string
"(null)" instead of null-string. (I noticed that the save
files on a different platform had these "(null)" strings,
while the HP730 didn't.)
- T. Alexander Popiel <> (Talek)
PS. As a new subscriber to the mailing list, I may not receive
replies to the list immediately. Please bear with me. :-)
*** login.c.old Thu Jan 28 23:41:42 1993
--- login.c Mon Feb 8 11:41:07 1993
***************
*** 127,135 ****
char *keycodetochar(object *pl,KeyCode k) {
KeySym ks=XKeycodeToKeysym(pl->contr->gdisp,k,0);
static char buf[MAX_BUF];
! if(ks==NoSymbol)
! return NULL;
! strcpy(buf,XKeysymToString(ks));
return buf;
}
--- 127,137 ----
char *keycodetochar(object *pl,KeyCode k) {
KeySym ks=XKeycodeToKeysym(pl->contr->gdisp,k,0);
static char buf[MAX_BUF];
! if(ks==NoSymbol) {
! strcpy(buf,"(null)");
! } else {
! strcpy(buf,XKeysymToString(ks));
! }
return buf;
}