[autofit] Make PIC mode work actually. * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the enumeration values automatically generated by including `afscript.h' and friends. * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
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
diff --git a/ChangeLog b/ChangeLog
index f29d23c..7937534 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2013-12-21 Werner Lemberg <wl@gnu.org>
+ [autofit] Make PIC mode work actually.
+
+ * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the
+ enumeration values automatically generated by including `afscript.h'
+ and friends.
+
+ * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
+
+2013-12-21 Werner Lemberg <wl@gnu.org>
+
Fix PIC linking.
* include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix
diff --git a/src/autofit/afpic.c b/src/autofit/afpic.c
index 1806895..eba6a89 100644
--- a/src/autofit/afpic.c
+++ b/src/autofit/afpic.c
@@ -98,20 +98,20 @@
FT_Init_Class_af_service_properties( &container->af_service_properties );
- for ( ss = 0; ss < AF_WRITING_SYSTEM_MAX - 1; ss++ )
+ for ( ss = 0; ss < AF_WRITING_SYSTEM_MAX; ss++ )
container->af_writing_system_classes[ss] =
&container->af_writing_system_classes_rec[ss];
- container->af_writing_system_classes[AF_WRITING_SYSTEM_MAX - 1] = NULL;
+ container->af_writing_system_classes[AF_WRITING_SYSTEM_MAX] = NULL;
- for ( ss = 0; ss < AF_SCRIPT_MAX - 1; ss++ )
+ for ( ss = 0; ss < AF_SCRIPT_MAX; ss++ )
container->af_script_classes[ss] =
&container->af_script_classes_rec[ss];
- container->af_script_classes[AF_SCRIPT_MAX - 1] = NULL;
+ container->af_script_classes[AF_SCRIPT_MAX] = NULL;
- for ( ss = 0; ss < AF_STYLE_MAX - 1; ss++ )
+ for ( ss = 0; ss < AF_STYLE_MAX; ss++ )
container->af_style_classes[ss] =
&container->af_style_classes_rec[ss];
- container->af_style_classes[AF_STYLE_MAX - 1] = NULL;
+ container->af_style_classes[AF_STYLE_MAX] = NULL;
#undef WRITING_SYSTEM
#define WRITING_SYSTEM( ws, WS ) \
diff --git a/src/autofit/afpic.h b/src/autofit/afpic.h
index 951628f..9a68b4a 100644
--- a/src/autofit/afpic.h
+++ b/src/autofit/afpic.h
@@ -49,19 +49,19 @@ FT_BEGIN_HEADER
FT_Service_PropertiesRec af_service_properties;
AF_WritingSystemClass af_writing_system_classes
- [AF_WRITING_SYSTEM_MAX];
+ [AF_WRITING_SYSTEM_MAX + 1];
AF_WritingSystemClassRec af_writing_system_classes_rec
- [AF_WRITING_SYSTEM_MAX - 1];
+ [AF_WRITING_SYSTEM_MAX];
AF_ScriptClass af_script_classes
- [AF_SCRIPT_MAX];
+ [AF_SCRIPT_MAX + 1];
AF_ScriptClassRec af_script_classes_rec
- [AF_SCRIPT_MAX - 1];
+ [AF_SCRIPT_MAX];
AF_StyleClass af_style_classes
- [AF_STYLE_MAX];
+ [AF_STYLE_MAX + 1];
AF_StyleClassRec af_style_classes_rec
- [AF_STYLE_MAX - 1];
+ [AF_STYLE_MAX];
FT_AutoHinter_InterfaceRec af_autofitter_interface;