diff --git a/ChangeLog b/ChangeLog index 861e0b2f9..8adabd9ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2014-01-05 Werner Lemberg + + [autofit] Minor fixes for `afblue.pl'. + + * src/tools/afblue.pl (aux_name): Don't use `reverse'. + : Use proper indentation for generated `#else'. + + * src/autofit/afblue.h: Regenerated. + 2014-01-04 Werner Lemberg [autofit] Fix Indic scripts. diff --git a/src/autofit/afblue.h b/src/autofit/afblue.h index 75f60df74..7c50d9983 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 774438f84..d7c732233 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 () { # Having preprocessor conditionals complicates the computation of # correct offset values. We have to introduce auxiliary enumeration - # elements with the name `af_blue____...' which store + # elements with the name `af_blue____...' that store # offsets to be used in conditional clauses. `' is the number of # sections seen so far, `' is the number of `#if' and `#endif' # conditionals seen so far in the topmost level, `' the number of @@ -344,7 +344,7 @@ while () $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 () # 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; }