summaryrefslogtreecommitdiff
path: root/lib/unilbrk/u16-width-linebreaks.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unilbrk/u16-width-linebreaks.c')
-rw-r--r--lib/unilbrk/u16-width-linebreaks.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/unilbrk/u16-width-linebreaks.c b/lib/unilbrk/u16-width-linebreaks.c
index fed5282c..cdf46111 100644
--- a/lib/unilbrk/u16-width-linebreaks.c
+++ b/lib/unilbrk/u16-width-linebreaks.c
@@ -1,5 +1,5 @@
/* Line breaking of UTF-16 strings.
- Copyright (C) 2001-2003, 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This file is free software.
@@ -118,7 +118,10 @@ u16_width_linebreaks_internal (const uint16_t *s, size_t n,
return last_column + piece_width;
}
-#undef u16_width_linebreaks
+#if defined IN_LIBUNISTRING
+/* For backward compatibility with older versions of libunistring. */
+
+# undef u16_width_linebreaks
int
u16_width_linebreaks (const uint16_t *s, size_t n,
@@ -131,6 +134,8 @@ u16_width_linebreaks (const uint16_t *s, size_t n,
o, encoding, -1, p);
}
+#endif
+
int
u16_width_linebreaks_v2 (const uint16_t *s, size_t n,
int width, int start_column, int at_end_columns,