summaryrefslogtreecommitdiff
path: root/x11/xview-lib/patches/patch-ae
blob: 812a9d8525b24d95dc1683db03ae21469783e785 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
*** 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 (__FreeBSD__)
  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;
      }
  }