summaryrefslogtreecommitdiffstats
path: root/gettext-tools/src/x-po.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-10-31 12:41:52 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:14:17 +0200
commit93f012e908818e29a94125315409f3367997a2fd (patch)
tree7603af64e5d971cff109a7b3704f889017623512 /gettext-tools/src/x-po.c
parent58197c3268a119eb48bcd1ec0363f7b94f804a24 (diff)
downloadexternal_gettext-93f012e908818e29a94125315409f3367997a2fd.zip
external_gettext-93f012e908818e29a94125315409f3367997a2fd.tar.gz
external_gettext-93f012e908818e29a94125315409f3367997a2fd.tar.bz2
Make it compile in C++ mode.
Diffstat (limited to 'gettext-tools/src/x-po.c')
-rw-r--r--gettext-tools/src/x-po.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/gettext-tools/src/x-po.c b/gettext-tools/src/x-po.c
index 7f980a9..5142802 100644
--- a/gettext-tools/src/x-po.c
+++ b/gettext-tools/src/x-po.c
@@ -76,23 +76,25 @@ extract_add_message (default_catalog_reader_ty *this,
because the old header may contain a charset= directive. */
if (msgctxt == NULL && *msgid == '\0' && !xgettext_omit_header)
{
- const char *charsetstr = strstr (msgstr, "charset=");
-
- if (charsetstr != NULL)
- {
- size_t len;
- char *charset;
-
- charsetstr += strlen ("charset=");
- len = strcspn (charsetstr, " \t\n");
- charset = (char *) xmalloc (len + 1);
- memcpy (charset, charsetstr, len);
- charset[len] = '\0';
-
- if (header_charset != NULL)
- free (header_charset);
- header_charset = charset;
- }
+ {
+ const char *charsetstr = strstr (msgstr, "charset=");
+
+ if (charsetstr != NULL)
+ {
+ size_t len;
+ char *charset;
+
+ charsetstr += strlen ("charset=");
+ len = strcspn (charsetstr, " \t\n");
+ charset = (char *) xmalloc (len + 1);
+ memcpy (charset, charsetstr, len);
+ charset[len] = '\0';
+
+ if (header_charset != NULL)
+ free (header_charset);
+ header_charset = charset;
+ }
+ }
discard:
if (msgctxt != NULL)