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

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

?? openserverplatformutils.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/* * Copyright 1999-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: OpenServerPlatformUtils.cpp,v $ * Revision 1.16  2004/09/08 13:56:42  peiyongz * Apache License Version 2.0 * * Revision 1.15  2004/01/29 11:51:20  cargilld * Code cleanup changes to get rid of various compiler diagnostic messages. * * Revision 1.14  2004/01/13 16:34:21  cargilld * Misc memory management changes. * * Revision 1.13  2003/12/24 15:24:14  cargilld * More updates to memory management so that the static memory manager. * * Revision 1.12  2003/12/17 19:58:05  cargilld * Platform update for memory management so that the static memory manager (one * used to call Initialize) is only for static data. * * Revision 1.11  2003/12/17 15:16:10  cargilld * Platform update for memory management so that the static memory manager (one * used to call Initialize) is only for static data. * * Revision 1.10  2003/12/17 13:58:03  cargilld * Platform update for memory management so that the static memory manager (one * used to call Initialize) is only for static data. * * Revision 1.9  2003/10/01 16:32:40  neilg * improve handling of out of memory conditions, bug #23415.  Thanks to David Cargill. * * Revision 1.8  2003/05/15 18:37:49  knoaman * Partial implementation of the configurable memory manager. * * Revision 1.7  2003/04/25 17:20:11  peiyongz * throw exception if getcwd() fails * * Revision 1.6  2003/04/24 02:55:58  peiyongz * Logical Path Resolution * * Revision 1.5  2003/03/09 16:57:18  peiyongz * PanicHandler * * Revision 1.4  2002/11/19 13:04:32  gareth * Bug# 14661 Caldera implemented openFileToWrite and writeBufferToFile. Patch from Cameron Dorrat. * * Revision 1.3  2002/11/04 15:13:01  tng * C++ Namespace Support. * * Revision 1.2  2002/05/21 20:31:47  tng * Minor update: Remove obsolete code * * Revision 1.1  2002/02/27 22:57:59  peiyongz * Bug# 6445 Caldera (SCO) OpenServer Port : patch from Martin Kalen * */// ---------------------------------------------------------------------------//  Includes// ---------------------------------------------------------------------------#if !defined (APP_NO_THREADS)#include     <pthread.h>#endif#include    <unistd.h>#include    <stdio.h>#include    <stdlib.h>#include    <errno.h>#include    <libgen.h>#include    <sys/time.h>#include    <netinet/in.h>#include    <arpa/inet.h>#include    <xercesc/util/PlatformUtils.hpp>#include    <xercesc/util/RuntimeException.hpp>#include    <xercesc/util/Janitor.hpp>#include    <xercesc/util/Mutexes.hpp>#include    <xercesc/util/XMLString.hpp>#include    <xercesc/util/XMLUniDefs.hpp>#include    <xercesc/util/XMLUni.hpp>#include    <xercesc/util/PanicHandler.hpp>#include    <xercesc/util/OutOfMemoryException.hpp>#if defined (XML_USE_ICU_TRANSCODER)#   include <xercesc/util/Transcoders/ICU/ICUTransService.hpp>#else//  Same as -DXML_USE_NATIVE_TRANSCODER#   include <xercesc/util/Transcoders/Iconv/IconvTransService.hpp>#endif#if defined(XML_USE_ICU_MESSAGELOADER)#   include <xercesc/util/MsgLoaders/ICU/ICUMsgLoader.hpp>#elif defined (XML_USE_ICONV_MESSAGELOADER)#   include <xercesc/util/MsgLoaders/MsgCatalog/MsgCatalogLoader.hpp>#else//  Same as -DXML_USE_INMEM_MESSAGELOADER#   include <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp>#endif#if defined (XML_USE_NETACCESSOR_LIBWWW)#   include <xercesc/util/NetAccessors/libWWW/LibWWWNetAccessor.hpp>#else//  Same as -DXML_USE_NETACCESSOR_SOCKET#   include <xercesc/util/NetAccessors/Socket/SocketNetAccessor.hpp>#endifXERCES_CPP_NAMESPACE_BEGIN// ---------------------------------------------------------------------------//  XMLPlatformUtils: Private Static Methods// ---------------------------------------------------------------------------////  This method is called by the platform independent part of this class//  when client code asks to have one of the supported message sets loaded.//XMLMsgLoader* XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain){    XMLMsgLoader* retVal = 0;    try    {#if defined (XML_USE_ICU_MESSAGELOADER)        retVal = new ICUMsgLoader(msgDomain);#elif defined (XML_USE_ICONV_MESSAGELOADER)        retVal = new MsgCatalogLoader(msgDomain);#else        retVal = new InMemMsgLoader(msgDomain);#endif    }    catch(const OutOfMemoryException&)    {        throw;    }    catch(...)    {        panic(PanicHandler::Panic_CantLoadMsgDomain);    }    return retVal;}XMLNetAccessor* XMLPlatformUtils::makeNetAccessor(){#if defined (XML_USE_NETACCESSOR_LIBWWW)    return new LibWWWNetAccessor();#else    return new SocketNetAccessor();#endif}////  This method is called very early in the bootstrapping process. This guy//  must create a transcoding service and return it. It cannot use any string//  methods, any transcoding services, throw any exceptions, etc... It just//  makes a transcoding service and returns it, or returns zero on failure.//XMLTransService* XMLPlatformUtils::makeTransService(){#if defined (XML_USE_ICU_TRANSCODER)	return new ICUTransService;#else	return new IconvTransService;#endif}// ---------------------------------------------------------------------------//  XMLPlatformUtils: The panic method// ---------------------------------------------------------------------------void XMLPlatformUtils::panic(const PanicHandler::PanicReasons reason){    fgUserPanicHandler? fgUserPanicHandler->panic(reason) : fgDefaultPanicHandler->panic(reason);	}// ---------------------------------------------------------------------------//  XMLPlatformUtils: File Methods// ---------------------------------------------------------------------------unsigned int XMLPlatformUtils::curFilePos(FileHandle theFile                                          , MemoryManager* const manager){    // Get the current position    int curPos = ftell((FILE*)theFile);    if (curPos == -1)        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotGetSize, manager);    return (unsigned int)curPos;}void XMLPlatformUtils::closeFile(FileHandle theFile                                 , MemoryManager* const manager){    if (fclose((FILE*)theFile))        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotCloseFile, manager);}unsigned int XMLPlatformUtils::fileSize(FileHandle theFile                                        , MemoryManager* const manager){    // Get the current position    long int curPos = ftell((FILE*)theFile);    if (curPos == -1)        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotGetCurPos, manager);    // Seek to the end and save that value for return	if (fseek((FILE*)theFile, 0, SEEK_END))        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotSeekToEnd, manager);    long int retVal = ftell((FILE*)theFile);    if (retVal == -1)        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotSeekToEnd, manager);    // And put the pointer back    if (fseek((FILE*)theFile, curPos, SEEK_SET))        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotSeekToPos, manager);    return (unsigned int)retVal;}FileHandle XMLPlatformUtils::openFile(const XMLCh* const fileName                                      , MemoryManager* const manager){    const char* tmpFileName = XMLString::transcode(fileName, manager);    ArrayJanitor<char> janText((char*)tmpFileName, manager);    FileHandle retVal = (FILE*)fopen(tmpFileName , "rb");    if (retVal == NULL)        return 0;    return retVal;}FileHandle XMLPlatformUtils::openFile(const char* const fileName                                      , MemoryManager* const manager){    FileHandle retVal = (FILE*)fopen(fileName, "rb");    if (retVal == NULL)        return 0;    return retVal;}FileHandle XMLPlatformUtils::openFileToWrite(const XMLCh* const fileName                                             , MemoryManager* const manager){    const char* tmpFileName = XMLString::transcode(fileName, manager);    ArrayJanitor<char> janText((char*)tmpFileName, manager);    return fopen( tmpFileName , "wb" );}FileHandle XMLPlatformUtils::openFileToWrite(const char* const fileName                                             , MemoryManager* const manager){    return fopen( fileName , "wb" );}FileHandle XMLPlatformUtils::openStdInHandle(MemoryManager* const manager){	return (FileHandle)fdopen(dup(0), "rb");}unsigned int XMLPlatformUtils::readFileBuffer(FileHandle            theFile,											  const unsigned int    toRead,											  XMLByte* const        toFill                                              , MemoryManager* const manager){    size_t noOfItemsRead = fread((void*)toFill, 1, toRead, (FILE*)theFile);    if(ferror((FILE*)theFile))    {        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotReadFromFile, manager);    }    return (unsigned int)noOfItemsRead;}voidXMLPlatformUtils::writeBufferToFile( FileHandle     const  theFile                                   , long                  toWrite                                   , const XMLByte* const  toFlush                                   , MemoryManager* const  manager)                                   {    if (!theFile        ||        (toWrite <= 0 ) ||        !toFlush         )        return;    const XMLByte* tmpFlush = (const XMLByte*) toFlush;    size_t bytesWritten = 0;    while (true)    {        bytesWritten=fwrite(tmpFlush, sizeof(XMLByte), toWrite, (FILE*)theFile);        if(ferror((FILE*)theFile))        {            ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile, manager);        }        if (bytesWritten < toWrite) //incomplete write        {            tmpFlush+=bytesWritten;            toWrite-=bytesWritten;            bytesWritten=0;        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日日摸夜夜添夜夜添国产精品 | 国产乱码字幕精品高清av| 国产一区二区视频在线| 欧洲av一区二区嗯嗯嗯啊| 亚洲精品一区二区三区香蕉| 一区二区三区加勒比av| 狠狠色丁香久久婷婷综| 5858s免费视频成人| 中文字幕一区二区三区不卡在线 | 亚洲日本欧美天堂| 国产一区二区三区四区五区美女 | av电影在线观看完整版一区二区| 在线成人av网站| 亚洲国产日韩在线一区模特| 97精品超碰一区二区三区| 亚洲精品一区在线观看| 日韩影院免费视频| 精品视频在线看| 一色屋精品亚洲香蕉网站| 国产精品一级片在线观看| 欧美不卡视频一区| 久88久久88久久久| 日韩色视频在线观看| 日韩av在线发布| 日韩一级片在线观看| 亚洲v中文字幕| 在线不卡免费欧美| 日日嗨av一区二区三区四区| 欧美日韩在线播放三区四区| 亚洲一区二区三区小说| 91精彩视频在线观看| 亚洲精品一二三四区| 91日韩精品一区| 亚洲精品成人a在线观看| 在线免费观看日韩欧美| 亚洲午夜免费视频| 91精品国产麻豆| 美女看a上一区| 久久久久久久久久久久久夜| 国产精品一区二区不卡| 中文天堂在线一区| 91网站黄www| 亚洲一区二区在线免费观看视频 | 91久久精品一区二区三区| 一区二区三区成人| 欧美日韩精品福利| 美女视频黄 久久| 国产精品女同一区二区三区| av中文一区二区三区| 一区二区三区在线观看网站| 欧美日韩国产一级片| 麻豆国产精品777777在线| 久久久精品蜜桃| 91黄色小视频| 午夜一区二区三区视频| 日韩精品一区二区三区在线| 国产91丝袜在线播放0| 亚洲欧洲日本在线| 欧美日本在线看| 国产一区二区按摩在线观看| 中文字幕一区二区三区乱码在线 | 一本久久a久久精品亚洲| 天天影视涩香欲综合网| 久久精品亚洲精品国产欧美| 日本丰满少妇一区二区三区| 久久国产欧美日韩精品| 亚洲欧洲成人自拍| 欧美电视剧在线看免费| 99精品视频在线播放观看| 午夜电影一区二区三区| 国产精品久久国产精麻豆99网站| 欧美做爰猛烈大尺度电影无法无天| 蜜臀久久99精品久久久画质超高清| 国产精品久久久久久久第一福利| 欧美精选午夜久久久乱码6080| 丁香桃色午夜亚洲一区二区三区| 一区二区三区在线播| 久久亚洲精品国产精品紫薇| 在线免费不卡电影| 国产福利一区二区三区| 婷婷激情综合网| 亚洲婷婷国产精品电影人久久| 欧美一级片在线看| 日本韩国一区二区| 成人免费观看男女羞羞视频| 日本怡春院一区二区| 亚洲精品乱码久久久久久日本蜜臀 | 日韩一卡二卡三卡四卡| 91精品1区2区| 成人免费精品视频| 精品一区二区免费视频| 亚洲国产精品久久一线不卡| 中文字幕一区在线| 国产午夜亚洲精品理论片色戒| 欧美丰满少妇xxxxx高潮对白| 一本久道久久综合中文字幕| 不卡的av在线播放| 国产乱子轮精品视频| 美女看a上一区| 丝袜诱惑制服诱惑色一区在线观看 | 国产一区在线观看麻豆| 日韩1区2区日韩1区2区| 亚洲午夜视频在线观看| 亚洲蜜臀av乱码久久精品蜜桃| 国产精品网曝门| 久久久不卡网国产精品一区| 精品三级在线观看| 精品sm在线观看| 精品国产髙清在线看国产毛片| 91精品国产欧美一区二区18| 8x福利精品第一导航| 91精品国产色综合久久ai换脸 | 午夜国产精品一区| 丝袜诱惑制服诱惑色一区在线观看| 亚洲一卡二卡三卡四卡| 亚洲夂夂婷婷色拍ww47| 亚洲一区在线看| 五月婷婷激情综合网| 日韩精品成人一区二区三区 | 国产69精品久久久久777| 国产成人精品一区二区三区网站观看| 老司机精品视频在线| 久久99久久精品欧美| 国产乱码精品1区2区3区| 国产suv一区二区三区88区| 成人一区二区视频| 色综合天天综合色综合av| 色久综合一二码| 欧美精品日韩一区| 日韩精品在线一区二区| 国产亚洲短视频| 日韩一区在线免费观看| 亚洲黄色av一区| 午夜精品久久久久久久| 国产综合色视频| 91蜜桃免费观看视频| 欧美精选一区二区| 国产亚洲欧美日韩日本| 亚洲欧美一区二区久久| 亚洲mv在线观看| 国产一区在线视频| 色综合天天综合网天天狠天天| 4438亚洲最大| 中文字幕成人网| 亚洲综合一区在线| 韩国av一区二区三区在线观看| 成人永久aaa| 91精品国产综合久久久久久久 | 色噜噜久久综合| 成人av在线播放网站| 欧美亚洲丝袜传媒另类| 久久综合久久99| 一区二区三区精品| 国产精品一线二线三线精华| 色国产综合视频| 精品国产欧美一区二区| 亚洲免费av观看| 国产在线不卡视频| 精品视频在线免费| www.66久久| 欧美三级日韩三级国产三级| 国产亚洲福利社区一区| 亚洲国产视频直播| 波多野结衣一区二区三区| 7777精品伊人久久久大香线蕉完整版| 欧美韩国日本不卡| 久久国产欧美日韩精品| 欧美综合一区二区三区| 国产精品热久久久久夜色精品三区 | 久久99国内精品| 欧美色网一区二区| 综合久久久久综合| 国产精品18久久久久久久网站| 欧美另类高清zo欧美| 亚洲日本在线a| 国产成人免费xxxxxxxx| 欧美成人vps| 蜜桃一区二区三区在线| 欧美午夜免费电影| 一区二区三区中文字幕精品精品| 国产精品资源在线看| 日韩欧美国产综合在线一区二区三区| 亚洲欧美日韩中文播放| 成人av免费网站| 国产精品美女视频| 国产福利91精品| 精品精品欲导航| 久久不见久久见免费视频7 | 久久国产麻豆精品| 91精品国产综合久久久久| 亚洲高清在线视频| 欧美在线看片a免费观看| 亚洲精品欧美激情| 色婷婷亚洲综合| 亚洲黄一区二区三区| 91福利区一区二区三区| 亚洲综合在线视频| 欧美日韩高清影院| 日本伊人精品一区二区三区观看方式| 欧美日韩一级大片网址|