亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? xmlutf8transcoder390.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/* * Copyright 2004,2004 The Apache Software Foundation. *  * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *  *      http://www.apache.org/licenses/LICENSE-2.0 *  * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *//* * $Log: XMLUTF8Transcoder390.cpp,v $ * Revision 1.5  2004/09/08 13:56:46  peiyongz * Apache License Version 2.0 * * Revision 1.4  2004/06/30 19:04:17  peiyongz * XML1.0-3rd Edition: UTF_8 * * Revision 1.3  2004/02/06 18:23:55  cargilld * Misc 390 changes. * */// ---------------------------------------------------------------------------//  Includes// ---------------------------------------------------------------------------#include <xercesc/util/TranscodingException.hpp>#include <xercesc/util/XMLString.hpp>#include <xercesc/util/XMLUniDefs.hpp>#include <xercesc/util/Transcoders/Uniconv390/XMLUTF8Transcoder390.hpp>#include <xercesc/util/UTFDataFormatException.hpp>#include <string.h>XERCES_CPP_NAMESPACE_BEGINextern "OS" void TROTASC(const XMLByte * input,                         XMLCh * output,                         unsigned int * count,                         XMLCh *table,                         int STOP,                         int * FLAG                        );//Add a long double in front of the table, the compiler will set the //table starting address on a double word boundarystruct 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  , 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F  , 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027  , 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F  , 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037  , 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F  , 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047  , 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F  , 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057  , 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F  , 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067  , 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F  , 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077  , 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF  , 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF};// ---------------------------------------------------------------------------//  Local static data////  gUTFBytes//      A list of counts of trailing bytes for each initial byte in the input.////  gUTFByteIndicator//      For a UTF8 sequence of n bytes, n>=2, the first byte of the//      sequence must contain n 1's followed by precisely 1 0 with the//      rest of the byte containing arbitrary bits.  This array stores//      the required bit pattern for validity checking.//  gUTFByteIndicatorTest//      When bitwise and'd with the observed value, if the observed//      value is correct then a result matching gUTFByteIndicator will//      be produced.////  gUTFOffsets//      A list of values to offset each result char type, according to how//      many source bytes when into making it.////  gFirstByteMark//      A list of values to mask onto the first byte of an encoded sequence,//      indexed by the number of bytes used to create the sequence.// ---------------------------------------------------------------------------static const XMLByte gUTFBytes[256] ={        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0    ,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0    ,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0    ,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0    ,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0    ,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0    ,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0    ,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0    ,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0    ,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0    ,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0    ,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0    ,   0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1    ,   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1    ,   2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2    ,   3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5};static const XMLByte gUTFByteIndicator[6] ={    0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC};static const XMLByte gUTFByteIndicatorTest[6] ={    0x80, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE};static const XMLUInt32 gUTFOffsets[6] ={    0, 0x3080, 0xE2080, 0x3C82080, 0xFA082080, 0x82082080};static const XMLByte gFirstByteMark[7] ={    0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC};// ---------------------------------------------------------------------------//  XMLUTF8Transcoder390: Constructors and Destructor// ---------------------------------------------------------------------------XMLUTF8Transcoder390::XMLUTF8Transcoder390(const  XMLCh* const    encodingName                                    , const unsigned int    blockSize                                    , MemoryManager* const manager) :    XMLTranscoder(encodingName, blockSize, manager){}XMLUTF8Transcoder390::~XMLUTF8Transcoder390(){}// ---------------------------------------------------------------------------//  XMLUTF8Transcoder390: Implementation of the transcoder API// ---------------------------------------------------------------------------unsigned intXMLUTF8Transcoder390::transcodeFrom(const  XMLByte* const          srcData                                , const unsigned int            srcCount                                ,       XMLCh* const            toFill                                , const unsigned int            maxChars                                ,       unsigned int&           bytesEaten                                ,       unsigned char* const    charSizes){    // Watch for pathological scenario. Shouldn't happen, but...    if (!srcCount || !maxChars)        return 0;    // If debugging, make sure that the block size is legal    #if defined(XERCES_DEBUG)    checkBlockSize(maxChars);    #endif    //    //  Get pointers to our start and end points of the input and output    //  buffers.    //    const XMLByte*  srcPtr = srcData;    const XMLByte*  srcEnd = srcPtr + srcCount;    XMLCh*          outPtr = toFill;    XMLCh*          outEnd = outPtr + maxChars;    unsigned char*  sizePtr = charSizes;    unsigned int    countDone = (srcCount<maxChars)?srcCount:maxChars;    // if this flag is set, a none ASCII character is encountered    int             flag = 0;    // Special-case ASCII, which is a leading byte value of <= 127                     TROTASC(srcPtr, outPtr, &countDone, padding_temp.gFromTable, 0xFFFF,&flag);    srcPtr+=countDone;    outPtr+=countDone;    memset(sizePtr, 1, countDone);    sizePtr+=countDone;            //    //  We now loop until we either run out of input data, or room to store    //  output chars.    //    while ((srcPtr < srcEnd) && (outPtr < outEnd))    {                if (*srcPtr <= 127)        {            *outPtr++ = XMLCh(*srcPtr++);            *sizePtr++ = 1;            continue;        }                // See how many trailing src bytes this sequence is going to require        const unsigned int trailingBytes = gUTFBytes[*srcPtr];        //        //  If there are not enough source bytes to do this one, then we        //  are done. Note that we done >= here because we are implicitly        //  counting the 1 byte we get no matter what.        //        //  If we break out here, then there is nothing to undo since we        //  haven't updated any pointers yet.        //        if (srcPtr + trailingBytes >= srcEnd)            break;        // Looks ok, so lets build up the value        // or at least let's try to do so--remembering that        // we cannot assume the encoding to be valid:        // first, test first byte        if((gUTFByteIndicatorTest[trailingBytes] & *srcPtr) != gUTFByteIndicator[trailingBytes]) {            char pos[2] = {(char)0x31, 0};             char len[2] = {(char)(trailingBytes+0x31), 0};            char byte[2] = {*srcPtr,0};            ThrowXMLwithMemMgr3(UTFDataFormatException, XMLExcepts::UTF8_FormatError, pos, byte, len, getMemoryManager());        }        /***         * http://www.unicode.org/reports/tr27/         *         * Table 3.1B. lists all of the byte sequences that are legal in UTF-8.          * A range of byte values such as A0..BF indicates that any byte from A0 to BF (inclusive)          * is legal in that position.          * Any byte value outside of the ranges listed is illegal.          * For example,          * the byte sequence <C0 AF> is illegal  since C0 is not legal in the 1st Byte column.          * The byte sequence <E0 9F 80> is illegal since in the row          *    where E0 is legal as a first byte,          *    9F is not legal as a second byte.          * The byte sequence <F4 80 83 92> is legal, since every byte in that sequence matches          * a byte range in a row of the table (the last row).          *         *         * Table 3.1B. Legal UTF-8 Byte Sequences           * Code Points              1st Byte    2nd Byte    3rd Byte    4th Byte          * =========================================================================         * U+0000..U+007F            00..7F                * -------------------------------------------------------------------------         * U+0080..U+07FF            C2..DF      80..BF               *         * -------------------------------------------------------------------------         * U+0800..U+0FFF            E0          A0..BF     80..BF            *                                       --          *                                   * U+1000..U+FFFF            E1..EF      80..BF     80..BF             *         * --------------------------------------------------------------------------         * U+10000..U+3FFFF          F0          90..BF     80..BF       80..BF          *                                       --         * U+40000..U+FFFFF          F1..F3      80..BF     80..BF       80..BF          * U+100000..U+10FFFF        F4          80..8F     80..BF       80..BF          *                                           --         * ==========================================================================         *         *  Cases where a trailing byte range is not 80..BF are underlined in the table to          *  draw attention to them. These occur only in the second byte of a sequence.         *         ***/        XMLUInt32 tmpVal = 0;        switch(trailingBytes)        {            case 1 :                // UTF-8:   [110y yyyy] [10xx xxxx]                // Unicode: [0000 0yyy] [yyxx xxxx]                //                // 0xC0, 0xC1 has been filtered out                             checkTrailingBytes(*(srcPtr+1), 1, 1);                tmpVal = *srcPtr++;                tmpVal <<= 6;                tmpVal += *srcPtr++;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品1区二区.| 欧美精品 国产精品| 欧美午夜片在线看| 国产精品乱人伦| www.欧美色图| 欧美午夜影院一区| 亚洲精品免费视频| 欧美视频第二页| 日韩高清不卡一区二区三区| 日韩欧美国产电影| 欧洲另类一二三四区| 国产成人亚洲精品青草天美| 日韩av中文字幕一区二区三区| 国产精品久久毛片| 精品欧美一区二区久久| 一区二区三区四区在线播放| 日本一区二区在线不卡| 日韩三级中文字幕| 91精品一区二区三区在线观看| 91亚洲精品久久久蜜桃| 成人伦理片在线| 国产一区二区三区四区在线观看| 日本不卡不码高清免费观看| 一区二区三区久久久| 综合亚洲深深色噜噜狠狠网站| 国产女主播一区| 久久久久国产免费免费| 久久久久久久久久久久久夜| 日韩欧美在线网站| 日韩女同互慰一区二区| 日韩欧美国产综合一区| 91麻豆精品国产91久久久久久久久| 欧美熟乱第一页| 在线观看国产一区二区| 91成人在线观看喷潮| 一本久久精品一区二区 | 欧美成va人片在线观看| 91视视频在线观看入口直接观看www | 91麻豆国产精品久久| 久久99精品久久久| 国产欧美一二三区| 日韩一区二区免费高清| 91麻豆精品91久久久久久清纯| 欧美日韩不卡在线| 91麻豆精品国产自产在线| 在线成人av网站| 日韩欧美视频在线 | 国产精品久久免费看| 中文字幕一区三区| 亚洲少妇最新在线视频| 亚洲精品v日韩精品| 亚洲福利视频一区| 日本不卡一二三区黄网| 激情综合网最新| 国产成人av电影在线| av亚洲精华国产精华| 欧美午夜精品一区二区蜜桃| 51久久夜色精品国产麻豆| 精品国产伦一区二区三区观看方式 | 久久综合九色综合欧美就去吻| 久久国产成人午夜av影院| 九色综合国产一区二区三区| 国模冰冰炮一区二区| 丁香亚洲综合激情啪啪综合| www.亚洲激情.com| 欧美性淫爽ww久久久久无| 日韩欧美成人激情| 国产精品久久毛片av大全日韩| 亚洲与欧洲av电影| 老司机一区二区| proumb性欧美在线观看| 欧美视频中文字幕| 久久综合九色综合97_久久久 | 亚洲国产婷婷综合在线精品| 免费成人在线影院| 成人丝袜视频网| 欧美日韩www| 国产精品污污网站在线观看| 亚洲成人三级小说| 国产成人av福利| 欧美日韩高清一区| 久久精品视频一区| 首页欧美精品中文字幕| 成人性生交大合| 欧美探花视频资源| 欧美精品一区二区在线播放| 国产精品网站在线| 午夜日韩在线电影| 伦理电影国产精品| 92精品国产成人观看免费 | caoporen国产精品视频| 美女久久久精品| 美国毛片一区二区三区| 99热这里都是精品| 日韩欧美高清dvd碟片| 亚洲精品v日韩精品| 国产精品1024久久| 欧美区在线观看| 中文字幕一区二区三区不卡在线 | 国产成人综合视频| 91精品国产欧美日韩| 亚洲视频一区二区在线观看| 国模一区二区三区白浆| 这里是久久伊人| 亚洲精品视频在线看| 国产成人av自拍| 日韩一区二区中文字幕| 亚洲综合色视频| 91香蕉国产在线观看软件| wwwwxxxxx欧美| 日本 国产 欧美色综合| 在线观看免费成人| 亚洲区小说区图片区qvod| 国产河南妇女毛片精品久久久| 欧美丰满一区二区免费视频| 91在线观看美女| 久久久一区二区三区捆绑**| 日韩av不卡一区二区| 欧美日韩国产天堂| 亚洲综合精品自拍| 色综合咪咪久久| 亚洲丝袜精品丝袜在线| 成人深夜视频在线观看| 久久久精品国产免大香伊| 蜜桃视频一区二区三区| 欧美精品在线一区二区三区| 亚洲一区二区欧美| 日本精品一级二级| 亚洲黄色性网站| 色综合婷婷久久| 亚洲男同1069视频| 91小视频免费看| 亚洲精品国产第一综合99久久| 一本高清dvd不卡在线观看 | 一区二区三区中文字幕精品精品 | 国产sm精品调教视频网站| 久久69国产一区二区蜜臀| 久久精品人人做人人爽人人| 成人激情午夜影院| 日韩精品乱码免费| 欧美国产一区二区在线观看| 一本到三区不卡视频| 偷窥少妇高潮呻吟av久久免费| 91精品国产高清一区二区三区| 91伊人久久大香线蕉| 日韩中文字幕麻豆| 日韩电影在线免费| 丁香婷婷综合网| 亚洲欧洲无码一区二区三区| 色综合久久六月婷婷中文字幕| 亚洲欧洲精品一区二区三区| 99国产一区二区三精品乱码| 亚洲精品日韩综合观看成人91| 日本电影欧美片| 午夜成人在线视频| 精品久久人人做人人爰| 国产成人精品亚洲午夜麻豆| 国产精品久久久久久久久免费丝袜 | 亚洲一区二区三区视频在线 | 久久综合成人精品亚洲另类欧美| 国产一区不卡精品| 亚洲欧洲三级电影| 欧美日韩午夜影院| 麻豆精品一区二区综合av| 国产视频不卡一区| 日本高清视频一区二区| 日韩高清欧美激情| 国产精品情趣视频| 欧美日韩一级二级三级| 麻豆精品一区二区综合av| 欧美国产成人在线| 欧美日韩久久一区二区| 国产精品一区二区视频| 亚洲精品高清在线| 欧美成人一级视频| 色狠狠色狠狠综合| 狠狠色丁香久久婷婷综| 一级中文字幕一区二区| 精品国产网站在线观看| 91麻豆产精品久久久久久 | 麻豆精品久久精品色综合| 欧美国产精品一区二区三区| 欧美色爱综合网| 国产99精品国产| 日韩在线观看一区二区| 国产精品色哟哟网站| 欧美一卡二卡三卡四卡| 99久久国产综合精品色伊| 美女爽到高潮91| 136国产福利精品导航| 精品美女在线观看| 欧美三级欧美一级| 成人免费va视频| 美女国产一区二区| 亚洲欧美日韩国产综合| 成人激情电影免费在线观看| 欧美三电影在线| 成人动漫av在线| 欧美精品一区二区三区很污很色的 | 国产日韩综合av|