[autofit] Minor fixes for `afblue.pl'. * src/tools/afblue.pl (aux_name): Don't use `reverse'. <Handling #endif>: Use proper indentation for generated `#else'. * src/autofit/afblue.h: Regenerated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
diff --git a/ChangeLog b/ChangeLog
index 861e0b2..8adabd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-01-05 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Minor fixes for `afblue.pl'.
+
+ * src/tools/afblue.pl (aux_name): Don't use `reverse'.
+ <Handling #endif>: Use proper indentation for generated `#else'.
+
+ * src/autofit/afblue.h: Regenerated.
+
2014-01-04 Werner Lemberg <wl@gnu.org>
[autofit] Fix Indic scripts.
diff --git a/src/autofit/afblue.h b/src/autofit/afblue.h
index 75f60df..7c50d99 100644
--- a/src/autofit/afblue.h
+++ b/src/autofit/afblue.h
@@ -103,13 +103,13 @@ FT_BEGIN_HEADER
AF_BLUE_STRING_CJK_LEFT_UNFILL = af_blue_1_1_1 + 77,
AF_BLUE_STRING_CJK_RIGHT_FILL = af_blue_1_1_1 + 153,
AF_BLUE_STRING_CJK_RIGHT_UNFILL = af_blue_1_1_1 + 229,
- af_blue_1_2_1 = af_blue_1_1_1 + 304,
+ af_blue_1_1_2 = af_blue_1_1_1 + 304,
#else
- af_blue_1_2_1 = af_blue_1_1_1 + 0,
+ af_blue_1_1_2 = af_blue_1_1_1 + 0,
#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
- af_blue_1_2 = af_blue_1_2_1 + 0,
+ af_blue_1_2 = af_blue_1_1_2 + 0,
#else
- af_blue_1_2 = af_blue_1_2_1 + 0,
+ af_blue_1_2 = af_blue_1_1_2 + 0,
#endif /* AF_CONFIG_OPTION_CJK */
@@ -162,13 +162,13 @@ FT_BEGIN_HEADER
AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
af_blue_2_1_1 = af_blue_2_1 + 4,
#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
- af_blue_2_2_1 = af_blue_2_1_1 + 4,
+ af_blue_2_1_2 = af_blue_2_1_1 + 4,
#else
- af_blue_2_2_1 = af_blue_2_1_1 + 0,
+ af_blue_2_1_2 = af_blue_2_1_1 + 0,
#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
- af_blue_2_2 = af_blue_2_2_1 + 1,
+ af_blue_2_2 = af_blue_2_1_2 + 1,
#else
- af_blue_2_2 = af_blue_2_2_1 + 0,
+ af_blue_2_2 = af_blue_2_1_2 + 0,
#endif /* AF_CONFIG_OPTION_CJK */
diff --git a/src/tools/afblue.pl b/src/tools/afblue.pl
index 774438f..d7c7322 100644
--- a/src/tools/afblue.pl
+++ b/src/tools/afblue.pl
@@ -194,7 +194,7 @@ sub convert_literal
sub aux_name
{
- return "af_blue_" . $num_sections. "_" . join('_', reverse @name_stack);
+ return "af_blue_" . $num_sections. "_" . join('_', @name_stack);
}
@@ -210,7 +210,7 @@ sub aux_name_next
sub enum_val_string
{
- # Build string which holds code to save the current offset in an
+ # Build string that holds code to save the current offset in an
# enumeration element.
my $aux = shift;
@@ -288,7 +288,7 @@ while (<DATA>)
{
# Having preprocessor conditionals complicates the computation of
# correct offset values. We have to introduce auxiliary enumeration
- # elements with the name `af_blue_<s>_<n1>_<n2>_...' which store
+ # elements with the name `af_blue_<s>_<n1>_<n2>_...' that store
# offsets to be used in conditional clauses. `<s>' is the number of
# sections seen so far, `<n1>' is the number of `#if' and `#endif'
# conditionals seen so far in the topmost level, `<n2>' the number of
@@ -344,7 +344,7 @@ while (<DATA>)
$curr_offset = 0;
}
- elsif (/ ^ \# \s* endif /x)
+ elsif (/ ^ (\# \s*) endif /x)
{
my $prev_else = pop @else_stack;
Die("unbalanced #endif") unless defined($prev_else);
@@ -356,8 +356,9 @@ while (<DATA>)
# necessary to have correct offsets.
if (!$prev_else)
{
+ # Use amount of whitespace from `endif'.
push @{$diversions{$curr_enum}}, enum_val_string(aux_name())
- . "#else\n";
+ . $1 . "else\n";
$curr_offset = 0;
}