[sword-cvs] icu-sword/source/layout AnchorTables.cpp,1.3,1.4 ArabicLayoutEngine.cpp,1.3,1.4 ArabicLayoutEngine.h,1.3,1.4 ArabicShaping.cpp,1.3,1.4 ClassDefinitionTables.cpp,1.3,1.4 ContextualGlyphSubstProc.h,1.3,1.4 ContextualSubstSubtables.cpp,1.3,1.4 ContextualSubstSubtables.h,1.3,1.4 DefaultCharMapper.h,1.3,1.4 GXLayoutEngine.cpp,1.3,1.4 GXLayoutEngine.h,1.3,1.4 GlyphIterator.cpp,1.3,1.4 GlyphIterator.h,1.3,1.4 GlyphPositioningTables.cpp,1.3,1.4 GlyphSubstitutionTables.cpp,1.3,1.4 GlyphSubstitutionTables.h,1.3,1.4 HanLayoutEngine.cpp,1.1,1.2 HanLayoutEngine.h,1.1,1.2 IndicLayoutEngine.cpp,1.3,1.4 IndicLayoutEngine.h,1.3,1.4 IndicRearrangementProcessor.cpp,1.3,1.4 IndicRearrangementProcessor.h,1.3,1.4 IndicReordering.cpp,1.3,1.4 IndicReordering.h,1.3,1.4 LEFontInstance.h,1.3,1.4 LEGlyphFilter.h,1.3,1.4 LELanguages.h,1.1,1.2 LEScripts.h,1.3,1.4 LESwaps.h,1.3,1.4 LETypes.h,1.3,1.4 LayoutEngine.cpp,1.3,1.4 LayoutEngine.h,1.3,1.4 LigatureSubstProc.cpp,1.3,1.4 LigatureSubstProc.h,1.3,1.4 LookupProcessor.cpp,1.3,1.4 LookupProcessor.h,1.3,1.4 MPreFixups.cpp,1.1,1.2 MPreFixups.h,1.1,1.2 Makefile.in,1.4,1.5 MarkToBasePosnSubtables.cpp,1.3,1.4 MarkToMarkPosnSubtables.cpp,1.3,1.4 MultipleSubstSubtables.cpp,1.3,1.4 OpenTypeLayoutEngine.cpp,1.4,1.5 OpenTypeLayoutEngine.h,1.3,1.4 ScriptAndLanguage.h,1.3,1.4 ScriptAndLanguageTags.cpp,1.3,1.4 ScriptAndLanguageTags.h,1.3,1.4 SegmentArrayProcessor.h,1.3,1.4 SegmentSingleProcessor.h,1.3,1.4 SimpleArrayProcessor.h,1.3,1.4 SingleTableProcessor.h,1.3,1.4 ThaiLayoutEngine.cpp,1.3,1.4 ThaiLayoutEngine.h,1.3,1.4 ThaiShaping.cpp,1.4,1.5 ThaiShaping.h,1.3,1.4 ThaiStateTables.cpp,1.3,1.4 TrimmedArrayProcessor.h,1.3,1.4 layout.dsp,1.4,1.5 layout.rc,1.3,1.4 layout.vcproj,1.1,1.2

sword@www.crosswire.org sword@www.crosswire.org
Tue, 6 Apr 2004 03:11:18 -0700


Update of /cvs/core/icu-sword/source/layout
In directory www:/tmp/cvs-serv8911/source/layout

Modified Files:
	AnchorTables.cpp ArabicLayoutEngine.cpp ArabicLayoutEngine.h 
	ArabicShaping.cpp ClassDefinitionTables.cpp 
	ContextualGlyphSubstProc.h ContextualSubstSubtables.cpp 
	ContextualSubstSubtables.h DefaultCharMapper.h 
	GXLayoutEngine.cpp GXLayoutEngine.h GlyphIterator.cpp 
	GlyphIterator.h GlyphPositioningTables.cpp 
	GlyphSubstitutionTables.cpp GlyphSubstitutionTables.h 
	HanLayoutEngine.cpp HanLayoutEngine.h IndicLayoutEngine.cpp 
	IndicLayoutEngine.h IndicRearrangementProcessor.cpp 
	IndicRearrangementProcessor.h IndicReordering.cpp 
	IndicReordering.h LEFontInstance.h LEGlyphFilter.h 
	LELanguages.h LEScripts.h LESwaps.h LETypes.h LayoutEngine.cpp 
	LayoutEngine.h LigatureSubstProc.cpp LigatureSubstProc.h 
	LookupProcessor.cpp LookupProcessor.h MPreFixups.cpp 
	MPreFixups.h Makefile.in MarkToBasePosnSubtables.cpp 
	MarkToMarkPosnSubtables.cpp MultipleSubstSubtables.cpp 
	OpenTypeLayoutEngine.cpp OpenTypeLayoutEngine.h 
	ScriptAndLanguage.h ScriptAndLanguageTags.cpp 
	ScriptAndLanguageTags.h SegmentArrayProcessor.h 
	SegmentSingleProcessor.h SimpleArrayProcessor.h 
	SingleTableProcessor.h ThaiLayoutEngine.cpp ThaiLayoutEngine.h 
	ThaiShaping.cpp ThaiShaping.h ThaiStateTables.cpp 
	TrimmedArrayProcessor.h layout.dsp layout.rc layout.vcproj 
Log Message:
ICU 2.8 sync

Index: AnchorTables.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/AnchorTables.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- AnchorTables.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ AnchorTables.cpp	6 Apr 2004 10:09:02 -0000	1.4
@@ -1,7 +1,7 @@
 /*
  * @(#)AnchorTables.cpp	1.6 00/03/15
  *
- * (C) Copyright IBM Corp. 1998, 1999, 2000, 2001 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
  *
  */
 
@@ -42,6 +42,9 @@
     }
 
     default:
+		// Unknown format, set the anchor point to (0, 0)
+		anchor.fX = 0;
+		anchor.fY = 0;
         break;
     }
 }

Index: ArabicLayoutEngine.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ArabicLayoutEngine.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ArabicLayoutEngine.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ ArabicLayoutEngine.cpp	6 Apr 2004 10:09:02 -0000	1.4
@@ -35,6 +35,8 @@
 
 public:
     CharSubstitutionFilter(const LEFontInstance *fontInstance);
+    ~CharSubstitutionFilter();
+
     le_bool accept(LEGlyphID glyph) const;
 };
 
@@ -44,6 +46,12 @@
     // nothing to do
 }
 
+CharSubstitutionFilter::~CharSubstitutionFilter()
+{
+    // nothing to do
+}
+
+
 le_bool CharSubstitutionFilter::accept(LEGlyphID glyph) const
 {
     return fFontInstance->canDisplay((LEUnicode) glyph);
@@ -127,7 +135,7 @@
     } else if (fGDEFTable != NULL) {
         GDEFMarkFilter filter(fGDEFTable);
 
-        adjustMarkGlyphs(glyphs, glyphCount, false, &filter, positions, success);
+        adjustMarkGlyphs(glyphs, glyphCount, FALSE, &filter, positions, success);
     } else {
         GlyphDefinitionTableHeader *gdefTable = (GlyphDefinitionTableHeader *) ArabicShaping::glyphDefinitionTable;
         GDEFMarkFilter filter(gdefTable);
@@ -206,7 +214,7 @@
 
     charIndices = tempCharIndices;
 
-    ArabicOpenTypeLayoutEngine::mapCharsToGlyphs(tempChars, 0, tempGlyphCount, false, true, glyphs, charIndices, success);
+    ArabicOpenTypeLayoutEngine::mapCharsToGlyphs(tempChars, 0, tempGlyphCount, FALSE, TRUE, glyphs, charIndices, success);
 
     LE_DELETE_ARRAY(tempChars);
 

Index: ArabicLayoutEngine.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ArabicLayoutEngine.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ArabicLayoutEngine.h	10 Sep 2003 02:42:25 -0000	1.3
+++ ArabicLayoutEngine.h	6 Apr 2004 10:09:02 -0000	1.4
@@ -2,7 +2,7 @@
 /*
  * @(#)ArabicLayoutEngine.h	1.3 00/03/15
  *
- * (C) Copyright IBM Corp. 1998, 1999, 2000, 2001, 2002 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
  *
  */
 
@@ -77,14 +77,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 
@@ -99,7 +99,7 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - true if the characters are in a right to left directional run
+     * @param rightToLeft - TRUE if the characters are in a right to left directional run
      *
      * Output parameters:
      * @param outChars - the output character arrayt
@@ -123,7 +123,7 @@
      * @param chars - the input character context
      * @param offset - the offset of the first character to process
      * @param count - the number of characters to process
-     * @param reverse - true if the glyphs in the glyph array have been reordered
+     * @param reverse - TRUE if the glyphs in the glyph array have been reordered
      * @param glyphs - the input glyph array
      * @param glyphCount - the number of glyphs
      * @param positions - the position array, will be updated as needed
@@ -210,8 +210,8 @@
      * @param chars - the input character context
      * @param offset - the offset of the first character to be mapped
      * @param count - the number of characters to be mapped
-     * @param reverse - if true, the output will be in reverse order
-     * @param mirror - if true, do character mirroring
+     * @param reverse - if TRUE, the output will be in reverse order
+     * @param mirror - if TRUE, do character mirroring
      *
      * Output parameters:
      * @param glyphs - the glyph array
@@ -231,7 +231,7 @@
      * @param chars - the input character context
      * @param offset - the offset of the first character to process
      * @param count - the number of characters to process
-     * @param reverse - true if the glyphs in the glyph array have been reordered
+     * @param reverse - TRUE if the glyphs in the glyph array have been reordered
      * @param glyphs - the input glyph array
      * @param glyphCount - the number of glyphs
      * @param positions - the position array, will be updated as needed

Index: ArabicShaping.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ArabicShaping.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ArabicShaping.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ ArabicShaping.cpp	6 Apr 2004 10:09:02 -0000	1.4
@@ -150,7 +150,7 @@
 
     // erout is effective right logical index
     le_int32 erout = -1;
-    le_bool rightShapes = false;
+    le_bool rightShapes = FALSE;
     le_bool rightCauses = (rightType & MASK_SHAPE_LEFT) != 0;
     le_int32 in, e, out = 0, dir = 1;
 

Index: ClassDefinitionTables.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ClassDefinitionTables.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ClassDefinitionTables.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ ClassDefinitionTables.cpp	6 Apr 2004 10:09:02 -0000	1.4
@@ -83,11 +83,11 @@
 
     for (i = 0; i < count; i += 1) {
         if (SWAPW(classValueArray[i]) == glyphClass) {
-            return true;
+            return TRUE;
         }
     }
 
-    return false;
+    return FALSE;
 }
 
 le_int32 ClassDefFormat2Table::getGlyphClass(LEGlyphID glyphID) const
@@ -111,11 +111,11 @@
 
     for (i = 0; i < rangeCount; i += 1) {
         if (SWAPW(classRangeRecordArray[i].rangeValue) == glyphClass) {
-            return true;
+            return TRUE;
         }
     }
 
-    return false;
+    return FALSE;
 }
 
 U_NAMESPACE_END

Index: ContextualGlyphSubstProc.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ContextualGlyphSubstProc.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ContextualGlyphSubstProc.h	10 Sep 2003 02:42:25 -0000	1.3
+++ ContextualGlyphSubstProc.h	6 Apr 2004 10:09:02 -0000	1.4
@@ -37,14 +37,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 

Index: ContextualSubstSubtables.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ContextualSubstSubtables.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ContextualSubstSubtables.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ ContextualSubstSubtables.cpp	6 Apr 2004 10:09:02 -0000	1.4
@@ -57,20 +57,20 @@
 
     while (glyphCount > 0) {
         if (! glyphIterator->next()) {
-            return false;
+            return FALSE;
         }
 
         TTGlyphID glyph = (TTGlyphID) glyphIterator->getCurrGlyphID();
 
         if (glyph != SWAPW(glyphArray[match])) {
-            return false;
+            return FALSE;
         }
 
         glyphCount -= 1;
         match += direction;
     }
 
-    return true;
+    return TRUE;
 }
 
 le_bool ContextualSubstitutionBase::matchGlyphClasses(const le_uint16 *classArray, le_uint16 glyphCount,
@@ -88,7 +88,7 @@
 
     while (glyphCount > 0) {
         if (! glyphIterator->next()) {
-            return false;
+            return FALSE;
         }
 
         LEGlyphID glyph = glyphIterator->getCurrGlyphID();
@@ -101,7 +101,7 @@
             // table. If we're looking for such a class, pretend that
             // we found it.
             if (classDefinitionTable->hasGlyphClass(matchClass)) {
-                return false;
+                return FALSE;
             }
         }
 
@@ -109,7 +109,7 @@
         match += direction;
     }
 
-    return true;
+    return TRUE;
 }
 
 le_bool ContextualSubstitutionBase::matchGlyphCoverages(const Offset *coverageTableOffsetArray, le_uint16 glyphCount,
@@ -128,18 +128,18 @@
         const CoverageTable *coverageTable = (const CoverageTable *) (offsetBase + coverageTableOffset);
 
         if (! glyphIterator->next()) {
-            return false;
+            return FALSE;
         }
 
         if (coverageTable->getGlyphCoverage((LEGlyphID) glyphIterator->getCurrGlyphID()) < 0) {
-            return false;
+            return FALSE;
         }
 
         glyphCount -= 1;
         glyph += direction;
     }
 
-    return true;
+    return TRUE;
 }
 
 le_uint32 ContextualSubstitutionSubtable::process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator,
@@ -364,7 +364,7 @@
                 }
 
                 tempIterator.prev();
-                if (! matchGlyphIDs(chainSubRuleTable->backtrackGlyphArray, backtrackGlyphCount, &tempIterator, true)) {
+                if (! matchGlyphIDs(chainSubRuleTable->backtrackGlyphArray, backtrackGlyphCount, &tempIterator, TRUE)) {
                     continue;
                 }
 
@@ -438,7 +438,7 @@
 
                 tempIterator.prev();
                 if (! matchGlyphClasses(chainSubClassRuleTable->backtrackClassArray, backtrackGlyphCount,
-                    &tempIterator, backtrackClassDefinitionTable, true)) {
+                    &tempIterator, backtrackClassDefinitionTable, TRUE)) {
                     continue;
                 }
 
@@ -485,7 +485,7 @@
 
     tempIterator.prev();
     if (! ContextualSubstitutionBase::matchGlyphCoverages(backtrackCoverageTableOffsetArray,
-        backtrkGlyphCount, &tempIterator, (const char *) this, true)) {
+        backtrkGlyphCount, &tempIterator, (const char *) this, TRUE)) {
         return 0;
     }
 

Index: ContextualSubstSubtables.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ContextualSubstSubtables.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ContextualSubstSubtables.h	10 Sep 2003 02:42:25 -0000	1.3
+++ ContextualSubstSubtables.h	6 Apr 2004 10:09:02 -0000	1.4
@@ -32,15 +32,15 @@
 {
     static le_bool matchGlyphIDs(
         const TTGlyphID *glyphArray, le_uint16 glyphCount, GlyphIterator *glyphIterator,
-        le_bool backtrack = false);
+        le_bool backtrack = FALSE);
 
     static le_bool matchGlyphClasses(
         const le_uint16 *classArray, le_uint16 glyphCount, GlyphIterator *glyphIterator,
-        const ClassDefinitionTable *classDefinitionTable, le_bool backtrack = false);
+        const ClassDefinitionTable *classDefinitionTable, le_bool backtrack = FALSE);
 
     static le_bool matchGlyphCoverages(
         const Offset *coverageTableOffsetArray, le_uint16 glyphCount,
-        GlyphIterator *glyphIterator, const char *offsetBase, le_bool backtrack = false);
+        GlyphIterator *glyphIterator, const char *offsetBase, le_bool backtrack = FALSE);
 
     static void applySubstitutionLookups(
         const LookupProcessor *lookupProcessor, 

Index: DefaultCharMapper.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/DefaultCharMapper.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- DefaultCharMapper.h	10 Sep 2003 02:42:25 -0000	1.3
+++ DefaultCharMapper.h	6 Apr 2004 10:09:03 -0000	1.4
@@ -25,7 +25,7 @@
  *
  * @see LECharMapper
  */
-class DefaultCharMapper : public LECharMapper
+class DefaultCharMapper : public UMemory, public LECharMapper
 {
 private:
     le_bool fFilterControls;

Index: GXLayoutEngine.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/GXLayoutEngine.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- GXLayoutEngine.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ GXLayoutEngine.cpp	6 Apr 2004 10:09:03 -0000	1.4
@@ -39,7 +39,7 @@
         return 0;
     }
 
-    mapCharsToGlyphs(chars, offset, count, false, rightToLeft, glyphs, charIndices, success);
+    mapCharsToGlyphs(chars, offset, count, FALSE, rightToLeft, glyphs, charIndices, success);
 
     if (LE_FAILURE(success)) {
         return 0;

Index: GXLayoutEngine.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/GXLayoutEngine.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- GXLayoutEngine.h	10 Sep 2003 02:42:25 -0000	1.3
+++ GXLayoutEngine.h	6 Apr 2004 10:09:03 -0000	1.4
@@ -2,7 +2,7 @@
 /*
  * @(#)GXLayoutEngine.h	1.4 00/03/15
  *
- * (C) Copyright IBM Corp. 1998, 1999, 2000, 2001, 2002 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
  *
  */
 
@@ -60,14 +60,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 
@@ -90,7 +90,7 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - true if the text is in a right to left directional run
+     * @param rightToLeft - TRUE if the text is in a right to left directional run
      *
      * Output parameters:
      * @param glyphs - the glyph index array

Index: GlyphIterator.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/GlyphIterator.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- GlyphIterator.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ GlyphIterator.cpp	6 Apr 2004 10:09:03 -0000	1.4
@@ -15,13 +15,79 @@
 
 U_NAMESPACE_BEGIN
 
-GlyphIterator::GlyphIterator(LEGlyphID *theGlyphs, GlyphPositionAdjustment *theGlyphPositionAdjustments, le_int32 theGlyphCount,
-    le_bool rightToLeft, le_uint16 theLookupFlags, LETag theFeatureTag, const LETag *theGlyphTags[],
+const char InsertionList::fgClassID = 0;
+
+InsertionList::InsertionList(le_bool rightToLeft)
+: head(NULL), tail(NULL), growAmount(0), append(rightToLeft)
+{
+	tail = (InsertionRecord *) &head;
+}
+
+InsertionList::~InsertionList()
+{
+	reset();
+}
+
+void InsertionList::reset()
+{
+	while (head != NULL) {
+		InsertionRecord *record = head;
+
+		head = head->next;
+		LE_DELETE_ARRAY(record);
+	}
+
+	tail = (InsertionRecord *) &head;
+	growAmount = 0;
+}
+
+le_int32 InsertionList::getGrowAmount()
+{
+	return growAmount;
+}
+
+LEGlyphID *InsertionList::insert(le_int32 position, le_int32 count)
+{
+	InsertionRecord *insertion = (InsertionRecord *) LE_NEW_ARRAY(char, sizeof(InsertionRecord) + (count - ANY_NUMBER) * sizeof (LEGlyphID));
+
+	insertion->position = position;
+	insertion->count = count;
+
+	growAmount += count - 1;
+
+	if (append) {
+		// insert on end of list...
+		insertion->next = NULL;
+		tail->next = insertion;
+		tail = insertion;
+	} else {
+		// insert on front of list...
+		insertion->next = head;
+		head = insertion;
+	}
+
+	return insertion->glyphs;
+}
+
+le_bool InsertionList::applyInsertions(InsertionCallback *callback)
+{
+	for (InsertionRecord *rec = head; rec != NULL; rec = rec->next) {
+		if (callback->applyInsertion(rec->position, rec->count, rec->glyphs)) {
+			return TRUE;
+		}
+	}
+
+	return FALSE;
+}
+
+GlyphIterator::GlyphIterator(LEGlyphID *&theGlyphs, GlyphPositionAdjustment *theGlyphPositionAdjustments, le_int32 *&theCharIndices, le_int32 theGlyphCount,
+    le_bool rightToLeft, le_uint16 theLookupFlags, LETag theFeatureTag, const LETag **&theGlyphTags,
     const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader)
   : direction(1), position(-1), nextLimit(theGlyphCount), prevLimit(-1),
     cursiveFirstPosition(-1), cursiveLastPosition(-1), cursiveBaselineAdjustment(0),
-    glyphs(theGlyphs), glyphPositionAdjustments(theGlyphPositionAdjustments), lookupFlags(theLookupFlags),
-    featureTag(theFeatureTag), glyphTags(theGlyphTags),
+    glyphsRef(&theGlyphs), glyphs(theGlyphs), glyphPositionAdjustments(theGlyphPositionAdjustments),
+	charIndicesRef(&theCharIndices), charIndices(theCharIndices), glyphCount(theGlyphCount), insertionList(NULL), ownInsertionList(TRUE), srcIndex(-1), destIndex(-1),
+	lookupFlags(theLookupFlags), featureTag(theFeatureTag), glyphTagsRef(&theGlyphTags), glyphTags(theGlyphTags),
     glyphClassDefinitionTable(NULL),
     markAttachClassDefinitionTable(NULL)
 
@@ -37,9 +103,12 @@
         nextLimit = -1;
         prevLimit = theGlyphCount;
     }
+
+	insertionList = new InsertionList(rightToLeft);
 }
 
 GlyphIterator::GlyphIterator(GlyphIterator &that)
+  : InsertionCallback()
 {
     direction    = that.direction;
     position     = that.position;
@@ -49,10 +118,19 @@
     cursiveFirstPosition = that.cursiveFirstPosition;
     cursiveLastPosition  = that.cursiveLastPosition;
 
+    glyphsRef = that.glyphsRef;
     glyphs = that.glyphs;
     glyphPositionAdjustments = that.glyphPositionAdjustments;
+    charIndicesRef = that.charIndicesRef;
+    charIndices = that.charIndices;
+    glyphCount = that.glyphCount;
+    insertionList = that.insertionList;
+    ownInsertionList = FALSE;
+    srcIndex = that.srcIndex;
+    destIndex = that.destIndex;
     lookupFlags = that.lookupFlags;
     featureTag = that.featureTag;
+    glyphTagsRef = that.glyphTagsRef;
     glyphTags = that.glyphTags;
     glyphClassDefinitionTable = that.glyphClassDefinitionTable;
     markAttachClassDefinitionTable = that.markAttachClassDefinitionTable;
@@ -68,10 +146,19 @@
     cursiveFirstPosition = that.cursiveFirstPosition;
     cursiveLastPosition  = that.cursiveLastPosition;
 
-    glyphs = that.glyphs;
+	glyphsRef = that.glyphsRef;
+	glyphs = that.glyphs;
     glyphPositionAdjustments = that.glyphPositionAdjustments;
+	charIndicesRef = that.charIndicesRef;
+	charIndices = that.charIndices;
+	glyphCount = that.glyphCount;
+	insertionList = that.insertionList;
+	ownInsertionList = FALSE;
+	srcIndex = that.srcIndex;
+	destIndex = that.destIndex;
     lookupFlags = that.lookupFlags;
     featureTag = newFeatureTag;
+	glyphTagsRef = that.glyphTagsRef;
     glyphTags = that.glyphTags;
     glyphClassDefinitionTable = that.glyphClassDefinitionTable;
     markAttachClassDefinitionTable = that.markAttachClassDefinitionTable;
@@ -88,10 +175,19 @@
     cursiveFirstPosition = that.cursiveFirstPosition;
     cursiveLastPosition  = that.cursiveLastPosition;
 
+	glyphsRef = that.glyphsRef;
     glyphs = that.glyphs;
     glyphPositionAdjustments = that.glyphPositionAdjustments;
+	charIndicesRef = that.charIndicesRef;
+	charIndices = that.charIndices;
+	glyphCount = that.glyphCount;
+	insertionList = that.insertionList;
+	ownInsertionList = FALSE;
+	srcIndex = that.srcIndex;
+	destIndex = that.destIndex;
     lookupFlags = newLookupFlags;
     featureTag = that.featureTag;
+	glyphTagsRef = that.glyphTagsRef;
     glyphTags = that.glyphTags;
     glyphClassDefinitionTable = that.glyphClassDefinitionTable;
     markAttachClassDefinitionTable = that.markAttachClassDefinitionTable;
@@ -103,6 +199,91 @@
 
 GlyphIterator::~GlyphIterator()
 {
+	if (ownInsertionList) {
+		delete insertionList;
+	}
+}
+
+void GlyphIterator::reset(le_uint16 newLookupFlags, LETag newFeatureTag)
+{
+	position    = prevLimit;
+	featureTag  = newFeatureTag;
+	lookupFlags = newLookupFlags;
+}
+
+LEGlyphID *GlyphIterator::insertGlyphs(le_int32 count)
+{
+	return insertionList->insert(position, count);
+}
+
+le_int32 GlyphIterator::applyInsertions()
+{
+	le_int32 growAmount = insertionList->getGrowAmount();
+
+	if (growAmount == 0) {
+		return glyphCount;
+	}
+
+	le_int32 newGlyphCount = glyphCount + growAmount;
+
+	*glyphsRef      = glyphs      = (LEGlyphID *)    LE_GROW_ARRAY(glyphs,      newGlyphCount);
+	*glyphTagsRef   = glyphTags   = (const LETag **) LE_GROW_ARRAY(glyphTags,   newGlyphCount);
+	*charIndicesRef = charIndices = (le_int32 *)     LE_GROW_ARRAY(charIndices, newGlyphCount);
+
+	srcIndex  = glyphCount - 1;
+	destIndex = newGlyphCount - 1;
+
+	// If the current position is at the end of the array
+	// update it to point to the end of the new array. The
+	// insertion callback will handle all other cases.
+	if (position == glyphCount) {
+		position = newGlyphCount;
+	}
+
+	insertionList->applyInsertions(this);
+
+	insertionList->reset();
+
+	if (direction < 0) {
+		prevLimit = newGlyphCount;
+	} else {
+		nextLimit = newGlyphCount;
+	}
+
+	return glyphCount = newGlyphCount;
+}
+
+le_bool GlyphIterator::applyInsertion(le_int32 atPosition, le_int32 count, LEGlyphID newGlyphs[])
+{
+	// if the current position is within the block we're shifting
+	// it needs to be updated to the current glyph's
+	// new location.
+	if (position >= atPosition && position <= srcIndex) {
+		position += destIndex - srcIndex;
+	}
+
+	while (srcIndex > atPosition) {
+		glyphs[destIndex]      = glyphs[srcIndex];
+		glyphTags[destIndex]   = glyphTags[srcIndex];
+		charIndices[destIndex] = charIndices[srcIndex];
+
+		destIndex -= 1;
+		srcIndex  -= 1;
+	}
+
+	for (le_int32 i = count - 1; i >= 0; i -= 1) {
+		glyphs[destIndex]      = newGlyphs[i];
+		glyphTags[destIndex]   = glyphTags[atPosition];
+		charIndices[destIndex] = charIndices[atPosition];
+
+		destIndex -= 1;
+	}
+
+	// the source glyph we're pointing at
+	// just got replaced by the insertion
+	srcIndex -= 1;
+
+	return FALSE;
 }
 
 le_int32 GlyphIterator::getCurrStreamPosition() const
@@ -380,7 +561,7 @@
     le_int32 glyphClass = gcdNoGlyphClass;
 
     if (LE_GET_GLYPH(glyphID) >= 0xFFFE) {
-        return true;
+        return TRUE;
     }
 
     if (glyphClassDefinitionTable != NULL) {
@@ -390,7 +571,7 @@
     switch (glyphClass)
     {
     case gcdNoGlyphClass:
-        return false;
+        return FALSE;
 
     case gcdSimpleGlyph:
         return (lookupFlags & lfIgnoreBaseGlyphs) != 0;
@@ -401,7 +582,7 @@
     case gcdMarkGlyph:
     {
         if ((lookupFlags & lfIgnoreMarks) != 0) {
-            return true;
+            return TRUE;
         }
 
         le_uint16 markAttachType = (lookupFlags & lfMarkAttachTypeMask) >> lfMarkAttachTypeShift;
@@ -410,14 +591,14 @@
             return markAttachClassDefinitionTable->getGlyphClass(glyphID) != markAttachType;
         }
 
-        return false;
+        return FALSE;
     }
 
     case gcdComponentGlyph:
         return (lookupFlags & lfIgnoreBaseGlyphs) != 0;
 
     default:
-        return false;
+        return FALSE;
     }
 }
 
@@ -427,7 +608,7 @@
 le_bool GlyphIterator::hasFeatureTag() const
 {
     if (featureTag == defaultTag || featureTag == emptyTag) {
-        return true;
+        return TRUE;
     }
 
     if (glyphTags != NULL) {
@@ -435,12 +616,12 @@
 
         for (le_int32 tag = 0; tagList[tag] != emptyTag; tag += 1) {
             if (tagList[tag] == featureTag) {
-                return true;
+                return TRUE;
             }
         }
     }
 
-    return false;
+    return FALSE;
 }
 
 le_bool GlyphIterator::findFeatureTag()
@@ -448,11 +629,11 @@
     while (nextInternal()) {
         if (hasFeatureTag()) {
             prevInternal();
-            return true;
+            return TRUE;
         }
     }
 
-    return false;
+    return FALSE;
 }
 
 

Index: GlyphIterator.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/GlyphIterator.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- GlyphIterator.h	10 Sep 2003 02:42:25 -0000	1.3
+++ GlyphIterator.h	6 Apr 2004 10:09:03 -0000	1.4
@@ -20,10 +20,66 @@
 
 U_NAMESPACE_BEGIN
 
-class GlyphIterator : public UMemory {
+struct InsertionRecord
+{
+	InsertionRecord *next;
+	le_int32 position;
+	le_int32 count;
+	LEGlyphID glyphs[ANY_NUMBER];
+};
+
+class InsertionCallback
+{
 public:
-    GlyphIterator(LEGlyphID *theGlyphs, GlyphPositionAdjustment *theGlyphPositionAdjustments, le_int32 theGlyphCount,
-        le_bool rightToLeft, le_uint16 theLookupFlags, LETag theFeatureTag, const LETag *theGlyphTags[],
+	virtual le_bool applyInsertion(le_int32 atPosition, le_int32 count, LEGlyphID newGlyphs[]) = 0;
+};
+
+class InsertionList : public UObject
+{
+public:
+	InsertionList(le_bool rightToLeft);
+	~InsertionList();
+
+	LEGlyphID *insert(le_int32 position, le_int32 count);
+	le_int32 getGrowAmount();
+
+	le_bool applyInsertions(InsertionCallback *callback);
+
+	void reset();
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for the actual class.
+     *
+     * @stable ICU 2.8
+     */
+    virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+
+    /**
+     * ICU "poor man's RTTI", returns a UClassID for this class.
+     *
+     * @stable ICU 2.8
+     */
+    static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+
+private:
+
+    /**
+     * The address of this static class variable serves as this class's ID
+     * for ICU "poor man's RTTI".
+     */
+    static const char fgClassID;
+
+	InsertionRecord *head;
+	InsertionRecord *tail;
+
+	le_int32 growAmount;
+	le_bool  append;
+};
+
+class GlyphIterator : public UMemory, protected InsertionCallback {
+public:
+    GlyphIterator(LEGlyphID *&theGlyphs, GlyphPositionAdjustment *theGlyphPositionAdjustments, le_int32 *&theCharIndices, le_int32 theGlyphCount,
+        le_bool rightToLeft, le_uint16 theLookupFlags, LETag theFeatureTag, const LETag **&theGlyphTags,
         const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader);
 
     GlyphIterator(GlyphIterator &that);
@@ -32,7 +88,9 @@
 
     GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags);
 
-    ~GlyphIterator();
+    virtual ~GlyphIterator();
+
+	void reset(le_uint16 newLookupFlags, LETag newFeatureTag);
 
     le_bool next(le_uint32 delta = 1);
     le_bool prev(le_uint32 delta = 1);
@@ -71,6 +129,12 @@
     void adjustCursiveLastGlyphPositionAdjustment(float xPlacmentAdjust, float yPlacementAdjust,
                                            float xAdvanceAdjust, float yAdvanceAdjust);
 
+	LEGlyphID *insertGlyphs(le_int32 count);
+	le_int32 applyInsertions();
+
+protected:
+	virtual le_bool applyInsertion(le_int32 atPosition, le_int32 count, LEGlyphID newGlyphs[]);
+
 private:
     GlyphIterator();
     le_bool filterGlyph(le_uint32 index) const;
@@ -86,10 +150,19 @@
     le_int32  cursiveLastPosition;
     float     cursiveBaselineAdjustment;
     LEPoint   cursiveLastExitPoint;
+	LEGlyphID **glyphsRef;
     LEGlyphID *glyphs;
     GlyphPositionAdjustment *glyphPositionAdjustments;
+	le_int32 **charIndicesRef;
+	le_int32  *charIndices;
+	le_int32  glyphCount;
+	InsertionList *insertionList;
+	le_bool ownInsertionList;
+	le_int32 srcIndex;
+	le_int32 destIndex;
     le_uint16 lookupFlags;
     LETag    featureTag;
+	const LETag ***glyphTagsRef;
     const LETag **glyphTags;
     const GlyphClassDefinitionTable *glyphClassDefinitionTable;
     const MarkAttachClassDefinitionTable *markAttachClassDefinitionTable;

Index: GlyphPositioningTables.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/GlyphPositioningTables.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- GlyphPositioningTables.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ GlyphPositioningTables.cpp	6 Apr 2004 10:09:03 -0000	1.4
@@ -1,7 +1,7 @@
 /*
  * @(#)GlyphPositioningTables.cpp	1.7 00/03/15
  *
- * (C) Copyright IBM Corp. 1998, 1999, 2000, 2001 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
  *
  */
 
@@ -23,8 +23,9 @@
                                           const LEFontInstance *fontInstance, const LETag *featureOrder) const
 {
     GlyphPositioningLookupProcessor processor(this, scriptTag, languageTag, featureOrder);
+	le_int32 *charIndices = NULL;
 
-    processor.process(glyphs, glyphPositionAdjustments, glyphTags, glyphCount, rightToLeft,
+    processor.process(glyphs, glyphPositionAdjustments, glyphTags, charIndices, glyphCount, rightToLeft,
         glyphDefinitionTableHeader, fontInstance);
 }
 

Index: GlyphSubstitutionTables.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/GlyphSubstitutionTables.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- GlyphSubstitutionTables.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ GlyphSubstitutionTables.cpp	6 Apr 2004 10:09:03 -0000	1.4
@@ -18,14 +18,14 @@
 
 U_NAMESPACE_BEGIN
 
-void GlyphSubstitutionTableHeader::process(LEGlyphID *glyphs, const LETag **glyphTags, le_int32 glyphCount,
+le_int32 GlyphSubstitutionTableHeader::process(LEGlyphID *&glyphs, const LETag **&glyphTags, le_int32 *&charIndices, le_int32 glyphCount,
                                            le_bool rightToLeft, LETag scriptTag, LETag languageTag,
                                            const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
                                            const LEGlyphFilter *filter, const LETag *featureOrder) const
 {
     GlyphSubstitutionLookupProcessor processor(this, scriptTag, languageTag, filter, featureOrder);
 
-    processor.process(glyphs, NULL, glyphTags, glyphCount, rightToLeft, glyphDefinitionTableHeader, NULL);
+    return processor.process(glyphs, NULL, glyphTags, charIndices, glyphCount, rightToLeft, glyphDefinitionTableHeader, NULL);
 }
 
 le_bool GlyphSubstitutionTableHeader::coversScript(LETag scriptTag) const
@@ -39,7 +39,7 @@
 {
     const ScriptListTable *scriptListTable = (const ScriptListTable *) ((char *)this + SWAPW(scriptListOffset));
 
-    return scriptListTable->findLanguage(scriptTag, languageTag, true) != NULL;
+    return scriptListTable->findLanguage(scriptTag, languageTag, TRUE) != NULL;
 }
 
 U_NAMESPACE_END

Index: GlyphSubstitutionTables.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/GlyphSubstitutionTables.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- GlyphSubstitutionTables.h	10 Sep 2003 02:42:25 -0000	1.3
+++ GlyphSubstitutionTables.h	6 Apr 2004 10:09:03 -0000	1.4
@@ -29,7 +29,7 @@
     Offset  featureListOffset;
     Offset  lookupListOffset;
 
-    void    process(LEGlyphID *glyphs, const LETag **glyphTags, le_int32 glyphCount,
+    le_int32    process(LEGlyphID *&glyphs, const LETag **&glyphTags, le_int32 *&charIndices, le_int32 glyphCount,
                  le_bool rightToLeft, LETag scriptTag, LETag languageTag,
                  const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
                  const LEGlyphFilter *filter = NULL, const LETag *featureOrder = NULL) const;

Index: HanLayoutEngine.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/HanLayoutEngine.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- HanLayoutEngine.cpp	10 Sep 2003 02:42:25 -0000	1.1
+++ HanLayoutEngine.cpp	6 Apr 2004 10:09:03 -0000	1.2
@@ -15,6 +15,8 @@
 #include "HanLayoutEngine.h"
 #include "ScriptAndLanguageTags.h"
 
+U_NAMESPACE_BEGIN
+
 const char HanOpenTypeLayoutEngine::fgClassID=0;
 
 HanOpenTypeLayoutEngine::HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
@@ -66,3 +68,5 @@
 
     return count;
 }
+
+U_NAMESPACE_END

Index: HanLayoutEngine.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/HanLayoutEngine.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- HanLayoutEngine.h	10 Sep 2003 02:42:25 -0000	1.1
+++ HanLayoutEngine.h	6 Apr 2004 10:09:03 -0000	1.2
@@ -60,14 +60,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 
@@ -82,7 +82,7 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - true if the characters are in a right to left directional run
+     * @param rightToLeft - TRUE if the characters are in a right to left directional run
      *
      * Output parameters:
      * @param outChars - the output character arrayt

Index: IndicLayoutEngine.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/IndicLayoutEngine.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- IndicLayoutEngine.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ IndicLayoutEngine.cpp	6 Apr 2004 10:09:03 -0000	1.4
@@ -44,8 +44,8 @@
 
 // Input: characters, tags
 // Output: glyphs, char indices
-le_int32 IndicOpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, const LETag **featureTags,
-                LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success)
+le_int32 IndicOpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+					const LETag **&featureTags, LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;

Index: IndicLayoutEngine.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/IndicLayoutEngine.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- IndicLayoutEngine.h	10 Sep 2003 02:42:25 -0000	1.3
+++ IndicLayoutEngine.h	6 Apr 2004 10:09:03 -0000	1.4
@@ -84,14 +84,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 
@@ -108,7 +108,7 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - true if the characters are in a right to left directional run
+     * @param rightToLeft - TRUE if the characters are in a right to left directional run
      *
      * Output parameters:
      * @param outChars - the output character arrayt
@@ -137,7 +137,7 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - true if the characters are in a right to left directional run
+     * @param rightToLeft - TRUE if the characters are in a right to left directional run
      * @param featureTags - the feature tag array
      *
      * Output parameters:
@@ -153,7 +153,7 @@
      * @internal
      */
     virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
-            const LETag **featureTags, LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success);
+            const LETag **&featureTags, LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success);
 
 private:
 

Index: IndicRearrangementProcessor.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/IndicRearrangementProcessor.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- IndicRearrangementProcessor.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ IndicRearrangementProcessor.cpp	6 Apr 2004 10:09:03 -0000	1.4
@@ -162,7 +162,7 @@
         id = charIndices[lastGlyph];
         x = lastGlyph - 2;
 
-        while (x >= lastGlyph) {
+        while (x >= firstGlyph) {
             glyphs[x + 2] = glyphs[x];
             charIndices[x + 2] = charIndices[x];
             x -= 1;
@@ -182,7 +182,7 @@
         id = charIndices[lastGlyph];
         x = lastGlyph - 2;
 
-        while (x >= lastGlyph) {
+        while (x >= firstGlyph) {
             glyphs[x + 2] = glyphs[x];
             charIndices[x + 2] = charIndices[x];
             x -= 1;

Index: IndicRearrangementProcessor.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/IndicRearrangementProcessor.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- IndicRearrangementProcessor.h	10 Sep 2003 02:42:25 -0000	1.3
+++ IndicRearrangementProcessor.h	6 Apr 2004 10:09:03 -0000	1.4
@@ -39,14 +39,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 

Index: IndicReordering.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/IndicReordering.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- IndicReordering.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ IndicReordering.cpp	6 Apr 2004 10:09:03 -0000	1.4
@@ -319,8 +319,8 @@
             le_int32 baseConsonant = lastConsonant;
             le_int32 postBase = lastConsonant + 1;
             le_int32 postBaseLimit = classTable->scriptFlags & IndicClassTable::SF_POST_BASE_LIMIT_MASK;
-            le_bool  seenVattu = false;
-            le_bool  seenBelowBaseForm = false;
+            le_bool  seenVattu = FALSE;
+            le_bool  seenBelowBaseForm = FALSE;
 
             while (baseConsonant > baseLimit) {
                 IndicClassTable::CharClass charClass = classTable->getCharClass(chars[baseConsonant]);
@@ -341,7 +341,7 @@
 
                         postBase = baseConsonant;
                     } else if (IndicClassTable::hasBelowBaseForm(charClass)) {
-                        seenBelowBaseForm = true;
+                        seenBelowBaseForm = TRUE;
                     }
 
                     postBaseLimit -= 1;
@@ -362,7 +362,7 @@
             }
 
             // write any pre-base consonants
-            le_bool supressVattu = true;
+            le_bool supressVattu = TRUE;
 
             for (i = baseLimit; i < baseConsonant; i += 1) {
                 LEUnicode ch = chars[i];

Index: IndicReordering.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/IndicReordering.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- IndicReordering.h	10 Sep 2003 02:42:25 -0000	1.3
+++ IndicReordering.h	6 Apr 2004 10:09:04 -0000	1.4
@@ -68,7 +68,7 @@
         CF_INDEX_SHIFT  = 16
     };
 
-    typedef le_int32 CharClass;
+    typedef le_uint32 CharClass;
 
     enum ScriptFlagBits
     {

Index: LEFontInstance.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/LEFontInstance.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LEFontInstance.h	10 Sep 2003 02:42:25 -0000	1.3
+++ LEFontInstance.h	6 Apr 2004 10:09:04 -0000	1.4
@@ -38,7 +38,7 @@
      *
      * @return the adjusted character
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual LEUnicode32 mapChar(LEUnicode32 ch) const = 0;
 };
@@ -75,7 +75,7 @@
      * This virtual destructor is here so that the subclass
      * destructors can be invoked through the base class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline ~LEFontInstance() {};
 
@@ -150,7 +150,7 @@
      * @return the address of the table in memory, or <code>NULL</code>
      *         if the table doesn't exist.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual const void *getFontTable(LETag tableTag) const = 0;
 
@@ -161,12 +161,12 @@
      * to glyph mapping.
      *
      * The default implementation of this method will return
-     * <code>true</code> if <code>mapCharToGlyph(ch)</code>
+     * <code>TRUE</code> if <code>mapCharToGlyph(ch)</code>
      * returns a non-zero value.
      *
      * @param ch - the character to be tested
      *
-     * @return true if the font can render ch.
+     * @return TRUE if the font can render ch.
      *
      * @draft ICU 2.6
      */
@@ -178,7 +178,7 @@
      *
      * @return the number of design units pre EM.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual le_int32 getUnitsPerEM() const = 0;
 
@@ -189,7 +189,7 @@
      * @param chars - the character array
      * @param offset - the index of the first character
      * @param count - the number of characters
-     * @param reverse - if true, store the glyph indices in reverse order.
+     * @param reverse - if TRUE, store the glyph indices in reverse order.
      * @param mapper - the character mapper.
      * @param glyphs - the output glyph array
      *
@@ -251,9 +251,9 @@
      * @param pointNumber - the number of the point
      * @param point - the point's X and Y pixel values will be stored here
      *
-     * @return true if the point coordinates could be stored.
+     * @return TRUE if the point coordinates could be stored.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const = 0;
 
@@ -263,7 +263,7 @@
      *
      * @return the pixel width of the EM square
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual float getXPixelsPerEm() const = 0;
 
@@ -273,7 +273,7 @@
      *
      * @return the pixel height of the EM square
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual float getYPixelsPerEm() const = 0;
 
@@ -395,7 +395,7 @@
      *
      * @return the floating point value
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static float fixedToFloat(le_int32 fixed);
 
@@ -407,7 +407,7 @@
      *
      * @return the fixed point value
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static le_int32 floatToFixed(float theFloat);
 

Index: LEGlyphFilter.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/LEGlyphFilter.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LEGlyphFilter.h	10 Sep 2003 02:42:25 -0000	1.3
+++ LEGlyphFilter.h	6 Apr 2004 10:09:04 -0000	1.4
@@ -1,7 +1,7 @@
 /*
  * @(#)LEGlyphFilter.h	1.3 00/03/15
  *
- * (C) Copyright IBM Corp. 1998, 1999, 2000, 2001, 2002 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
  *
  */
 
@@ -24,7 +24,7 @@
      * Destructor.
      * @draft ICU 2.4
      */
-    virtual inline ~LEGlyphFilter() {};
+    virtual ~LEGlyphFilter();
 
     /**
      * This method is used to test a particular
@@ -33,7 +33,7 @@
      *
      * @param glyph - the glyph index to be tested
      *
-     * @return true if the glyph index is in the set.
+     * @return TRUE if the glyph index is in the set.
      *
      * @internal
      */

Index: LELanguages.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/LELanguages.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- LELanguages.h	10 Sep 2003 02:42:25 -0000	1.1
+++ LELanguages.h	6 Apr 2004 10:09:04 -0000	1.2
@@ -13,6 +13,8 @@
 #ifndef __LELANGUAGES_H
 #define __LELANGUAGES_H
 
+#include "LETypes.h"
+
 U_NAMESPACE_BEGIN
 
 /**

Index: LEScripts.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/LEScripts.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LEScripts.h	10 Sep 2003 02:42:25 -0000	1.3
+++ LEScripts.h	6 Apr 2004 10:09:04 -0000	1.4
@@ -13,6 +13,8 @@
 #ifndef __LESCRIPTS_H
 #define __LESCRIPTS_H
 
+#include "LETypes.h"
+
 U_NAMESPACE_BEGIN
 
 /**

Index: LESwaps.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/LESwaps.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LESwaps.h	10 Sep 2003 02:42:25 -0000	1.3
+++ LESwaps.h	6 Apr 2004 10:09:04 -0000	1.4
@@ -17,18 +17,33 @@
  * A convenience macro which invokes the swapWord member function
  * from a concise call.
  *
- * @draft ICU 2.2
+ * @stable ICU 2.8
  */
-#define SWAPW(value) (LESwaps::isBigEndian() ? (value) : LESwaps::swapWord(value))
-
+#if defined(U_IS_BIG_ENDIAN)
+	#if U_IS_BIG_ENDIAN
+		#define SWAPW(value) (value)
+	#else
+		#define SWAPW(value) LESwaps::swapWord(value)
+	#endif
+#else
+	#define SWAPW(value) (LESwaps::isBigEndian() ? (value) : LESwaps::swapWord(value))
+#endif
 
 /**
  * A convenience macro which invokes the swapLong member function
  * from a concise call.
  *
- * @draft ICU 2.2
+ * @stable ICU 2.8
  */
-#define SWAPL(value) (LESwaps::isBigEndian() ? (value) : LESwaps::swapLong(value))
+#if defined(U_IS_BIG_ENDIAN)
+	#if U_IS_BIG_ENDIAN
+		#define SWAPL(value) (value)
+	#else
+		#define SWAPL(value) LESwaps::swapLong(value)
+	#endif
+#else
+	#define SWAPL(value) (LESwaps::isBigEndian() ? (value) : LESwaps::swapLong(value))
+#endif
 
 /**
  * This class is used to access data which stored in big endian order
@@ -39,11 +54,12 @@
  * All methods are static and inline in an attempt to induce the compiler
  * to do most of the calculations at compile time.
  *
- * @draft ICU 2.2
+ * @stable ICU 2.8
  */
 class U_LAYOUT_API LESwaps /* not : public UObject because all methods are static */ {
 public:
 
+#if !defined(U_IS_BIG_ENDIAN)
     /**
      * This method detects the endian-ness of the platform by
      * casting a pointer to a word to a pointer to a byte. On
@@ -51,16 +67,17 @@
      * lowest address. On little endian platforms, the FF will
      * be in the byte with the highest address.
      *
-     * @return true if the platform is big endian
+     * @return TRUE if the platform is big endian
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
-    static le_bool isBigEndian()
+    static le_uint8 isBigEndian()
     {
         const le_uint16 word = 0xFF00;
 
         return *((le_uint8 *) &word);
     };
+#endif
 
     /**
      * This method does the byte swap required on little endian platforms
@@ -70,7 +87,7 @@
      *
      * @return the byte swapped word
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static le_uint16 swapWord(le_uint16 value)
     {
@@ -85,7 +102,7 @@
      *
      * @return the byte swapped long
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static le_uint32 swapLong(le_uint32 value)
     {

Index: LETypes.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/LETypes.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LETypes.h	10 Sep 2003 02:42:25 -0000	1.3
+++ LETypes.h	6 Apr 2004 10:09:04 -0000	1.4
@@ -72,24 +72,6 @@
  */
 typedef UBool le_bool;
 
-#ifndef true
-/**
- * Used for <code>le_bool</code> values which are <code>true</code>.
- *
- * @stable ICU 2.4
- */
-#define true 1
-#endif
-
-#ifndef false
-/**
- * Used for <code>le_bool</code> values which are <code>false</code>.
- *
- * @stable ICU 2.4
- */
-#define false 0
-#endif
-
 #ifndef NULL
 /**
  * Used to represent empty pointers.

Index: LayoutEngine.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/LayoutEngine.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LayoutEngine.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ LayoutEngine.cpp	6 Apr 2004 10:09:04 -0000	1.4
@@ -82,6 +82,14 @@
     return ch;
 }
 
+// This is here to get it out of LEGlyphFilter.h.
+// No particular reason to put it here, other than
+// this is a good central location...
+LEGlyphFilter::~LEGlyphFilter()
+{
+	// nothing to do
+}
+
 const char LayoutEngine::fgClassID=0;
 
 LayoutEngine::LayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode)
@@ -170,6 +178,7 @@
     
     if (fGlyphs == NULL) {
       success = LE_NO_LAYOUT_ERROR;
+	  return;
     }
     
     LE_ARRAY_COPY(glyphs, fGlyphs, fGlyphCount);
@@ -272,6 +281,21 @@
     positions[glyphCount * 2 + 1] = y;
 }
 
+void LayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool /*reverse*/, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success)
+{
+    if (LE_FAILURE(success)) {
+        return;
+    }
+
+    if (chars == NULL || glyphs == NULL || positions == NULL || offset < 0 || count < 0 || glyphCount < 0) {
+        success = LE_ILLEGAL_ARGUMENT_ERROR;
+        return;
+    }
+
+    // default is no adjustments
+    return;
+}
+
 void LayoutEngine::adjustMarkGlyphs(const LEGlyphID glyphs[], le_int32 glyphCount, le_bool reverse, LEGlyphFilter *markFilter,
                                     float positions[], LEErrorCode &success)
 {
@@ -352,7 +376,7 @@
         }
     }
 
-    DefaultCharMapper charMapper(true, mirror);
+    DefaultCharMapper charMapper(TRUE, mirror);
 
     fFontInstance->mapCharsToGlyphs(chars, offset, count, reverse, &charMapper, glyphs);
 }

Index: LayoutEngine.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/LayoutEngine.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LayoutEngine.h	10 Sep 2003 02:42:25 -0000	1.3
+++ LayoutEngine.h	6 Apr 2004 10:09:04 -0000	1.4
@@ -61,7 +61,7 @@
  * @see LEFontInstance
  * @see ScriptAndLanguageTags.h
  *
- * @draft ICU 2.2
+ * @stable ICU 2.8
  */
 class U_LAYOUT_API LayoutEngine : public UObject {
 protected:
@@ -163,7 +163,7 @@
      * @param offset - the offset of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the context.
-     * @param rightToLeft - true if the text is in a right to left directional run
+     * @param rightToLeft - TRUE if the text is in a right to left directional run
      *
      * Output parameters:
      * @param glyphs - the glyph index array
@@ -207,7 +207,7 @@
      * @param chars - the input character context
      * @param offset - the offset of the first character to process
      * @param count - the number of characters to process
-     * @param reverse - true if the glyphs in the glyph array have been reordered
+     * @param reverse - TRUE if the glyphs in the glyph array have been reordered
      * @param glyphs - the input glyph array
      * @param glyphCount - the number of glyphs
      * @param positions - the position array, will be updated as needed
@@ -218,20 +218,7 @@
      *
      * @internal
      */
-    virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool /*reverse*/, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success)
-    {
-        if (LE_FAILURE(success)) {
-            return;
-        }
-
-        if (chars == NULL || glyphs == NULL || positions == NULL || offset < 0 || count < 0 || glyphCount < 0) {
-            success = LE_ILLEGAL_ARGUMENT_ERROR;
-            return;
-        }
-
-        // default is no adjustments
-        return;
-    };
+    virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool /*reverse*/, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success);
 
     /**
      * This method gets a table from the font associated with
@@ -262,8 +249,8 @@
      * @param chars - the input character context
      * @param offset - the offset of the first character to be mapped
      * @param count - the number of characters to be mapped
-     * @param reverse - if true, the output will be in reverse order
-     * @param mirror - if true, do character mirroring
+     * @param reverse - if TRUE, the output will be in reverse order
+     * @param mirror - if TRUE, do character mirroring
      *
      * Output parameters:
      * @param glyphs - the glyph array
@@ -282,7 +269,7 @@
      * 
      * @param glyphs - the glyph array
      * @param glyphCount - the number of glyphs
-     * @param reverse - true if the glyph array has been reordered
+     * @param reverse - TRUE if the glyph array has been reordered
      * @param markFilter - used to identify mark glyphs
      * @param positions - the glyph position array - updated as required
      * @param success - output parameter set to an error code if the operation fails
@@ -300,7 +287,7 @@
      * method. It is declared virtual so that it will be invoked by the
      * subclass destructors.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual ~LayoutEngine();
 
@@ -313,7 +300,7 @@
      * @param offset - the offset of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - true if the characers are in a right to left directional run
+     * @param rightToLeft - TRUE if the characers are in a right to left directional run
      * @param x - the initial X position
      * @param y - the initial Y position
      * @param success - output parameter set to an error code if the operation fails
@@ -323,7 +310,7 @@
      * Note; the glyph, character index and position array can be accessed
      * using the getter method below.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual le_int32 layoutChars(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, float x, float y, LEErrorCode &success);
 
@@ -334,7 +321,7 @@
      *
      * @return the number of glyphs in the glyph array
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     le_int32 getGlyphCount() const
     {
@@ -349,7 +336,7 @@
      * @param glyphs - the destiniation glyph array
      * @param success - set to an error code if the operation fails
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     void getGlyphs(LEGlyphID glyphs[], LEErrorCode &success) const;
 
@@ -363,7 +350,7 @@
      * @param extraBits - this value will be ORed with each glyph index
      * @param success - set to an error code if the operation fails
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual void getGlyphs(le_uint32 glyphs[], le_uint32 extraBits, LEErrorCode &success) const;
 
@@ -375,7 +362,7 @@
      * @param charIndices - the destiniation character index array
      * @param success - set to an error code if the operation fails
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     void getCharIndices(le_int32 charIndices[], LEErrorCode &success) const;
 
@@ -388,7 +375,7 @@
      * @param indexBase - an offset which will be added to each index
      * @param success - set to an error code if the operation fails
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     void getCharIndices(le_int32 charIndices[], le_int32 indexBase, LEErrorCode &success) const;
 
@@ -401,7 +388,7 @@
      * @param glyphs - the destiniation position array
      * @param success - set to an error code if the operation fails
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     void getGlyphPositions(float positions[], LEErrorCode &success) const;
 
@@ -417,7 +404,7 @@
      * @param y - the glyph's Y position
      * @param success - set to an error code if the operation fails
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     void getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEErrorCode &success) const;
 
@@ -426,7 +413,7 @@
      * so that the LayoutEngine can be reused to layout a different
      * characer array. (This method is also called by the destructor)
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual void reset();
 
@@ -444,21 +431,21 @@
      *
      * @see LEFontInstance
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static LayoutEngine *layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success);
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 

Index: LigatureSubstProc.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/LigatureSubstProc.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LigatureSubstProc.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ LigatureSubstProc.cpp	6 Apr 2004 10:09:05 -0000	1.4
@@ -17,7 +17,7 @@
 U_NAMESPACE_BEGIN
 
 #define ExtendedComplement(m) ((le_int32) (~((le_uint32) (m))))
-#define SignBit(m) ((ExtendedComplement(m) >> 1) & (m))
+#define SignBit(m) ((ExtendedComplement(m) >> 1) & (le_int32)(m))
 #define SignExtend(v,m) (((v) & SignBit(m))? ((v) | ExtendedComplement(m)): (v))
 
 const char LigatureSubstitutionProcessor::fgClassID=0;

Index: LigatureSubstProc.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/LigatureSubstProc.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LigatureSubstProc.h	10 Sep 2003 02:42:25 -0000	1.3
+++ LigatureSubstProc.h	6 Apr 2004 10:09:05 -0000	1.4
@@ -39,14 +39,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 

Index: LookupProcessor.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/LookupProcessor.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LookupProcessor.cpp	10 Sep 2003 02:42:25 -0000	1.3
+++ LookupProcessor.cpp	6 Apr 2004 10:09:05 -0000	1.4
@@ -48,14 +48,18 @@
     return 1;
 }
 
-void LookupProcessor::process(LEGlyphID *glyphs, GlyphPositionAdjustment *glyphPositionAdjustments, const LETag **glyphTags, le_int32 glyphCount,
+le_int32 LookupProcessor::process(LEGlyphID *&glyphs, GlyphPositionAdjustment *glyphPositionAdjustments, const LETag **&glyphTags, le_int32 *&charIndices, le_int32 glyphCount,
                               le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
                               const LEFontInstance *fontInstance) const
 {
     if (lookupSelectArray == NULL) {
-        return;
+        return glyphCount;
     }
 
+	GlyphIterator glyphIterator(glyphs, glyphPositionAdjustments, charIndices, glyphCount,
+								rightToLeft, 0, 0, glyphTags, glyphDefinitionTableHeader);
+	le_int32 newGlyphCount = glyphCount;
+
     for (le_uint16 order = 0; order < lookupOrderCount; order += 1) {
         le_uint16 lookup = lookupOrderArray[order];
         LETag selectTag = lookupSelectArray[lookup];
@@ -63,9 +67,8 @@
         if (selectTag != notSelected) {
             const LookupTable *lookupTable = lookupListTable->getLookupTable(lookup);
             le_uint16 lookupFlags = SWAPW(lookupTable->lookupFlags);
-            GlyphIterator glyphIterator(glyphs, glyphPositionAdjustments, glyphCount,
-                                  rightToLeft, lookupFlags, selectTag, glyphTags,
-                                  glyphDefinitionTableHeader);
+            
+			glyphIterator.reset(lookupFlags, selectTag);
 
             while (glyphIterator.findFeatureTag()) {
                 le_uint32 delta = 1;
@@ -74,8 +77,12 @@
                     delta = applyLookupTable(lookupTable, &glyphIterator, fontInstance);
                 }
             }
+
+			newGlyphCount = glyphIterator.applyInsertions();
         }
     }
+
+	return newGlyphCount;
 }
 
 le_uint32 LookupProcessor::applySingleLookup(le_uint16 lookupTableIndex, GlyphIterator *glyphIterator,

Index: LookupProcessor.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/LookupProcessor.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LookupProcessor.h	10 Sep 2003 02:42:25 -0000	1.3
+++ LookupProcessor.h	6 Apr 2004 10:09:05 -0000	1.4
@@ -29,7 +29,7 @@
     static const LETag notSelected;
     static const LETag defaultFeature;
 
-    void process(LEGlyphID *glyphs, GlyphPositionAdjustment *glyphPositionAdjustments, const LETag **glyphTags, le_int32 glyphCount,
+    le_int32 process(LEGlyphID *&glyphs, GlyphPositionAdjustment *glyphPositionAdjustments, const LETag **&glyphTags, le_int32 *&charIndices, le_int32 glyphCount,
                  le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, const LEFontInstance *fontInstance) const;
 
     le_uint32 applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const;

Index: MPreFixups.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/MPreFixups.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2

Index: MPreFixups.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/MPreFixups.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- MPreFixups.h	10 Sep 2003 02:42:26 -0000	1.1
+++ MPreFixups.h	6 Apr 2004 10:09:05 -0000	1.2
@@ -30,7 +30,7 @@
 
     void add(le_int32 baseIndex, le_int32 mpreIndex);
     
-    void apply(LEGlyphID *glyphs, le_int32 *charIndicies);
+    void apply(LEGlyphID *glyphs, le_int32 *charIndices);
 
 private:
     FixupData *fFixupData;

Index: Makefile.in
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/Makefile.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Makefile.in	10 Sep 2003 02:42:26 -0000	1.4
+++ Makefile.in	6 Apr 2004 10:09:05 -0000	1.5
@@ -2,9 +2,6 @@
 ## others. All Rights Reserved.
 ## Makefile.in for ICU - layout
 
-SO_TARGET_VERSION = @LIB_VERSION@
-SO_TARGET_VERSION_MAJOR = @LIB_VERSION_MAJOR@
-
 ## Install directory information
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
@@ -24,15 +21,25 @@
 TARGET_STUBNAME=le
 
 ifneq ($(ENABLE_STATIC),)
-TARGET = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).a
+TARGET = $(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
 endif
 
 ifneq ($(ENABLE_SHARED),)
 SO_TARGET = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
 ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET)
+
+ifeq ($(ENABLE_SO_VERSION_DATA),1)
+SO_VERSION_DATA = layout.res
 endif
 
-ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS)
+ifeq ($(OS390BATCH),1)
+BATCH_TARGET = $(BATCH_LAYOUT_TARGET)
+BATCH_LIBS = $(BATCH_LIBICUUC) -lm
+endif   # OS390BATCH
+
+endif   # ENABLE_SHARED
+
+ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
 
 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
@@ -111,7 +118,7 @@
 DEPS = $(OBJECTS:.o=.d)
 
 ## Header files to install
-HEADERS= $(srcdir)/*LayoutEngine.h $(srcdir)/LE*.h
+HEADERS= $(srcdir)/LayoutEngine.h $(srcdir)/LE*.h
 LOHEADERS= $(srcdir)/unicode/loengine.h
 
 ## List of phony targets
@@ -172,8 +179,7 @@
 
 clean-local:
 	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
-	$(RMV) $(OBJECTS) $(ALL_TARGETS)
-#	$(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS)
+	$(RMV) $(OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
 
 distclean-local: clean-local
 	$(RMV) Makefile
@@ -190,8 +196,14 @@
 endif
 
 ifneq ($(ENABLE_SHARED),)
-$(FINAL_SO_TARGET): $(OBJECTS)
+$(FINAL_SO_TARGET): $(OBJECTS) $(SO_VERSION_DATA)
 	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
+
+ifeq ($(OS390BATCH),1)
+$(BATCH_TARGET): $(OBJECTS)
+	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
+endif   # OS390BATCH
+
 endif
 
 ifeq (,$(MAKECMDGOALS))

Index: MarkToBasePosnSubtables.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/MarkToBasePosnSubtables.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- MarkToBasePosnSubtables.cpp	10 Sep 2003 02:42:26 -0000	1.3
+++ MarkToBasePosnSubtables.cpp	6 Apr 2004 10:09:05 -0000	1.4
@@ -67,6 +67,12 @@
     const AnchorTable *anchorTable = (const AnchorTable *) ((char *) baseArray + anchorTableOffset);
     LEPoint baseAnchor, markAdvance, pixels;
 
+	if (anchorTableOffset == 0) {
+		// this means the table is mal-formed...
+		glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition());
+		return 0;
+	}
+
     anchorTable->getAnchor(baseGlyph, fontInstance, baseAnchor);
 
     fontInstance->getGlyphAdvance(markGlyph, pixels);

Index: MarkToMarkPosnSubtables.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/MarkToMarkPosnSubtables.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- MarkToMarkPosnSubtables.cpp	10 Sep 2003 02:42:26 -0000	1.3
+++ MarkToMarkPosnSubtables.cpp	6 Apr 2004 10:09:05 -0000	1.4
@@ -48,8 +48,7 @@
         return 0;
     }
 
-    // FIXME: we probably don't want to find a mark before a previous base glyph...
-    GlyphIterator mark2Iterator(*glyphIterator, (le_uint16) (lfIgnoreLigatures /*| lfIgnoreBaseGlyphs*/));
+    GlyphIterator mark2Iterator(*glyphIterator);
     LEGlyphID mark2Glyph = findMark2Glyph(&mark2Iterator);
     le_int32 mark2Coverage = getBaseCoverage((LEGlyphID) mark2Glyph);
     const Mark2Array *mark2Array = (const Mark2Array *) ((char *) this + SWAPW(baseArrayOffset));

Index: MultipleSubstSubtables.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/MultipleSubstSubtables.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- MultipleSubstSubtables.cpp	10 Sep 2003 02:42:26 -0000	1.3
+++ MultipleSubstSubtables.cpp	6 Apr 2004 10:09:05 -0000	1.4
@@ -29,7 +29,7 @@
         if (glyphCount == 0) {
             glyphIterator->setCurrGlyphID(0xFFFF);
             return 1;
-        } else if (glyphCount >= 1) {
+        } else if (glyphCount == 1) {
             TTGlyphID substitute = SWAPW(sequenceTable->substituteArray[0]);
 
             if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute))) {
@@ -38,8 +38,21 @@
 
             return 1;
         } else {
-            // Can't do this 'till there's a way to
-            // grow the glyph array...
+			LEGlyphID *newGlyphs = glyphIterator->insertGlyphs(glyphCount);
+			le_int32 insert = 0, direction = 1;
+
+			if (glyphIterator->isRightToLeft()) {
+				insert = glyphCount - 1;
+				direction = -1;
+			}
+
+			for (le_int32 i = 0; i < glyphCount; i += 1) {
+				TTGlyphID substitute = SWAPW(sequenceTable->substituteArray[i]);
+
+				newGlyphs[insert] = LE_SET_GLYPH(glyph, substitute);
+				insert += direction;
+			}
+
             return 1;
         }
     }

Index: OpenTypeLayoutEngine.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/OpenTypeLayoutEngine.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- OpenTypeLayoutEngine.cpp	10 Sep 2003 02:42:26 -0000	1.4
+++ OpenTypeLayoutEngine.cpp	6 Apr 2004 10:09:05 -0000	1.5
@@ -92,10 +92,25 @@
     fLangSysTag = getLangSysTag(fLanguageCode);
 }
 
+le_int32 OpenTypeLayoutEngine::characterProcessing(const LEUnicode /*chars*/[], le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
+				LEUnicode *&/*outChars*/, le_int32 *&/*charIndices*/, const LETag **&/*featureTags*/, LEErrorCode &success)
+{
+    if (LE_FAILURE(success)) {
+        return 0;
+    }
+
+    if (offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
+        success = LE_ILLEGAL_ARGUMENT_ERROR;
+        return 0;
+    }
+
+    return count;
+}
+
 // Input: characters, tags
 // Output: glyphs, char indices
-le_int32 OpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, const LETag **featureTags,
-                LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success)
+le_int32 OpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
+											   const LETag **&featureTags, LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success)
 {
     if (LE_FAILURE(success)) {
         return 0;
@@ -113,10 +128,23 @@
     }
 
     if (fGSUBTable != NULL) {
-        fGSUBTable->process(glyphs, featureTags, count, rightToLeft, fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter, fFeatureOrder);
+        count = fGSUBTable->process(glyphs, featureTags, charIndices, count, rightToLeft, fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter, fFeatureOrder);
     }
 
     return count;
+}
+
+le_int32 OpenTypeLayoutEngine::glyphPostProcessing(LEGlyphID tempGlyphs[], le_int32 tempCharIndices[], le_int32 tempGlyphCount,
+                LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success)
+{
+    if (LE_FAILURE(success)) {
+        return 0;
+    }
+
+    glyphs = tempGlyphs;
+    charIndices = tempCharIndices;
+
+    return tempGlyphCount;
 }
 
 le_int32 OpenTypeLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success)

Index: OpenTypeLayoutEngine.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/OpenTypeLayoutEngine.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- OpenTypeLayoutEngine.h	10 Sep 2003 02:42:26 -0000	1.3
+++ OpenTypeLayoutEngine.h	6 Apr 2004 10:09:05 -0000	1.4
@@ -113,14 +113,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 
@@ -225,7 +225,7 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - true if the characters are in a right to left directional run
+     * @param rightToLeft - TRUE if the characters are in a right to left directional run
      *
      * Output parameters:
      * @param outChars - the output character array, if different from the input
@@ -238,19 +238,7 @@
      * @internal
      */
     virtual le_int32 characterProcessing(const LEUnicode /*chars*/[], le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
-            LEUnicode *&/*outChars*/, le_int32 *&/*charIndices*/, const LETag **&/*featureTags*/, LEErrorCode &success) /*= 0;*/
-    {
-        if (LE_FAILURE(success)) {
-            return 0;
-        }
-
-        if (offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
-            success = LE_ILLEGAL_ARGUMENT_ERROR;
-            return 0;
-        }
-
-        return count;
-    };
+            LEUnicode *&/*outChars*/, le_int32 *&/*charIndices*/, const LETag **&/*featureTags*/, LEErrorCode &success);
 
     /**
      * This method does character to glyph mapping, and applies the GSUB table. The
@@ -266,7 +254,7 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - true if the characters are in a right to left directional run
+     * @param rightToLeft - TRUE if the characters are in a right to left directional run
      * @param featureTags - the feature tag array
      *
      * Output parameters:
@@ -282,7 +270,7 @@
      * @internal
      */
     virtual le_int32 glyphProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
-            const LETag **featureTags, LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success);
+            const LETag **&featureTags, LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success);
 
     /**
      * This method does any processing necessary to convert "fake"
@@ -310,17 +298,7 @@
      * @internal
      */
     virtual le_int32 glyphPostProcessing(LEGlyphID tempGlyphs[], le_int32 tempCharIndices[], le_int32 tempGlyphCount,
-                    LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success)
-    {
-        if (LE_FAILURE(success)) {
-            return 0;
-        }
-
-        glyphs = tempGlyphs;
-        charIndices = tempCharIndices;
-
-        return tempGlyphCount;
-    };
+                    LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success);
 
     /**
      * This method applies the characterProcessing, glyphProcessing and glyphPostProcessing
@@ -331,7 +309,7 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - true if the text is in a right to left directional run
+     * @param rightToLeft - TRUE if the text is in a right to left directional run
      *
      * Output parameters:
      * @param glyphs - the glyph index array

Index: ScriptAndLanguage.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ScriptAndLanguage.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ScriptAndLanguage.h	10 Sep 2003 02:42:26 -0000	1.3
+++ ScriptAndLanguage.h	6 Apr 2004 10:09:05 -0000	1.4
@@ -34,7 +34,7 @@
     le_uint16           langSysCount;
     LangSysRecord       langSysRecordArray[ANY_NUMBER];
 
-    const LangSysTable  *findLanguage(LETag languageTag, le_bool exactMatch = false) const;
+    const LangSysTable  *findLanguage(LETag languageTag, le_bool exactMatch = FALSE) const;
 };
 
 typedef TagAndOffsetRecord ScriptRecord;
@@ -45,7 +45,7 @@
     ScriptRecord        scriptRecordArray[ANY_NUMBER];
 
     const ScriptTable   *findScript(LETag scriptTag) const;
-    const LangSysTable  *findLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch = false) const;
+    const LangSysTable  *findLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch = FALSE) const;
 };
 
 U_NAMESPACE_END

Index: ScriptAndLanguageTags.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ScriptAndLanguageTags.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4

Index: ScriptAndLanguageTags.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ScriptAndLanguageTags.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4

Index: SegmentArrayProcessor.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/SegmentArrayProcessor.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- SegmentArrayProcessor.h	10 Sep 2003 02:42:26 -0000	1.3
+++ SegmentArrayProcessor.h	6 Apr 2004 10:09:06 -0000	1.4
@@ -33,14 +33,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 

Index: SegmentSingleProcessor.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/SegmentSingleProcessor.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- SegmentSingleProcessor.h	10 Sep 2003 02:42:26 -0000	1.3
+++ SegmentSingleProcessor.h	6 Apr 2004 10:09:06 -0000	1.4
@@ -33,14 +33,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 

Index: SimpleArrayProcessor.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/SimpleArrayProcessor.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- SimpleArrayProcessor.h	10 Sep 2003 02:42:26 -0000	1.3
+++ SimpleArrayProcessor.h	6 Apr 2004 10:09:06 -0000	1.4
@@ -33,14 +33,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 

Index: SingleTableProcessor.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/SingleTableProcessor.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- SingleTableProcessor.h	10 Sep 2003 02:42:26 -0000	1.3
+++ SingleTableProcessor.h	6 Apr 2004 10:09:06 -0000	1.4
@@ -33,14 +33,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 

Index: ThaiLayoutEngine.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ThaiLayoutEngine.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ThaiLayoutEngine.cpp	10 Sep 2003 02:42:26 -0000	1.3
+++ ThaiLayoutEngine.cpp	6 Apr 2004 10:09:06 -0000	1.4
@@ -83,7 +83,7 @@
     }
 
     glyphCount = ThaiShaping::compose(chars, offset, count, fGlyphSet, fErrorChar, outChars, charIndices);
-    mapCharsToGlyphs(outChars, 0, glyphCount, false, false, glyphs, charIndices, success);
+    mapCharsToGlyphs(outChars, 0, glyphCount, FALSE, FALSE, glyphs, charIndices, success);
 
     LE_DELETE_ARRAY(outChars);
 

Index: ThaiLayoutEngine.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ThaiLayoutEngine.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ThaiLayoutEngine.h	10 Sep 2003 02:42:26 -0000	1.3
+++ ThaiLayoutEngine.h	6 Apr 2004 10:09:06 -0000	1.4
@@ -54,14 +54,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 
@@ -98,7 +98,7 @@
      * @param offset - the index of the first character to process
      * @param count - the number of characters to process
      * @param max - the number of characters in the input context
-     * @param rightToLeft - true if the text is in a right to left directional run
+     * @param rightToLeft - TRUE if the text is in a right to left directional run
      *
      * Output parameters:
      * @param glyphs - the glyph index array

Index: ThaiShaping.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ThaiShaping.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ThaiShaping.cpp	10 Sep 2003 02:42:26 -0000	1.4
+++ ThaiShaping.cpp	6 Apr 2004 10:09:06 -0000	1.5
@@ -143,40 +143,40 @@
 }
 
 le_uint8 ThaiShaping::doTransition (StateTransition transition, LEUnicode currChar, le_int32 inputIndex, le_uint8 glyphSet,
-        LEUnicode errorChar, LEUnicode *outputBuffer, le_int32 *charIndicies, le_int32 &outputIndex)
+        LEUnicode errorChar, LEUnicode *outputBuffer, le_int32 *charIndices, le_int32 &outputIndex)
 {
     switch (transition.action) {
-    case _A:
-        charIndicies[outputIndex] = inputIndex;
+    case tA:
+        charIndices[outputIndex] = inputIndex;
         outputBuffer[outputIndex++] = currChar;
         break;
         
-    case _C:
-        charIndicies[outputIndex] = inputIndex;
+    case tC:
+        charIndices[outputIndex] = inputIndex;
         outputBuffer[outputIndex++] = currChar;
         break;
         
-    case _D:
-        charIndicies[outputIndex] = inputIndex;
+    case tD:
+        charIndices[outputIndex] = inputIndex;
         outputBuffer[outputIndex++] = leftAboveVowel(currChar, glyphSet);
         break;
         
-    case _E:
-        charIndicies[outputIndex] = inputIndex;
+    case tE:
+        charIndices[outputIndex] = inputIndex;
         outputBuffer[outputIndex++] = lowerRightTone(currChar, glyphSet);
         break;
         
-    case _F:
-        charIndicies[outputIndex] = inputIndex;
+    case tF:
+        charIndices[outputIndex] = inputIndex;
         outputBuffer[outputIndex++] = lowerLeftTone(currChar, glyphSet);
         break;
     
-    case _G:
-        charIndicies[outputIndex] = inputIndex;
+    case tG:
+        charIndices[outputIndex] = inputIndex;
         outputBuffer[outputIndex++] = upperLeftTone(currChar, glyphSet);
         break;
         
-    case _H:
+    case tH:
     {
         LEUnicode cod = outputBuffer[outputIndex - 1];
         LEUnicode coa = noDescenderCOD(cod, glyphSet);
@@ -184,38 +184,38 @@
         if (cod != coa) {
             outputBuffer[outputIndex - 1] = coa;
             
-            charIndicies[outputIndex] = inputIndex;
+            charIndices[outputIndex] = inputIndex;
             outputBuffer[outputIndex++] = currChar;
             break;
         }
 
-        charIndicies[outputIndex] = inputIndex;
+        charIndices[outputIndex] = inputIndex;
         outputBuffer[outputIndex++] = lowerBelowVowel(currChar, glyphSet);
         break;
     }
         
-    case _R:
-        charIndicies[outputIndex] = inputIndex;
+    case tR:
+        charIndices[outputIndex] = inputIndex;
         outputBuffer[outputIndex++] = errorChar;
 
-        charIndicies[outputIndex] = inputIndex;
+        charIndices[outputIndex] = inputIndex;
         outputBuffer[outputIndex++] = currChar;
         break;
         
-    case _S:
+    case tS:
         if (currChar == CH_SARA_AM) {
-            charIndicies[outputIndex] = inputIndex;
+            charIndices[outputIndex] = inputIndex;
             outputBuffer[outputIndex++] = errorChar;
         }
 
-        charIndicies[outputIndex] = inputIndex;
+        charIndices[outputIndex] = inputIndex;
         outputBuffer[outputIndex++] = currChar;
         break;
         
     default:
         // FIXME: if we get here, there's an error
         // in the state table!
-        charIndicies[outputIndex] = inputIndex;
+        charIndices[outputIndex] = inputIndex;
         outputBuffer[outputIndex++] = currChar;
         break;
      }
@@ -224,14 +224,14 @@
 }
 
 le_uint8 ThaiShaping::getNextState(LEUnicode ch, le_uint8 prevState, le_int32 inputIndex, le_uint8 glyphSet, LEUnicode errorChar,
-                              le_uint8 &charClass, LEUnicode *output, le_int32 *charIndicies, le_int32 &outputIndex)
+                              le_uint8 &charClass, LEUnicode *output, le_int32 *charIndices, le_int32 &outputIndex)
 {
     StateTransition transition;
 
     charClass = getCharClass(ch);
     transition = getTransition(prevState, charClass);
     
-    return doTransition(transition, ch, inputIndex, glyphSet, errorChar, output, charIndicies, outputIndex);
+    return doTransition(transition, ch, inputIndex, glyphSet, errorChar, output, charIndices, outputIndex);
 }
 
 le_bool ThaiShaping::isLegalHere(LEUnicode ch, le_uint8 prevState)
@@ -240,28 +240,28 @@
     StateTransition transition = getTransition(prevState, charClass);
 
     switch (transition.action) {
-    case _A:
-    case _C:
-    case _D:
-    case _E:
-    case _F:
-    case _G:
-    case _H:
-        return true;
+    case tA:
+    case tC:
+    case tD:
+    case tE:
+    case tF:
+    case tG:
+    case tH:
+        return TRUE;
             
-    case _R:
-    case _S:
-        return false;
+    case tR:
+    case tS:
+        return FALSE;
             
     default:
         // FIXME: if we get here, there's an error
         // in the state table!
-        return false;
+        return FALSE;
     }
 }
     
 le_int32 ThaiShaping::compose(const LEUnicode *input, le_int32 offset, le_int32 charCount, le_uint8 glyphSet,
-                          LEUnicode errorChar, LEUnicode *output, le_int32 *charIndicies)
+                          LEUnicode errorChar, LEUnicode *output, le_int32 *charIndices)
 {
     le_uint8 state = 0;
     le_int32 inputIndex;
@@ -278,19 +278,19 @@
         if (ch == CH_SARA_AM && isLegalHere(ch, state)) {
             outputIndex = conOutput;
             state = getNextState(CH_NIKHAHIT, conState, inputIndex, glyphSet, errorChar, charClass,
-                output, charIndicies, outputIndex);
+                output, charIndices, outputIndex);
             
             for (int j = conInput + 1; j < inputIndex; j += 1) {
                 ch = input[j + offset];
                 state = getNextState(ch, state, j, glyphSet, errorChar, charClass,
-                    output, charIndicies, outputIndex);
+                    output, charIndices, outputIndex);
             }
             
             ch = CH_SARA_AA;
         }
         
         state = getNextState(ch, state, inputIndex, glyphSet, errorChar, charClass,
-            output, charIndicies, outputIndex);
+            output, charIndices, outputIndex);
         
         if (charClass >= CON && charClass <= COD) {
             conState = state;

Index: ThaiShaping.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ThaiShaping.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ThaiShaping.h	10 Sep 2003 02:42:26 -0000	1.3
+++ ThaiShaping.h	6 Apr 2004 10:09:06 -0000	1.4
@@ -46,15 +46,15 @@
         classCount = 19,
 
         // State Transition actions
-        _A  =  0,
-        _C  =  1,
-        _D  =  2,
-        _E  =  3,
-        _F  =  4,
-        _G  =  5,
-        _H  =  6,
-        _R  =  7,
-        _S  =  8
+        tA  =  0,
+        tC  =  1,
+        tD  =  2,
+        tE  =  3,
+        tF  =  4,
+        tG  =  5,
+        tH  =  6,
+        tR  =  7,
+        tS  =  8
     };
 
     struct StateTransition
@@ -67,7 +67,7 @@
     };
 
     static le_int32 compose(const LEUnicode *input, le_int32 offset, le_int32 charCount, le_uint8 glyphSet,
-        LEUnicode errorChar, LEUnicode *output, le_int32 *charIndicies);
+        LEUnicode errorChar, LEUnicode *output, le_int32 *charIndices);
 
 private:
     // forbid instantiation
@@ -78,10 +78,10 @@
 
     static StateTransition getTransition(le_uint8 state, le_uint8 currClass);
     static le_uint8 doTransition(StateTransition transition, LEUnicode currChar, le_int32 inputIndex, le_uint8 glyphSet,
-        LEUnicode errorChar, LEUnicode *outputBuffer, le_int32 *charIndicies, le_int32 &outputIndex);
+        LEUnicode errorChar, LEUnicode *outputBuffer, le_int32 *charIndices, le_int32 &outputIndex);
 
     static le_uint8 getNextState(LEUnicode ch, le_uint8 state, le_int32 inputIndex, le_uint8 glyphSet, LEUnicode errorChar,
-        le_uint8 &charClass, LEUnicode *output, le_int32 *charIndicies, le_int32 &outputIndex);
+        le_uint8 &charClass, LEUnicode *output, le_int32 *charIndices, le_int32 &outputIndex);
 
     static le_bool isLegalHere(LEUnicode ch, le_uint8 prevState);
     static le_uint8 getCharClass(LEUnicode ch);

Index: ThaiStateTables.cpp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/ThaiStateTables.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ThaiStateTables.cpp	10 Sep 2003 02:42:26 -0000	1.3
+++ ThaiStateTables.cpp	6 Apr 2004 10:09:06 -0000	1.4
@@ -1,7 +1,7 @@
 /*
  * %W% %E%
  *
- * (C) Copyright IBM Corp. 1999, 2000, 2002 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1999-2003 - All Rights Reserved
  *
  * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS
  * YOU REALLY KNOW WHAT YOU'RE DOING.
@@ -30,58 +30,58 @@
     //|         O         O         O         O         V         V         V         V         V         V         D         O         D         D         D         I         V         V         V    |
     //|         N         N         A         D         O         1         2         3         1         2         I         N         1         2         3         K         1         2         3    |
     //+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    /*00*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*01*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 2, _C}, { 6, _C}, { 0, _C}, { 8, _E}, { 0, _E}, { 0, _E}, { 0, _C}, { 9, _E}, {11, _C}, {14, _C}, {16, _C}},
-    /*02*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 3, _E}, { 0, _E}, { 0, _R}, { 0, _R}, { 4, _E}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*03*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*04*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 5, _C}, { 0, _C}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*05*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*06*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 7, _E}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*07*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*08*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _A}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*09*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {10, _C}, { 0, _C}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*10*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*11*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {12, _C}, { 0, _C}, { 0, _R}, { 0, _R}, {13, _C}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*12*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*13*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*14*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {15, _C}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*15*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*16*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {17, _C}, { 0, _R}, { 0, _C}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*17*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*18*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _A}, { 0, _S}, { 0, _A}, {19, _C}, {23, _C}, { 0, _C}, {25, _F}, { 0, _F}, { 0, _F}, { 0, _D}, {26, _F}, {28, _D}, {31, _D}, {33, _D}},
-    /*19*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {20, _F}, { 0, _F}, { 0, _R}, { 0, _R}, {21, _F}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*20*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*21*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {22, _C}, { 0, _C}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*22*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*23*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {24, _F}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*24*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*25*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _A}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*26*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {27, _G}, { 0, _G}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*27*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*28*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {29, _G}, { 0, _G}, { 0, _R}, { 0, _R}, {30, _G}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*29*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*30*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*31*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {32, _G}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*32*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*33*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {34, _G}, { 0, _R}, { 0, _G}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*34*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*35*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _A}, { 0, _S}, { 0, _A}, {36, _H}, {40, _H}, { 0, _H}, {42, _E}, { 0, _E}, { 0, _E}, { 0, _C}, {43, _E}, {45, _C}, {48, _C}, {50, _C}},
-    /*36*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {37, _E}, { 0, _E}, { 0, _R}, { 0, _R}, {38, _E}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*37*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*38*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {39, _C}, { 0, _C}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*39*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*40*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {41, _E}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*41*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*42*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _A}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*43*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {44, _C}, { 0, _C}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*44*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*45*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {46, _C}, { 0, _C}, { 0, _R}, { 0, _R}, {47, _C}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*46*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*47*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*48*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {49, _C}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*49*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*50*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _S}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, {51, _C}, { 0, _R}, { 0, _C}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}},
-    /*51*/ {{ 0, _A}, { 1, _A}, {18, _A}, {35, _A}, { 0, _A}, { 0, _S}, { 0, _A}, { 0, _A}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}, { 0, _R}}
+    /*00*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*01*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 2, tC}, { 6, tC}, { 0, tC}, { 8, tE}, { 0, tE}, { 0, tE}, { 0, tC}, { 9, tE}, {11, tC}, {14, tC}, {16, tC}},
+    /*02*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 3, tE}, { 0, tE}, { 0, tR}, { 0, tR}, { 4, tE}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*03*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*04*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 5, tC}, { 0, tC}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*05*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*06*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 7, tE}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*07*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*08*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tA}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*09*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {10, tC}, { 0, tC}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*10*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*11*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {12, tC}, { 0, tC}, { 0, tR}, { 0, tR}, {13, tC}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*12*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*13*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*14*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {15, tC}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*15*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*16*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {17, tC}, { 0, tR}, { 0, tC}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*17*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*18*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tA}, { 0, tS}, { 0, tA}, {19, tC}, {23, tC}, { 0, tC}, {25, tF}, { 0, tF}, { 0, tF}, { 0, tD}, {26, tF}, {28, tD}, {31, tD}, {33, tD}},
+    /*19*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {20, tF}, { 0, tF}, { 0, tR}, { 0, tR}, {21, tF}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*20*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*21*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {22, tC}, { 0, tC}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*22*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*23*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {24, tF}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*24*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*25*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tA}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*26*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {27, tG}, { 0, tG}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*27*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*28*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {29, tG}, { 0, tG}, { 0, tR}, { 0, tR}, {30, tG}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*29*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*30*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*31*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {32, tG}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*32*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*33*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {34, tG}, { 0, tR}, { 0, tG}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*34*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*35*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tA}, { 0, tS}, { 0, tA}, {36, tH}, {40, tH}, { 0, tH}, {42, tE}, { 0, tE}, { 0, tE}, { 0, tC}, {43, tE}, {45, tC}, {48, tC}, {50, tC}},
+    /*36*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {37, tE}, { 0, tE}, { 0, tR}, { 0, tR}, {38, tE}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*37*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*38*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {39, tC}, { 0, tC}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*39*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*40*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {41, tE}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*41*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*42*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tA}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*43*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {44, tC}, { 0, tC}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*44*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*45*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {46, tC}, { 0, tC}, { 0, tR}, { 0, tR}, {47, tC}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*46*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*47*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*48*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {49, tC}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*49*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*50*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tS}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, {51, tC}, { 0, tR}, { 0, tC}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}},
+    /*51*/ {{ 0, tA}, { 1, tA}, {18, tA}, {35, tA}, { 0, tA}, { 0, tS}, { 0, tA}, { 0, tA}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}, { 0, tR}}
 };
 
 U_NAMESPACE_END

Index: TrimmedArrayProcessor.h
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/TrimmedArrayProcessor.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- TrimmedArrayProcessor.h	10 Sep 2003 02:42:26 -0000	1.3
+++ TrimmedArrayProcessor.h	6 Apr 2004 10:09:06 -0000	1.4
@@ -33,14 +33,14 @@
     /**
      * ICU "poor man's RTTI", returns a UClassID for the actual class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
 
     /**
      * ICU "poor man's RTTI", returns a UClassID for this class.
      *
-     * @draft ICU 2.2
+     * @stable ICU 2.8
      */
     static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
 

Index: layout.dsp
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/layout.dsp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- layout.dsp	10 Sep 2003 02:42:26 -0000	1.4
+++ layout.dsp	6 Apr 2004 10:09:06 -0000	1.5
@@ -55,7 +55,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 ..\..\lib\icuuc.lib /nologo /dll /machine:I386 /out:"..\..\bin\icule26.dll" /implib:"..\..\lib\icule.lib"
+# ADD LINK32 ..\..\lib\icuuc.lib /nologo /dll /machine:I386 /out:"..\..\bin\icule28.dll" /implib:"..\..\lib\icule.lib"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "layout - Win32 Debug"
@@ -82,7 +82,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\lib\icuucd.lib /nologo /dll /debug /machine:I386 /out:"..\..\bin\icule26d.dll" /implib:"..\..\lib\iculed.lib" /pdbtype:sept
+# ADD LINK32 ..\..\lib\icuucd.lib /nologo /dll /debug /machine:I386 /out:"..\..\bin\icule28d.dll" /implib:"..\..\lib\iculed.lib" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "layout - Win64 Release"
@@ -109,7 +109,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:IX86 /machine:IA64
-# ADD LINK32 ..\..\lib\icuuc.lib /nologo /dll /machine:IX86 /out:"..\..\bin\icule26.dll" /implib:"..\..\lib\icule.lib" /machine:IA64
+# ADD LINK32 ..\..\lib\icuuc.lib /nologo /dll /machine:IX86 /out:"..\..\bin\icule28.dll" /implib:"..\..\lib\icule.lib" /machine:IA64
 
 !ELSEIF  "$(CFG)" == "layout - Win64 Debug"
 
@@ -135,7 +135,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:IX86 /pdbtype:sept /machine:IA64
-# ADD LINK32 ..\..\lib\icuucd.lib /nologo /dll /incremental:no /debug /machine:IX86 /out:"..\..\bin\icule26d.dll" /implib:"..\..\lib\iculed.lib" /pdbtype:sept /machine:IA64
+# ADD LINK32 ..\..\lib\icuucd.lib /nologo /dll /incremental:no /debug /machine:IX86 /out:"..\..\bin\icule28d.dll" /implib:"..\..\lib\iculed.lib" /pdbtype:sept /machine:IA64
 
 !ENDIF 
 

Index: layout.rc
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/layout.rc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- layout.rc	10 Sep 2003 02:42:26 -0000	1.3
+++ layout.rc	6 Apr 2004 10:09:06 -0000	1.4
@@ -1,25 +1,50 @@
-//Do not edit with Microsoft Developer Studio because it will modify this
-//script in the wrong way.
+// Do not edit with Microsoft Developer Studio Resource Editor.
+//   It will permanently substitute version numbers that are intended to be
+//   picked up by the pre-processor during each build.
 // Copyright (c) 2001-2003 International Business Machines
 // Corporation and others. All Rights Reserved.
 //
+#include "../common/msvcres.h"
+
 #define APSTUDIO_READONLY_SYMBOLS
 /////////////////////////////////////////////////////////////////////////////
 //
 // Generated from the TEXTINCLUDE 2 resource.
 //
-#include "winresrc.h"
-
+#include <winresrc.h>
 /////////////////////////////////////////////////////////////////////////////
 #undef APSTUDIO_READONLY_SYMBOLS
 
 /////////////////////////////////////////////////////////////////////////////
-//
+// 
 
 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
 #pragma code_page(1252)
 
-#include "unicode\uversion.h"
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "../common/msvcres.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include <winresrc.h>\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
 
 /////////////////////////////////////////////////////////////////////////////
 //
@@ -55,7 +80,6 @@
 #else
             VALUE "OriginalFilename", "icule" U_ICU_VERSION_SHORT ".dll\0")
 #endif
-
             VALUE "PrivateBuild", "\0"
             VALUE "ProductName", "International Components for Unicode\0"
             VALUE "ProductVersion", CommaVersionString(U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM, U_ICU_VERSION_PATCHLEVEL_NUM, 0)
@@ -69,4 +93,16 @@
 END
 
 /////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
 

Index: layout.vcproj
===================================================================
RCS file: /cvs/core/icu-sword/source/layout/layout.vcproj,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- layout.vcproj	10 Sep 2003 02:42:26 -0000	1.1
+++ layout.vcproj	6 Apr 2004 10:09:06 -0000	1.2
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
+<?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
 	ProjectType="Visual C++"
-	Version="7.00"
+	Version="7.10"
 	Name="layout"
 	SccProjectName=""
 	SccLocalPath="">
@@ -24,7 +24,7 @@
 				ImproveFloatingPointConsistency="TRUE"
 				OptimizeForProcessor="2"
 				AdditionalIncludeDirectories="..\..\include,..\common"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LAYOUT_EXPORTS;U_LAYOUT_IMPLEMENTATION"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;U_LAYOUT_IMPLEMENTATION"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
 				DisableLanguageExtensions="TRUE"
@@ -43,11 +43,12 @@
 				Name="VCLinkerTool"
 				AdditionalOptions="/MACHINE:I386"
 				AdditionalDependencies="..\..\lib\icuucd.lib"
-				OutputFile="..\..\bin\icule26d.dll"
+				OutputFile="..\..\bin\icule28d.dll"
 				LinkIncremental="2"
 				SuppressStartupBanner="TRUE"
 				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\..\..\lib/icule26d.pdb"
+				ProgramDatabaseFile=".\..\..\lib/icule28d.pdb"
+				BaseAddress="0x4ac00000"
 				ImportLibrary="..\..\lib\iculed.lib"/>
 			<Tool
 				Name="VCMIDLTool"
@@ -70,7 +71,13 @@
 			<Tool
 				Name="VCWebServiceProxyGeneratorTool"/>
 			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
 				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
@@ -85,7 +92,7 @@
 				InlineFunctionExpansion="2"
 				ImproveFloatingPointConsistency="TRUE"
 				AdditionalIncludeDirectories="..\..\include,..\common"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LAYOUT_EXPORTS;U_LAYOUT_IMPLEMENTATION"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;U_LAYOUT_IMPLEMENTATION"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="TRUE"
@@ -103,10 +110,11 @@
 				Name="VCLinkerTool"
 				AdditionalOptions="/MACHINE:I386"
 				AdditionalDependencies="..\..\lib\icuuc.lib"
-				OutputFile="..\..\bin\icule26.dll"
+				OutputFile="..\..\bin\icule28.dll"
 				LinkIncremental="1"
 				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\..\..\lib/icule26.pdb"
+				ProgramDatabaseFile=".\..\..\lib/icule28.pdb"
+				BaseAddress="0x4ac00000"
 				ImportLibrary="..\..\lib\icule.lib"/>
 			<Tool
 				Name="VCMIDLTool"
@@ -129,9 +137,17 @@
 			<Tool
 				Name="VCWebServiceProxyGeneratorTool"/>
 			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
 				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
 		</Configuration>
 	</Configurations>
+	<References>
+	</References>
 	<Files>
 		<Filter
 			Name="Source Files"
@@ -179,9 +195,6 @@
 				RelativePath=".\GDEFMarkFilter.cpp">
 			</File>
 			<File
-				RelativePath=".\GXLayoutEngine.cpp">
-			</File>
-			<File
 				RelativePath=".\GlyphDefinitionTables.cpp">
 			</File>
 			<File
@@ -194,10 +207,13 @@
 				RelativePath=".\GlyphPosnLookupProc.cpp">
 			</File>
 			<File
+				RelativePath=".\GlyphSubstitutionTables.cpp">
+			</File>
+			<File
 				RelativePath=".\GlyphSubstLookupProc.cpp">
 			</File>
 			<File
-				RelativePath=".\GlyphSubstitutionTables.cpp">
+				RelativePath=".\GXLayoutEngine.cpp">
 			</File>
 			<File
 				RelativePath=".\HanLayoutEngine.cpp">
@@ -221,10 +237,10 @@
 				RelativePath=".\IndicReordering.cpp">
 			</File>
 			<File
-				RelativePath=".\LEFontInstance.cpp">
+				RelativePath=".\LayoutEngine.cpp">
 			</File>
 			<File
-				RelativePath=".\LayoutEngine.cpp">
+				RelativePath=".\LEFontInstance.cpp">
 			</File>
 			<File
 				RelativePath=".\LigatureSubstProc.cpp">
@@ -233,16 +249,16 @@
 				RelativePath=".\LigatureSubstSubtables.cpp">
 			</File>
 			<File
-				RelativePath=".\LookupProcessor.cpp">
+				RelativePath=".\loengine.cpp">
 			</File>
 			<File
-				RelativePath=".\LookupTables.cpp">
+				RelativePath=".\LookupProcessor.cpp">
 			</File>
 			<File
 				RelativePath=".\Lookups.cpp">
 			</File>
 			<File
-				RelativePath=".\MPreFixups.cpp">
+				RelativePath=".\LookupTables.cpp">
 			</File>
 			<File
 				RelativePath=".\MarkArrays.cpp">
@@ -260,6 +276,9 @@
 				RelativePath=".\MorphTables.cpp">
 			</File>
 			<File
+				RelativePath=".\MPreFixups.cpp">
+			</File>
+			<File
 				RelativePath=".\MultipleSubstSubtables.cpp">
 			</File>
 			<File
@@ -322,9 +341,6 @@
 			<File
 				RelativePath=".\ValueRecords.cpp">
 			</File>
-			<File
-				RelativePath=".\loengine.cpp">
-			</File>
 		</Filter>
 		<Filter
 			Name="Header Files"
@@ -351,10 +367,10 @@
 				RelativePath=".\ContextualGlyphInsertion.h">
 			</File>
 			<File
-				RelativePath=".\ContextualGlyphSubstProc.h">
+				RelativePath=".\ContextualGlyphSubstitution.h">
 			</File>
 			<File
-				RelativePath=".\ContextualGlyphSubstitution.h">
+				RelativePath=".\ContextualGlyphSubstProc.h">
 			</File>
 			<File
 				RelativePath=".\ContextualSubstSubtables.h">
@@ -381,9 +397,6 @@
 				RelativePath=".\GDEFMarkFilter.h">
 			</File>
 			<File
-				RelativePath=".\GXLayoutEngine.h">
-			</File>
-			<File
 				RelativePath=".\GlyphDefinitionTables.h">
 			</File>
 			<File
@@ -399,10 +412,13 @@
 				RelativePath=".\GlyphPosnLookupProc.h">
 			</File>
 			<File
+				RelativePath=".\GlyphSubstitutionTables.h">
+			</File>
+			<File
 				RelativePath=".\GlyphSubstLookupProc.h">
 			</File>
 			<File
-				RelativePath=".\GlyphSubstitutionTables.h">
+				RelativePath=".\GXLayoutEngine.h">
 			</File>
 			<File
 				RelativePath=".\HanLayoutEngine.h">
@@ -426,140 +442,143 @@
 				RelativePath=".\IndicReordering.h">
 			</File>
 			<File
-				RelativePath=".\LEFontInstance.h">
+				RelativePath=".\LayoutEngine.h">
 				<FileConfiguration
 					Name="Debug|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LEFontInstance.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 				<FileConfiguration
 					Name="Release|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LEFontInstance.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath=".\LEGlyphFilter.h">
+				RelativePath=".\LayoutTables.h">
+			</File>
+			<File
+				RelativePath=".\LEFontInstance.h">
 				<FileConfiguration
 					Name="Debug|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LEGlyphFilter.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 				<FileConfiguration
 					Name="Release|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LEGlyphFilter.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath=".\LELanguages.h">
+				RelativePath=".\LEGlyphFilter.h">
 				<FileConfiguration
 					Name="Debug|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LELanguages.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 				<FileConfiguration
 					Name="Release|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LELanguages.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath=".\LEScripts.h">
+				RelativePath=".\LELanguages.h">
 				<FileConfiguration
 					Name="Debug|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LEScripts.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 				<FileConfiguration
 					Name="Release|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LEScripts.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath=".\LESwaps.h">
+				RelativePath=".\LEScripts.h">
 				<FileConfiguration
 					Name="Debug|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LESwaps.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 				<FileConfiguration
 					Name="Release|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LESwaps.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath=".\LETypes.h">
+				RelativePath=".\LESwaps.h">
 				<FileConfiguration
 					Name="Debug|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LETypes.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 				<FileConfiguration
 					Name="Release|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LETypes.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath=".\LayoutEngine.h">
+				RelativePath=".\LETypes.h">
 				<FileConfiguration
 					Name="Debug|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LayoutEngine.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 				<FileConfiguration
 					Name="Release|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\layout
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\layout
 "
-						Outputs="..\..\include\layout\LayoutEngine.h"/>
+						Outputs="..\..\include\layout\$(InputFileName)"/>
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath=".\LayoutTables.h">
+				RelativePath=".\LigatureSubstitution.h">
 			</File>
 			<File
 				RelativePath=".\LigatureSubstProc.h">
@@ -568,19 +587,32 @@
 				RelativePath=".\LigatureSubstSubtables.h">
 			</File>
 			<File
-				RelativePath=".\LigatureSubstitution.h">
+				RelativePath=".\unicode\loengine.h">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode
+"
+						Outputs="..\..\include\unicode\$(InputFileName)"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode
+"
+						Outputs="..\..\include\unicode\$(InputFileName)"/>
+				</FileConfiguration>
 			</File>
 			<File
 				RelativePath=".\LookupProcessor.h">
 			</File>
 			<File
-				RelativePath=".\LookupTables.h">
-			</File>
-			<File
 				RelativePath=".\Lookups.h">
 			</File>
 			<File
-				RelativePath=".\MPreFixups.h">
+				RelativePath=".\LookupTables.h">
 			</File>
 			<File
 				RelativePath=".\MarkArrays.h">
@@ -601,6 +633,9 @@
 				RelativePath=".\MorphTables.h">
 			</File>
 			<File
+				RelativePath=".\MPreFixups.h">
+			</File>
+			<File
 				RelativePath=".\MultipleSubstSubtables.h">
 			</File>
 			<File
@@ -668,25 +703,6 @@
 			</File>
 			<File
 				RelativePath=".\ValueRecords.h">
-			</File>
-			<File
-				RelativePath=".\unicode\loengine.h">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\unicode
-"
-						Outputs="..\..\include\unicode\loengine.h"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="copy  $(InputPath)  ..\..\include\unicode
-"
-						Outputs="..\..\include\unicode\loengine.h"/>
-				</FileConfiguration>
 			</File>
 		</Filter>
 		<Filter