亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美日韩国产综合视频在线观看| 欧美韩日一区二区三区| 午夜天堂影视香蕉久久| 一区二区三区免费在线观看| 亚洲人成在线播放网站岛国| 中文字幕中文字幕一区| 国产精品欧美久久久久无广告| 国产女人18水真多18精品一级做| 久久久精品国产免费观看同学| 国产日韩欧美综合在线| 欧美国产成人在线| 亚洲精品视频一区| 午夜久久久久久久久 | 99精品视频在线观看| 成人夜色视频网站在线观看| 99精品1区2区| 欧美日韩免费高清一区色橹橹| 在线播放欧美女士性生活| 欧美va亚洲va国产综合| 国产片一区二区三区| 亚洲精品成人悠悠色影视| 午夜激情综合网| 国产在线播放一区三区四| 99精品欧美一区二区蜜桃免费| 色婷婷av一区二区三区gif| 7777精品久久久大香线蕉| 亚洲精品一区二区在线观看| 国产精品视频在线看| 亚洲影院理伦片| 国产一区二区中文字幕| 在线精品视频免费播放| 欧美一区二区三区免费观看视频| 欧美高清一级片在线观看| 一区二区在线看| 久久99蜜桃精品| 色婷婷国产精品| 欧美精品一区二区在线播放| 亚洲三级小视频| 久久99精品久久久久久国产越南| yourporn久久国产精品| 欧美一级xxx| 亚洲综合在线电影| 国产成人免费在线观看不卡| 欧美亚洲图片小说| 久久久美女艺术照精彩视频福利播放| 一区二区三区在线观看动漫| 国产麻豆精品在线| 在线播放日韩导航| 亚洲精品日韩一| 成人黄色片在线观看| 日韩精品一区二区三区中文精品| 一区二区三区在线免费播放| 国产成人免费视频| 欧美一级片在线看| 亚洲成人动漫精品| 色综合视频一区二区三区高清| 久久人人97超碰com| 奇米影视7777精品一区二区| 日本精品一区二区三区四区的功能| 久久久www成人免费无遮挡大片| 日本中文字幕一区二区视频| 在线看国产一区| 亚洲久本草在线中文字幕| 国产乱码精品一区二区三 | 精品国产91乱码一区二区三区| 有码一区二区三区| 91在线观看一区二区| 在线观看一区日韩| 精品一区二区三区日韩| 最近中文字幕一区二区三区| 666欧美在线视频| 国产福利精品一区二区| 亚洲图片一区二区| 久久综合九色综合久久久精品综合| www.欧美精品一二区| 丝袜美腿亚洲一区二区图片| 国产农村妇女精品| 91精品婷婷国产综合久久竹菊| 成人免费视频网站在线观看| 日韩av一级电影| 1024成人网| 亚洲精品一区二区精华| 91精品国产福利| 色综合久久天天综合网| 国产精品一区二区91| 视频一区在线视频| 国产精品久久久久久久午夜片| 欧美理论在线播放| 99久久久精品免费观看国产蜜| 激情文学综合丁香| 亚洲大尺度视频在线观看| 国产精品乱码一区二区三区软件| 欧美一区二区不卡视频| 色婷婷香蕉在线一区二区| 国产精品小仙女| 国模一区二区三区白浆| 午夜不卡av在线| 亚洲激情图片一区| 亚洲视频免费在线观看| 久久先锋影音av鲁色资源网| 日韩视频一区在线观看| 欧美日韩午夜在线视频| 欧洲一区二区av| 91色|porny| www.久久精品| 不卡的电视剧免费网站有什么| 国产精品1024| 国产成人亚洲综合a∨婷婷 | www.亚洲在线| 成人黄色软件下载| 不卡大黄网站免费看| 成人成人成人在线视频| zzijzzij亚洲日本少妇熟睡| 成人国产精品视频| 99久久精品国产观看| 99久久国产免费看| 日本高清视频一区二区| 91福利精品第一导航| 欧美日韩中文另类| 欧美欧美欧美欧美| 91精品中文字幕一区二区三区| 欧美一二区视频| 欧美va在线播放| 国产日本亚洲高清| 亚洲婷婷综合色高清在线| 一区二区三区四区在线| 亚洲午夜久久久久久久久久久 | 中文字幕一区二区三区精华液 | 日本中文字幕一区二区视频 | 一区二区在线观看免费视频播放| 亚洲欧美欧美一区二区三区| 中文字幕一区av| 亚洲一卡二卡三卡四卡无卡久久| 亚洲成人av资源| 国产在线国偷精品免费看| 成人一区在线观看| 91官网在线观看| 精品国产免费一区二区三区四区 | 欧美日韩一二三区| 91精品欧美一区二区三区综合在| 宅男在线国产精品| 久久久精品蜜桃| 亚洲女人****多毛耸耸8| 性做久久久久久| 久久国产乱子精品免费女| 成人黄色av网站在线| 欧美精品第1页| 国产午夜精品久久久久久久 | 香蕉成人伊视频在线观看| 蜜桃一区二区三区在线| 不卡电影免费在线播放一区| 欧美视频一区二区三区四区| 久久久青草青青国产亚洲免观| 亚洲激情男女视频| 韩国理伦片一区二区三区在线播放| 91视频国产观看| 欧美精品aⅴ在线视频| 国产精品免费丝袜| 丝袜美腿亚洲一区二区图片| 成人av影视在线观看| 欧美三级日韩在线| 欧美国产日韩亚洲一区| 欧美体内she精高潮| 精品粉嫩超白一线天av| 亚洲视频你懂的| 色综合天天综合狠狠| 欧美本精品男人aⅴ天堂| 一区二区在线看| 国产mv日韩mv欧美| 欧美xxxx老人做受| 亚洲综合精品自拍| 风流少妇一区二区| 日韩女优av电影| 亚洲一区二区美女| 97久久精品人人做人人爽 | 国产精品久久久久久久久免费相片| 亚洲成人自拍一区| 色天使久久综合网天天| 国产精品五月天| 国内成人自拍视频| 欧美一区二区三区四区五区 | 欧美日韩高清一区| 亚洲色欲色欲www| 成人妖精视频yjsp地址| 久久综合精品国产一区二区三区| 午夜精品一区二区三区电影天堂| 色综合久久九月婷婷色综合| 国产精品久久三| 国产99一区视频免费| 国产色91在线| 国产乱码字幕精品高清av| 精品国产91洋老外米糕| 久久精品999| 精品国产91乱码一区二区三区 | 久久国产视频网| 日韩欧美自拍偷拍| 久久99精品国产.久久久久久| 久久免费视频色| 日韩精品色哟哟| 91精品国产一区二区三区|