aboutsummaryrefslogtreecommitdiff
path: root/intl/dcigettext.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-11-20 10:08:52 +0000
committerUlrich Drepper <drepper@redhat.com>2000-11-20 10:08:52 +0000
commitad5b53b1075af3514ae5e1c665f95529e4e7818e (patch)
tree67c20f2f1c091728e83ef830c4abd7d9a2c2e28e /intl/dcigettext.c
parent17427edd1fc510ae6eb7903cc8664e15500490d6 (diff)
downloadglibc-ad5b53b1075af3514ae5e1c665f95529e4e7818e.tar
glibc-ad5b53b1075af3514ae5e1c665f95529e4e7818e.tar.gz
glibc-ad5b53b1075af3514ae5e1c665f95529e4e7818e.tar.bz2
glibc-ad5b53b1075af3514ae5e1c665f95529e4e7818e.zip
Update.
* intl/dcigettext.c (transcmp): Make s1 and s2 const. (DCIGETTEXT): Make domaindata variable const. * intl/loadmsgcat.c (_nl_load_domain): Rearrange domain initialization to avoid warning.
Diffstat (limited to 'intl/dcigettext.c')
-rw-r--r--intl/dcigettext.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
index c47cccf512..dd3a559f58 100644
--- a/intl/dcigettext.c
+++ b/intl/dcigettext.c
@@ -243,10 +243,13 @@ static void *root;
static int
transcmp (const void *p1, const void *p2)
{
- struct known_translation_t *s1 = (struct known_translation_t *) p1;
- struct known_translation_t *s2 = (struct known_translation_t *) p2;
+ const struct known_translation_t *s1;
+ const struct known_translation_t *s2;
int result;
+ s1 = (const struct known_translation_t *) p1;
+ s2 = (const struct known_translation_t *) p2;
+
result = strcmp (s1->msgid, s2->msgid);
if (result == 0)
{
@@ -564,8 +567,8 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
if (plural != 0)
{
- struct loaded_domain *domaindata =
- (struct loaded_domain *) domain->data;
+ const struct loaded_domain *domaindata =
+ (const struct loaded_domain *) domain->data;
index = plural_eval (domaindata->plural, n);
if (index >= domaindata->nplurals)
/* This should never happen. It means the plural expression
@@ -662,7 +665,7 @@ _nl_find_msg (domain_file, msgid, index)
const char *msgid;
unsigned long int index;
{
- struct loaded_domain *domain;
+ const struct loaded_domain *domain;
size_t act;
char *result;
@@ -672,7 +675,7 @@ _nl_find_msg (domain_file, msgid, index)
if (domain_file->data == NULL)
return NULL;
- domain = (struct loaded_domain *) domain_file->data;
+ domain = (const struct loaded_domain *) domain_file->data;
/* Locate the MSGID and its translation. */
if (domain->hash_size > 2 && domain->hash_tab != NULL)