~pac72/ubuntu/lucid/ddd/devel

« back to all changes in this revision

Viewing changes to patches/lesstif-0.82.patch

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Schepler
  • Date: 2004-07-22 03:49:37 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040722034937-cysl08t1jvba4jrx
Tags: 1:3.3.9-3
USERINFO has been renamed to USERINFO.txt; adjust debian/rules code
to match, to get correct information on the About DDD dialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: lesstif-0.82.patch,v 1.2 1999/08/19 11:30:11 andreas Exp $
2
 
 
3
 
This file contains a variety of patches for lesstif-0.82.  We suggest
4
 
that these patches be applied (using `patch -l < lesstif-0.82.patch')
5
 
before building LessTif and running DDD with LessTif.
6
 
 
7
 
 
8
 
From zeller Fri Nov 21 19:33:36 1997
9
 
Subject: Modifier mapping trouble in LessTif 0.82, and a patch
10
 
To: lesstif@hungry.com (LessTif Mailing List)
11
 
Date: Fri, 21 Nov 1997 19:33:36 +0100 (MET)
12
 
Cc: bug-ddd@gnu.org (DDD Maintainers)
13
 
X-Organization: TU Braunschweig, Abt. Softwaretechnologie
14
 
X-Postal-Address: Bueltenweg 88, D-38092 Braunschweig, Germany
15
 
X-Telephone: +49 531 391-7580
16
 
X-Fax: +49 531 391-8140
17
 
X-URL: http://www.cs.tu-bs.de/~zeller/
18
 
X-FTP: ftp://ftp.ips.cs.tu-bs.de/pub/local/softech/
19
 
X-Mailer: ELM [version 2.4 PL25]
20
 
Content-Type: text
21
 
Content-Length: 6058      
22
 
Status: RO
23
 
 
24
 
Hi!
25
 
 
26
 
Here's a bug report for LessTif 0.82.
27
 
 
28
 
 
29
 
PROBLEM
30
 
-------
31
 
 
32
 
I run an application (DDD) with accelerators bound to `Meta<Key>X'.
33
 
With OSF/Motif, Alt+X invokes the `Meta<Key>X' accelerator, and `X'
34
 
without modifiers acts like `X'.  With LessTif, this is reversed: I
35
 
was astonished to find that pressing `X' alone already invokes the
36
 
accelerator and pressing Alt+X acts like `X' alone.
37
 
 
38
 
 
39
 
CAUSE
40
 
-----
41
 
 
42
 
LessTif implements a modifier mapping different from OSF/Motif.
43
 
The LessTif model is superior to the OSF/Motif model because it allows 
44
 
applications to distinguish between `Alt' and `Meta' modifiers, and it
45
 
allows people to bind `Alt' and `Meta' to individual Keysyms.  In
46
 
OSF/Motif, at least `Alt' is hard-wired to the Mod1 modifier; I don't
47
 
know about `Meta' treatment, but it might be hard-wired too.
48
 
 
49
 
The problem in my case was that the `Meta' modifier is not bound to
50
 
*any* particular keysym (no `Meta' on my keyboard, only `Alt'), and
51
 
LessTif fails to recognize this.
52
 
 
53
 
 
54
 
DIAGNOSTICS
55
 
-----------
56
 
 
57
 
In `MapEvent.c', the function `_XmMapKeyEvent' determines accelerator
58
 
events.  Here, we find a line that binds modifier keysyms to modifier masks.
59
 
It says:
60
 
 
61
 
    if (evs->event.lateModifiers)
62
 
    {
63
 
        switch (evs->event.lateModifiers->keysym)
64
 
        {
65
 
        case XK_Meta_L:
66
 
        case XK_Meta_R:
67
 
            evs->event.modifiers |= GET_MODIFIER(METAModifier);
68
 
            break;
69
 
    ...
70
 
 
71
 
The problem is that GET_MODIFIER(METAmodifier) returns `0' for a
72
 
non-existing modifier binding, and this special situation is not
73
 
handled by LessTif.  This results in an accelerator being installed
74
 
for a key with _no_ modifiers, instead of no accelerator being
75
 
installed at all.
76
 
 
77
 
 
78
 
CONSEQUENCES
79
 
------------
80
 
 
81
 
The LessTif code should be changed such that:
82
 
 
83
 
1. If a modifier is not bound to a particular keysym, the appropriate
84
 
   accelerator should not be installed.  A diagnostic might be issued.
85
 
2. If `Alt' or `Meta' are not bound to a particular keysym, LessTif
86
 
   should use `Mod1' as default, to simulate the OSF/Motif behaviour.
87
 
 
88
 
 
89
 
PATCH
90
 
-----
91
 
 
92
 
Here's a patch that realizes the consequences.
93
 
 
94
 
--- lesstif-0.82/lib/Xm/MapEvent.c.orig Fri Nov 21 18:35:52 1997
95
 
+++ lesstif-0.82/lib/Xm/MapEvent.c      Fri Nov 21 19:07:40 1997
96
 
@@ -1819,7 +1819,72 @@
97
 
     CompileNameValueTable( mappingNotify );
98
 
 }
99
 
 
100
 
-#define GET_MODIFIER(m_idx) mods[m_idx]
101
 
+
102
 
+/*
103
 
+ * SetLateModifier -- set up the modifier masks for ALT, META, SUPER,
104
 
+ * and HYPER modifier keys.  If the modifier is not bound to a
105
 
+ * particular KeySym, return False; upon success, return True.
106
 
+ *
107
 
+ * For compatibility with the closed software foundation, we treat META
108
 
+ * and ALT as synonyms of Mod1 if not bound to a particular keysym.
109
 
+ */
110
 
+static Boolean 
111
 
+SetLateModifier(Display *display, EventSeqPtr evs)
112
 
+{
113
 
+    if (evs->event.lateModifiers)
114
 
+    {
115
 
+       unsigned long mask = 0;
116
 
+       XmModifierMaskSetReference mods;
117
 
+
118
 
+       mods = _XmGetModifierMappingsForDisplay(display);
119
 
+
120
 
+       switch (evs->event.lateModifiers->keysym)
121
 
+       {
122
 
+        case XK_Meta_L:
123
 
+        case XK_Meta_R:
124
 
+            mask = mods[METAModifier];
125
 
+           if (mask == 0)
126
 
+               mask = Mod1Mask;
127
 
+            break;
128
 
129
 
+        case XK_Alt_L:
130
 
+        case XK_Alt_R:
131
 
+           mask = mods[ALTModifier];
132
 
+           if (mask == 0)
133
 
+               mask = Mod1Mask;
134
 
+            break;
135
 
136
 
+        case XK_Super_L:
137
 
+        case XK_Super_R:
138
 
+           mask = mods[SUPERModifier];
139
 
+            break;
140
 
+
141
 
+        case XK_Hyper_L:
142
 
+        case XK_Hyper_R:
143
 
+           mask = mods[HYPERModifier];
144
 
+           break;
145
 
+
146
 
+       default:
147
 
+           _XmWarning(NULL, "Unknown modifier.\n");
148
 
+           return False;
149
 
+       }
150
 
+
151
 
+       if (mask == 0)
152
 
+       {
153
 
+           /* There is no keysym associated with this modifier. */
154
 
+           /* Should we issue a warning here? -- FIXME */
155
 
+           return False;
156
 
+       }
157
 
+       else
158
 
+       {
159
 
+           evs->event.modifiers |= mask;
160
 
+       }
161
 
+    }
162
 
+
163
 
+    return True;
164
 
+}
165
 
+              
166
 
+              
167
 
 
168
 
 Boolean
169
 
 _XmMapBtnEvent(String str, int *eventType,
170
 
@@ -1827,8 +1892,6 @@
171
 
 {
172
 
     EventSeqPtr evs = NULL;
173
 
     Boolean err = False;
174
 
-    XmModifierMaskSetReference mods =
175
 
-       _XmGetModifierMappingsForDisplay(_XmGetDefaultDisplay());
176
 
 
177
 
     _XmTransParseInit();
178
 
 
179
 
@@ -1848,29 +1911,12 @@
180
 
        _XmWarning(NULL, "Multiple event sequence ignored.\n");
181
 
     }
182
 
 
183
 
-    if (evs->event.lateModifiers)
184
 
+    err = SetLateModifier(_XmGetDefaultDisplay(), evs);
185
 
+    if (err)
186
 
     {
187
 
-       switch (evs->event.lateModifiers->keysym)
188
 
-       {
189
 
-        case XK_Meta_L:
190
 
-        case XK_Meta_R:
191
 
-            evs->event.modifiers |= GET_MODIFIER(METAModifier);
192
 
-            break;
193
 
194
 
-        case XK_Alt_L:
195
 
-        case XK_Alt_R:
196
 
-           evs->event.modifiers |= GET_MODIFIER(ALTModifier);
197
 
-            break;
198
 
199
 
-        case XK_Super_L:
200
 
-        case XK_Super_R:
201
 
-           evs->event.modifiers |= GET_MODIFIER(SUPERModifier);
202
 
-            break;
203
 
+       FreeEventSeq(evs);
204
 
 
205
 
-        case XK_Hyper_L:
206
 
-        case XK_Hyper_R:
207
 
-           evs->event.modifiers |= GET_MODIFIER(HYPERModifier);
208
 
-       }
209
 
+       return False;
210
 
     }
211
 
 
212
 
     PrintEventSeq(evs);
213
 
@@ -1899,8 +1945,6 @@
214
 
 {
215
 
     EventSeqPtr evs = NULL;
216
 
     Boolean err = False;
217
 
-    XmModifierMaskSetReference mods =
218
 
-       _XmGetModifierMappingsForDisplay(_XmGetDefaultDisplay());
219
 
 
220
 
     _XmTransParseInit();
221
 
 
222
 
@@ -1920,29 +1964,12 @@
223
 
        _XmWarning(NULL, "Multiple event sequence ignored.\n");
224
 
     }
225
 
 
226
 
-    if (evs->event.lateModifiers)
227
 
+    err = SetLateModifier(_XmGetDefaultDisplay(), evs);
228
 
+    if (err)
229
 
     {
230
 
-       switch (evs->event.lateModifiers->keysym)
231
 
-       {
232
 
-        case XK_Meta_L:
233
 
-        case XK_Meta_R:
234
 
-            evs->event.modifiers |= GET_MODIFIER(METAModifier);
235
 
-            break;
236
 
237
 
-        case XK_Alt_L:
238
 
-        case XK_Alt_R:
239
 
-           evs->event.modifiers |= GET_MODIFIER(ALTModifier);
240
 
-            break;
241
 
242
 
-        case XK_Super_L:
243
 
-        case XK_Super_R:
244
 
-           evs->event.modifiers |= GET_MODIFIER(SUPERModifier);
245
 
-            break;
246
 
+       FreeEventSeq(evs);
247
 
 
248
 
-        case XK_Hyper_L:
249
 
-        case XK_Hyper_R:
250
 
-           evs->event.modifiers |= GET_MODIFIER(HYPERModifier);
251
 
-       }
252
 
+       return False;
253
 
     }
254
 
 
255
 
     PrintEventSeq(evs);
256
 
 
257
 
Andreas Zeller     Technische Universitaet Braunschweig, Germany
258
 
                   mailto:zeller@acm.org http://www.cs.tu-bs.de/~zeller/
259
 
 
260
 
From zeller Fri Nov 21 19:42:35 1997
261
 
Date: Fri, 21 Nov 97 19:42:35 XXX
262
 
From: Andreas Zeller <zeller@gnu.org>
263
 
MIME-Version: 1.0
264
 
Content-Type: multipart/mixed; boundary="D0Fi1SCUe6"
265
 
Content-Transfer-Encoding: 7bit
266
 
To: DDD Maintainers <bug-ddd@gnu.org>
267
 
Subject: RE: Modifier mapping trouble in LessTif 0.82, and a patch
268
 
X-Mailer: VM 6.34 under 20.3 "Chisinau" XEmacs  Lucid
269
 
Status: RO
270
 
 
271
 
 
272
 
--D0Fi1SCUe6
273
 
Content-Type: text/plain; charset=us-ascii
274
 
Content-Transfer-Encoding: 7bit
275
 
 
276
 
Miers, Mitch <mlm@dsc.com> says:
277
 
 
278
 
 
279
 
--D0Fi1SCUe6
280
 
Content-Type: message/rfc822
281
 
Content-Transfer-Encoding: 7bit
282
 
 
283
 
Received: from gypsum.dsc.com (gypsum.dsc.com [192.146.147.185]) by infbssys.ips.cs.tu-bs.de with SMTP id UAA03525
284
 
  (8.8.7/IDA-1.6 for <zeller@gnu.org>); Fri, 21 Nov 1997 20:39:12 +0100
285
 
Received: by gypsum.dsc.com with SMTP (Microsoft Exchange Server Internet Mail Connector Version 4.0.995.52)
286
 
        id <01BCF672.1EDA7830@gypsum.dsc.com>; Fri, 21 Nov 1997 11:39:26 -0800
287
 
Message-ID: <c=US%a=_%p=DSC%l=GYPSUM-971121193924Z-41804@gypsum.dsc.com>
288
 
X-Mailer:  Microsoft Exchange Server Internet Mail Connector Version 4.0.995.52
289
 
MIME-Version: 1.0
290
 
Content-Type: text/plain; charset="us-ascii"
291
 
From: "Miers, Mitch" <mlm@dsc.com>
292
 
To: "'lesstif@Hungry.COM'" <lesstif@Hungry.COM>,
293
 
        "'Andreas Zeller'"
294
 
         <zeller@gnu.org>
295
 
Subject: RE: Modifier mapping trouble in LessTif 0.82, and a patch
296
 
Date: Fri, 21 Nov 1997 11:39:24 -0800
297
 
 
298
 
 
299
 
Nice patch.  It never occurred to me that this would be a problem:(
300
 
 
301
 
>PROBLEM
302
 
>-------
303
 
>
304
 
>I run an application (DDD) with accelerators bound to `Meta<Key>X'.
305
 
>With OSF/Motif, Alt+X invokes the `Meta<Key>X' accelerator, and `X'
306
 
>without modifiers acts like `X'.  With LessTif, this is reversed: I
307
 
>was astonished to find that pressing `X' alone already invokes the
308
 
>accelerator and pressing Alt+X acts like `X' alone.
309
 
[deletia]
310
 
>Andreas Zeller     Technische Universitaet Braunschweig, Germany
311
 
>                   mailto:zeller@acm.org http://www.cs.tu-bs.de/~zeller/
312
 
>
313
 
 
314
 
Thanks, the patch has been installed.  This might also address
315
 
jdassen@wi.leidenuniv.nl's problem (or maybe not):
316
 
 
317
 
Unlike DDD [*] 2.1.1, DDD 2.2 (recently released) isn't useable with
318
 
LessTif
319
 
0.81 and 0.82 under Linux currently: it builds, but its debugger console
320
 
doesn't respond to keyboard input or menu clicks.
321
 
 
322
 
Mitch
323
 
 
324
 
 
325
 
--D0Fi1SCUe6
326
 
Content-Type: text/plain; charset=us-ascii
327
 
Content-Transfer-Encoding: 7bit
328
 
 
329
 
 
330
 
Andreas Zeller
331
 
 
332
 
--D0Fi1SCUe6--
333
 
 
334
 
From zeller Fri Nov 21 22:53:02 1997
335
 
Subject: TextOut.c:DrawAll draws too much
336
 
To: lesstif@hungry.com (LessTif Mailing List)
337
 
Date: Fri, 21 Nov 1997 22:53:02 +0100 (MET)
338
 
X-Organization: TU Braunschweig, Abt. Softwaretechnologie
339
 
X-Postal-Address: Bueltenweg 88, D-38092 Braunschweig, Germany
340
 
X-Telephone: +49 531 391-7580
341
 
X-Fax: +49 531 391-8140
342
 
X-URL: http://www.cs.tu-bs.de/~zeller/
343
 
X-FTP: ftp://ftp.ips.cs.tu-bs.de/pub/local/softech/
344
 
X-Mailer: ELM [version 2.4 PL25]
345
 
Content-Type: text
346
 
Content-Length: 791       
347
 
Status: RO
348
 
 
349
 
Hi!
350
 
 
351
 
The function `TextOut.c::DrawAll' in LessTif 0.82 draws too many
352
 
lines.  The main loop goes from 0 to Out_Rows(o), which is the number
353
 
of lines shown; the actual text may have less lines.  When accessing
354
 
the non-existent bogus lines, various effects can be observed.
355
 
 
356
 
Here is a patch:
357
 
 
358
 
--- lesstif-0.82/lib/Xm/TextOut.c.orig  Fri Nov 21 22:42:33 1997
359
 
+++ lesstif-0.82/lib/Xm/TextOut.c       Fri Nov 21 22:43:19 1997
360
 
@@ -532,7 +532,8 @@
361
 
        }
362
 
     }
363
 
 
364
 
-    for (i = 0; i < Out_Rows(o) /*Text_LineCount(w)*/; i++)
365
 
+    for (i = 0; i < (Text_LineCount(w) < Out_Rows(o) ?
366
 
+                    Text_LineCount(w) : Out_Rows(o)); i++)
367
 
     {
368
 
        Line line = &Text_Line(w)[i];
369
 
        Line next = &Text_Line(w)[i + 1];
370
 
 
371
 
 
372
 
Andreas Zeller     Technische Universitaet Braunschweig, Germany
373
 
                   mailto:zeller@acm.org http://www.cs.tu-bs.de/~zeller/
374
 
 
375
 
From zeller Sat Nov 22 01:18:57 1997
376
 
Subject: XmTextXYToPos() is broken in LessTif 0.82, and a patch
377
 
To: lesstif@hungry.com (LessTif Mailing List)
378
 
Date: Sat, 22 Nov 1997 01:18:57 +0100 (MET)
379
 
X-Organization: TU Braunschweig, Abt. Softwaretechnologie
380
 
X-Postal-Address: Bueltenweg 88, D-38092 Braunschweig, Germany
381
 
X-Telephone: +49 531 391-7580
382
 
X-Fax: +49 531 391-8140
383
 
X-URL: http://www.cs.tu-bs.de/~zeller/
384
 
X-FTP: ftp://ftp.ips.cs.tu-bs.de/pub/local/softech/
385
 
X-Mailer: ELM [version 2.4 PL25]
386
 
Content-Type: text
387
 
Content-Length: 1093      
388
 
Status: RO
389
 
 
390
 
Hi!
391
 
 
392
 
 
393
 
PROBLEM:
394
 
 
395
 
In LessTif 0.82, the function XmTextXYToPos() frequently returns bogus
396
 
positions - the positions returned is the position of the first
397
 
character in the line.
398
 
 
399
 
 
400
 
CAUSE:
401
 
 
402
 
The problem is due to an incomplete implementation in
403
 
TextOut.c:XToPos().  The function references a `Line' member
404
 
`past_end'; if `past_end' is non-zero, the function always returns the
405
 
first position of the line.  However, `past_end' member are never
406
 
initialized in the current LessTif version.
407
 
 
408
 
 
409
 
PATCH:
410
 
 
411
 
The following patch fixes the problem.
412
 
 
413
 
--- lesstif-0.82/lib/Xm/TextOut.c.orig  Fri Nov 21 22:42:33 1997
414
 
+++ lesstif-0.82/lib/Xm/TextOut.c       Sat Nov 22 01:06:47 1997
415
 
@@ -718,10 +718,6 @@
416
 
     {
417
 
        end = Text_LastPos(w);  /* Avoid PASTENDPOS */
418
 
     }
419
 
-    else if (next->past_end)           /* There's nothing there ... */
420
 
-    {
421
 
-       end = start;                    /* FIXME - this is probably wrong */
422
 
-    }
423
 
     else
424
 
     {
425
 
        end = next->start - 1;
426
 
 
427
 
 
428
 
ALTERNATIVE SOLUTION:
429
 
 
430
 
Initialize `past_end' values to something meaningful.
431
 
 
432
 
 
433
 
Andreas Zeller     Technische Universitaet Braunschweig, Germany
434
 
                   mailto:zeller@acm.org http://www.cs.tu-bs.de/~zeller/
435
 
 
436
 
From zeller Wed Dec  3 10:05:25 1997
437
 
Date: Wed, 3 Dec 97 10:05:25 XXX
438
 
From: Andreas Zeller <zeller@gnu.org>
439
 
MIME-Version: 1.0
440
 
Content-Type: text/plain; charset=us-ascii
441
 
Content-Transfer-Encoding: 7bit
442
 
To: LessTif Mailing List <lesstif@hungry.com>
443
 
Subject: XmStringGetNextComponent returns bad values, and a fix
444
 
X-Mailer: VM 6.34 under 20.3 "Vatican City" XEmacs  Lucid
445
 
Status: RO
446
 
 
447
 
Hi!
448
 
 
449
 
In LessTif 0.82, XmStringGetNextComponent() returns TAG values in the
450
 
TEXT parameter, and vice versa.  Here's a patch:
451
 
 
452
 
--- lesstif-0.82/lib/Xm/XmString.c.orig     Wed Dec  3 10:50:46 1997
453
 
+++ lesstif-0.82/lib/Xm/XmString.c  Wed Dec  3 10:54:34 1997
454
 
@@ -3567,7 +3567,7 @@
455
 
        case XmSTRING_COMPONENT_CHARSET:
456
 
            if (r->data)
457
 
            {
458
 
-               *text = XtNewString(r->data);
459
 
+               *tag = XtNewString(r->data);
460
 
            }
461
 
            break;
462
 
 
463
 
@@ -3575,7 +3575,7 @@
464
 
        case XmSTRING_COMPONENT_LOCALE_TEXT:
465
 
            if (r->data)
466
 
            {
467
 
-               *tag = XtNewString(r->data);
468
 
+               *text = XtNewString(r->data);
469
 
            }
470
 
            break;
471
 
 
472
 
 
473
 
Greetings,
474
 
 
475
 
 
476
 
Andreas Zeller
477
 
 
478
 
From zeller Wed Dec  3 11:36:36 1997
479
 
Date: Wed, 3 Dec 97 11:36:36 XXX
480
 
From: Andreas Zeller <zeller@gnu.org>
481
 
MIME-Version: 1.0
482
 
Content-Type: text/plain; charset=us-ascii
483
 
Content-Transfer-Encoding: 7bit
484
 
To: LessTif Mailing List <lesstif@hungry.com>
485
 
Subject: XmStringPeekNextComponent returns bad value, and a fix
486
 
X-Mailer: VM 6.34 under 20.3 "Vatican City" XEmacs  Lucid
487
 
Status: RO
488
 
 
489
 
Hi!
490
 
 
491
 
In LessTif 0.82, XmStringPeekNextComponent() returns
492
 
XmSTRING_COMPONENT_UNKNOWN when reading beyond the end of an XmString;
493
 
however, in this case, XmStringGetNextComponent() returns
494
 
XmSTRING_COMPONENT_END, and so should XmStringPeekNextComponent().
495
 
Here's a fix:
496
 
 
497
 
--- lesstif-0.82/lib/Xm/XmString.c.orig     Wed Dec  3 10:50:46 1997
498
 
+++ lesstif-0.82/lib/Xm/XmString.c  Wed Dec  3 12:32:18 1997
499
 
@@ -3619,7 +3619,7 @@
500
 
     }
501
 
     else
502
 
     {
503
 
-       return XmSTRING_COMPONENT_UNKNOWN;
504
 
+       return XmSTRING_COMPONENT_END;
505
 
     }
506
 
 }
507
 
 
508
 
Andreas Zeller
509
 
 
510
 
From zeller Wed Dec  3 13:56:53 1997
511
 
Subject: XmTextInsert does not invoke ValueChanged callback, and a fix
512
 
To: lesstif@hungry.com (LessTif Mailing List)
513
 
Date: Wed, 3 Dec 1997 13:56:53 +0100 (MET)
514
 
X-Organization: TU Braunschweig, Abt. Softwaretechnologie
515
 
X-Postal-Address: Bueltenweg 88, D-38092 Braunschweig, Germany
516
 
X-Telephone: +49 531 391-7580
517
 
X-Fax: +49 531 391-8140
518
 
X-URL: http://www.cs.tu-bs.de/~zeller/
519
 
X-FTP: ftp://ftp.ips.cs.tu-bs.de/pub/local/softech/
520
 
X-Mailer: ELM [version 2.4 PL25]
521
 
Content-Type: text
522
 
Content-Length: 626       
523
 
Status: RO
524
 
 
525
 
Hi!
526
 
 
527
 
In LessTif 0.82, XmTextInsert() does not invoke
528
 
XmNvalueChangedCallback, although Motif doc says it does so.
529
 
 
530
 
Here's a patch:
531
 
 
532
 
--- lesstif-0.82/lib/Xm/Text.c.orig Wed Dec  3 13:53:31 1997
533
 
+++ lesstif-0.82/lib/Xm/Text.c      Wed Dec  3 13:53:36 1997
534
 
@@ -1459,7 +1459,7 @@
535
 
     endret = position;
536
 
 
537
 
     st = (*Text_Source(w)->Replace) (tw, evp, &startret, &endret,
538
 
-                                    &block, False);
539
 
+                                    &block, True);
540
 
     /* FIX ME ?? */
541
 
 
542
 
     RefigureLines(tw);
543
 
 
544
 
 
545
 
Andreas Zeller     Technische Universitaet Braunschweig, Germany
546
 
                   mailto:zeller@acm.org http://www.cs.tu-bs.de/~zeller/
547
 
 
548
 
From zeller Wed Dec  3 16:02:23 1997
549
 
Subject: _XmTextNextX() does not handle 8-bit characters, and a patch
550
 
To: lesstif@hungry.com (LessTif Mailing List)
551
 
Date: Wed, 3 Dec 1997 16:02:23 +0100 (MET)
552
 
Cc: bug-ddd@gnu.org (DDD Maintainers)
553
 
X-Organization: TU Braunschweig, Abt. Softwaretechnologie
554
 
X-Postal-Address: Bueltenweg 88, D-38092 Braunschweig, Germany
555
 
X-Telephone: +49 531 391-7580
556
 
X-Fax: +49 531 391-8140
557
 
X-URL: http://www.cs.tu-bs.de/~zeller/
558
 
X-FTP: ftp://ftp.ips.cs.tu-bs.de/pub/local/softech/
559
 
X-Mailer: ELM [version 2.4 PL25]
560
 
Content-Type: text
561
 
Content-Length: 683       
562
 
Status: RO
563
 
 
564
 
Hi!
565
 
 
566
 
In LessTif 0.82, the function _XmTextNextX() in TextOut.c returns bad
567
 
values for characters outside the range 0..127.  In the Text widget,
568
 
this results in forced line wraps at non-ASCII characters.
569
 
 
570
 
Here's a patch:
571
 
 
572
 
--- lesstif-0.82/lib/Xm/TextOut.c.orig      Fri Nov 21 22:42:33 1997
573
 
+++ lesstif-0.82/lib/Xm/TextOut.c   Wed Dec  3 15:56:55 1997
574
 
@@ -629,9 +629,9 @@
575
 
 
576
 
     while (len > 0)
577
 
     {
578
 
-       char c;
579
 
+       unsigned int c;
580
 
 
581
 
-       c = *ptr;
582
 
+       c = (unsigned char)*ptr;
583
 
        if (c == '\t')
584
 
        {
585
 
            x = Out_NextTabStop(o, x);
586
 
 
587
 
 
588
 
Greetings,
589
 
 
590
 
Andreas Zeller     Technische Universitaet Braunschweig, Germany
591
 
                   mailto:zeller@acm.org http://www.cs.tu-bs.de/~zeller/
592