]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix two msgcat bugs.
authorBruno Haible <bruno@clisp.org>
Fri, 27 Jul 2001 14:59:19 +0000 (14:59 +0000)
committerBruno Haible <bruno@clisp.org>
Fri, 27 Jul 2001 14:59:19 +0000 (14:59 +0000)
src/ChangeLog
src/msgcat.c

index 5267b312801b73821b5a21661ff7565bd490b155..c92ff276bfc0265e5018ffee056d82b134208765 100644 (file)
@@ -1,3 +1,9 @@
+2001-07-21  Bruno Haible  <haible@clisp.cons.org>
+
+       * msgcat.c (usage): The default value for more-than is 0 here.
+       (is_message_selected): Always keep the header entry. Needed when
+       option --unique is used.
+
 2001-07-21  Bruno Haible  <haible@clisp.cons.org>
 
        * message.h (struct message_ty): Add fields 'alternative_count',
index 52b9ac7ffe5be2c6f4541292e499a9c8d71ac128..33259f00dadb6a06dfa818fef1452c0c9cf63b5d 100644 (file)
@@ -345,7 +345,7 @@ Message selection:\n\
                                  definitions, defaults to infinite if not\n\
                                  set\n\
   ->, --more-than=NUMBER         print messages with more than this many\n\
-                                 definitions, defaults to 1 if not set\n\
+                                 definitions, defaults to 0 if not set\n\
   -u, --unique                   shorthand for --less-than=2, requests\n\
                                  that only unique messages be printed\n\
 "));
@@ -448,8 +448,8 @@ is_message_selected (tmp)
 {
   int used = (tmp->used >= 0 ? tmp->used : - tmp->used);
 
-  /* FIXME: Add tmp->msgid[0] == '\0' || ... here? */
-  return (used > more_than && used < less_than);
+  return (tmp->msgid[0] == '\0') /* keep the header entry */
+        || (used > more_than && used < less_than);
 }