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

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

?? unixwareplatformutils.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
    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;        }        else            return;    }    return;}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);}// ---------------------------------------------------------------------------//  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];    //get the absolute path    char* retPath = realpath(newSrc, &absPath[0]);    if (!retPath)    {        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotGetBasePathName, manager);    }    return XMLString::transcode(absPath, manager);}bool XMLPlatformUtils::isRelative(const XMLCh* const toCheck                                  , MemoryManager* const manager){    // Check for pathological case of empty path    if (!toCheck[0])        return false;    //    //  If it starts with a slash, then it cannot be relative. This covers    //  both something like "\Test\File.xml" and an NT Lan type remote path    //  that starts with a node like "\\MyNode\Test\File.xml".    //    if (toCheck[0] == XMLCh('/'))        return false;    // Else assume its a relative path    return true;}XMLCh* XMLPlatformUtils::getCurrentDirectory(MemoryManager* const manager){    char  dirBuf[PATH_MAX + 2];    char  *curDir = getcwd(&dirBuf[0], PATH_MAX + 1);    if (!curDir)    {        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotGetBasePathName, manager);    }    return XMLString::transcode(curDir, manager);}inline bool XMLPlatformUtils::isAnySlash(XMLCh c) {    return ( chBackSlash == c || chForwardSlash == c);}// ---------------------------------------------------------------------------//  XMLPlatformUtils: Timing Methods// ---------------------------------------------------------------------------unsigned long XMLPlatformUtils::getCurrentMillis(){    timeb aTime;    ftime(&aTime);    return (unsigned long)(aTime.time*1000 + aTime.millitm);}// -----------------------------------------------------------------------//  Mutex methods// -----------------------------------------------------------------------#if !defined (APP_NO_THREADS)// ---------------------------------------------------------------------------//  XMLPlatformUtils: Platform init method// ---------------------------------------------------------------------------static pthread_mutex_t* gAtomicOpMutex =0 ;void XMLPlatformUtils::platformInit(){    //    // The gAtomicOpMutex mutex needs to be created    // because compareAndSwap, atomicIncrement and atomicDecrement    // does not have the atomic system calls for usage    // Normally, mutexes are created on first use, but there is a    // circular dependency between compareAndExchange() and    // mutex creation that must be broken.    gAtomicOpMutex = new pthread_mutex_t;    if (pthread_mutex_init(gAtomicOpMutex, NULL))        panic( PanicHandler::Panic_SystemInit );}class  RecursiveMutex : public XMemory{public:    pthread_mutex_t   mutex;    int               recursionCount;    pthread_t         tid;    RecursiveMutex() {		if (pthread_mutex_init(&mutex, NULL))			ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotCreate, XMLPlatformUtils::fgMemoryManager);		recursionCount = 0;		tid = 0;	}    ~RecursiveMutex() {		if (pthread_mutex_destroy(&mutex))			ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotDestroy, XMLPlatformUtils::fgMemoryManager);	}	void lock()      {		if (pthread_equal(tid, pthread_self()))		{			recursionCount++;			return;		}		if (pthread_mutex_lock(&mutex) != 0)			ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotLock, XMLPlatformUtils::fgMemoryManager);		tid = pthread_self();		recursionCount = 1;	}	void unlock()    {		if (--recursionCount > 0)			return;		if (pthread_mutex_unlock(&mutex) != 0)			ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotUnlock, XMLPlatformUtils::fgMemoryManager);		tid = 0;	}};void* XMLPlatformUtils::makeMutex(){    return new RecursiveMutex;}void XMLPlatformUtils::closeMutex(void* const mtxHandle){    if (mtxHandle == NULL)        return;    RecursiveMutex *rm = (RecursiveMutex *)mtxHandle;    delete rm;}void XMLPlatformUtils::lockMutex(void* const mtxHandle){    if (mtxHandle == NULL)        return;    RecursiveMutex *rm = (RecursiveMutex *)mtxHandle;    rm->lock();}void XMLPlatformUtils::unlockMutex(void* const mtxHandle){    if (mtxHandle == NULL)        return;    RecursiveMutex *rm = (RecursiveMutex *)mtxHandle;    rm->unlock();}// -----------------------------------------------------------------------//  Miscellaneous synchronization methods// -----------------------------------------------------------------------//atomic system calls in UnixWare is only restricted to kernel libraries//So, to make operations thread safe we implement static mutex and lock//the atomic operations. It makes the process slow but what's the alternative!void* XMLPlatformUtils::compareAndSwap ( void**      toFill ,                    const void* const newValue ,                    const void* const toCompare){    if (pthread_mutex_lock( gAtomicOpMutex))        panic(PanicHandler::Panic_SynchronizationErr);    void *retVal = *toFill;    if (*toFill == toCompare)              *toFill = (void *)newValue;    if (pthread_mutex_unlock( gAtomicOpMutex))        panic(PanicHandler::Panic_SynchronizationErr);    return retVal;}int XMLPlatformUtils::atomicIncrement(int &location){    if (pthread_mutex_lock( gAtomicOpMutex))        panic(PanicHandler::Panic_SynchronizationErr);    int tmp = ++location;    if (pthread_mutex_unlock( gAtomicOpMutex))        panic(PanicHandler::Panic_SynchronizationErr);    return tmp;}int XMLPlatformUtils::atomicDecrement(int &location){    if (pthread_mutex_lock( gAtomicOpMutex))        panic(PanicHandler::Panic_SynchronizationErr);    int tmp = --location;    if (pthread_mutex_unlock( gAtomicOpMutex))        panic(PanicHandler::Panic_SynchronizationErr);    return tmp;}#else // #if !defined (APP_NO_THREADS)void XMLPlatformUtils::platformInit(){}void* XMLPlatformUtils::makeMutex(){	return 0;}void XMLPlatformUtils::closeMutex(void* const mtxHandle){}void XMLPlatformUtils::lockMutex(void* const mtxHandle){}void XMLPlatformUtils::unlockMutex(void* const mtxHandle){}void* XMLPlatformUtils::compareAndSwap ( void**      toFill,                                   const void* const newValue,                                   const void* const toCompare){    void *retVal = *toFill;    if (*toFill == toCompare)       *toFill = (void *)newValue;    return retVal;}int XMLPlatformUtils::atomicIncrement(int &location){    return ++location;}int XMLPlatformUtils::atomicDecrement(int &location){    return --location;}#endif // APP_NO_THREADSvoid XMLPlatformUtils::platformTerm(){#if !defined (APP_NO_THREADS)    // delete the mutex we created	pthread_mutex_destroy(gAtomicOpMutex);    delete gAtomicOpMutex;	gAtomicOpMutex = 0;#endif}#include <xercesc/util/LogicalPath.c>XERCES_CPP_NAMESPACE_END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧洲一区在线电影| 国产激情一区二区三区四区 | 风流少妇一区二区| 亚洲精品在线三区| 麻豆精品新av中文字幕| 欧美一区二区视频免费观看| 蜜臀a∨国产成人精品| 欧美精品一区二区三区蜜桃| 国产91丝袜在线18| 亚洲欧美国产毛片在线| 精品视频免费在线| 秋霞电影网一区二区| 欧美成人vps| 成人av在线播放网站| 一区二区三区日韩在线观看| 欧美日韩成人在线| 国产一区二区三区四区五区入口| 中文字幕不卡在线| 在线欧美一区二区| 美国欧美日韩国产在线播放| 精品国产乱码久久久久久夜甘婷婷 | 99久久国产综合精品女不卡| 亚洲视频一区二区在线| 欧美群妇大交群中文字幕| 精品一区二区三区免费观看| 中文字幕欧美一区| 欧美人狂配大交3d怪物一区| 国产二区国产一区在线观看| 亚洲一区精品在线| 欧美精品一区视频| 色噜噜狠狠色综合欧洲selulu| 免费成人av在线播放| 国产嫩草影院久久久久| 精品视频1区2区| 国产成人午夜视频| 日韩国产在线观看一区| 欧美高清一级片在线观看| 欧美日本在线播放| 9人人澡人人爽人人精品| 日韩成人一区二区三区在线观看| 国产精品日日摸夜夜摸av| 欧美精品电影在线播放| 国产宾馆实践打屁股91| 日韩精品电影一区亚洲| 亚洲色图都市小说| www激情久久| 欧美视频在线观看一区二区| 粉嫩蜜臀av国产精品网站| 日韩电影在线一区二区三区| 亚洲免费伊人电影| 久久久国际精品| 欧美一区二区三区影视| 日本福利一区二区| 成人黄色网址在线观看| 黄色日韩三级电影| 日本午夜一区二区| 亚洲午夜私人影院| 亚洲色图欧洲色图| 国产精品污污网站在线观看 | 亚洲精品一区二区精华| 777a∨成人精品桃花网| 色哦色哦哦色天天综合| 成人手机电影网| 韩国理伦片一区二区三区在线播放| 亚洲成在人线在线播放| 亚洲黄一区二区三区| 中文字幕亚洲视频| 国产精品久线观看视频| 欧美激情在线一区二区| 久久久精品天堂| 久久综合视频网| 精品欧美一区二区久久| 日韩一区二区三区在线| 日韩亚洲欧美成人一区| 欧美丰满一区二区免费视频| 在线精品视频一区二区三四| 97成人超碰视| 91麻豆免费在线观看| 色综合色综合色综合| 91福利视频网站| 欧美三区在线视频| 在线不卡a资源高清| 欧美精品 日韩| 欧美一区二区三区四区在线观看 | 麻豆国产精品777777在线| 日韩av电影免费观看高清完整版在线观看| 亚洲国产成人91porn| 午夜亚洲福利老司机| 婷婷成人综合网| 日韩av一二三| 国产一区二区三区四区五区美女| 国产精品538一区二区在线| 国产九色精品成人porny | 国产精品伦一区二区三级视频| 欧美极品另类videosde| 中文字幕在线观看不卡| 日韩毛片在线免费观看| 亚洲无线码一区二区三区| 日本成人中文字幕在线视频| 久久99国产精品久久| 国产福利一区二区三区视频在线| 成人三级伦理片| 欧美自拍偷拍一区| 日韩一区二区在线免费观看| 久久久久久一级片| 亚洲欧洲国产日本综合| 亚洲五月六月丁香激情| 精品一区二区三区免费视频| 成人深夜视频在线观看| 欧美色网一区二区| 久久久精品日韩欧美| 亚洲精品免费在线| 精品一区精品二区高清| 91天堂素人约啪| 欧美电视剧在线观看完整版| 国产精品久久影院| 日日摸夜夜添夜夜添精品视频| 国产精品99久久久久久久vr| 色久综合一二码| 久久毛片高清国产| 亚洲一区视频在线| 国产精品一区二区免费不卡 | 亚洲一区二区视频在线| 乱一区二区av| 91福利国产成人精品照片| 精品成人在线观看| 亚洲图片欧美一区| 成人听书哪个软件好| 91精品国产91综合久久蜜臀| 国产精品国产自产拍高清av王其| 日韩av在线免费观看不卡| 丁香婷婷综合色啪| 欧美成人video| 亚洲一区二区偷拍精品| 福利一区福利二区| 日韩精品专区在线影院重磅| 亚洲欧美一区二区久久| 国产成人综合在线| 日韩视频在线永久播放| 洋洋av久久久久久久一区| 成人午夜激情在线| 精品国产一区二区三区四区四| 亚洲成人免费影院| 91蜜桃网址入口| 国产女同互慰高潮91漫画| 日本不卡视频一二三区| 日本电影亚洲天堂一区| 中文字幕在线播放不卡一区| 国产一区二区三区在线观看免费 | 中文字幕精品一区二区精品绿巨人| 日本免费新一区视频| 欧美视频中文一区二区三区在线观看| 中文字幕av一区 二区| 韩国成人在线视频| 欧美一区二区三区的| 亚洲图片欧美一区| 欧美午夜精品久久久久久超碰| 亚洲视频一区在线| 91社区在线播放| 国产精品国产三级国产普通话蜜臀 | 国产suv精品一区二区三区| 正在播放亚洲一区| 亚洲电影在线免费观看| 在线观看亚洲精品| 亚洲综合在线视频| 在线亚洲欧美专区二区| 亚洲美女偷拍久久| 99久久国产综合精品色伊| 国产精品乱人伦中文| 国产91精品久久久久久久网曝门| 欧美精品一区男女天堂| 国产又黄又大久久| 久久久噜噜噜久久人人看 | 日韩一区在线看| 91免费观看视频| 亚洲最大色网站| 欧美日韩中文字幕一区二区| 亚洲成人www| 56国语精品自产拍在线观看| 日本成人在线不卡视频| 日韩一区国产二区欧美三区| 九九热在线视频观看这里只有精品| 日韩欧美激情一区| 国产精品888| 亚洲欧美激情在线| 欧美综合天天夜夜久久| 日韩福利视频导航| 国产亚洲精品aa午夜观看| 欧美一卡二卡三卡| 国产美女精品在线| 国产精品嫩草99a| 国内精品嫩模私拍在线| 久久看人人爽人人| 99re热视频精品| 午夜久久久影院| 久久中文娱乐网| 99久久伊人精品| 日韩黄色片在线观看| 久久亚洲精华国产精华液| 91丨porny丨户外露出|