ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DDD


From: Russell Shaw
Subject: Re: DDD
Date: Sat, 14 Mar 2015 22:38:22 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0

On 12/03/15 18:19, shaunak saha wrote:
Hi,

We are working on porting GTK port version of DDD. hopefully the first GTK
official release will be done end of this year. Will make a last motif release
before that with few fixes.

I found the bug is in XmTextXYToPos(), and is caused by three unicode copyright (c) chars in my file being displayed in DDD. Each (c) consists of two bytes: 0xc2 0xa9 present in the text buffer of the text_w widget.

XmTextXYToPos() only counts the (c) as one char, even though it's displayed as two chars on the screen.

The same applies for any other non 7-bit-clean unicode bytes in the file.

ddd-3.3.12/ddd/SourceView.C" line 5071

void SourceView::startSelectWordAct (Widget text_w, XEvent* e,
                                     String *params, Cardinal *num_params)
{
#if XtSpecificationRelease < 6
    selection_event = *e;
#endif

    XtCallActionProc(text_w, "grab-focus", e, params, *num_params);

    if (e->type != ButtonPress && e->type != ButtonRelease)
        return;

    XButtonEvent *event = &e->xbutton;

    XmTextPosition pos = XmTextXYToPos (text_w, event->x, event->y);

    XmTextPosition startpos, endpos;

    if (app_data.source_editing)
        startpos = endpos = pos;
    else
        find_word_bounds(text_w, pos, startpos, endpos);

    ...


XmTextXYToPos() is in the debian source from:
  apt-get source libmotif-common

The deb source adds quite a few patches, which could have an effect on the problem, but i couldn't trace into XmTextXYToPos() because of debian library dependencies involved in installing more things from source.

The easy fix was to banish all chars not 7-bit clean from the source being 
debugged.
--
regards,
Russell Shaw, B.Eng, M.Eng(Research)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]