+2003-01-12 Bruno Haible <bruno@clisp.org>
+
+ * linebreak.c (mbs_possible_linebreaks): Return immediately if n = 0.
+ (mbs_width_linebreaks): Likewise.
+
2003-01-12 Bruno Haible <bruno@clisp.org>
* mkdtemp.c: Use the simpler macro names HAVE_STDINT_H,
mbs_possible_linebreaks (const char *s, size_t n, const char *encoding,
char *p)
{
+ if (n == 0)
+ return;
if (is_utf8_encoding (encoding))
u8_possible_linebreaks ((const unsigned char *) s, n, encoding, p);
else
const char *o, const char *encoding,
char *p)
{
+ if (n == 0)
+ return start_column;
if (is_utf8_encoding (encoding))
return u8_width_linebreaks ((const unsigned char *) s, n, width, start_column, at_end_columns, o, encoding, p);
else