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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? avc_binwr.c

?? 支持各種柵格圖像和矢量圖像讀取的庫
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* $Id: avc_binwr.c,v 1.17 2006/06/14 16:31:28 daniel Exp $ * * Name:     avc_binwr.c * Project:  Arc/Info vector coverage (AVC)  E00->BIN conversion library * Language: ANSI C * Purpose:  Binary files access functions (write mode). * Author:   Daniel Morissette, dmorissette@dmsolutions.ca * ********************************************************************** * Copyright (c) 1999-2001, Daniel Morissette * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: *  * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. *  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER  * DEALINGS IN THE SOFTWARE. ********************************************************************** * * $Log: avc_binwr.c,v $ * Revision 1.17  2006/06/14 16:31:28  daniel * Added support for AVCCoverPC2 type (bug 1491) * * Revision 1.16  2005/06/03 03:49:58  daniel * Update email address, website url, and copyright dates * * Revision 1.15  2001/07/06 05:09:33  daniel * Removed #ifdef around fseek to fix NT4 drive problem since ANSI-C requires * an fseek() between read and write operations so this applies to Unix too. * * Revision 1.14  2001/07/06 04:25:00  daniel * Fixed a problem writing arc.dir on NT4 networked drives in an empty dir. * * Revision 1.13  2000/10/16 16:13:29  daniel * Fixed sHeader.nPrecision when writing PC TXT files * * Revision 1.12  2000/09/26 21:40:18  daniel * Fixed writing of PC Coverage TXT... they're different from V7 TXT * * Revision 1.11  2000/09/26 20:21:04  daniel * Added AVCCoverPC write * * Revision 1.10  2000/09/22 19:45:20  daniel * Switch to MIT-style license * * Revision 1.9  2000/05/29 15:31:30  daniel * Added Japanese DBCS support * * Revision 1.8  2000/01/10 02:55:12  daniel * Added call to AVCAdjustCaseSensitiveFilename() when creating tables * * Revision 1.7  1999/12/24 07:18:34  daniel * Added PC Arc/Info coverages support * * Revision 1.6  1999/08/26 17:26:09  daniel * Removed printf() messages used in Windows tests * * Revision 1.5  1999/08/23 18:18:51  daniel * Fixed memory leak and some VC++ warnings * * Revision 1.4  1999/06/08 22:08:14  daniel * Modified CreateTable() to overwrite existing arc.dir entries if necessary * * Revision 1.3  1999/06/08 18:24:32  daniel * Fixed some problems with '/' vs '\\' on Windows * * Revision 1.2  1999/05/17 16:17:36  daniel * Added RXP + TXT/TX6/TX7 write support * * Revision 1.1  1999/05/11 02:34:46  daniel * Initial revision * **********************************************************************/#include "avc.h"#include <ctype.h>  /* tolower() *//*===================================================================== * Stuff related to writing the binary coverage files *====================================================================*/static void    _AVCBinWriteCloseTable(AVCBinFile *psFile);static AVCBinFile *_AVCBinWriteCreateDBFTable(const char *pszPath,                                               const char *pszCoverName,                                              AVCTableDef *psSrcTableDef,                                              AVCCoverType eCoverType,                                              int nPrecision,                                               AVCDBCSInfo *psDBCSInfo);/********************************************************************** *                          AVCBinWriteCreate() * * Open a coverage file for writing, write a header if applicable, and * initialize the handle to be ready to write objects to the file. * * pszPath is the coverage (or info directory) path, terminated by *         a '/' or a '\\' * pszName is the name of the file to create relative to this directory. * * Note: For most file types except tables, passing pszPath="" and  * including the coverage path as part of pszName instead would work. * * Returns a valid AVCBinFile handle, or NULL if the file could * not be created. * * AVCBinClose() will eventually have to be called to release the  * resources used by the AVCBinFile structure. **********************************************************************/AVCBinFile *AVCBinWriteCreate(const char *pszPath, const char *pszName,                               AVCCoverType eCoverType,                              AVCFileType eType, int nPrecision,                              AVCDBCSInfo *psDBCSInfo){    AVCBinFile   *psFile;    char         *pszFname = NULL, *pszExt;    GBool        bCreateIndex = FALSE;    int          nLen;    /*-----------------------------------------------------------------     * Make sure precision value is valid (AVC_DEFAULT_PREC is NOT valid)     *----------------------------------------------------------------*/    if (nPrecision!=AVC_SINGLE_PREC && nPrecision!=AVC_DOUBLE_PREC)    {        CPLError(CE_Failure, CPLE_IllegalArg,                 "AVCBinWriteCreate(): Invalid precision parameter "                 "(value must be AVC_SINGLE_PREC or AVC_DOUBLE_PREC)");        return NULL;    }    /*-----------------------------------------------------------------     * The case of INFO tables is a bit different...     * tables have to be created through a separate function.     *----------------------------------------------------------------*/    if (eType == AVCFileTABLE)    {        CPLError(CE_Failure, CPLE_AssertionFailed,                 "AVCBinWriteCreate(): TABLEs must be created using "                 "AVCBinWriteCreateTable()");        return NULL;    }    /*-----------------------------------------------------------------     * Alloc and init the AVCBinFile struct.     *----------------------------------------------------------------*/    psFile = (AVCBinFile*)CPLCalloc(1, sizeof(AVCBinFile));    psFile->eFileType = eType;    psFile->nPrecision = nPrecision;    psFile->pszFilename = (char*)CPLMalloc((strlen(pszPath)+strlen(pszName)+1)*                                           sizeof(char));    sprintf(psFile->pszFilename, "%s%s", pszPath, pszName);    psFile->eCoverType = eCoverType;    /*-----------------------------------------------------------------     * PRJ files are text files... we won't use the AVCRawBin*()     * functions for them... the file will be created and closed     * inside AVCBinWritePrj().     *----------------------------------------------------------------*/    if (eType == AVCFilePRJ)    {        return psFile;    }    /*-----------------------------------------------------------------     * All other file types share a very similar creation method.     *----------------------------------------------------------------*/    psFile->psRawBinFile = AVCRawBinOpen(psFile->pszFilename, "w",                                 AVC_COVER_BYTE_ORDER(psFile->eCoverType),                                         psDBCSInfo);    if (psFile->psRawBinFile == NULL)    {        /* Failed to open file... just return NULL since an error message         * has already been issued by AVCRawBinOpen()         */        CPLFree(psFile->pszFilename);        CPLFree(psFile);        return NULL;    }    /*-----------------------------------------------------------------     * Create an Index file if applicable for current file type.     * Yep, we'll have a problem if filenames come in as uppercase, but     * this should not happen in a normal situation.     * For each type there is 3 possibilities, e.g. "pal", "pal.adf", "ttt.pal"     *----------------------------------------------------------------*/    pszFname = CPLStrdup(psFile->pszFilename);    nLen = strlen(pszFname);    if (eType == AVCFileARC &&        ( (nLen>=3 && EQUALN((pszExt=pszFname+nLen-3), "arc", 3)) ||          (nLen>=7 && EQUALN((pszExt=pszFname+nLen-7), "arc.adf", 7)) ) )    {        strncpy(pszExt, "arx", 3);        bCreateIndex = TRUE;    }    else if ((eType == AVCFilePAL || eType == AVCFileRPL) &&             ( (nLen>=3 && EQUALN((pszExt=pszFname+nLen-3), "pal", 3)) ||               (nLen>=7 && EQUALN((pszExt=pszFname+nLen-7), "pal.adf", 7)) ) )    {        strncpy(pszExt, "pax", 3);        bCreateIndex = TRUE;    }    else if (eType == AVCFileCNT &&             ( (nLen>=3 && EQUALN((pszExt=pszFname+nLen-3), "cnt", 3)) ||               (nLen>=7 && EQUALN((pszExt=pszFname+nLen-7), "cnt.adf", 7)) ) )    {        strncpy(pszExt, "cnx", 3);        bCreateIndex = TRUE;    }    else if ((eType == AVCFileTXT || eType == AVCFileTX6) &&             ( (nLen>=3 && EQUALN((pszExt=pszFname+nLen-3), "txt", 3)) ||               (nLen>=7 && EQUALN((pszExt=pszFname+nLen-7), "txt.adf", 7)) ) )    {        strncpy(pszExt, "txx", 3);        bCreateIndex = TRUE;    }    if (bCreateIndex)    {        psFile->psIndexFile = AVCRawBinOpen(pszFname, "w",                                    AVC_COVER_BYTE_ORDER(psFile->eCoverType),                                            psDBCSInfo);    }    CPLFree(pszFname);    /*-----------------------------------------------------------------     * Generate the appropriate headers for the main file and its index     * if one was created.     *----------------------------------------------------------------*/    if (AVCBinWriteHeader(psFile) == -1)    {        /* Failed!  Return NULL */        AVCBinWriteClose(psFile);        psFile = NULL;    }    return psFile;}/********************************************************************** *                          _AVCBinWriteHeader() * * (This function is for internal library use... external calls should * go to AVCBinWriteHeader() instead) * * Generate a 100 bytes header using the info in psHeader. * * Note: PC Coverage files have an initial 256 bytes header followed by the * regular 100 bytes header. * * This function assumes that the file pointer is currently located at * the beginning of the file. * * Returns 0 on success or -1 on error. **********************************************************************/int _AVCBinWriteHeader(AVCRawBinFile *psFile, AVCBinHeader *psHeader,                       AVCCoverType eCoverType){    int nStatus = 0;    if (eCoverType == AVCCoverPC)    {        /* PC Coverage header starts with an initial 256 bytes header         */        AVCRawBinWriteInt16(psFile, 0x0400);  /* Signature??? */        AVCRawBinWriteInt32(psFile, psHeader->nLength);        AVCRawBinWriteZeros(psFile, 250);    }    AVCRawBinWriteInt32(psFile, psHeader->nSignature);    AVCRawBinWriteInt32(psFile, psHeader->nPrecision);    AVCRawBinWriteInt32(psFile, psHeader->nRecordSize);    AVCRawBinWriteZeros(psFile, 12);    AVCRawBinWriteInt32(psFile, psHeader->nLength);    /* Pad the rest of the header with zeros     */    AVCRawBinWriteZeros(psFile, 72);    if (CPLGetLastErrorNo() != 0)        nStatus = -1;    return nStatus;}/********************************************************************** *                          AVCBinWriteHeader() * * Write a header to the specified file using the values that apply to * this file's type.  The function simply does nothing if it is called * for a file type that requires no header. * * Returns 0 on success or -1 on error. **********************************************************************/int AVCBinWriteHeader(AVCBinFile *psFile){    AVCBinHeader sHeader;    int          nStatus=0;    GBool        bHeader = TRUE;    /*-----------------------------------------------------------------     * Set the appropriate header information for this file type.     *----------------------------------------------------------------*/    sHeader.nPrecision = sHeader.nRecordSize = sHeader.nLength = 0;    sHeader.nSignature = 9994;    switch(psFile->eFileType)    {      case AVCFileARC:        sHeader.nPrecision = (psFile->nPrecision == AVC_DOUBLE_PREC)? -1 : 1;        break;      case AVCFilePAL:      case AVCFileRPL:        sHeader.nPrecision = (psFile->nPrecision == AVC_DOUBLE_PREC)? -11 : 11;        break;      case AVCFileLAB:        sHeader.nSignature = 9993;        sHeader.nPrecision = (psFile->nPrecision == AVC_DOUBLE_PREC)? -2 : 2;        sHeader.nRecordSize = (psFile->nPrecision == AVC_DOUBLE_PREC)? 28 : 16;        break;      case AVCFileCNT:        sHeader.nPrecision = (psFile->nPrecision == AVC_DOUBLE_PREC)? -14 : 14;        break;      case AVCFileTOL:        /* single prec: tol.adf has no header         * double prec: par.adf has a header         */        if (psFile->nPrecision == AVC_DOUBLE_PREC)        {            sHeader.nSignature = 9993;            sHeader.nPrecision = 40;            sHeader.nRecordSize = 8;        }        else        {            bHeader = FALSE;        }        break;      case AVCFileTXT:      case AVCFileTX6:        if (psFile->eCoverType == AVCCoverPC)            sHeader.nPrecision = 1;        else            sHeader.nPrecision = (psFile->nPrecision==AVC_DOUBLE_PREC)? -67:67;        break;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区三区美女| 2023国产精品| 亚洲一区中文在线| 在线观看日韩毛片| 丝袜诱惑制服诱惑色一区在线观看| 欧美午夜一区二区三区| 天天爽夜夜爽夜夜爽精品视频| 欧美另类变人与禽xxxxx| 午夜精品久久久久久久久久久| 欧美精品久久一区| 久草热8精品视频在线观看| 久久久久国产成人精品亚洲午夜| 国产成人一级电影| 亚洲欧洲中文日韩久久av乱码| 91极品美女在线| 日韩不卡一区二区| 久久午夜色播影院免费高清| 成人不卡免费av| 亚洲影院久久精品| 日韩美一区二区三区| 粉嫩高潮美女一区二区三区| 亚洲人123区| 日韩三级高清在线| 国产91精品一区二区麻豆网站 | 色哟哟一区二区三区| 婷婷中文字幕一区三区| 精品久久久久久久久久久院品网 | 1000部国产精品成人观看| 91高清在线观看| 蜜臀va亚洲va欧美va天堂| 欧美国产激情一区二区三区蜜月| 色婷婷精品久久二区二区蜜臂av| 日韩电影一二三区| 国产精品久久久久久久久搜平片| 欧美日韩精品系列| 国产精品正在播放| 亚洲国产精品综合小说图片区| 精品国产成人系列| 在线一区二区三区四区| 国产麻豆精品95视频| 午夜一区二区三区视频| 国产精品热久久久久夜色精品三区| 欧美日韩www| av不卡在线观看| 精品综合久久久久久8888| 一区二区三区成人| 国产日韩精品视频一区| 欧美一区二区三区免费在线看| 成人av动漫在线| 国产最新精品免费| 视频一区欧美日韩| 有码一区二区三区| 国产欧美一区二区精品久导航| 日韩午夜激情电影| 欧美在线你懂得| av激情综合网| 国产一区不卡在线| 青娱乐精品视频在线| 亚洲国产中文字幕在线视频综合| 欧美激情一区二区在线| 久久女同精品一区二区| 日韩精品一区二区三区视频播放 | 国产目拍亚洲精品99久久精品| 91精品国产入口| 91福利小视频| 99re这里只有精品视频首页| 国产99精品视频| 国产不卡视频一区二区三区| 麻豆国产一区二区| 日本特黄久久久高潮| 一区二区三区欧美激情| 亚洲码国产岛国毛片在线| 中文字幕精品三区| 欧美激情一区二区在线| 国产欧美日韩在线看| 国产欧美精品区一区二区三区 | 日本一区二区成人在线| 精品成人在线观看| 欧美不卡在线视频| 日韩情涩欧美日韩视频| 日韩美女视频在线| 久久综合九色综合久久久精品综合| 欧美电影免费观看完整版| 日韩欧美电影一二三| 欧美电视剧在线看免费| 久久久久久影视| 国产精品色呦呦| 日韩美女久久久| 亚洲精品写真福利| 亚洲国产成人av好男人在线观看| 亚洲大片一区二区三区| 日本欧美一区二区| 久久99热这里只有精品| 国产精品一二三四| 97久久精品人人澡人人爽| 欧美亚州韩日在线看免费版国语版| 欧美日韩国产天堂| 欧美一区二区视频网站| 337p日本欧洲亚洲大胆精品| 国产欧美视频一区二区| 亚洲人快播电影网| 琪琪一区二区三区| 国产精品中文有码| 一本大道久久a久久精品综合 | 欧美刺激脚交jootjob| 久久久综合精品| 亚洲色图制服丝袜| 日韩成人午夜精品| 国产黄人亚洲片| 在线观看日韩高清av| 欧美成人综合网站| 亚洲欧美在线观看| 亚洲一二三四在线| 狠狠色2019综合网| 色吧成人激情小说| 精品国产一区二区三区av性色| 亚洲国产精品99久久久久久久久 | 蜜臀av性久久久久蜜臀aⅴ四虎| 国产伦精品一区二区三区视频青涩| eeuss鲁片一区二区三区在线看| 欧美三级一区二区| 久久先锋影音av| 天天av天天翘天天综合网 | 日韩一卡二卡三卡| 国产精品家庭影院| 美女在线视频一区| 色综合视频一区二区三区高清| 日韩精品在线网站| 夜夜夜精品看看| 成人永久aaa| 日韩欧美国产一区二区在线播放| 亚洲女同ⅹxx女同tv| 国产一区二区三区四区五区入口 | 国产精品家庭影院| 久久99深爱久久99精品| 欧美在线观看你懂的| 亚洲国产岛国毛片在线| 日本一区中文字幕| 欧美四级电影在线观看| 国产精品另类一区| 经典三级视频一区| 4hu四虎永久在线影院成人| 亚洲免费在线播放| 成人午夜精品在线| 久久亚洲精品小早川怜子| 日韩成人一级片| 欧美放荡的少妇| 亚洲综合一二区| 91美女福利视频| 中文字幕一区二区三区在线观看| 国产精品一线二线三线| 日韩欧美一级特黄在线播放| 亚洲成人黄色影院| 欧美综合色免费| 亚洲婷婷在线视频| youjizz久久| 中文久久乱码一区二区| 国产一区二区网址| 精品国内二区三区| 久久99精品久久久| 欧美不卡一区二区三区| 免费精品99久久国产综合精品| 欧美一区二区三区婷婷月色| 亚洲成人精品影院| 欧美日韩高清在线播放| 亚洲一区二区欧美| 欧美在线观看一二区| 亚洲中国最大av网站| 色又黄又爽网站www久久| 一级做a爱片久久| 欧美色综合网站| 五月婷婷激情综合网| 555www色欧美视频| 奇米在线7777在线精品 | 国产免费成人在线视频| 大陆成人av片| 综合在线观看色| 日本二三区不卡| 午夜精品福利一区二区蜜股av| 欧美高清视频一二三区| 精品写真视频在线观看| 国产女主播视频一区二区| av中文字幕不卡| 一区二区三区精品视频| 欧美三级中文字幕在线观看| 日本色综合中文字幕| 久久天堂av综合合色蜜桃网| 成人免费毛片app| 亚洲欧美韩国综合色| 欧美日本韩国一区二区三区视频| 日本成人在线一区| 久久精品人人爽人人爽| 99久久精品情趣| 亚洲成人免费在线观看| 精品久久久久99| 色综合天天做天天爱| 五月婷婷激情综合网| 久久精品水蜜桃av综合天堂| 日本丶国产丶欧美色综合| 日本欧美加勒比视频|