summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-12-29 20:01:09 +0100
committerBruno Haible <bruno@clisp.org>2021-12-29 20:01:34 +0100
commitb1936b2a75e6ce4f85642836abb71c14800516be (patch)
tree3d20f520e79e214febe4bdbe50c99da94bef5a25 /doc
parent729c31ed79c77b2e670b45fa383a0509eaba66d8 (diff)
downloadlibunistring-b1936b2a75e6ce4f85642836abb71c14800516be.tar.gz
doc: Update for new behaviour of line breaking functions.
* doc/unilbrk.texi (unilbrk.h): Document UC_BREAK_CR_BEFORE_LF. Mention that this value can occur in the array returned by u*_possible_linebreaks and u*_width_linebreaks. * NEWS: Mention the change.
Diffstat (limited to 'doc')
-rw-r--r--doc/unilbrk.texi18
1 files changed, 13 insertions, 5 deletions
diff --git a/doc/unilbrk.texi b/doc/unilbrk.texi
index 91e5863..c068704 100644
--- a/doc/unilbrk.texi
+++ b/doc/unilbrk.texi
@@ -20,6 +20,12 @@ following meanings:
This value indicates that @code{@var{s}[@var{i}]} is a line break character.
@end deftypevr
+@deftypevr Constant int UC_BREAK_CR_BEFORE_LF
+This value is a variant of @code{UC_BREAK_MANDATORY}. It indicates that
+@code{@var{s}[@var{i}]} is a CR character and that @code{@var{s}[@var{i+1}]}
+is a LF character.
+@end deftypevr
+
@deftypevr Constant int UC_BREAK_POSSIBLE
This value indicates that a line break may be inserted between
@code{@var{s}[@var{i}-1]} and @code{@var{s}[@var{i}]}.
@@ -51,8 +57,9 @@ possible.
@deftypefunx void ulc_possible_linebreaks (const@tie{}char@tie{}*@var{s}, size_t@tie{}@var{n}, const@tie{}char@tie{}*@var{encoding}, char@tie{}*@var{p})
Determines the line break points in @var{s}, and stores the result at
@code{@var{p}[0..@var{n}-1]}. Every @code{@var{p}[@var{i}]} is assigned one of
-the values @code{UC_BREAK_MANDATORY}, @code{UC_BREAK_POSSIBLE},
-@code{UC_BREAK_HYPHENATION}, @code{UC_BREAK_PROHIBITED}.
+the values @code{UC_BREAK_MANDATORY}, @code{UC_BREAK_CR_BEFORE_LF},
+@code{UC_BREAK_POSSIBLE}, @code{UC_BREAK_HYPHENATION},
+@code{UC_BREAK_PROHIBITED}.
@end deftypefun
The following functions determine where line breaks should be inserted so that
@@ -82,7 +89,8 @@ The given @var{encoding} is used for disambiguating widths in @code{uc_width}.
Returns the column after the end of the string, and stores the result at
@code{@var{p}[0..@var{n}-1]}. Every @code{@var{p}[@var{i}]} is assigned one of
-the values @code{UC_BREAK_MANDATORY}, @code{UC_BREAK_POSSIBLE},
-@code{UC_BREAK_HYPHENATION}, @code{UC_BREAK_PROHIBITED}. Here the value
-@code{UC_BREAK_POSSIBLE} indicates that a line break @emph{should} be inserted.
+the values @code{UC_BREAK_MANDATORY}, @code{UC_BREAK_CR_BEFORE_LF},
+@code{UC_BREAK_POSSIBLE}, @code{UC_BREAK_HYPHENATION},
+@code{UC_BREAK_PROHIBITED}. Here the value @code{UC_BREAK_POSSIBLE} indicates
+that a line break @emph{should} be inserted.
@end deftypefun