slang-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: unicode (was Re: Minor error message change)


On Fri, 30 May 2003, John E. Davis wrote:

> On Thu, 29 May 2003 16:40:18 -0400 (EDT), Pavel Roskin <proski@xxxxxxx> said:
> >I don't program in s-lang, so I cannot comment in details on the strlen
> >proposal.  I think that is needed is the width of the text as it appears
> >on the terminal.  Wide glyphs should count as 2.
>
> For jed, that is not what one wants.  Movement through the buffer is
> implemented in terms of characters (not bytes).  The displayable
> representation is a different issue altogether that rarely enters into
> the use of the strlen function.  Also, if strlen returned the width,
> then what is the width of a tab?

OK.  I'm searching slang-1.4.9 for the "strlen" function in *.sl files.
The first one I find is in smg.sl:

static define draw_centered_string (s, r, c, dc)
{
   variable len;

   len = strlen (s);
   smg_gotorc (r, c + (dc - len)/2);
   smg_write_string (s);
}

Need I say more?  I guess most users don't use Tab in the output.

Thank you for your replies.  I think we are losing an excellent chance to
do things right.  On the other hand, S-Lang will be in compatible with the
existing hacks by Debian and Red Hat, as well as with ncurses.  I hope you
understand the implications and I don't want to start another holy war.  I
guess I'll have to swallow it or make things right, and I only have time
for the former :-(

-- 
Regards,
Pavel Roskin


[2003 date index] [2003 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]