add icu.icu5431.malayam.patch

This commit is contained in:
Caolan McNamara 2006-10-03 13:08:10 +00:00
parent f3b78b8071
commit c49c2c1211
2 changed files with 80 additions and 1 deletions

76
icu.icu5431.malayam.patch Normal file
View File

@ -0,0 +1,76 @@
diff -ru icu.orig/source/layout/IndicReordering.cpp icu/source/layout/IndicReordering.cpp
--- icu.orig/source/layout/IndicReordering.cpp 2006-10-03 13:41:18.000000000 +0100
+++ icu/source/layout/IndicReordering.cpp 2006-10-03 13:54:11.000000000 +0100
@@ -50,6 +50,14 @@
#define distFeatureMask 0x00010000UL
#define initFeatureMask 0x00008000UL
+// TODO: Find better names for these!
+#define tagArray4 (loclFeatureMask | nuktFeatureMask | akhnFeatureMask | vatuFeatureMask | presFeatureMask | blwsFeatureMask | abvsFeatureMask | pstsFeatureMask | halnFeatureMask | blwmFeatureMask | abvmFeatureMask | distFeatureMask)
+#define tagArray3 (pstfFeatureMask | tagArray4)
+#define tagArray2 (halfFeatureMask | tagArray3)
+#define tagArray1 (blwfFeatureMask | tagArray2)
+#define tagArray0 (rphfFeatureMask | tagArray1)
+
+
class IndicReorderingOutput : public UMemory {
private:
le_int32 fOutIndex;
@@ -154,6 +162,27 @@
fSMabove = fSMbelow = 0;
}
+ void swapChars(int a, int b)
+ {
+ LEErrorCode success = LE_NO_ERROR;
+ LEUnicode temp_char;
+ le_uint32 temp_index;
+ FeatureMask temp_tag;
+
+ temp_char = fOutChars[fOutIndex + b];
+ temp_index = fGlyphStorage.getCharIndex(fOutIndex + b, success);
+ temp_tag = fGlyphStorage.getAuxData(fOutIndex + b, success);
+
+ fOutChars[fOutIndex + b] = fOutChars[fOutIndex + a];
+ le_uint32 toswap = fGlyphStorage.getCharIndex(fOutIndex + a, success);
+ fGlyphStorage.setCharIndex(fOutIndex + b, toswap, success);
+ fGlyphStorage.setAuxData(fOutIndex + b, tagArray3, success);
+
+ fOutChars[fOutIndex + a] = temp_char;
+ fGlyphStorage.setCharIndex(fOutIndex + a, temp_index, success);
+ fGlyphStorage.setAuxData(fOutIndex + a, temp_tag, success);
+ }
+
void writeChar(LEUnicode ch, le_uint32 charIndex, FeatureMask charFeatures)
{
LEErrorCode success = LE_NO_ERROR;
@@ -335,13 +364,6 @@
C_DOTTED_CIRCLE = 0x25CC
};
-// TODO: Find better names for these!
-#define tagArray4 (loclFeatureMask | nuktFeatureMask | akhnFeatureMask | vatuFeatureMask | presFeatureMask | blwsFeatureMask | abvsFeatureMask | pstsFeatureMask | halnFeatureMask | blwmFeatureMask | abvmFeatureMask | distFeatureMask)
-#define tagArray3 (pstfFeatureMask | tagArray4)
-#define tagArray2 (halfFeatureMask | tagArray3)
-#define tagArray1 (blwfFeatureMask | tagArray2)
-#define tagArray0 (rphfFeatureMask | tagArray1)
-
static const FeatureMap featureMap[] =
{
{loclFeatureTag, loclFeatureMask},
@@ -629,6 +651,15 @@
output.writeChar(chars[i], i, tagArray4);
}
+ /* for the special conjuction of Cons+0x0d4d+0x0d31 of Malayalam */
+ if ((baseConsonant - 2 >= 0) &&
+ (chars[baseConsonant - 1] == 0x0d4d) &&
+ (chars[baseConsonant] == 0x0d31) &&
+ ((chars[baseConsonant - 2] >= 0x0d15) &&
+ (chars[baseConsonant - 2] <= 0x0d39))) {
+ output.swapChars(-1, -3);
+ }
+
if ((classTable->scriptFlags & SF_MATRAS_AFTER_BASE) != 0) {
output.writeMbelow();
output.writeSMbelow(); // FIXME: there are no SMs in these scripts...

View File

@ -14,6 +14,7 @@ Patch1: icu-3.4-multiarchdevel.patch
Patch2: icu-config Patch2: icu-config
Patch3: icu.icu5365.dependantvowels.patch Patch3: icu.icu5365.dependantvowels.patch
Patch4: icu.icu5418.malayam.patch Patch4: icu.icu5418.malayam.patch
Patch5: icu.icu5431.malayam.patch
%description %description
The International Components for Unicode (ICU) libraries provide The International Components for Unicode (ICU) libraries provide
@ -55,7 +56,8 @@ Group: Documentation
%setup -q -n %{name} %setup -q -n %{name}
%patch1 -p1 -b .multiarchdevel %patch1 -p1 -b .multiarchdevel
%patch3 -p1 -b .dependantvowels %patch3 -p1 -b .dependantvowels
%patch4 -p1 -b .malayam.patch %patch4 -p1 -b .icu5418.malayam.patch
%patch5 -p1 -b .icu5431.malayam.patch
%build %build
cd source cd source
@ -138,6 +140,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Mon Oct 02 2006 Caolan McNamara <caolanm@redhat.com> - 3.6-5 * Mon Oct 02 2006 Caolan McNamara <caolanm@redhat.com> - 3.6-5
- rh#208705# add pkg-config Require for -devel package - rh#208705# add pkg-config Require for -devel package
- add icu.icu5431.malayam.patch for rh#208551#/rh#209084#
* Sun Oct 01 2006 Jesse Keating <jkeating@redhat.com> - 3.6-4 * Sun Oct 01 2006 Jesse Keating <jkeating@redhat.com> - 3.6-4
- rebuilt for unwind info generation, broken in gcc-4.1.1-21 - rebuilt for unwind info generation, broken in gcc-4.1.1-21