summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanc999@yahoo.com.tw>2019-06-07 02:11:03 +0000
committerChun-wei Fan <fanc999@yahoo.com.tw>2019-06-07 02:11:03 +0000
commit5d2d018397873d199ceb175292f3fa0e2f45a598 (patch)
tree245b21744fa2c581288ac1b21e6c2a7c70d32fad
parent1355b656207cb19f08872112d1bdbb89c3496fa2 (diff)
parent6a6976ff13d85aa4317ac2687622f313190e5114 (diff)
downloadpango-5d2d018397873d199ceb175292f3fa0e2f45a598.tar.gz
Merge branch 'gen-script-for-lang-avoid-empty-arrays' into 'master'
tools/gen-script-for-lang.c: Avoid generating code with empty arrays See merge request GNOME/pango!53
-rw-r--r--pango/pango-script-lang-table.h4
-rw-r--r--tools/gen-script-for-lang.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/pango/pango-script-lang-table.h b/pango/pango-script-lang-table.h
index d296010e..9f6e0b42 100644
--- a/pango/pango-script-lang-table.h
+++ b/pango/pango-script-lang-table.h
@@ -1,7 +1,7 @@
/* pango-script-lang-table.h:
*
* Generated by ../tools/gen-script-for-lang.c
- * Date: 2019-05-27
+ * Date: 2019-06-06
* Source: fontconfig-2.13.1
*
* Do not edit.
@@ -236,7 +236,7 @@ static const PangoScriptForLang pango_script_for_lang[] = {
{ "ug", { G_UNICODE_SCRIPT_ARABIC/*33*/ } },
{ "uk", { G_UNICODE_SCRIPT_CYRILLIC/*72*/ } },
{ "und-zmth", { G_UNICODE_SCRIPT_LATIN/*53*/, G_UNICODE_SCRIPT_GREEK/*51*/ } },
- { "und-zsye", { } },
+ { "und-zsye", { 0 } },
{ "ur", { G_UNICODE_SCRIPT_ARABIC/*27*/ } },
{ "uz", { G_UNICODE_SCRIPT_LATIN/*52*/ } },
{ "ve", { G_UNICODE_SCRIPT_LATIN/*62*/ } },
diff --git a/tools/gen-script-for-lang.c b/tools/gen-script-for-lang.c
index 7de3c98d..2f439a4e 100644
--- a/tools/gen-script-for-lang.c
+++ b/tools/gen-script-for-lang.c
@@ -289,7 +289,13 @@ int main (void)
for (j = 0; j < MAX_SCRIPTS; j++)
{
if (!info->scripts[j].freq)
- break;
+ {
+ /* Avoid generating code with empty arrays */
+ if (j == 0)
+ g_print ("0");
+
+ break;
+ }
if (j != 0)
g_print (", ");