bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: gen-uni-tables: Keep line number better up-to-date
Date: Fri, 23 Feb 2024 18:26:57 +0100	[thread overview]
Message-ID: <5030322.iZASKD2KPV@nimes> (raw)

gen-uni-tables could, while reading EastAsianWidth.txt or LineBreak.txt, output
a diagnostic with a wrong line number. The cause is that 'lineno' was not
correctly kept up-to-date while reading a blank line.

This patch fixes it.


2024-02-23  Bruno Haible  <bruno@clisp.org>

	gen-uni-tables: Keep line number better up-to-date.
	* lib/gen-uni-tables.c (fill_width, fill_org_lbp): Increase lineno by 1
	when reading a blank line.

diff --git a/lib/gen-uni-tables.c b/lib/gen-uni-tables.c
index ea5e6aa3f8..90d33abab1 100644
--- a/lib/gen-uni-tables.c
+++ b/lib/gen-uni-tables.c
@@ -6616,6 +6616,8 @@ fill_width (const char *width_filename)
       c = getc (stream);
       if (c == EOF)
         break;
+      if (c == '\n')
+        continue;
       if (c == '#')
         {
           do c = getc (stream); while (c != EOF && c != '\n');
@@ -8571,6 +8573,8 @@ fill_org_lbp (const char *linebreak_filename)
       c = getc (stream);
       if (c == EOF)
         break;
+      if (c == '\n')
+        continue;
       if (c == '#')
         {
           do c = getc (stream); while (c != EOF && c != '\n');





                 reply	other threads:[~2024-02-23 17:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5030322.iZASKD2KPV@nimes \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).