summaryrefslogtreecommitdiff
path: root/lib/gettext.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-06-29 11:14:40 +0200
committerAndy Wingo <wingo@pobox.com>2016-06-29 11:32:05 +0200
commit2b421e02e103027851a0fa8dd1e02088948b73f8 (patch)
tree254f2883eb63eccf22cc206a06a452a26e814e9f /lib/gettext.h
parentbfca4367b074e2961618dc656dd2a14339a7ef72 (diff)
downloadguile-2b421e02e103027851a0fa8dd1e02088948b73f8.tar.gz
Update Gnulib to 6835fc458f30b94f15d69c35a79cbc2dfabe2d06.
Diffstat (limited to 'lib/gettext.h')
-rw-r--r--lib/gettext.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/gettext.h b/lib/gettext.h
index 330d8dad4..a22c9fa8b 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2014 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -225,15 +225,17 @@ dcpgettext_expr (const char *domain,
if (msg_ctxt_id != NULL)
#endif
{
+ int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcgettext (domain, msg_ctxt_id, category);
+ found_translation = (translation != msg_ctxt_id);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
- if (translation != msg_ctxt_id)
+ if (found_translation)
return translation;
}
return msgid;
@@ -271,15 +273,17 @@ dcnpgettext_expr (const char *domain,
if (msg_ctxt_id != NULL)
#endif
{
+ int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+ found_translation = !(translation == msg_ctxt_id || translation == msgid_plural);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
- if (!(translation == msg_ctxt_id || translation == msgid_plural))
+ if (found_translation)
return translation;
}
return (n == 1 ? msgid : msgid_plural);