From mint-bounce@lists.fishpool.fi  Sun Sep 27 06:22:21 2009
X-Envelope-From: Gerhard_Stoll@b.maus.de
X-Envelope-To: <mint@fishpool.com>
From: Gerhard_Stoll@b.maus.de (Gerhard Stoll)
To: mint@fishpool.com
Subject: [MiNT] Highwire coding question
Message-ID: <200909271131.p45602@b.maus.de>
In-Reply-To: <00557bc7.019636d61d91@smtp.freeola.net>
Date: Sun, 27 Sep 2009 11:31:00 +0200
Organization: MAUS Berlin (+49-30-82701142)
X-Gateway: b.maus.de gb1.1r 102698.1858
X-Gateway-Administrator: postmaster@b.maus.de
Lines: 37
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-to: mint-bounce@lists.fishpool.fi
X-original-sender: Gerhard_Stoll@b.maus.de
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-Id: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>
List-subscribe: <mailto:mint-request@lists.fishpool.fi?Subject=subscribe>
List-owner: <mailto:tjhukkan@fishpool.fi>
List-post: <mailto:mint@lists.fishpool.fi>

> So would it help to search the original string rather than try to copy
> a piece of it ?

Yes

Is not perfect, but this part work for ctrl+cursor
right.-------------------------------cut-------------------------------
WORD i;
WCHAR ** text = input->TextArray;
WCHAR  * beg  = text[ form->TextCursrY ] + form->TextCursrX;

i = 0;
while (1)
{
  if ( *beg == ' ' )
  {
    scrl = ++i;
    break;
  }
  else if (*beg == '\n' )
    {           /* this work not very good. */
      scrl = -form->TextCursrX;
      lift = +1;
      line = -2;
    }
  else if ( *beg == '\0' )
      {
        word = NULL;
        break;
      }
  beg++;
  i++;
}
-------------------------------cut-------------------------------

Gerhard


