neilg 2004/06/15 10:26:26 Modified: c/src/xercesc/util/Transcoders/Uniconv390 XMLIBM1047Transcoder390.cpp XMLIBM1140Transcoder390.cpp XMLWin1252Transcoder390.cpp Log: make sure tables are properly aligned; thanks to Steve Dulin Revision Changes Path 1.2 +16 -5 xml-xerces/c/src/xercesc/util/Transcoders/Uniconv390/XMLIBM1047Transcoder390.cpp Index: XMLIBM1047Transcoder390.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Transcoders/Uniconv390/XMLIBM1047Transcoder390.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- XMLIBM1047Transcoder390.cpp 6 Feb 2004 15:02:11 -0000 1.1 +++ XMLIBM1047Transcoder390.cpp 15 Jun 2004 17:26:25 -0000 1.2 @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.2 2004/06/15 17:26:25 neilg + * make sure tables are properly aligned; thanks to Steve Dulin + * * Revision 1.1 2004/02/06 15:02:11 cargilld * Intrinsic transcoding support for 390. * @@ -83,8 +86,16 @@ // a binary search to find the Unicode point, and that record's other // field is the IBM1047 code point to translate to. // --------------------------------------------------------------------------- -static const XMLCh gFromTable[256] = -{ + +//Add a long double in front of the table, the compiler will set the +//table starting address on a double word boundary +struct temp{ + long double pad; + XMLCh gFromTable[256]; +}; + +static struct temp padding_temp={ + 0, 0x0000, 0x0001, 0x0002, 0x0003, 0x009C, 0x0009, 0x0086, 0x007F , 0x0097, 0x008D, 0x008E, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F , 0x0010, 0x0011, 0x0012, 0x0013, 0x009D, 0x000A, 0x0008, 0x0087 @@ -219,7 +230,7 @@ // --------------------------------------------------------------------------- XMLCh XMLIBM1047Transcoder390::xlatThisOne(const XMLByte toXlat) { - return gFromTable[toXlat]; + return padding_temp.gFromTable[toXlat]; } @@ -234,7 +245,7 @@ ( encodingName , blockSize - , gFromTable + , padding_temp.gFromTable , gToTable , gToTableSz , manager 1.3 +16 -5 xml-xerces/c/src/xercesc/util/Transcoders/Uniconv390/XMLIBM1140Transcoder390.cpp Index: XMLIBM1140Transcoder390.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Transcoders/Uniconv390/XMLIBM1140Transcoder390.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XMLIBM1140Transcoder390.cpp 6 Feb 2004 18:18:09 -0000 1.2 +++ XMLIBM1140Transcoder390.cpp 15 Jun 2004 17:26:25 -0000 1.3 @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.3 2004/06/15 17:26:25 neilg + * make sure tables are properly aligned; thanks to Steve Dulin + * * Revision 1.2 2004/02/06 18:18:09 cargilld * Misc 390 changes. * @@ -85,8 +88,16 @@ // a binary search to find the Unicode point, and that record's other // field is the IBM1140 code point to translate to. // --------------------------------------------------------------------------- -static const XMLCh gFromTable[256] = -{ + +//Add a long double in front of the table, the compiler will set the +//table starting address on a double word boundary +struct temp{ + long double pad; + XMLCh gFromTable[256]; +}; + +static struct temp padding_temp={ + 0, 0x0000, 0x0001, 0x0002, 0x0003, 0x009C, 0x0009, 0x0086, 0x007F , 0x0097, 0x008D, 0x008E, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F , 0x0010, 0x0011, 0x0012, 0x0013, 0x009D, 0x0085, 0x0008, 0x0087 @@ -221,7 +232,7 @@ // --------------------------------------------------------------------------- XMLCh XMLIBM1140Transcoder390::xlatThisOne(const XMLByte toXlat) { - return gFromTable[toXlat]; + return padding_temp.gFromTable[toXlat]; } @@ -235,7 +246,7 @@ ( encodingName , blockSize - , gFromTable + , padding_temp.gFromTable , gToTable , gToTableSz , manager 1.3 +15 -4 xml-xerces/c/src/xercesc/util/Transcoders/Uniconv390/XMLWin1252Transcoder390.cpp Index: XMLWin1252Transcoder390.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Transcoders/Uniconv390/XMLWin1252Transcoder390.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XMLWin1252Transcoder390.cpp 6 Feb 2004 18:27:26 -0000 1.2 +++ XMLWin1252Transcoder390.cpp 15 Jun 2004 17:26:25 -0000 1.3 @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.3 2004/06/15 17:26:25 neilg + * make sure tables are properly aligned; thanks to Steve Dulin + * * Revision 1.2 2004/02/06 18:27:26 cargilld * Misc 390 changes. * @@ -84,8 +87,16 @@ // a binary search to find the Unicode point, and that record's other // field is the 1252 code point to translate to. // --------------------------------------------------------------------------- -static const XMLCh gFromTable[256] = -{ + +//Add a long double in front of the table, the compiler will set the +//table starting address on a double word boundary +struct temp{ + long double pad; + XMLCh gFromTable[256]; +}; + +static struct temp padding_temp={ + 0, 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007 , 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F , 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017 @@ -225,7 +236,7 @@ ( encodingName , blockSize - , gFromTable + , padding_temp.gFromTable , gToTable , gToTableSz , manager
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]