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

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

?? os2platformutils.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
字號:
/* * Copyright 1999-2000,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: OS2PlatformUtils.cpp,v 1.10 2004/09/08 13:56:41 peiyongz Exp $ */// ---------------------------------------------------------------------------//  Includes// ---------------------------------------------------------------------------#define INCL_DOSSEMAPHORES#define INCL_DOSERRORS#define INCL_DOSMISC#define INCL_DOSFILEMGR#include    <xercesc/util/XercesDefs.hpp>#include    <xercesc/util/PlatformUtils.hpp>#include    <xercesc/util/RuntimeException.hpp>#include    <xercesc/util/Janitor.hpp>#include    <xercesc/util/XMLString.hpp>#include    <xercesc/util/XMLUniDefs.hpp>#include    <xercesc/util/PanicHandler.hpp>#include    <stdio.h>#include    <stdlib.h>#include    <io.h>#if defined(XML_USE_ICU_TRANSCODER)  #include  <xercesc/util/Transcoders/ICU/ICUTransService.hpp>#elif defined(XML_USE_ICONV_TRANSCODER)  #include  <xercesc/util/Transcoders/Iconv/IconvTransService.hpp>#else  #error A transcoding service must be chosen#endif#if defined(XML_USE_INMEMORY_MSGLOADER)  #include  <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp>#else  #error A message loading service must be chosen#endif#if defined(XML_IBMVAOS2)#include    <builtin.h>#endif#include    <OS2.h>XERCES_CPP_NAMESPACE_BEGIN// ---------------------------------------------------------------------------//  XMLPlatformUtils: Platform init and term methods// ---------------------------------------------------------------------------void XMLPlatformUtils::platformInit(){}void XMLPlatformUtils::platformTerm(){    // We don't have any termination requirements at this time}// ---------------------------------------------------------------------------//  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_CouldNotGetCurPos, 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){    return (unsigned int)filelength(fileno((FILE *)theFile));}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::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::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;}void XMLPlatformUtils::resetFile(FileHandle theFile                                 , MemoryManager* const manager){    // Seek to the start of the file    if (fseek((FILE*)theFile, 0, SEEK_SET) )        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotResetFile, manager);}// -----------------------------------------------------------------------//  File system methods// -----------------------------------------------------------------------XMLCh* XMLPlatformUtils::getFullPath(const XMLCh* const srcPath,                                     MemoryManager* const manager){    // Transcode the incoming string    char* tmpSrcPath = XMLString::transcode(srcPath, fgMemoryManager);    ArrayJanitor<char> janSrcPath(tmpSrcPath, fgMemoryManager);    char tmpPath[CCHMAXPATH];    _fullpath(tmpPath, tmpSrcPath, CCHMAXPATH);    return XMLString::transcode(tmpPath, manager);}bool XMLPlatformUtils::isRelative(const XMLCh* const toCheck                                  , MemoryManager* const manager){    // Check for pathological case of an empty path    if (!toCheck[0])        return false;    //    //  If it starts with a drive, then it cannot be relative. Note that    //  we checked the drive not being empty above, so worst case it's one    //  char long and the check of the 1st char will fail because it's really    //  a null character.    //    if (toCheck[1] == chColon)    {        if (((toCheck[0] >= chLatin_A) && (toCheck[0] <= chLatin_Z))        ||  ((toCheck[0] >= chLatin_a) && (toCheck[0] <= chLatin_z)))        {            return false;        }    }    //    //  If it starts with a double slash, then it cannot be relative since    //  its a remote file.    //    if ((toCheck[0] == chBackSlash) && (toCheck[1] == chBackSlash))        return false;    // Else assume its a relative path    return true;}XMLCh* XMLPlatformUtils::getCurrentDirectory(MemoryManager* const manager){    /***      *  REVISIT:     *      *   To be implemented later    ***/    XMLCh curDir[]={ chPeriod, chForwardSlash, chNull};    return getFullPath(curDir, manager);}inline bool XMLPlatformUtils::isAnySlash(XMLCh c) {    return ( chBackSlash == c || chForwardSlash == c);}// -----------------------------------------------------------------------//  Timing methods// -----------------------------------------------------------------------unsigned long XMLPlatformUtils::getCurrentMillis(){    APIRET  retr;    ULONG   timerBuf = 0;    retr =  DosQuerySysInfo( QSV_MS_COUNT, QSV_MS_COUNT, (PVOID) &timerBuf,                             sizeof( ULONG ) );//  if ( retr != NO_ERROR )//     return (timerBuf);    return (timerBuf);}// -----------------------------------------------------------------------//  Mutex methods// -----------------------------------------------------------------------void XMLPlatformUtils::closeMutex(void* const mtxHandle){#if ! defined(APP_NO_THREADS)    if (mtxHandle == NULL)      return;    if (DosCloseMutexSem( (HMTX)mtxHandle))    {      ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotDestroy, fgMemoryManager);    }#endif}void XMLPlatformUtils::lockMutex(void* const mtxHandle){#if ! defined(APP_NO_THREADS)    if (mtxHandle == NULL)      return;    if (DosRequestMutexSem( (HMTX)mtxHandle,(ULONG) SEM_INDEFINITE_WAIT) )    {      ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);    }#endif}void* XMLPlatformUtils::makeMutex(){#if ! defined(APP_NO_THREADS)    HMTX hRet; // Mutex Handle    if (DosCreateMutexSem(NULL, &hRet, 0, FALSE))        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);    return (void*)hRet;#else    return 0;#endif}void XMLPlatformUtils::unlockMutex(void* const mtxHandle){#if ! defined(APP_NO_THREADS)    if (mtxHandle == NULL)       return;    if (DosReleaseMutexSem( (HMTX)mtxHandle))    {      ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotUnlock, fgMemoryManager);    }#endif}// -----------------------------------------------------------------------//  Miscellaneous synchronization methods// -----------------------------------------------------------------------void* XMLPlatformUtils::compareAndSwap ( void**      toFill                                       , const void* const newValue                                       , const void* const toCompare ){#if defined(XML_IBMVA4_OS2)    return (void *)__smp_cmpxchg4((unsigned int *)toFill,                                  (unsigned int)newValue,                                  (unsigned int)toCompare);#elif defined(__GNUG__)    char ret;    long int readval;    long int * p    = (long **)toFill;    __asm__ __volatile__ ("lock; cmpxchgl %3, %1\n\tsete %0"                          : "=q" (ret), "=m" (*p), "=a" (readval)                          : "r" (newValue), "m" (*p), "a" (toCompare)                          : "memory");    return (void *)(long)ret;#else    void * retVal = *toFill;    if (*toFill == toCompare)      *toFill = (void *)newValue;    return retVal;#endif}// -----------------------------------------------------------------------//  Atomic Increment and Decrement////  The function return value is positive if the result of the operation//  was positive. Zero if the result of the operation was zero. Negative//  if the result of the operation was negative. Except for the zero//  case, the value returned may differ from the actual result of the//  operation - only the sign and zero/nonzero state is guaranteed to be//  correct.// -----------------------------------------------------------------------int XMLPlatformUtils::atomicIncrement(int& location){#if defined(XML_IBMVA4_OS2)    return __smp_inc4(&location);#elif defined(__GNUG__)    __asm__ __volatile__ ("lock; incl %0" : "=m" (location) : );    return location;#else    return ++location;#endif}int XMLPlatformUtils::atomicDecrement(int& location){#if defined(XML_IBMVA4_OS2)    return __smp_dec4(&location);#elif defined(__GNUG__)    __asm__ __volatile__ ("lock; decl %0" : "=m" (location) : );    return location;#else    return --location;#endif}// ---------------------------------------------------------------------------//  XMLPlatformUtils: The panic method// ---------------------------------------------------------------------------void XMLPlatformUtils::panic(const PanicHandler::PanicReasons reason){    fgUserPanicHandler? fgUserPanicHandler->panic(reason) : fgDefaultPanicHandler->panic(reason);	}// -----------------------------------------------------------------------//  Private static methods. These are provided by the per-platform//  implementation files.// -----------------------------------------------------------------------XMLMsgLoader* XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain){#if defined(XML_USE_INMEMORY_MSGLOADER)    return new InMemMsgLoader(msgDomain);#else    return 0;#endif}XMLNetAccessor* XMLPlatformUtils::makeNetAccessor(){  return 0;}XMLTransService* XMLPlatformUtils::makeTransService(){#if defined(XML_USE_ICU_TRANSCODER)    return new ICUTransService;#elif defined(XML_USE_ICONV_TRANSCODER)    return new IconvTransService;#else    return 0;#endif}#include <xercesc/util/LogicalPath.c>XERCES_CPP_NAMESPACE_END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲高清免费观看 | 99久久综合99久久综合网站| 欧美三级一区二区| 亚洲欧美日韩中文字幕一区二区三区 | 91超碰这里只有精品国产| 国产亚洲女人久久久久毛片| 久久国产成人午夜av影院| 91精品国产综合久久香蕉的特点| 婷婷丁香久久五月婷婷| 欧美日韩国产bt| 中文字幕一区二区三区在线不卡| 国产乱一区二区| 国产欧美一区二区精品忘忧草| 国产精品综合视频| 久久久久综合网| 91在线视频观看| 亚洲一区二区三区四区在线观看| 北条麻妃国产九九精品视频| 一区二区三区四区乱视频| 91精品福利视频| 午夜精品久久久久久久久久 | 色综合天天综合给合国产| 日韩理论片在线| 99麻豆久久久国产精品免费| 伊人色综合久久天天人手人婷| 欧美在线|欧美| 成人99免费视频| 亚洲国产三级在线| 91福利国产精品| 裸体一区二区三区| 欧美成人video| 97精品久久久午夜一区二区三区 | 成人激情开心网| 国产精品乱码一区二区三区软件 | 欧美日韩午夜在线视频| 激情五月播播久久久精品| 国产丝袜美腿一区二区三区| 99视频一区二区三区| 天天亚洲美女在线视频| 2023国产精品视频| 91成人国产精品| 成人小视频在线| 久久99久久久欧美国产| 亚洲精品久久7777| 国产视频一区在线观看| 欧美美女一区二区在线观看| 成人av综合在线| 韩国v欧美v日本v亚洲v| 天天综合网天天综合色| 亚洲免费资源在线播放| 国产精品水嫩水嫩| 337p日本欧洲亚洲大胆色噜噜| 欧美乱妇一区二区三区不卡视频| 91亚洲精华国产精华精华液| 丁香激情综合国产| 久久不见久久见中文字幕免费| 天天综合色天天综合色h| 一区二区三区中文字幕电影| 中文字幕av一区 二区| 精品99久久久久久| 欧美一区二区在线免费播放| 欧美人体做爰大胆视频| 欧美又粗又大又爽| 99re6这里只有精品视频在线观看| 国产高清无密码一区二区三区| 美女脱光内衣内裤视频久久网站| 亚洲高清视频在线| 亚洲黄色小说网站| 一区二区三区日本| 亚洲激情图片qvod| 亚洲综合色成人| 亚洲精品视频在线| 亚洲综合色视频| 亚洲国产成人av网| 午夜天堂影视香蕉久久| 亚洲大片在线观看| 天天色天天爱天天射综合| 午夜免费欧美电影| 日韩精品久久理论片| 日韩国产精品大片| 蜜臀av一区二区在线免费观看 | 亚洲精品午夜久久久| 日韩码欧中文字| 一区二区三区在线免费视频| 亚洲国产精品久久艾草纯爱| 日韩国产精品大片| 精品一区二区精品| 岛国一区二区在线观看| 99在线精品观看| 欧美色欧美亚洲另类二区| 欧美丰满一区二区免费视频| 日韩精品一区二区三区在线观看| 精品国产一二三| 国产精品网曝门| 亚洲天堂2014| 香蕉久久一区二区不卡无毒影院 | 亚洲国产成人av| 久久91精品久久久久久秒播| 国产aⅴ综合色| 99精品国产热久久91蜜凸| 欧美午夜精品一区| 精品久久久久久久久久久久久久久久久 | 在线观看不卡一区| 欧美久久久久久久久中文字幕| 337p日本欧洲亚洲大胆色噜噜| 国产精品久久久久久福利一牛影视| 亚洲综合免费观看高清完整版| 日产国产高清一区二区三区| 欧美一区二区三区视频免费| 国产亚洲欧美日韩日本| 亚洲私人黄色宅男| 蜜桃av一区二区三区电影| 国产成人精品亚洲777人妖| 色激情天天射综合网| 日韩一区二区三区电影| 国产精品久久久久婷婷二区次| 午夜精彩视频在线观看不卡| 懂色av中文一区二区三区| 欧美日本视频在线| 国产女主播一区| 丝袜美腿亚洲色图| 成人免费高清视频在线观看| 欧美日本韩国一区二区三区视频| 国产欧美日韩另类一区| 亚洲成人免费在线| 成人av免费观看| 精品欧美一区二区在线观看| 一区二区成人在线观看| 国产精品中文字幕日韩精品| 欧美高清视频在线高清观看mv色露露十八 | 自拍偷自拍亚洲精品播放| 美国十次了思思久久精品导航| 色呦呦一区二区三区| 久久久久青草大香线综合精品| 午夜精品在线视频一区| 97久久超碰国产精品电影| 久久婷婷久久一区二区三区| 三级久久三级久久| 色狠狠一区二区| 国产精品免费丝袜| 久久99精品网久久| 欧美日本一区二区三区| 亚洲少妇30p| 国产91精品在线观看| 欧美mv日韩mv| 蜜桃视频一区二区| 欧美日韩激情在线| 亚洲综合一二区| 在线视频国内自拍亚洲视频| 亚洲天堂2016| 99re在线精品| 中文字幕一区二区三区在线播放| 国产精品一区二区三区网站| 欧美成人精品二区三区99精品| 日本欧美大码aⅴ在线播放| 在线看国产一区| 亚洲最新在线观看| 91国偷自产一区二区开放时间 | 亚洲夂夂婷婷色拍ww47| 波多野结衣在线一区| 久久久91精品国产一区二区精品 | 国产成人午夜视频| 精品成人一区二区三区四区| 紧缚奴在线一区二区三区| 欧美一级片在线| 日本在线不卡一区| 91精品国产欧美一区二区| 日韩精品亚洲一区二区三区免费| 欧美放荡的少妇| 日韩电影在线一区二区| 91麻豆精品国产91久久久久久 | 成人91在线观看| 亚洲丝袜自拍清纯另类| 99国产精品久久久久久久久久久| 中文字幕色av一区二区三区| 91极品视觉盛宴| 日本大香伊一区二区三区| 亚洲精品国产高清久久伦理二区| 欧美少妇性性性| 欧美aaaaaa午夜精品| 精品粉嫩aⅴ一区二区三区四区| 国产精品一二一区| 国产精品麻豆久久久| 色婷婷香蕉在线一区二区| 一区二区久久久久| 5月丁香婷婷综合| 国产一区二区三区久久悠悠色av| 国产精品私人影院| 在线看日韩精品电影| 伦理电影国产精品| 国产欧美日韩精品a在线观看| 91在线小视频| 日本亚洲免费观看| 欧美激情艳妇裸体舞| 色妹子一区二区| 免费一区二区视频| 国产精品欧美一级免费| 欧美三级午夜理伦三级中视频| 韩国成人福利片在线播放| 亚洲日本韩国一区|