Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / src / message.c
index 586675f..bc1604c 100644 (file)
@@ -1,5 +1,6 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995-1998, 2000-2009 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2009, 2015 Free Software Foundation,
+   Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
@@ -58,6 +59,7 @@ const char *const format_language[NFORMATS] =
   /* format_qt */               "qt",
   /* format_qt_plursl */        "qt-plural",
   /* format_kde */              "kde",
+  /* format_kde_kuit */         "kde-kuit",
   /* format_boost */            "boost",
   /* format_lua */              "lua",
   /* format_javascript */       "javascript"
@@ -89,6 +91,7 @@ const char *const format_language_pretty[NFORMATS] =
   /* format_qt */               "Qt",
   /* format_qt_plural */        "Qt plural",
   /* format_kde */              "KDE",
+  /* format_kde_kuit */         "KDE KUIT",
   /* format_boost */            "Boost",
   /* format_lua */              "Lua",
   /* format_javascript */       "JavaScript"
@@ -104,6 +107,14 @@ possible_format_p (enum is_format is_format)
 }
 
 
+const char *const syntax_check_name[NSYNTAXCHECKS] =
+{
+  /* sc_ellipsis_unicode */     "ellipsis-unicode",
+  /* sc_space_ellipsis */       "space-ellipsis",
+  /* sc_quote_unicode */        "quote-unicode"
+};
+
+
 message_ty *
 message_alloc (const char *msgctxt,
                const char *msgid, const char *msgid_plural,
@@ -130,6 +141,8 @@ message_alloc (const char *msgctxt,
   mp->range.min = -1;
   mp->range.max = -1;
   mp->do_wrap = undecided;
+  for (i = 0; i < NSYNTAXCHECKS; i++)
+    mp->do_syntax_check[i] = undecided;
   mp->prev_msgctxt = NULL;
   mp->prev_msgid = NULL;
   mp->prev_msgid_plural = NULL;
@@ -235,6 +248,8 @@ message_copy (message_ty *mp)
     result->is_format[i] = mp->is_format[i];
   result->range = mp->range;
   result->do_wrap = mp->do_wrap;
+  for (i = 0; i < NSYNTAXCHECKS; i++)
+    result->do_syntax_check[i] = mp->do_syntax_check[i];
   for (j = 0; j < mp->filepos_count; ++j)
     {
       lex_pos_ty *pp = &mp->filepos[j];