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

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

?? avc_rawbin.c

?? 支持各種柵格圖像和矢量圖像讀取的庫
?? C
?? 第 1 頁 / 共 2 頁
字號:
        memcpy(pBuf, pszConvBuf, nBytesToRead);    }}/********************************************************************** *                          AVCRawBinFSeek() * * Move the read pointer to the specified location. * * As with fseek(), the specified position can be relative to the  * beginning of the file (SEEK_SET), or the current position (SEEK_CUR). * SEEK_END is not supported. **********************************************************************/void AVCRawBinFSeek(AVCRawBinFile *psFile, int nOffset, int nFrom){    int  nTarget = 0;    CPLAssert(nFrom == SEEK_SET || nFrom == SEEK_CUR);    /* Supported only with read access for now     */    CPLAssert(psFile && psFile->eAccess != AVCWrite);    if (psFile == NULL || psFile->eAccess == AVCWrite)        return;    /* Compute destination relative to current memory buffer      */    if (nFrom == SEEK_SET)        nTarget = nOffset - psFile->nOffset;    else if (nFrom == SEEK_CUR)        nTarget = nOffset + psFile->nCurPos;    /* Is the destination located inside the current buffer?     */    if (nTarget > 0 && nTarget <= psFile->nCurSize)    {        /* Requested location is already in memory... just move the          * read pointer         */        psFile->nCurPos = nTarget;    }    else    {        /* Requested location is not part of the memory buffer...         * move the FILE * to the right location and be ready to          * read from there.         */        VSIFSeek(psFile->fp, psFile->nOffset+nTarget, SEEK_SET);        psFile->nCurPos = 0;        psFile->nCurSize = 0;        psFile->nOffset = psFile->nOffset+nTarget;    }}/********************************************************************** *                          AVCRawBinEOF() * * Return TRUE if there is no more data to read from the file or * FALSE otherwise. **********************************************************************/GBool AVCRawBinEOF(AVCRawBinFile *psFile){    if (psFile == NULL || psFile->fp == NULL)        return TRUE;    /* In write access mode, always return TRUE, since we always write     * at EOF for now.     */    if (psFile->eAccess != AVCRead && psFile->eAccess != AVCReadWrite)        return TRUE;    /* If file data size was specified, then check that we have not      * passed that point yet...     */    if (psFile->nFileDataSize > 0 &&        (psFile->nOffset+psFile->nCurPos) >= psFile->nFileDataSize)        return TRUE;    /* If the file pointer has been moved by AVCRawBinFSeek(), then     * we may be at a position past EOF, but VSIFeof() would still     * return FALSE.     * To prevent this situation, if the memory buffer is empty,     * we will try to read 1 byte from the file to force the next     * chunk of data to be loaded (and we'll move the the read pointer     * back by 1 char after of course!).       * If we are at the end of the file, this will trigger the EOF flag.     */    if (psFile->nCurPos == 0 && psFile->nCurSize == 0)    {        char c;        /* Set bDisableReadBytesEOFError=TRUE to temporarily disable          * the EOF error message from AVCRawBinReadBytes().         */        bDisableReadBytesEOFError = TRUE;        AVCRawBinReadBytes(psFile, 1, &c);        bDisableReadBytesEOFError = FALSE;        if (psFile->nCurPos > 0)            AVCRawBinFSeek(psFile, -1, SEEK_CUR);    }    return (psFile->nCurPos == psFile->nCurSize &&             VSIFEof(psFile->fp));}/********************************************************************** *                          AVCRawBinRead<datatype>() * * Arc/Info files are binary files with MSB first (Motorola) byte  * ordering.  The following functions will read from the input file * and return a value with the bytes ordered properly for the current  * platform. **********************************************************************/GInt16  AVCRawBinReadInt16(AVCRawBinFile *psFile){    GInt16 n16Value;    AVCRawBinReadBytes(psFile, 2, (GByte*)(&n16Value));    if (psFile->eByteOrder != geSystemByteOrder)    {        return (GInt16)CPL_SWAP16(n16Value);    }    return n16Value;}GInt32  AVCRawBinReadInt32(AVCRawBinFile *psFile){    GInt32 n32Value;    AVCRawBinReadBytes(psFile, 4, (GByte*)(&n32Value));    if (psFile->eByteOrder != geSystemByteOrder)    {        return (GInt32)CPL_SWAP32(n32Value);    }    return n32Value;}float   AVCRawBinReadFloat(AVCRawBinFile *psFile){    float fValue;    AVCRawBinReadBytes(psFile, 4, (GByte*)(&fValue));    if (psFile->eByteOrder != geSystemByteOrder)    {        CPL_SWAP32PTR( &fValue );    }    return fValue;}double  AVCRawBinReadDouble(AVCRawBinFile *psFile){    double dValue;    AVCRawBinReadBytes(psFile, 8, (GByte*)(&dValue));    if (psFile->eByteOrder != geSystemByteOrder)    {        CPL_SWAPDOUBLE(&dValue);    }    return dValue;}/********************************************************************** *                          AVCRawBinWriteBytes() * * Write the number of bytes from the buffer to the file. * * If a problem happens, then CPLError() will be called and  * CPLGetLastErrNo() can be used to test if a write operation was  * succesful. **********************************************************************/void AVCRawBinWriteBytes(AVCRawBinFile *psFile, int nBytesToWrite, GByte *pBuf){    /*----------------------------------------------------------------     * Make sure file is opened with Write access     *---------------------------------------------------------------*/    if (psFile == NULL ||         (psFile->eAccess != AVCWrite && psFile->eAccess != AVCReadWrite))    {        CPLError(CE_Failure, CPLE_FileIO,              "AVCRawBinWriteBytes(): call not compatible with access mode.");        return;    }    if (VSIFWrite(pBuf, nBytesToWrite, 1, psFile->fp) != 1)        CPLError(CE_Failure, CPLE_FileIO,                 "Writing to %s failed.", psFile->pszFname);    /*----------------------------------------------------------------     * In write mode, we keep track of current file position ( =nbr of     * bytes written) through psFile->nCurPos     *---------------------------------------------------------------*/    psFile->nCurPos += nBytesToWrite;}/********************************************************************** *                          AVCRawBinWrite<datatype>() * * Arc/Info files are binary files with MSB first (Motorola) byte  * ordering.  The following functions will reorder the byte for the * value properly and write that to the output file. * * If a problem happens, then CPLError() will be called and  * CPLGetLastErrNo() can be used to test if a write operation was  * succesful. **********************************************************************/void  AVCRawBinWriteInt16(AVCRawBinFile *psFile, GInt16 n16Value){    if (psFile->eByteOrder != geSystemByteOrder)    {        n16Value = (GInt16)CPL_SWAP16(n16Value);    }    AVCRawBinWriteBytes(psFile, 2, (GByte*)&n16Value);}void  AVCRawBinWriteInt32(AVCRawBinFile *psFile, GInt32 n32Value){    if (psFile->eByteOrder != geSystemByteOrder)    {        n32Value = (GInt32)CPL_SWAP32(n32Value);    }    AVCRawBinWriteBytes(psFile, 4, (GByte*)&n32Value);}void  AVCRawBinWriteFloat(AVCRawBinFile *psFile, float fValue){    if (psFile->eByteOrder != geSystemByteOrder)    {        CPL_SWAP32PTR( &fValue );    }    AVCRawBinWriteBytes(psFile, 4, (GByte*)&fValue);}void  AVCRawBinWriteDouble(AVCRawBinFile *psFile, double dValue){    if (psFile->eByteOrder != geSystemByteOrder)    {        CPL_SWAPDOUBLE(&dValue);    }    AVCRawBinWriteBytes(psFile, 8, (GByte*)&dValue);}/********************************************************************** *                          AVCRawBinWriteZeros() * * Write a number of zeros (sepcified in bytes) at the current position  * in the file. * * If a problem happens, then CPLError() will be called and  * CPLGetLastErrNo() can be used to test if a write operation was  * succesful. **********************************************************************/void AVCRawBinWriteZeros(AVCRawBinFile *psFile, int nBytesToWrite){    char acZeros[8] = {0, 0, 0, 0, 0, 0, 0, 0};    int i;    /* Write by 8 bytes chunks.  The last chunk may be less than 8 bytes      */    for(i=0; i< nBytesToWrite; i+=8)    {        AVCRawBinWriteBytes(psFile, MIN(8,(nBytesToWrite-i)),                             (GByte*)acZeros);    }}/********************************************************************** *                          AVCRawBinWritePaddedString() * * Write a string and pad the end of the field (up to nFieldSize) with * spaces number of spaces at the current position in the file. * * If a problem happens, then CPLError() will be called and  * CPLGetLastErrNo() can be used to test if a write operation was  * succesful. **********************************************************************/void AVCRawBinWritePaddedString(AVCRawBinFile *psFile, int nFieldSize,                                const char *pszString){    char acSpaces[8] = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '};    int i, nLen, numSpaces;    /* If we're on a system with a multibyte codepage then we have to     * convert strings to the proper multibyte encoding.     */    pszString = AVCE00Convert2ArcDBCS(psFile->psDBCSInfo,                                           pszString, nFieldSize);    nLen = strlen(pszString);    nLen = MIN(nLen, nFieldSize);    numSpaces = nFieldSize - nLen;    if (nLen > 0)        AVCRawBinWriteBytes(psFile, nLen, (GByte*)pszString);    /* Write spaces by 8 bytes chunks.  The last chunk may be less than 8 bytes     */    for(i=0; i< numSpaces; i+=8)    {        AVCRawBinWriteBytes(psFile, MIN(8,(numSpaces-i)),                             (GByte*)acSpaces);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩精品一区二区三区四区| 国产成人精品在线看| 99久久精品国产网站| 成人免费在线观看入口| 欧洲一区在线电影| 蜜桃av一区二区| 久久久国产精品不卡| av资源站一区| 亚洲图片欧美视频| 欧美刺激脚交jootjob| 高清国产一区二区三区| 中文字幕中文乱码欧美一区二区| 在线免费观看日本一区| 美国欧美日韩国产在线播放| 国产视频不卡一区| 色婷婷综合久色| 青青草伊人久久| 国产精品家庭影院| 欧美日韩精品一区二区| 国产一区二区美女| 亚洲精品欧美激情| 日韩欧美你懂的| 不卡一区在线观看| 奇米影视7777精品一区二区| 久久精品一区二区三区不卡牛牛| 91福利在线播放| 九色综合国产一区二区三区| 亚洲欧洲日本在线| 精品国产网站在线观看| 色88888久久久久久影院按摩| 美女高潮久久久| 一区二区三区电影在线播| 精品国产欧美一区二区| 欧美日韩综合在线| 风间由美一区二区三区在线观看 | 日精品一区二区三区| 久久日一线二线三线suv| 色妹子一区二区| 精品无码三级在线观看视频| 亚洲天堂免费在线观看视频| 欧美一三区三区四区免费在线看 | 国产日产欧美精品一区二区三区| 欧美性视频一区二区三区| 国产真实乱子伦精品视频| 亚洲国产精品天堂| 国产精品久久久久影院老司| 日韩午夜av电影| 色哟哟国产精品| 久久久久高清精品| 色综合天天综合网国产成人综合天| 亚洲一二三级电影| 亚洲一区二区三区在线| 精品国产伦一区二区三区观看方式| 色婷婷av一区| 成人黄色小视频在线观看| 精品一区二区久久| 日韩主播视频在线| 亚洲综合一区二区三区| 国产精品大尺度| 国产网站一区二区三区| 久久久www免费人成精品| 日韩免费观看2025年上映的电影| 欧美三级乱人伦电影| 欧美午夜精品一区二区三区| av中文一区二区三区| 国产成人福利片| 国产在线精品视频| 久久se这里有精品| 精品亚洲欧美一区| 久久精品国产第一区二区三区| 视频一区视频二区中文字幕| 一区二区三区欧美亚洲| 一区二区三区在线免费播放| 亚洲欧美日韩国产综合在线 | 在线观看日韩毛片| 91丝袜高跟美女视频| 91视频你懂的| 97久久超碰国产精品| 99国产欧美另类久久久精品| 99国产精品久久久久久久久久 | 欧美日韩精品欧美日韩精品一 | 亚洲一二三四在线观看| 一区二区免费看| 亚洲成人精品在线观看| 日韩成人免费在线| 久久精品国产精品亚洲精品| 国产精品亚洲成人| 9l国产精品久久久久麻豆| 9i在线看片成人免费| 91麻豆自制传媒国产之光| 91极品美女在线| 欧美日韩性生活| 日韩精品一区二区在线| 久久久久久久久伊人| 亚洲欧洲精品一区二区三区不卡| 亚洲日本免费电影| 日韩中文字幕麻豆| 韩国中文字幕2020精品| 99麻豆久久久国产精品免费 | 国产视频一区在线观看| 国产精品色婷婷| 亚洲一区二区三区在线看| 日本强好片久久久久久aaa| 韩国一区二区视频| 99re亚洲国产精品| 欧美一级欧美三级在线观看| 国产欧美一区二区精品性| 亚洲欧美日本韩国| 青椒成人免费视频| 成人中文字幕合集| 欧美丰满少妇xxxxx高潮对白| 精品国产免费人成在线观看| 中文字幕制服丝袜一区二区三区 | 国产精品 欧美精品| 色老头久久综合| 久久亚区不卡日本| 一区二区三区免费看视频| 精品亚洲成av人在线观看| 99re亚洲国产精品| 精品美女在线观看| 亚洲一区二区不卡免费| 国产精品一二三| 欧美精品亚洲一区二区在线播放| 国产女人18毛片水真多成人如厕| 亚洲午夜免费视频| 成人动漫在线一区| 欧美草草影院在线视频| 一区二区成人在线视频| 韩国欧美国产一区| 欧美午夜精品久久久| 久久久久久97三级| 视频一区二区欧美| 99精品视频一区二区三区| 精品99一区二区三区| 午夜精品福利一区二区蜜股av | 国产精品1区2区3区| 欧美精品在线视频| 一区二区三区波多野结衣在线观看| 韩国精品久久久| 日韩免费在线观看| 亚洲成人1区2区| 一本大道综合伊人精品热热 | 亚洲人成伊人成综合网小说| 国产麻豆精品一区二区| 91麻豆精品91久久久久久清纯| 亚洲女人的天堂| 不卡在线观看av| 中文av字幕一区| 丰满少妇久久久久久久| 久久先锋影音av鲁色资源网| 免费亚洲电影在线| 欧美一区二区三区四区久久| 亚洲bdsm女犯bdsm网站| 在线这里只有精品| 亚洲理论在线观看| 一本大道久久a久久综合| 亚洲欧洲精品一区二区精品久久久| 高清av一区二区| 国产欧美日韩在线| 丁香桃色午夜亚洲一区二区三区| 精品日韩在线观看| 国产毛片精品视频| 国产亚洲欧美一级| 粉嫩高潮美女一区二区三区 | 国产在线不卡视频| 久久亚洲免费视频| 国产成人av影院| 中文字幕精品一区二区三区精品| 东方aⅴ免费观看久久av| 国产亚洲精品久| 成人99免费视频| 亚洲免费观看高清完整版在线| 91丨九色丨国产丨porny| 亚洲色图视频免费播放| 色综合咪咪久久| 亚洲婷婷综合久久一本伊一区| 97久久超碰国产精品电影| 一区二区三区四区不卡视频| 欧美日韩一区二区三区四区| 日本成人在线视频网站| 精品国产制服丝袜高跟| 国产精品一区二区三区四区| 国产精品久久久久aaaa樱花| 色婷婷综合五月| 日韩有码一区二区三区| 欧美v日韩v国产v| 成人午夜电影网站| 亚洲最大的成人av| 欧美一区二区三区色| 狠狠色狠狠色综合日日91app| 国产欧美综合色| 欧美综合一区二区三区| 蜜桃av一区二区三区| 国产精品网友自拍| 欧美日韩日日夜夜| 国产一区二区精品在线观看| 亚洲天堂精品在线观看| 欧美一区二区三区系列电影| 国产成人精品亚洲777人妖| 一区二区三区四区视频精品免费|