diff options
author | Daiki Ueno <ueno@gnu.org> | 2016-05-19 11:05:42 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2016-05-19 12:27:19 +0900 |
commit | 246b06a664f5f9f9dd0acca65b6b636a90bcd99b (patch) | |
tree | 114b744c06b6949d5210e4ef3481fdc7d7833922 /gnulib-local | |
parent | aab762e6c0afa9f31c0277a60c1d27f50233bc10 (diff) | |
download | external_gettext-246b06a664f5f9f9dd0acca65b6b636a90bcd99b.zip external_gettext-246b06a664f5f9f9dd0acca65b6b636a90bcd99b.tar.gz external_gettext-246b06a664f5f9f9dd0acca65b6b636a90bcd99b.tar.bz2 |
Update after Gnulib changed
* gnulib-local/lib/gettext.h: Update from gnulib.
* gettext-runtime/m4/extern-inline.m4: Likewise.
* gettext-runtime/m4/intdiv0.m4: Likewise.
Diffstat (limited to 'gnulib-local')
-rw-r--r-- | gnulib-local/lib/gettext.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gnulib-local/lib/gettext.h b/gnulib-local/lib/gettext.h index 20ef0a6..3d4233c 100644 --- a/gnulib-local/lib/gettext.h +++ b/gnulib-local/lib/gettext.h @@ -1,6 +1,6 @@ /* Convenience header for conditional use of GNU <libintl.h>. - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011, 2015-2016 Free - Software Foundation, Inc. + 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 it under the terms of the GNU Lesser General Public License as published by @@ -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); |