From: Bruno Haible Date: Mon, 19 Nov 2001 11:05:37 +0000 (+0000) Subject: Use bool instead of int. X-Git-Tag: v0.11~289 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccd48867400d9fcc6293ece7bb796c541bd4b7d2;p=thirdparty%2Fgettext.git Use bool instead of int. --- diff --git a/src/ChangeLog b/src/ChangeLog index f169cf6b9..78310cfda 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2001-11-17 Bruno Haible + + * 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 * msgfmt.c (format_directive_message): Finish 2001-08-30 patch. diff --git a/src/message.c b/src/message.c index 6b60c8d5a..7202c5384 100644 --- a/src/message.c +++ b/src/message.c @@ -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; diff --git a/src/message.h b/src/message.h index d1d61814c..0571e99cc 100644 --- a/src/message.h +++ b/src/message.h @@ -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)); diff --git a/src/msgcmp.c b/src/msgcmp.c index 275c366b8..ab08fbcd2 100644 --- a/src/msgcmp.c +++ b/src/msgcmp.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -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); diff --git a/src/msgl-cat.c b/src/msgl-cat.c index f81baf000..6d6cfd4cb 100644 --- a/src/msgl-cat.c +++ b/src/msgl-cat.c @@ -24,6 +24,7 @@ /* Specification. */ #include "msgl-cat.h" +#include #include #include @@ -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++) { diff --git a/src/msgmerge.c b/src/msgmerge.c index 2e72b3762..672ca125d 100644 --- a/src/msgmerge.c +++ b/src/msgmerge.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -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++; } diff --git a/src/read-po.c b/src/read-po.c index ca0d347c3..891947bc9 100644 --- a/src/read-po.c +++ b/src/read-po.c @@ -23,6 +23,7 @@ /* Specification. */ #include "read-po.h" +#include #include #include @@ -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. */