summaryrefslogtreecommitdiff
path: root/lib/uniwbrk
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:33 +0100
committerJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:33 +0100
commit5f59a34ab747dde8ede7357f3431bf06bd6002fe (patch)
tree056a4477fd870d454d5be5868cddab829a47f4d2 /lib/uniwbrk
parent27dae84ed92f1ef0300263091972338d12e78348 (diff)
New upstream version 1.4.2upstream/1.4.2upstream
Diffstat (limited to 'lib/uniwbrk')
-rw-r--r--lib/uniwbrk/u-wordbreaks.h2
-rw-r--r--lib/uniwbrk/u16-wordbreaks.c2
-rw-r--r--lib/uniwbrk/u32-wordbreaks.c2
-rw-r--r--lib/uniwbrk/u8-wordbreaks.c8
-rw-r--r--lib/uniwbrk/ulc-wordbreaks.c19
-rw-r--r--lib/uniwbrk/wbrktable.c2
-rw-r--r--lib/uniwbrk/wbrktable.h2
-rw-r--r--lib/uniwbrk/wordbreak-property.c2
8 files changed, 16 insertions, 23 deletions
diff --git a/lib/uniwbrk/u-wordbreaks.h b/lib/uniwbrk/u-wordbreaks.h
index 7a0d1a66..665ead67 100644
--- a/lib/uniwbrk/u-wordbreaks.h
+++ b/lib/uniwbrk/u-wordbreaks.h
@@ -1,5 +1,5 @@
/* Word breaks in UTF-8/UTF-16/UTF-32 strings. -*- coding: utf-8 -*-
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software.
diff --git a/lib/uniwbrk/u16-wordbreaks.c b/lib/uniwbrk/u16-wordbreaks.c
index 4ebc4711..023ee0d7 100644
--- a/lib/uniwbrk/u16-wordbreaks.c
+++ b/lib/uniwbrk/u16-wordbreaks.c
@@ -1,5 +1,5 @@
/* Word breaks in UTF-16 strings.
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software.
diff --git a/lib/uniwbrk/u32-wordbreaks.c b/lib/uniwbrk/u32-wordbreaks.c
index 5cde6681..47d127ee 100644
--- a/lib/uniwbrk/u32-wordbreaks.c
+++ b/lib/uniwbrk/u32-wordbreaks.c
@@ -1,5 +1,5 @@
/* Word breaks in UTF-32 strings.
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software.
diff --git a/lib/uniwbrk/u8-wordbreaks.c b/lib/uniwbrk/u8-wordbreaks.c
index a5c3d2ed..b0cc58ed 100644
--- a/lib/uniwbrk/u8-wordbreaks.c
+++ b/lib/uniwbrk/u8-wordbreaks.c
@@ -1,5 +1,5 @@
/* Word breaks in UTF-8 strings.
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software.
@@ -54,7 +54,6 @@ read_file (FILE *stream)
char *buf = NULL;
int alloc = 0;
int size = 0;
- int count;
while (! feof (stream))
{
@@ -70,7 +69,7 @@ read_file (FILE *stream)
exit (1);
}
}
- count = fread (buf + size, 1, BUFSIZE, stream);
+ int count = fread (buf + size, 1, BUFSIZE, stream);
if (count == 0)
{
if (ferror (stream))
@@ -102,11 +101,10 @@ main (int argc, char * argv[])
char *input = read_file (stdin);
int length = strlen (input);
char *breaks = malloc (length);
- int i;
u8_wordbreaks ((uint8_t *) input, length, breaks);
- for (i = 0; i < length; i++)
+ for (int i = 0; i < length; i++)
{
switch (breaks[i])
{
diff --git a/lib/uniwbrk/ulc-wordbreaks.c b/lib/uniwbrk/ulc-wordbreaks.c
index d73bd457..c904b73e 100644
--- a/lib/uniwbrk/ulc-wordbreaks.c
+++ b/lib/uniwbrk/ulc-wordbreaks.c
@@ -1,5 +1,5 @@
/* Word breaks in strings.
- Copyright (C) 2001-2003, 2006-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software.
@@ -66,25 +66,22 @@ ulc_wordbreaks (const char *s, size_t n, char *p)
if (offsets != NULL)
{
- uint8_t *t;
size_t m;
-
- t = u8_conv_from_encoding (encoding, iconveh_question_mark,
- s, n, offsets, NULL, &m);
+ uint8_t *t =
+ u8_conv_from_encoding (encoding, iconveh_question_mark,
+ s, n, offsets, NULL, &m);
if (t != NULL)
{
char *q = (char *) (m > 0 ? malloc (m) : NULL);
if (m == 0 || q != NULL)
{
- size_t i;
-
/* Determine the word breaks of the UTF-8 string. */
u8_wordbreaks (t, m, q);
/* Translate the result back to the original string. */
memset (p, 0, n);
- for (i = 0; i < n; i++)
+ for (size_t i = 0; i < n; i++)
if (offsets[i] != (size_t)(-1))
p[i] = q[offsets[i]];
@@ -130,7 +127,6 @@ read_file (FILE *stream)
char *buf = NULL;
int alloc = 0;
int size = 0;
- int count;
while (! feof (stream))
{
@@ -146,7 +142,7 @@ read_file (FILE *stream)
exit (1);
}
}
- count = fread (buf + size, 1, BUFSIZE, stream);
+ int count = fread (buf + size, 1, BUFSIZE, stream);
if (count == 0)
{
if (ferror (stream))
@@ -179,11 +175,10 @@ main (int argc, char * argv[])
char *input = read_file (stdin);
int length = strlen (input);
char *breaks = malloc (length);
- int i;
ulc_wordbreaks (input, length, breaks);
- for (i = 0; i < length; i++)
+ for (int i = 0; i < length; i++)
{
switch (breaks[i])
{
diff --git a/lib/uniwbrk/wbrktable.c b/lib/uniwbrk/wbrktable.c
index 7bd41a25..1d6b063a 100644
--- a/lib/uniwbrk/wbrktable.c
+++ b/lib/uniwbrk/wbrktable.c
@@ -1,5 +1,5 @@
/* Word break auxiliary table. -*- coding: utf-8 -*-
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software.
diff --git a/lib/uniwbrk/wbrktable.h b/lib/uniwbrk/wbrktable.h
index b72aa012..2cbd3981 100644
--- a/lib/uniwbrk/wbrktable.h
+++ b/lib/uniwbrk/wbrktable.h
@@ -1,5 +1,5 @@
/* Word break auxiliary table.
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software.
diff --git a/lib/uniwbrk/wordbreak-property.c b/lib/uniwbrk/wordbreak-property.c
index f703a459..fd1f47bc 100644
--- a/lib/uniwbrk/wordbreak-property.c
+++ b/lib/uniwbrk/wordbreak-property.c
@@ -1,5 +1,5 @@
/* Word break property.
- Copyright (C) 2001-2003, 2006-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software.