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

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

?? 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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩片之四级片| 亚洲品质自拍视频网站| 午夜成人免费电影| 欧美精品视频www在线观看| 亚洲欧洲av在线| 99麻豆久久久国产精品免费| 国产精品青草久久| 91在线视频18| 午夜精品免费在线| 日韩欧美卡一卡二| 成人h版在线观看| 综合久久久久久| 欧美性大战久久久久久久蜜臀| 亚洲一区免费视频| 精品国精品国产尤物美女| 91福利国产成人精品照片| 亚洲精品一二三| 不卡一区二区在线| 亚洲综合激情另类小说区| 911精品产国品一二三产区| 理论电影国产精品| 精品国产区一区| 欧美亚洲综合久久| 国产成人精品免费在线| 亚洲影院在线观看| 26uuu精品一区二区三区四区在线| 91在线你懂得| 国产精品91xxx| 亚洲丰满少妇videoshd| 国产精品护士白丝一区av| 91精品国产欧美日韩| 91香蕉视频污| 波多野结衣的一区二区三区| 玖玖九九国产精品| 亚洲国产日日夜夜| 亚洲视频网在线直播| 久久精品男人天堂av| 日韩欧美国产麻豆| 7777精品伊人久久久大香线蕉超级流畅| 国产91精品露脸国语对白| 麻豆freexxxx性91精品| 日韩精品色哟哟| 天天av天天翘天天综合网色鬼国产| 国产精品成人在线观看| 国产精品天天看| 日本一区二区电影| 中文字幕乱码日本亚洲一区二区 | 丝袜亚洲精品中文字幕一区| 亚洲视频在线观看三级| 亚洲另类在线视频| 亚洲另类中文字| 亚洲国产精品一区二区www| 一区二区三区不卡视频在线观看 | 3751色影院一区二区三区| 欧美日韩在线三级| 日韩三级.com| 国产欧美日韩精品a在线观看| 国产日韩精品视频一区| 国产精品麻豆视频| 一区二区三区在线不卡| 一级精品视频在线观看宜春院 | 国产精品五月天| 夜夜亚洲天天久久| 久久91精品国产91久久小草| 久久av中文字幕片| 97精品视频在线观看自产线路二| 色一情一伦一子一伦一区| 欧美日韩国产高清一区二区三区| 日韩久久精品一区| 综合激情网...| 美女高潮久久久| 91视视频在线观看入口直接观看www | 午夜亚洲福利老司机| 激情六月婷婷久久| 在线免费观看日本一区| 久久嫩草精品久久久久| 亚洲一区二区偷拍精品| 国产一区二区三区国产| 欧美亚洲高清一区| 亚洲欧美综合另类在线卡通| 人妖欧美一区二区| 欧美自拍偷拍一区| 国产精品情趣视频| 国产一区二区三区久久久| 777xxx欧美| 香蕉成人伊视频在线观看| 91色在线porny| 中文字幕高清一区| 国产精品一区不卡| 欧美成人一区二区三区片免费| 天天综合天天综合色| 欧美影院精品一区| 一区二区三区在线视频观看| 国产成人综合自拍| 国产三级精品视频| 国产精品资源在线观看| 久久久综合视频| 国产美女视频一区| 国产日韩欧美精品一区| 国产成人在线影院| 国产精品国产成人国产三级| 岛国一区二区三区| 中文字幕综合网| 欧美色图第一页| 奇米综合一区二区三区精品视频| 91精品国产综合久久精品图片| 日韩激情一区二区| 久久综合九色综合97_久久久| 国产一区二区三区免费看| 国产精品―色哟哟| 欧美日精品一区视频| 免费的国产精品| 国产精品色一区二区三区| 秋霞午夜鲁丝一区二区老狼| 精品国产免费视频| 色噜噜狠狠成人网p站| 日韩在线卡一卡二| 中文字幕亚洲电影| 欧美一级一区二区| 91视视频在线观看入口直接观看www | 国产精品免费网站在线观看| 3atv一区二区三区| a在线播放不卡| 国产精品白丝jk黑袜喷水| 亚洲第一在线综合网站| 国产精品高清亚洲| 精品福利二区三区| 欧美一区二区免费观在线| av在线不卡免费看| 国产大陆精品国产| 激情另类小说区图片区视频区| 亚洲香肠在线观看| 亚洲精品乱码久久久久久久久| 久久久久久一级片| 26uuu国产电影一区二区| 日韩欧美成人激情| 7777精品伊人久久久大香线蕉完整版 | 日本视频中文字幕一区二区三区| 一区二区在线电影| 亚洲精品va在线观看| 亚洲视频精选在线| 亚洲免费在线观看视频| 中文在线免费一区三区高中清不卡| 欧美视频中文字幕| 欧美区一区二区三区| 欧美日韩黄色影视| 日韩视频一区二区三区| 日韩一级大片在线| 久久久av毛片精品| 国产精品色婷婷| 国产精品入口麻豆九色| 亚洲免费看黄网站| 午夜精品123| 国产一区二区美女诱惑| 国产99久久久国产精品潘金| 不卡av在线网| 日韩午夜在线观看视频| 久久久久久久网| ●精品国产综合乱码久久久久| 国产剧情一区在线| 91亚洲精品久久久蜜桃| 欧美日韩视频不卡| 国产女主播一区| 亚洲gay无套男同| 国产91色综合久久免费分享| 欧美亚洲禁片免费| 久久精品视频在线看| 亚洲国产另类av| 不卡一区在线观看| 欧美精品一区二区三区蜜桃 | 韩国精品一区二区| 91国产精品成人| 中文字幕高清一区| 蜜乳av一区二区三区| 在线视频一区二区三区| 欧美国产欧美综合| 国产一区视频在线看| 欧美精品久久一区二区三区| 自拍偷拍亚洲激情| 国产成人在线免费| 久久久久免费观看| 精品一区二区成人精品| 51久久夜色精品国产麻豆| 亚洲欧美精品午睡沙发| 国产成a人亚洲精| 欧美伦理电影网| 性欧美大战久久久久久久久| 色综合天天视频在线观看| 18成人在线观看| 99精品欧美一区二区三区小说| 久久久精品天堂| 国产v综合v亚洲欧| 国产婷婷色一区二区三区四区| 国内欧美视频一区二区| 亚洲精品在线电影| 国产v综合v亚洲欧| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 国产精品99久久久久久似苏梦涵| 久久久久久免费网| 99精品欧美一区二区三区小说|