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

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

?? solarisplatformutils.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. *//* * $Id: SolarisPlatformUtils.cpp,v 1.28 2004/09/30 14:01:41 peiyongz Exp $ */// ---------------------------------------------------------------------------//  Includes// ---------------------------------------------------------------------------#if !defined (APP_NO_THREADS)#  if defined (XML_USE_DCE)#    include  <dce/pthread.h>#  else#    include    <pthread.h>#  endif#endif // APP_NO_THREADS#include    <unistd.h>#include    <stdio.h>#include    <stdlib.h>#include    <errno.h>#include    <libgen.h>#include    <sys/timeb.h>#include    <string.h>#include    <link.h>#include    <limits.h>#include    <dlfcn.h>#include    <sys/types.h>#include    <sys/stat.h>#include    <fcntl.h>#include    <xercesc/util/Janitor.hpp>#include    <xercesc/util/PlatformUtils.hpp>#include    <xercesc/util/RuntimeException.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   // 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   // use In-memory message loader    #include <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp>#endif#if defined (XML_USE_NETACCESSOR_LIBWWW)    #include <xercesc/util/NetAccessors/libWWW/LibWWWNetAccessor.hpp>#elif defined (XML_USE_NETACCESSOR_SOCKET)    #include <xercesc/util/NetAccessors/Socket/SocketNetAccessor.hpp>#endif#if defined (SOLARIS)extern "C" int ftime(struct timeb *); // Solaris headers missing this decl#endifXERCES_CPP_NAMESPACE_BEGIN// ---------------------------------------------------------------------------//  XMLPlatformUtils: Private Static Methods// ---------------------------------------------------------------------------XMLNetAccessor* XMLPlatformUtils::makeNetAccessor(){#if defined (XML_USE_NETACCESSOR_LIBWWW)    return new LibWWWNetAccessor();#elif defined (XML_USE_NETACCESSOR_SOCKET)    return new SocketNetAccessor();#else    return 0;#endif}////  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.//  In our case, we use the ICU based message loader mechanism.//XMLMsgLoader* XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain){    XMLMsgLoader* retVal;    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;}////  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;}#elif defined (XML_USE_ICONV_TRANSCODER){    return new IconvTransService;}#else // Use Native transcoding service{    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 = tell( (int)theFile);    if (curPos == -1)        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotGetSize, manager);    return (unsigned int)curPos;}void XMLPlatformUtils::closeFile(FileHandle theFile                                 , MemoryManager* const manager){    if (close((int) theFile))        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotCloseFile, manager);}unsigned int XMLPlatformUtils::fileSize(FileHandle theFile                                        , MemoryManager* const manager){    // Get the current position    long  int curPos = tell((int) theFile);    if (curPos == -1)        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotGetCurPos, manager);    // Seek to the end and save that value for return    if (lseek( (int) theFile, 0, SEEK_END) == (off_t)-1)        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotSeekToEnd, manager);    long int retVal = tell((int) theFile);    if (retVal == -1)        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotSeekToEnd, manager);    // And put the pointer back    if (lseek((int) theFile, curPos, SEEK_SET) == (off_t)-1)        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotSeekToPos, manager);    return (unsigned int)retVal;}FileHandle XMLPlatformUtils::openFile(const char* const fileName                                      , MemoryManager* const manager){    int retVal = open( fileName , O_RDONLY | O_LARGEFILE);    if (retVal == -1)        return 0;    return (FileHandle)retVal;}FileHandle XMLPlatformUtils::openFile(const XMLCh* const fileName                                      , MemoryManager* const manager){    const char* tmpFileName = XMLString::transcode(fileName, manager);    ArrayJanitor<char> janText((char*)tmpFileName, manager);    int retVal = open( tmpFileName , O_RDONLY | O_LARGEFILE);    if (retVal == -1)        return 0;    return (FileHandle)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 (FileHandle)open( tmpFileName , O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, 0666);}FileHandle XMLPlatformUtils::openFileToWrite(const char* const fileName                                             , MemoryManager* const manager){    return (FileHandle)open( fileName , O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, 0666);}unsigned intXMLPlatformUtils::readFileBuffer(FileHandle              theFile                               , const unsigned int      toRead                               , XMLByte* const          toFill                               , MemoryManager* const    manager){    ssize_t noOfItemsRead =      read((int) theFile, (void*) toFill, toRead);    if(noOfItemsRead == -1)    {        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;    ssize_t bytesWritten = 0;    while (true)    {      bytesWritten=write((int)theFile, (const void *)tmpFlush, toWrite);        if(bytesWritten == -1)        {            ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile, manager);        }        if (bytesWritten < toWrite) //incomplete write        {            tmpFlush+=bytesWritten;            toWrite-=bytesWritten;            bytesWritten=0;        }        else            return;    }    return;}void XMLPlatformUtils::resetFile(FileHandle theFile                                 , MemoryManager* const manager){    // Seek to the start of the file    if (lseek((int) theFile, 0, SEEK_SET) == -1)        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotResetFile, manager);}// ---------------------------------------------------------------------------//  XMLPlatformUtils: File system methods// ---------------------------------------------------------------------------XMLCh* XMLPlatformUtils::getFullPath(const XMLCh* const srcPath,                                     MemoryManager* const manager){    //    //  NOTE: THe path provided has always already been opened successfully,    //  so we know that its not some pathological freaky path. It comes in    //  in native format, and goes out as Unicode always    //    char* newSrc = XMLString::transcode(srcPath, manager);    ArrayJanitor<char> janText(newSrc, manager);    // Use a local buffer that is big enough for the largest legal path    char absPath[PATH_MAX + 1];

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人免费视频网站高清观看视频| 国产午夜精品久久| 亚洲福利电影网| 欧美日韩一区二区三区四区五区 | 久久久精品欧美丰满| 国产美女视频一区| 欧美国产欧美综合| 一本久久精品一区二区| 亚洲午夜一区二区三区| 欧美一区二区三区婷婷月色| 久久99精品久久久久久久久久久久 | 午夜久久久久久电影| 欧美一区二区免费视频| 国产综合久久久久久鬼色| 国产丝袜美腿一区二区三区| 久久久久久电影| 亚洲成人你懂的| 天堂蜜桃一区二区三区| 久久精品久久久精品美女| 99久久精品免费精品国产| 免费在线欧美视频| 国产成人aaa| 色婷婷综合久久| 欧美一区二区三区成人| 国产网站一区二区| 成人精品电影在线观看| 自拍偷拍欧美精品| 欧美在线观看一区二区| 免费观看一级特黄欧美大片| 久久免费午夜影院| av不卡在线观看| 午夜精品在线看| 欧美国产精品一区二区| 在线观看av一区二区| 极品少妇xxxx偷拍精品少妇| 中文字幕一区二区三区色视频| 欧美狂野另类xxxxoooo| 国产精品一区二区久久不卡| 亚洲综合免费观看高清完整版| 欧美videos大乳护士334| 成年人网站91| 美脚の诱脚舐め脚责91| 综合久久给合久久狠狠狠97色| 欧美精品久久久久久久多人混战| 国产成人午夜精品5599| 视频一区二区三区入口| 国产精品天干天干在观线| 日韩欧美国产午夜精品| 色成年激情久久综合| 国产91精品在线观看| 美日韩一级片在线观看| 亚洲国产一区二区视频| 国产亚洲婷婷免费| 日韩精品一区二区三区在线播放| 欧美性xxxxx极品少妇| av亚洲精华国产精华精华 | 综合av第一页| 久久久www成人免费无遮挡大片| 欧美日韩成人综合| 99综合影院在线| 欧美一二三区在线| 成人高清在线视频| 国产精品久久网站| 欧美日韩一级黄| 国产成人日日夜夜| 中文字幕欧美区| 亚洲欧美在线视频观看| 日韩三级伦理片妻子的秘密按摩| 欧美性感一类影片在线播放| 欧美精品一区二区在线播放 | 日本一区二区三区视频视频| 91.成人天堂一区| 欧美一区二视频| 日韩免费在线观看| 亚洲精品一区二区三区蜜桃下载| 日韩一卡二卡三卡四卡| 久久这里只有精品视频网| 国产精品99久久久久久久女警 | 久久99热国产| 成人v精品蜜桃久久一区| 欧美日韩一区小说| 日本一区二区三区视频视频| 亚洲午夜激情网站| 国产v日产∨综合v精品视频| jiyouzz国产精品久久| 欧美日韩国产综合视频在线观看| 久久精品亚洲精品国产欧美| 亚洲一级在线观看| 国产高清不卡一区二区| 欧美日韩国产综合一区二区| 久久久久国产精品人| 一区二区三区 在线观看视频| 欧美a级一区二区| 色综合av在线| 国产亚洲精品中文字幕| 视频在线观看91| 99免费精品视频| 欧美精品一区二区不卡| 亚洲资源在线观看| 懂色av中文字幕一区二区三区| 91精品欧美福利在线观看| 中文字幕一区二区三区不卡| 久久不见久久见免费视频7| 欧美午夜精品电影| 日韩伦理电影网| 国产乱妇无码大片在线观看| 欧美一区二区三区在线观看| 夜夜爽夜夜爽精品视频| 成人黄色av电影| 久久久一区二区三区捆绑**| 秋霞午夜鲁丝一区二区老狼| 在线免费观看日本欧美| 1024亚洲合集| 粉嫩高潮美女一区二区三区| 欧美r级电影在线观看| 日一区二区三区| 欧美性三三影院| 一区二区三区日韩精品| 91丨porny丨国产| 中文一区二区在线观看| 国产乱子轮精品视频| 精品福利一二区| 日韩高清在线电影| 欧美日韩在线亚洲一区蜜芽| 自拍偷拍国产亚洲| 97精品视频在线观看自产线路二| 国产亚洲一二三区| 国产精品一二二区| 久久久.com| 成人在线综合网| 国产精品午夜电影| 成人久久久精品乱码一区二区三区| 精品盗摄一区二区三区| 精彩视频一区二区| 精品国产乱码久久久久久老虎| 精品在线一区二区三区| 日韩精品一区二区三区蜜臀| 美女视频黄 久久| 日韩一二三区视频| 久久国产欧美日韩精品| 久久久久久久久久看片| 国产精品羞羞答答xxdd| 国产丝袜在线精品| av资源网一区| 亚洲精品久久久蜜桃| 在线免费观看不卡av| 亚洲电影第三页| 欧美一级高清片| 国产福利一区在线观看| 国产精品精品国产色婷婷| 91视频免费播放| 午夜免费欧美电影| 欧美xxxx在线观看| 国产成人欧美日韩在线电影| 日韩一区在线免费观看| 91久久免费观看| 丝袜国产日韩另类美女| 久久久久综合网| 91亚洲精品一区二区乱码| 亚洲国产三级在线| 日韩欧美一区二区三区在线| 国产精品一区二区久久精品爱涩| 最近日韩中文字幕| 6080yy午夜一二三区久久| 国产精品一二三四区| 一区二区三区四区在线播放 | 欧美日韩情趣电影| 紧缚捆绑精品一区二区| 中文字幕日韩一区二区| 欧美日精品一区视频| 国产一区中文字幕| 亚洲欧洲综合另类| 欧美一区二区三区精品| 成人国产在线观看| 五月天欧美精品| 中文字幕乱码久久午夜不卡 | 国产精品久久久久毛片软件| 欧美在线啊v一区| 激情综合五月婷婷| 亚洲最色的网站| 精品福利一二区| 欧日韩精品视频| 国产福利一区在线观看| 亚洲午夜久久久久久久久久久| 久久久三级国产网站| 欧美三级日韩三级国产三级| 国产成人免费9x9x人网站视频| 亚洲成国产人片在线观看| 久久久.com| 91精品国产综合久久久久久久久久| 成人中文字幕在线| 麻豆91精品91久久久的内涵| 1000精品久久久久久久久| 精品福利一区二区三区免费视频| 91高清视频免费看| 高清视频一区二区| 久久草av在线| 日韩黄色小视频| 亚洲免费毛片网站| 国产精品蜜臀av|