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/unilbrk/u8-possible-linebreaks.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/unilbrk/u8-possible-linebreaks.c')
| -rw-r--r-- | lib/unilbrk/u8-possible-linebreaks.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/unilbrk/u8-possible-linebreaks.c b/lib/unilbrk/u8-possible-linebreaks.c index bc4796f4..86a8e941 100644 --- a/lib/unilbrk/u8-possible-linebreaks.c +++ b/lib/unilbrk/u8-possible-linebreaks.c @@ -1,5 +1,5 @@ /* Line breaking of UTF-8 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>, 2001. This file is free software. @@ -457,7 +457,6 @@ read_file (FILE *stream) char *buf = NULL; int alloc = 0; int size = 0; - int count; while (! feof (stream)) { @@ -473,7 +472,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)) @@ -505,11 +504,10 @@ main (int argc, char * argv[]) char *input = read_file (stdin); int length = strlen (input); char *breaks = malloc (length); - int i; u8_possible_linebreaks_v2 ((uint8_t *) input, length, "UTF-8", breaks); - for (i = 0; i < length; i++) + for (int i = 0; i < length; i++) { switch (breaks[i]) { |
