[Top][All Lists]

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

Re: [Bug-gnulib] addition: linebreak.h, linebreak.c

From: Jim Meyering
Subject: Re: [Bug-gnulib] addition: linebreak.h, linebreak.c
Date: Fri, 04 Apr 2003 15:08:27 +0200

Bruno Haible <address@hidden> wrote:
> I propose to add the internationalized line breaking engine from GNU
> gettext to gnulib. Unlike the "break at spaces" heuristic which
> doesn't work for Chinese text, this code - an implementation of the
> Unicode line breaking algorithm - works for most languages of the
> world. (Still a south-east Asian language is not supported for which
> I'd need a free dictionary.)
> I want to put it into gnulib in the hope that it will be used e.g. as
> an alternative algorithm (option -U, --unicode) of 'fmt' in coreutils.

Sounds like a fine idea.
I prefer to avoid adding short-named options, unless it's to
provide compatibility with some existing implementation.

> The file defines the functions in 3 variants, for UTF-8, UTF-16 and
> UCS-4 strings; I usually comment out two of them through "#if 0"
> in order to reduce the size of the generated executables.
> Furthermore a fourth variant, which works on multibyte strings
> (implemented via iconv on top of the UTF-8 code). It is the latter
> which most programs use.
> Speak up if you have objections!

No objection, but some of those lines are too long ;-)
Would you please ensure that the max line length doesn't exceed 80?

> extern void u8_possible_linebreaks (const unsigned char *s, size_t n, const 
> char *encoding, char *p);
> extern int u8_width_linebreaks (const unsigned char *s, size_t n, int width, 
> int start_column, int at_end_columns, const char *o, const char *encoding, 
> char *p);

reply via email to

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