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

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

?? os400platformutils.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: OS400PlatformUtils.cpp,v 1.20 2004/09/23 21:44:13 cargilld Exp $ */// ---------------------------------------------------------------------------//  Includes// ---------------------------------------------------------------------------#define MY_XP_CPLUSPLUS#include    <pthread.h>#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    <errno.h>#include    <unistd.h>#include    <qp0z1170.h>#include    <mimchint.h>#include    <string.h>#include    <qmhsndpm.h>#include    <qmhrtvm.h>#include    <qusec.h>#include    <unistd.h>#include    <string.h>#include    <except.h>#include    <mih/cmpswp.h>#include    "OS400PlatformUtils.hpp"#include    <xercesc/util/OutOfMemoryException.hpp>#if defined (XML_USE_ICONV400_TRANSCODER)    #include <xercesc/util/Transcoders/Iconv400/Iconv400TransService.hpp>	void cleanupDefaultConverter();#elif defined (XML_USE_ICU_TRANSCODER)    #include <xercesc/util/Transcoders/ICU/ICUTransService.hpp>#else Transcoder not Specified - For OS/400 must be either ICU or Iconv400#endif#if defined(XML_USE_MSGFILE_MESSAGELOADER)	 #include <xercesc/util/MsgLoaders/MsgFile/MsgLoader.hpp>#elif defined(XML_USE_INMEM_MESSAGELOADER)	 #include <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp>#else	 #include <xercesc/util/MsgLoaders/ICU/ICUMsgLoader.hpp>#endif#if defined (XML_USE_NETACCESSOR_SOCKET)    #include <xercesc/util/NetAccessors/Socket/SocketNetAccessor.hpp>#endifXERCES_CPP_NAMESPACE_BEGINchar* PackingRepText(const char * const repText1,		     const char * const repText2,		     const char * const repText3,		     const char * const repText4);// ---------------------------------------------------------------------------//  XMLPlatformUtils: Platform init method// ---------------------------------------------------------------------------XMLNetAccessor* XMLPlatformUtils::makeNetAccessor(){#if defined (XML_USE_NETACCESSOR_SOCKET)    return new SocketNetAccessor();#else    return 0;#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;}#elif defined (XML_USE_ICONV400_TRANSCODER){    return new Iconv400TransService;}#else{    return new IconvTransService;}#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_MSGFILE_MESSAGELOADER)                retVal = new MsgCatalogLoader(msgDomain);#elif 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;}// ---------------------------------------------------------------------------//  XMLPlatformUtils: The panic method// ---------------------------------------------------------------------------void XMLPlatformUtils::panic(const PanicHandler::PanicReasons reason){	    if (fgUserPanicHandler)    {    	fgUserPanicHandler->panic(reason);    } 	    //    //  We just print a message and exit, Note we are currently dependent on    // the number of reasons being under 10 for this teo work    //    else    {        struct reason_code        {            char reason_char;            char endofstring;        }reason_code;        reason_code.reason_char = '0';        reason_code.endofstring = '\0';        reason_code.reason_char = reason_code.reason_char + reason;        send_message((char*)&reason_code,GENERAL_PANIC_MESSAGE,'e');    }}// ---------------------------------------------------------------------------//  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){   char errno_id[7];    const char* tmpFileName = XMLString::transcode(fileName, manager);    ArrayJanitor<char> janText((char*)tmpFileName, manager);    errno = 0;    FileHandle retVal = (FILE*)fopen( tmpFileName , "rb" );    if (retVal == NULL)    {     send_message((char*)tmpFileName,FILE_OPEN_PROBLEMS,'d');     convert_errno(errno_id,errno);     send_message(NULL,errno_id,'d');        return 0;    }    return retVal;}FileHandle XMLPlatformUtils::openFile(const char* const fileName                                      , MemoryManager* const manager){   char errno_id[7];    errno = 0;    FileHandle retVal = (FILE*)fopen( fileName , "rb" );    if (retVal == NULL)    {     send_message((char*)fileName,FILE_OPEN_PROBLEMS,'d');     convert_errno(errno_id,errno);     send_message(NULL,errno_id,'d');        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 openFileToWrite(tmpFileName);}FileHandle XMLPlatformUtils::openFileToWrite(const char* const fileName                                             , MemoryManager* const manager){    char errno_id[7];    errno = 0;    FileHandle retVal = (FILE*)fopen( fileName , "wb" );    if (retVal == NULL)    {     send_message((char*)fileName,FILE_OPEN_PROBLEMS,'d');     convert_errno(errno_id,errno);     send_message(NULL,errno_id,'d');        return 0;    }    return retVal;}unsigned intXMLPlatformUtils::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;        }        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// ---------------------------------------------------------------------------/* since we do not have the realpath function on AS/400 and it appearsto no be important that we convert the name to the real path we willonly verify that the path exists  - note that this may make AS/400 output a different error for the pathname but customer shouldbe able to determine what the name is suppose to be*/char *realpath(const char *file_name, char *resolved_name){ if (file_name== NULL) {   errno = EINVAL;   return(NULL); } if (access(file_name,F_OK)) /* verify that the file exists*/ {  errno = EACCES;  return(NULL); } else /* code says that we make a copy of the file name so do it */  strcpy(resolved_name,file_name);  return(resolved_name);}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]);		

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲午夜久久久久| 日本网站在线观看一区二区三区| 欧美色综合天天久久综合精品| 乱一区二区av| 亚洲一区二区三区在线播放| 久久九九久久九九| 91精品国产综合久久精品麻豆 | 亚洲国产精品黑人久久久| 欧美日韩国产免费一区二区| 91亚洲永久精品| 国产综合色产在线精品| 日日夜夜精品视频免费| 亚洲欧洲日产国码二区| 久久精品视频在线免费观看 | xnxx国产精品| 欧美高清视频一二三区| 欧美自拍偷拍一区| 91原创在线视频| 成人在线综合网站| 韩国精品久久久| 蜜臀久久99精品久久久久宅男| 亚洲一区自拍偷拍| 亚洲精品成a人| 亚洲精品免费视频| 亚洲欧洲精品一区二区三区| 国产丝袜在线精品| 国产视频一区在线播放| 欧美精品一区二区三区在线播放| 欧美一区二区三区公司| 欧美乱熟臀69xxxxxx| 欧美色国产精品| 欧美专区日韩专区| 色综合视频一区二区三区高清| aaa亚洲精品| 91色|porny| 色综合久久天天| 在线看不卡av| 欧美美女网站色| 日韩一区二区三区三四区视频在线观看 | 91麻豆精品国产91久久久久久 | 亚洲已满18点击进入久久| 亚洲色欲色欲www在线观看| 亚洲色欲色欲www| 国产成人精品免费在线| 国产一区二区伦理片| 国产风韵犹存在线视精品| 国产精品一区二区三区网站| 国产精品一二一区| 成人av免费网站| 在线视频观看一区| 欧美二区三区的天堂| 欧美www视频| 中文字幕免费不卡| 亚洲激情在线播放| 五月婷婷欧美视频| 久久er精品视频| 福利一区二区在线观看| 成人激情黄色小说| 日本久久精品电影| 日韩一区二区三区精品视频| 亚洲精品一区二区三区香蕉| 中文字幕制服丝袜成人av| 亚洲综合小说图片| 精品在线亚洲视频| 99这里只有精品| 欧美老肥妇做.爰bbww| 欧美mv日韩mv国产网站app| 欧美—级在线免费片| 亚洲综合激情小说| 捆绑变态av一区二区三区| 成人av免费网站| 欧美一级在线免费| 中文字幕精品三区| 天天综合色天天综合色h| 国产精品99久| 欧美亚洲日本国产| 久久久777精品电影网影网 | 欧美成人艳星乳罩| 亚洲女人小视频在线观看| 性做久久久久久免费观看欧美| 久久精品国产精品青草| 91在线小视频| 精品国产免费一区二区三区四区| 中文字幕人成不卡一区| 捆绑变态av一区二区三区| 91免费在线播放| 欧美不卡视频一区| 亚洲午夜三级在线| 国产98色在线|日韩| 欧美人狂配大交3d怪物一区| 国产精品热久久久久夜色精品三区| 午夜精彩视频在线观看不卡| 床上的激情91.| 日韩欧美一区二区不卡| 亚洲欧美一区二区三区久本道91| 经典三级在线一区| 欧美精品亚洲二区| 亚洲免费观看在线观看| 久久99精品久久久久久动态图| 91视频.com| 国产欧美va欧美不卡在线| 日日欢夜夜爽一区| 色婷婷亚洲综合| 国产精品美日韩| 国产一区二区视频在线播放| 制服.丝袜.亚洲.另类.中文| 亚洲免费观看视频| 波多野结衣的一区二区三区| 欧美精品一区二区在线观看| 日韩成人免费在线| 欧美少妇一区二区| 日本美女一区二区| 欧美亚洲免费在线一区| 玉足女爽爽91| 91在线视频在线| 国产精品久久久久久久久果冻传媒| 国产专区综合网| 精品美女被调教视频大全网站| 日韩精品国产欧美| 欧美精品黑人性xxxx| 亚洲va韩国va欧美va| 日本韩国精品在线| 亚洲欧美日韩国产手机在线| 成人网在线播放| 亚洲国产精华液网站w| 丁香婷婷综合色啪| 欧美激情一区二区三区不卡| 国产一区 二区 三区一级| 久久综合九色综合97婷婷| 久99久精品视频免费观看| 欧美一级片在线观看| 青青国产91久久久久久| 欧美精品 国产精品| 免费成人性网站| 日韩女优av电影| 久久精品72免费观看| 精品国产在天天线2019| 黄页网站大全一区二区| 2欧美一区二区三区在线观看视频| 韩国女主播成人在线| 国产亚洲一区二区三区| 粗大黑人巨茎大战欧美成人| 国产精品国产三级国产a| 色婷婷综合久久久久中文一区二区| 亚洲精品中文字幕乱码三区 | 这里只有精品免费| 麻豆免费精品视频| 久久这里只有精品视频网| 成人综合婷婷国产精品久久蜜臀| 国产精品美女久久久久aⅴ| 91美女福利视频| 午夜精品久久久久久久99樱桃| 91精品国产综合久久香蕉的特点| 久久99精品久久久| 日本一二三不卡| 91福利社在线观看| 美女性感视频久久| 国产清纯白嫩初高生在线观看91 | 亚洲丝袜制服诱惑| 欧美性大战xxxxx久久久| 日本免费新一区视频 | 亚洲成人一区二区| 欧美电影免费观看高清完整版| 国产精品一区二区三区乱码| 国产精品成人网| 制服丝袜中文字幕亚洲| 国产剧情一区在线| 玉米视频成人免费看| 欧美mv和日韩mv国产网站| 成人免费视频免费观看| 亚洲成av人片一区二区梦乃| 久久嫩草精品久久久精品| 色94色欧美sute亚洲线路一ni| 蜜桃视频一区二区三区 | 久久精品二区亚洲w码| 国产精品色呦呦| 欧美伦理电影网| 成人av电影在线播放| 日韩高清在线一区| 国产精品传媒在线| 日韩欧美在线网站| 91色|porny| 欧美一区二区在线播放| 成人免费视频免费观看| 日韩电影在线一区二区| 国产精品久久久久影院| 欧美日韩夫妻久久| 成年人午夜久久久| 美女被吸乳得到大胸91| 亚洲女同ⅹxx女同tv| 久久久综合九色合综国产精品| 欧美日韩精品一区二区天天拍小说| 国产盗摄视频一区二区三区| 三级影片在线观看欧美日韩一区二区| 国产亲近乱来精品视频| 日韩三级视频中文字幕| 欧美亚洲国产怡红院影院| 成人av在线电影| 国产精品伊人色| 久久99国内精品|