Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Russell Shaw <rjshaw@netspace.net.au>
To: ddd@gnu.org, "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: DDD
Date: Sat, 14 Mar 2015 11:38:00 -0000	[thread overview]
Message-ID: <55041DAE.1060401@netspace.net.au> (raw)
In-Reply-To: <CAKw9LJnXeee=KQDWZBfNG7hqF05isNJr3ZR_yHrui9-OT9QAcQ@mail.gmail.com>

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)


      parent reply	other threads:[~2015-03-14 11:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 14:24 DDD Russell Shaw
2015-03-11 16:23 ` DDD vose
     [not found] ` <CALeOzZ_Zk1hfMbkC37qLe7fDHxkie2w33f=RuvW_YU6u8WPXXw@mail.gmail.com>
2015-03-12 14:13   ` DDD Russell Shaw
     [not found] ` <55011D85.8070700@uns.ac.rs>
     [not found]   ` <CAKw9LJnXeee=KQDWZBfNG7hqF05isNJr3ZR_yHrui9-OT9QAcQ@mail.gmail.com>
2015-03-14 11:38     ` Russell Shaw [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55041DAE.1060401@netspace.net.au \
    --to=rjshaw@netspace.net.au \
    --cc=ddd@gnu.org \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox