]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Use bool instead of int.
authorBruno Haible <bruno@clisp.org>
Mon, 19 Nov 2001 11:05:37 +0000 (11:05 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 21:21:09 +0000 (23:21 +0200)
src/ChangeLog
src/message.c
src/message.h
src/msgcmp.c
src/msgl-cat.c
src/msgmerge.c
src/read-po.c

index f169cf6b96b490ec6896cc9ca1c6402cc819e94a..78310cfda9dcd897e9cc44d0c3a84a9dc287f94c 100644 (file)
@@ -1,3 +1,13 @@
+2001-11-17  Bruno Haible  <haible@clisp.cons.org>
+
+       * message.h (msgdomain_list_sublist): Change last argument to bool.
+       * message.c (msgdomain_list_sublist): Likewise.
+       * msgcmp.c (compare): Update msgdomain_list_sublist calls.
+       (compare_constructor, compare_directive_message): Likewise.
+       * msgl-cat.c (catenate_msgdomain_list): Likewise.
+       * msgmerge.c (merge): Likewise.
+       * read-po.c (readall_constructor, readall_directive_message): Likewise.
+
 2001-11-17  Bruno Haible  <haible@clisp.cons.org>
 
        * msgfmt.c (format_directive_message): Finish 2001-08-30 patch.
index 6b60c8d5ada00e3bf66cff273ea317ebbfeeacd5..7202c5384551b9a6d68724ebe795677804127c40 100644 (file)
@@ -788,7 +788,7 @@ message_list_ty *
 msgdomain_list_sublist (mdlp, domain, create)
      msgdomain_list_ty *mdlp;
      const char *domain;
-     int create;
+     bool create;
 {
   size_t j;
 
index d1d61814c5928c1027e832b789575e33f7ffd0e0..0571e99cc1580ad7301327702a5219763da02928 100644 (file)
@@ -241,7 +241,7 @@ extern void
                                           msgdomain_list_ty *mdlp2));
 extern message_list_ty *
        msgdomain_list_sublist PARAMS ((msgdomain_list_ty *mdlp,
-                                      const char *domain, int create));
+                                      const char *domain, bool create));
 extern message_ty *
        msgdomain_list_search PARAMS ((msgdomain_list_ty *mdlp,
                                      const char *msgid));
index 275c366b8514c857416353105ffcfe3528940845..ab08fbcd286d7fc9ab693f43756f63a484b17962 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <getopt.h>
 #include <limits.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <locale.h>
@@ -293,7 +294,7 @@ compare (fn1, fn2)
        message_list_ty *refmlp = ref->item[k]->messages;
        message_list_ty *defmlp;
 
-       defmlp = msgdomain_list_sublist (def, domain, 0);
+       defmlp = msgdomain_list_sublist (def, domain, false);
        if (defmlp == NULL)
          defmlp = empty_list;
 
@@ -368,7 +369,7 @@ compare_constructor (that)
 
   this->mdlp = msgdomain_list_alloc ();
   this->domain = MESSAGE_DOMAIN_DEFAULT;
-  this->mlp = msgdomain_list_sublist (this->mdlp, this->domain, 1);
+  this->mlp = msgdomain_list_sublist (this->mdlp, this->domain, true);
 }
 
 
@@ -410,7 +411,7 @@ compare_directive_message (that, msgid, msgid_pos, msgid_plural,
   message_ty *mp;
 
   /* Select the appropriate sublist of this->mdlp.  */
-  this->mlp = msgdomain_list_sublist (this->mdlp, this->domain, 1);
+  this->mlp = msgdomain_list_sublist (this->mdlp, this->domain, true);
 
   /* See if this message ID has been seen before.  */
   mp = message_list_search (this->mlp, msgid);
index f81baf00031b05573a1dc9a7b8e324a0a2330d04..6d6cfd4cb182b7ff8dcfa57a34a3a5119bc8f6b5 100644 (file)
@@ -24,6 +24,7 @@
 /* Specification.  */
 #include "msgl-cat.h"
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -279,7 +280,7 @@ domain \"%s\" in input file `%s' doesn't contain a header entry with a charset s
          message_list_ty *mlp = mdlp->item[k]->messages;
          message_list_ty *total_mlp;
 
-         total_mlp = msgdomain_list_sublist (total_mdlp, domain, 1);
+         total_mlp = msgdomain_list_sublist (total_mdlp, domain, true);
 
          for (j = 0; j < mlp->nitems; j++)
            {
index 2e72b3762d51f53b6ce4e5110442a47c0de2bac8..672ca125d4c447cb0bb91d3d05e9c5ab16ec6b80 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <getopt.h>
 #include <limits.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <locale.h>
@@ -629,9 +630,10 @@ merge (fn1, fn2, defp)
       {
        const char *domain = ref->item[k]->domain;
        message_list_ty *refmlp = ref->item[k]->messages;
-       message_list_ty *resultmlp = msgdomain_list_sublist (result, domain, 1);
+       message_list_ty *resultmlp =
+         msgdomain_list_sublist (result, domain, true);
 
-       definitions->item[0] = msgdomain_list_sublist (def, domain, 0);
+       definitions->item[0] = msgdomain_list_sublist (def, domain, false);
        if (definitions->item[0] == NULL)
          definitions->item[0] = empty_list;
 
@@ -653,7 +655,7 @@ merge (fn1, fn2, defp)
          if (k > 0 || defmlp->nitems > 0)
            {
              message_list_ty *resultmlp =
-               msgdomain_list_sublist (result, domain, 1);
+               msgdomain_list_sublist (result, domain, true);
 
              definitions->item[0] = defmlp;
 
@@ -684,7 +686,7 @@ merge (fn1, fn2, defp)
              mp = message_copy (defmsg);
              mp->obsolete = true;
 
-             message_list_append (msgdomain_list_sublist (result, domain, 1),
+             message_list_append (msgdomain_list_sublist (result, domain, true),
                                   mp);
              stats.obsolete++;
            }
index ca0d347c30e91f0b8661dab40f7312ed18c220c9..891947bc9d70aa97bf880925fecd2cf0b9531e78 100644 (file)
@@ -23,6 +23,7 @@
 /* Specification.  */
 #include "read-po.h"
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -103,7 +104,7 @@ readall_constructor (that)
 
   this->mdlp = msgdomain_list_alloc ();
   this->domain = MESSAGE_DOMAIN_DEFAULT;
-  this->mlp = msgdomain_list_sublist (this->mdlp, this->domain, 1);
+  this->mlp = msgdomain_list_sublist (this->mdlp, this->domain, true);
   this->comment = NULL;
   this->comment_dot = NULL;
   this->filepos_count = 0;
@@ -184,7 +185,7 @@ readall_directive_message (that, msgid, msgid_pos, msgid_plural,
   size_t j, i;
 
   /* Select the appropriate sublist of this->mdlp.  */
-  this->mlp = msgdomain_list_sublist (this->mdlp, this->domain, 1);
+  this->mlp = msgdomain_list_sublist (this->mdlp, this->domain, true);
 
   if (allow_duplicates && msgid[0] != '\0')
     /* Doesn't matter if this message ID has been seen before.  */