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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cygwintransservice.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
/* * Copyright 2002-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: CygwinTransService.cpp,v $ * Revision 1.13  2004/09/08 13:56:43  peiyongz * Apache License Version 2.0 * * Revision 1.12  2004/01/19 16:06:56  amassari * WideCharToMultiByte and MultiByteToWideChar return 0 on failure, not -1 * * Revision 1.11  2004/01/13 16:34:22  cargilld * Misc memory management changes. * * Revision 1.10  2003/12/24 15:24:15  cargilld * More updates to memory management so that the static memory manager. * * Revision 1.9  2003/11/08 23:37:00  neilg * fix for bug 24287 by Abe Backus. * * Revision 1.8  2003/05/17 16:32:17  knoaman * Memory manager implementation : transcoder update. * * Revision 1.7  2003/05/16 14:04:46  neilg * fix compilation error * * Revision 1.6  2003/05/16 06:01:57  knoaman * Partial implementation of the configurable memory manager. * * Revision 1.5  2003/05/15 18:47:02  knoaman * Partial implementation of the configurable memory manager. * * Revision 1.4  2003/03/09 17:02:20  peiyongz * PanicHandler * * Revision 1.3  2003/03/07 18:15:57  tng * Return a reference instead of void for operator= * * Revision 1.2  2002/11/04 15:14:32  tng * C++ Namespace Support. * * Revision 1.1  2002/08/19 18:35:56  tng * [Bug 6467] Installing Xerces C++ on cygwin environment. * */// ---------------------------------------------------------------------------//  Includes// ---------------------------------------------------------------------------#include <xercesc/util/PlatformUtils.hpp>#include <xercesc/util/TranscodingException.hpp>#include <xercesc/util/XMLException.hpp>#include <xercesc/util/XMLString.hpp>#include <xercesc/util/XMLUniDefs.hpp>#include <xercesc/util/XMLUni.hpp>#include <xercesc/util/RefHashTableOf.hpp>#include "CygwinTransService.hpp"#include <windows.h>#include <stdlib.h>XERCES_CPP_NAMESPACE_BEGIN// ---------------------------------------------------------------------------//  Local, const data// ---------------------------------------------------------------------------static const XMLCh gMyServiceId[] ={    chLatin_C, chLatin_y, chLatin_g, chLatin_w, chLatin_i, chLatin_n, chNull};// Cygwin doesn't support iswspace(), so this table is used by// CygwinTransService::isSpace() based on a union of Unicode// Table 6-1 and the ANSI definition of whitespace, arranged// in order of likely occurrence.static const XMLCh gWhitespace[] ={    0x0020,    0x00a0,    0x0009,    0x000a,    0x000d,    0x000b,    0x000c,    0x3000,    0x2000,    0x2001,    0x2002,    0x2003,    0x2004,    0x2005,    0x2006,    0x2007,    0x2008,    0x2009,    0x200a,    0x200b,    0x202f};// Used by the kernel32 function LCMapStringW to uppercasify strings// appropriate to this locale.  Cygwin doesn't support _wcsupr().static const LCID gLocaleId =#if defined(CYGWINTRANSCODER_DEFAULT_LOCALE)    MAKELCID( MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT), SORT_DEFAULT);#else    // CYGWINTRANSCODER_DYNAMIC_LOCALE    GetThreadLocale();#endif// ---------------------------------------------------------------------------//  This is the simple CPMapEntry class. It just contains an encoding name//  and a code page for that encoding.// ---------------------------------------------------------------------------class CPMapEntry : public XMemory{public :    // -----------------------------------------------------------------------    //  Constructors and Destructor    // -----------------------------------------------------------------------    CPMapEntry    (        const   XMLCh* const    encodingName        , const unsigned int    cpId        , const unsigned int    ieId    );    CPMapEntry    (        const   char* const     encodingName        , const unsigned int    cpId        , const unsigned int    ieId    );    ~CPMapEntry();    // -----------------------------------------------------------------------    //  Getter methods    // -----------------------------------------------------------------------    const XMLCh* getEncodingName() const;    const XMLCh* getKey() const;    unsigned int getWinCP() const;    unsigned int getIEEncoding() const;private :    // -----------------------------------------------------------------------    //  Unimplemented constructors and operators    // -----------------------------------------------------------------------    CPMapEntry();    CPMapEntry(const CPMapEntry&);    CPMapEntry& operator=(const CPMapEntry&);    // -----------------------------------------------------------------------    //  Private data members    //    //  fEncodingName    //      This is the encoding name for the code page that this instance    //      represents.    //    //  fCPId    //      This is the Windows specific code page for the encoding that this    //      instance represents.    //    //  fIEId    //      This is the IE encoding id. Its not used at this time, but we    //      go ahead and get it and store it just in case for later.    // -----------------------------------------------------------------------    XMLCh*          fEncodingName;    unsigned int    fCPId;    unsigned int    fIEId;};// ---------------------------------------------------------------------------//  CPMapEntry: Constructors and Destructor// ---------------------------------------------------------------------------CPMapEntry::CPMapEntry( const   char* const     encodingName                        , const unsigned int    cpId                        , const unsigned int    ieId) :    fEncodingName(0)    , fCPId(cpId)    , fIEId(ieId){    // Transcode the name to Unicode and store that copy    const unsigned int srcLen = strlen(encodingName);    const unsigned int targetLen = ::MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, encodingName, srcLen, NULL, 0);    fEncodingName = (XMLCh*) XMLPlatformUtils::fgMemoryManager->allocate    (        (targetLen + 1) * sizeof(XMLCh)    );//new XMLCh[targetLen + 1];    ::MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, encodingName, srcLen, (LPWSTR)fEncodingName, targetLen);    fEncodingName[targetLen] = 0;    //    //  Upper case it because we are using a hash table and need to be    //  sure that we find all case combinations.    //    ::LCMapStringW( gLocaleId, LCMAP_UPPERCASE, (LPCWSTR)fEncodingName, targetLen, (LPWSTR)fEncodingName, targetLen);}CPMapEntry::CPMapEntry( const   XMLCh* const    encodingName                        , const unsigned int    cpId                        , const unsigned int    ieId) :    fEncodingName(0)    , fCPId(cpId)    , fIEId(ieId){		fEncodingName = XMLString::replicate(encodingName, XMLPlatformUtils::fgMemoryManager);    //    //  Upper case it because we are using a hash table and need to be    //  sure that we find all case combinations.    //    unsigned int itsLen = XMLString::stringLen( fEncodingName);    ::LCMapStringW( gLocaleId, LCMAP_UPPERCASE, (LPCWSTR)fEncodingName, itsLen, (LPWSTR)fEncodingName, itsLen);}CPMapEntry::~CPMapEntry(){    XMLPlatformUtils::fgMemoryManager->deallocate(fEncodingName);//delete [] fEncodingName;}// ---------------------------------------------------------------------------//  CPMapEntry: Getter methods// ---------------------------------------------------------------------------const XMLCh* CPMapEntry::getEncodingName() const{    return fEncodingName;}unsigned int CPMapEntry::getWinCP() const{    return fCPId;}unsigned int CPMapEntry::getIEEncoding() const{    return fIEId;}//---------------------------------------------------------------------------////  class CygwinTransService Implementation ...////---------------------------------------------------------------------------// ---------------------------------------------------------------------------//  CygwinTransService: Constructors and Destructor// ---------------------------------------------------------------------------CygwinTransService::CygwinTransService(){    fCPMap = new RefHashTableOf<CPMapEntry>(109);    //    //  Open up the registry key that contains the info we want. Note that,    //  if this key does not exist, then we just return. It will just mean    //  that we don't have any support except for intrinsic encodings supported    //  by the parser itself (and the LCP support of course.    //    HKEY charsetKey;    if (::RegOpenKeyExA    (        HKEY_CLASSES_ROOT        , "MIME\\Database\\Charset"        , 0        , KEY_READ        , &charsetKey))    {        return;    }    //    //  Read in the registry keys that hold the code page ids. Skip for now    //  those entries which indicate that they are aliases for some other    //  encodings. We'll come back and do a second round for those and look    //  up the original name and get the code page id.    //    //  Note that we have to use A versions here so that this will run on    //  98, and transcode the strings to Unicode.    //    const unsigned int nameBufSz = 1024;    char nameBuf[nameBufSz + 1];    unsigned int subIndex = 0;    unsigned long theSize;    while (true)    {        // Get the name of the next key        theSize = nameBufSz;        if (::RegEnumKeyExA        (            charsetKey            , subIndex            , nameBuf            , &theSize            , 0, 0, 0, 0) == ERROR_NO_MORE_ITEMS)        {            break;        }        // Open this subkey        HKEY encodingKey;        if (::RegOpenKeyExA        (            charsetKey            , nameBuf            , 0            , KEY_READ            , &encodingKey))        {            XMLPlatformUtils::panic(PanicHandler::Panic_NoTransService);        }        //        //  Lts see if its an alias. If so, then ignore it in this first        //  loop. Else, we'll add a new entry for this one.        //        if (!isAlias(encodingKey))        {            //            //  Lets get the two values out of this key that we are            //  interested in. There should be a code page entry and an            //  IE entry.            //            unsigned long theType;            unsigned int CPId;            unsigned int IEId;            theSize = sizeof(unsigned int);            if (::RegQueryValueExA            (                encodingKey                , "Codepage"                , 0                , &theType                , (unsigned char*)&CPId                , &theSize) != ERROR_SUCCESS)            {                XMLPlatformUtils::panic(PanicHandler::Panic_NoTransService);            }            //            //  If this is not a valid Id, and it might not be because its            //  not loaded on this system, then don't take it.            //            if (::IsValidCodePage(CPId))            {                theSize = sizeof(unsigned int);                if (::RegQueryValueExA                (                    encodingKey                    , "InternetEncoding"                    , 0                    , &theType                    , (unsigned char*)&IEId                    , &theSize) != ERROR_SUCCESS)                {                    XMLPlatformUtils::panic(PanicHandler::Panic_NoTransService);                }                CPMapEntry* newEntry = new CPMapEntry(nameBuf, CPId, IEId);                fCPMap->put((void*)newEntry->getEncodingName(), newEntry);            }        }        // And now close the subkey handle and bump the subkey index

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人av影院| 99久久久久久| ㊣最新国产の精品bt伙计久久| 日本精品免费观看高清观看| 久久99精品久久久| 一区精品在线播放| 精品国产91亚洲一区二区三区婷婷| 在线观看亚洲a| 国产91精品露脸国语对白| 午夜精品久久久久久久99樱桃| 欧美国产日韩一二三区| 日韩免费视频一区| 欧美性极品少妇| 99久久99久久精品免费看蜜桃| 精品制服美女丁香| 午夜激情综合网| 亚洲欧美乱综合| 国产欧美一区二区精品秋霞影院 | 日日夜夜精品视频免费| 国产精品女同一区二区三区| 欧美精品一区二区三区一线天视频 | 天堂成人国产精品一区| 国产精品电影院| 久久影院午夜论| 91精品国产欧美一区二区成人| 色婷婷综合在线| 9人人澡人人爽人人精品| 国产一区二区免费视频| 另类综合日韩欧美亚洲| 亚洲大型综合色站| 亚洲美女一区二区三区| 国产精品久久三| 国产欧美精品一区aⅴ影院| 日韩精品一区国产麻豆| 7777精品伊人久久久大香线蕉| 欧洲激情一区二区| 色菇凉天天综合网| 91免费看视频| 91免费在线播放| 欧洲一区二区av| 欧美天堂亚洲电影院在线播放| 日本大香伊一区二区三区| 色综合久久综合网| 在线免费观看日韩欧美| 色94色欧美sute亚洲13| 色综合色狠狠综合色| 99久久精品免费看国产| 成人激情av网| 91天堂素人约啪| 91国内精品野花午夜精品| 91传媒视频在线播放| 在线观看视频91| 欧美日韩国产一级片| 欧美一区二区在线免费播放| 91精品国产91久久综合桃花 | 91精品国产91久久久久久一区二区| 欧美精品国产精品| 日韩一区二区三区观看| 26uuu亚洲综合色欧美| 欧美精品一区二区高清在线观看| 久久久无码精品亚洲日韩按摩| 国产亚洲精久久久久久| 国产精品久久久久久久浪潮网站| 亚洲乱码日产精品bd| 亚洲成人tv网| 精品在线一区二区三区| 成人白浆超碰人人人人| 91成人看片片| 日韩午夜在线播放| 欧美韩国一区二区| 伊人夜夜躁av伊人久久| 日本不卡不码高清免费观看| 国产福利一区二区三区在线视频| 99re热这里只有精品视频| 欧美日本在线观看| www日韩大片| 中文字幕亚洲在| 日韩高清欧美激情| 国产激情偷乱视频一区二区三区| 91国偷自产一区二区开放时间 | 天天爽夜夜爽夜夜爽精品视频| 精品一区二区三区久久久| 不卡一区二区中文字幕| 欧美天天综合网| 久久久高清一区二区三区| 亚洲乱码日产精品bd| 麻豆国产91在线播放| 91在线看国产| 精品欧美黑人一区二区三区| 国产精品美女久久久久aⅴ国产馆| 亚洲线精品一区二区三区八戒| 韩国成人福利片在线播放| 91免费视频观看| 久久亚洲精品国产精品紫薇| 亚洲激情图片小说视频| 激情综合色丁香一区二区| 一本高清dvd不卡在线观看| 精品久久国产97色综合| 亚洲一级片在线观看| 国产久卡久卡久卡久卡视频精品| 欧美性一区二区| 日本一区二区三区高清不卡| 日本三级韩国三级欧美三级| 99麻豆久久久国产精品免费| 欧美va在线播放| 五月激情丁香一区二区三区| 色综合激情久久| 欧美国产精品v| 精品在线免费视频| 在线不卡一区二区| 亚洲欧美日韩在线播放| 国产成人亚洲综合色影视| 欧美日本在线观看| 一区二区三区视频在线观看| 不卡的av电影| 久久久久99精品一区| 青青青爽久久午夜综合久久午夜| 色噜噜狠狠成人网p站| 欧美国产视频在线| 国产一区二区三区最好精华液| 欧美精品国产精品| 亚洲高清不卡在线观看| 色综合久久久久久久久| 国产精品免费久久| 国产精品一区二区在线播放| 精品入口麻豆88视频| 婷婷成人综合网| 欧美日韩另类国产亚洲欧美一级| 亚洲综合免费观看高清在线观看| av电影天堂一区二区在线| 久久久精品国产99久久精品芒果| 国模套图日韩精品一区二区| 欧美va日韩va| 久久黄色级2电影| 精品福利视频一区二区三区| 老司机午夜精品| 欧美成人艳星乳罩| 国产在线国偷精品免费看| 久久理论电影网| 国产精品99久久久久久久vr| 久久久.com| www.日韩精品| 亚洲欧美区自拍先锋| 91蝌蚪国产九色| 亚洲一区免费观看| 精品视频1区2区3区| 日韩国产精品久久久| 欧美一卡2卡三卡4卡5免费| 免费欧美日韩国产三级电影| 精品理论电影在线| 国模一区二区三区白浆| 国产人成亚洲第一网站在线播放| 国产91清纯白嫩初高中在线观看| 国产精品二三区| 欧美三级在线播放| 日韩福利视频导航| 欧美电影免费观看高清完整版在线 | 一本到不卡免费一区二区| 亚洲综合色网站| 欧美一区二区免费观在线| 精品在线你懂的| 国产精品国产自产拍高清av | 欧美亚洲一区二区三区四区| 视频一区中文字幕国产| 日韩小视频在线观看专区| 国产精品一级在线| 中文字幕五月欧美| 在线亚洲人成电影网站色www| 日韩精品乱码免费| 久久精品视频免费观看| 成人激情图片网| 亚洲电影欧美电影有声小说| 久久综合久久久久88| av亚洲产国偷v产偷v自拍| 亚洲国产精品人人做人人爽| 日韩精品在线一区| 成人爱爱电影网址| 日韩国产精品久久久久久亚洲| 国产视频一区在线观看| 欧美综合视频在线观看| 精品在线你懂的| 亚洲精品乱码久久久久久日本蜜臀| 欧美一区二区三区人| 成人影视亚洲图片在线| 亚洲成a天堂v人片| 欧美国产精品专区| 制服丝袜在线91| 99re视频这里只有精品| 美腿丝袜亚洲色图| 亚洲欧洲综合另类| 久久综合九色综合欧美98| 日本韩国欧美一区| 国产在线看一区| 午夜在线电影亚洲一区| 中文字幕乱码一区二区免费| 91精品国产综合久久久久| 成人动漫精品一区二区| 久久精品久久久精品美女| 亚洲精品视频一区二区| 久久久不卡网国产精品二区|