diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:28:50 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:28:50 +0100 |
| commit | ff33e1d252f46bec1a33e28700da3282fc24047a (patch) | |
| tree | 5c15bc695be820b393a8496c5807ecafbbdeb89b /lib/uniwbrk/u8-wordbreaks.c | |
| parent | b2ac982cc8b5290699eb5f52fb043d3d15e2624b (diff) | |
| parent | 5f59a34ab747dde8ede7357f3431bf06bd6002fe (diff) | |
Update upstream source from tag 'upstream/1.4.2'
Update to upstream version '1.4.2'
with Debian dir 493e96bcd865e4f9990e20bee26408c96231d727
Diffstat (limited to 'lib/uniwbrk/u8-wordbreaks.c')
| -rw-r--r-- | lib/uniwbrk/u8-wordbreaks.c | 8 |
1 files changed, 3 insertions, 5 deletions
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]) { |
