]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix comment handling.
authorBruno Haible <bruno@clisp.org>
Wed, 24 Oct 2001 09:50:06 +0000 (09:50 +0000)
committerBruno Haible <bruno@clisp.org>
Wed, 24 Oct 2001 09:50:06 +0000 (09:50 +0000)
src/ChangeLog
src/xgettext.c

index 8fef1f99d2506faf2b14d6a9e2142376bf709aef..9b5514a0abee7c5842daff0591035a93f98fa478 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-08  Bruno Haible  <haible@clisp.cons.org>
+
+       * xgettext.c (remember_a_message): When the comment tag is seen,
+       remember all remaining comment lines, not just one.
+
 2001-09-25  Bruno Haible  <haible@clisp.cons.org>
 
        Upgrade to automake-1.5.
index e2e11c1cb103efba6a5d27730ce70630b8350275..5ce99e505dc1e24bd25136c25d9eda37fcf9e5e4 100644 (file)
@@ -880,7 +880,9 @@ meta information, not the empty string.\n")));
   if (!mp->comment_dot)
     {
       int j;
+      bool add_all_remaining_comments;
 
+      add_all_remaining_comments = add_all_comments;
       for (j = 0; ; ++j)
        {
          const char *s = xgettext_comment (j);
@@ -921,9 +923,12 @@ meta information, not the empty string.\n")));
              if (interesting)
                continue;
            }
-         if (add_all_comments
-             || (comment_tag != NULL
-                 && strncmp (s, comment_tag, strlen (comment_tag)) == 0))
+         /* When the comment tag is seen, it drags in not only the line
+            which it starts, but all remaining comment lines.  */
+         if (add_all_remaining_comments
+             || (add_all_remaining_comments =
+                   (comment_tag != NULL
+                    && strncmp (s, comment_tag, strlen (comment_tag)) == 0)))
            message_comment_dot_append (mp, s);
        }
     }