1998-06-08 00:30:55 +00:00

169 lines
3.9 KiB
Plaintext

*** lib/libxview/win/win_input.c~ Tue Oct 8 22:51:45 1996
--- lib/libxview/win/win_input.c Wed Apr 17 02:26:55 1996
***************
*** 854,860 ****
#ifdef X11R6
/* lumpi@dobag.in-berlin.de */
int ksym_pcc;
! XGetKeyboardMapping(display,NoSymbol,0,&ksym_pcc);
for (index = 0; index < ksym_pcc; index++) {
#else
for (index = 0; index < display->keysyms_per_keycode; index++) {
--- 854,862 ----
#ifdef X11R6
/* lumpi@dobag.in-berlin.de */
int ksym_pcc;
! int tc_min_keycode, tc_max_keycode;
! XDisplayKeycodes(display, &tc_min_keycode, &tc_max_keycode);
! XGetKeyboardMapping(display,tc_min_keycode,tc_max_keycode-tc_min_keycode-1,&ksym_pcc);
for (index = 0; index < ksym_pcc; index++) {
#else
for (index = 0; index < display->keysyms_per_keycode; index++) {
***************
*** 862,868 ****
if ((ksym = XLookupKeysym(ek, index)) != NoSymbol)
if (IsKeypadKey(ksym)) {
/* See if key has been rebound. */
! if (!translate_key(display, ksym, ek->state,
buffer, BUFFERSIZE)) {
(void)win_translate_KP_keysym(ksym, buffer);
}
--- 864,870 ----
if ((ksym = XLookupKeysym(ek, index)) != NoSymbol)
if (IsKeypadKey(ksym)) {
/* See if key has been rebound. */
! if (translate_key(display, ksym, ek->state,
buffer, BUFFERSIZE)) {
(void)win_translate_KP_keysym(ksym, buffer);
}
***************
*** 2721,2728 ****
* Xlib's.
*/
! #ifdef X11R6
! /* lumpi@dobag.in-berlin.de */
static int
translate_key(dpy, symbol, modifiers, buffer, nbytes)
Display *dpy;
--- 2723,2732 ----
* Xlib's.
*/
! #ifdef X11R6
! /* lumpi@dobag.in-berlin.de
! tom@sees.bangor.ac.uk this replacement for X11R6 doesn't work. At least
! it should now return sensible values though. */
static int
translate_key(dpy, symbol, modifiers, buffer, nbytes)
Display *dpy;
***************
*** 2732,2742 ****
int nbytes;
{
/* This is _very_ rude ! */
! strcpy(buffer,XKeysymToString(symbol));
}
- #else
static int
translate_key(dpy, symbol, modifiers, buffer, nbytes)
Display *dpy;
--- 2736,2753 ----
int nbytes;
{
/* This is _very_ rude ! */
! char *string;
! string = XKeysymToString(symbol);
! if (string) {
! strncpy(buffer,XKeysymToString(symbol),nbytes);
! return(strlen(buffer));
! }
! else
! return 0;
}
+ #else
static int
translate_key(dpy, symbol, modifiers, buffer, nbytes)
Display *dpy;
***************
*** 2762,2765 ****
}
return 0;
}
! #endif
--- 2773,2776 ----
}
return 0;
}
! #endif
3.
*** lib/libxview/ttysw/tty_mapkey.c~ Tue Jun 29 06:17:20 1993
--- lib/libxview/ttysw/tty_mapkey.c Tue Jan 16 23:58:56 1996
***************
*** 500,506 ****
* have more time.
*/
! #ifdef i386
static void
ttysw_arrow_keys_to_string(xv_id, str)
unsigned xv_id;
--- 500,506 ----
* have more time.
*/
! #if defined(i386) && !defined (__OpenBSD__)
static void
ttysw_arrow_keys_to_string(xv_id, str)
unsigned xv_id;
*** lib/libxview/ttysw/cim_size.c.orig Tue Jun 29 06:17:14 1993
--- lib/libxview/ttysw/cim_size.c Sat Oct 25 00:53:49 1997
***************
*** 156,174 ****
{
if (lines_ptr) {
! cfree((CHAR *) (lines_ptr));
lines_ptr = NULL;
}
if (image) {
! cfree((CHAR **) image);
image = NULL;
}
if (mode_ptr) {
! cfree((char *) (mode_ptr));
mode_ptr = NULL;
}
if (screenmode) {
! cfree((char **) screenmode);
screenmode = NULL;
}
}
--- 156,174 ----
{
if (lines_ptr) {
! free((CHAR *) (lines_ptr));
lines_ptr = NULL;
}
if (image) {
! free((CHAR **) image);
image = NULL;
}
if (mode_ptr) {
! free((char *) (mode_ptr));
mode_ptr = NULL;
}
if (screenmode) {
! free((char **) screenmode);
screenmode = NULL;
}
}