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

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

?? avc_e00read.c

?? 支持各種柵格圖像和矢量圖像讀取的庫
?? C
?? 第 1 頁 / 共 5 頁
字號:
/********************************************************************** * $Id: avc_e00read.c,v 1.21 2006/06/27 18:38:43 dmorissette Exp $ * * Name:     avc_e00read.c * Project:  Arc/Info vector coverage (AVC)  BIN->E00 conversion library * Language: ANSI C * Purpose:  Functions to open a binary coverage and read it as if it *           was an ASCII E00 file.  This file is the main entry point *           for the library. * Author:   Daniel Morissette, dmorissette@dmsolutions.ca * ********************************************************************** * Copyright (c) 1999-2005, 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_e00read.c,v $ * Revision 1.21  2006/06/27 18:38:43  dmorissette * Cleaned up E00 reading (bug 1497, patch from James F.) * * Revision 1.20  2006/06/27 18:06:34  dmorissette * Applied patch for EOP processing from James F. (bug 1497) * * Revision 1.19  2006/06/16 11:48:11  daniel * New functions to read E00 files directly as opposed to translating to * binary coverage. Used in the implementation of E00 read support in OGR. * Contributed by James E. Flemer. (bug 1497) * * Revision 1.18  2006/06/14 16:31:28  daniel * Added support for AVCCoverPC2 type (bug 1491) * * Revision 1.17  2005/06/03 03:49:58  daniel * Update email address, website url, and copyright dates * * Revision 1.16  2004/07/14 18:49:50  daniel * Fixed leak when trying to open something that's not a coverage (bug513) * * Revision 1.15  2002/08/27 15:46:15  daniel * Applied fix made in GDAL/OGR by 'aubin' (moved include ctype.h after avc.h) * * Revision 1.14  2000/09/22 19:45:21  daniel * Switch to MIT-style license * * Revision 1.13  2000/05/29 15:31:31  daniel * Added Japanese DBCS support * * Revision 1.12  2000/02/14 17:21:01  daniel * Made more robust for corrupted or invalid files in cover directory * * Revision 1.11  2000/02/02 04:26:04  daniel * Support reading TX6/TX7/RXP/RPL files in weird coverages * * Revision 1.10  2000/01/10 02:56:30  daniel * Added read support for "weird" coverages * * Revision 1.9  2000/01/07 07:12:49  daniel * Added support for reading PC Coverage TXT files * * Revision 1.8  1999/12/24 07:41:08  daniel * Check fname length before testing for extension in AVCE00ReadFindCoverType() * * Revision 1.7  1999/12/24 07:18:34  daniel * Added PC Arc/Info coverages support * * Revision 1.6  1999/08/26 17:22:18  daniel * Use VSIFopen() instead of fopen() directly * * Revision 1.5  1999/08/23 18:21:41  daniel * New syntax for AVCBinReadListTables() * * Revision 1.4  1999/05/11 02:10:01  daniel * Free psInfo struct inside AVCE00ReadClose() * * Revision 1.3  1999/04/06 19:43:26  daniel * Added E00 coverage path in EXP 0  header line * * Revision 1.2  1999/02/25 04:19:01  daniel * Added TXT, TX6/TX7, RXP and RPL support + other minor changes * * Revision 1.1  1999/01/29 16:28:52  daniel * Initial revision * **********************************************************************/#ifdef WIN32#  include <direct.h>   /* getcwd() */#endif#include "avc.h"#include <ctype.h>      /* toupper() */static void _AVCE00ReadScanE00(AVCE00ReadE00Ptr psRead);static int _AVCE00ReadBuildSqueleton(AVCE00ReadPtr psInfo,                                     char **papszCoverDir);static AVCCoverType _AVCE00ReadFindCoverType(char **papszCoverDir);/********************************************************************** *                          AVCE00ReadOpen() * * Open a Arc/Info coverage to read it as if it was an E00 file. * * You can either pass the name of the coverage directory, or the path * to one of the files in the coverage directory.  The name of the * coverage MUST be included in pszCoverPath... this means that * passing "." is invalid. * The following are all valid values for pszCoverPath: *               /home/data/country *               /home/data/country/ *               /home/data/country/arc.adf * (Of course you should replace the '/' with '\\' on DOS systems!) * * Returns a new AVCE00ReadPtr handle or NULL if the coverage could  * not be opened or if it does not appear to be a valid Arc/Info coverage. * * The handle will eventually have to be released with AVCE00ReadClose(). **********************************************************************/AVCE00ReadPtr  AVCE00ReadOpen(const char *pszCoverPath){    AVCE00ReadPtr   psInfo;    int             i, nLen, nCoverPrecision;    VSIStatBuf      sStatBuf;    char            **papszCoverDir = NULL;    CPLErrorReset();    /*-----------------------------------------------------------------     * pszCoverPath must be either a valid directory name or a valid     * file name.     *----------------------------------------------------------------*/    if (pszCoverPath == NULL || strlen(pszCoverPath) == 0 ||        VSIStat(pszCoverPath, &sStatBuf) == -1)    {        CPLError(CE_Failure, CPLE_OpenFailed,                  "Invalid coverage path: %s.",                  pszCoverPath?pszCoverPath:"(NULL)");        return NULL;    }    /*-----------------------------------------------------------------     * Alloc the AVCE00ReadPtr handle     *----------------------------------------------------------------*/    psInfo = (AVCE00ReadPtr)CPLCalloc(1, sizeof(struct AVCE00ReadInfo_t));    /*-----------------------------------------------------------------     * 2 possibilities about the value passed in pszCoverPath:     * - It can be the directory name of the coverage     * - or it can be the path to one of the files in the coverage     *     * If the name passed in pszCoverPath is not a directory, then we     * need to strip the last part of the filename to keep only the     * path, terminated by a '/' (or a '\\').     *----------------------------------------------------------------*/    if (VSI_ISDIR(sStatBuf.st_mode))    {        /*-------------------------------------------------------------         * OK, we have a valid directory name... make sure it is          * terminated with a '/' (or '\\')         *------------------------------------------------------------*/        nLen = strlen(pszCoverPath);        if (pszCoverPath[nLen-1] == '/' || pszCoverPath[nLen-1] == '\\')            psInfo->pszCoverPath = CPLStrdup(pszCoverPath);        else        {#ifdef WIN32            psInfo->pszCoverPath = CPLStrdup(CPLSPrintf("%s\\",pszCoverPath));#else            psInfo->pszCoverPath = CPLStrdup(CPLSPrintf("%s/",pszCoverPath));#endif        }    }    else    {        /*-------------------------------------------------------------         * We are dealing with a filename.         * Extract the coverage path component and store it.         * The coverage path will remain terminated by a '/' or '\\' char.         *------------------------------------------------------------*/        psInfo->pszCoverPath = CPLStrdup(pszCoverPath);        for( i = strlen(psInfo->pszCoverPath)-1;              i > 0 && psInfo->pszCoverPath[i] != '/' &&                 psInfo->pszCoverPath[i] != '\\';             i-- ) {}        psInfo->pszCoverPath[i+1] = '\0';    }    /*-----------------------------------------------------------------     * Extract the coverage name from the coverage path.  Note that     * for this the coverage path must be in the form:     * "dir1/dir2/dir3/covername/" ... if it is not the case, then     * we would have to use getcwd() to find the current directory name...     * but for now we'll just produce an error if this happens.     *----------------------------------------------------------------*/    nLen = 0;    for( i = strlen(psInfo->pszCoverPath)-1; 	 i > 0 && psInfo->pszCoverPath[i-1] != '/' &&	          psInfo->pszCoverPath[i-1] != '\\'&&	          psInfo->pszCoverPath[i-1] != ':';	 i-- )     {        nLen++;    }    if (nLen > 0)    {        psInfo->pszCoverName = CPLStrdup(psInfo->pszCoverPath+i);        psInfo->pszCoverName[nLen] = '\0';    }    else    {        CPLError(CE_Failure, CPLE_OpenFailed,                  "Invalid coverage path (%s): "                 "coverage name must be included in path.", pszCoverPath);        CPLFree(psInfo->pszCoverPath);        CPLFree(psInfo);        return NULL;    }    /*-----------------------------------------------------------------     * Read the coverage directory listing and try to establish the cover type     *----------------------------------------------------------------*/    papszCoverDir = CPLReadDir(psInfo->pszCoverPath);    psInfo->eCoverType = _AVCE00ReadFindCoverType(papszCoverDir);    if (psInfo->eCoverType == AVCCoverTypeUnknown  )    {        CPLError(CE_Failure, CPLE_OpenFailed,                  "Invalid coverage (%s): directory does not appear to "                 "contain any supported vector coverage file.",  pszCoverPath);        CPLFree(psInfo->pszCoverName);        CPLFree(psInfo->pszCoverPath);        CPLFree(psInfo->pszInfoPath);        CPLFree(psInfo);        CSLDestroy(papszCoverDir);        return NULL;    }       /*-----------------------------------------------------------------     * INFO path: PC Coverages have all files in the same dir, and unix     * covers have the INFO files in ../info     *----------------------------------------------------------------*/    if (psInfo->eCoverType == AVCCoverPC || psInfo->eCoverType == AVCCoverPC2)    {        psInfo->pszInfoPath = CPLStrdup(psInfo->pszCoverPath);    }    else    {        /*-------------------------------------------------------------         * Lazy way to build the INFO path: simply add "../info/"...         * this could probably be improved!         *------------------------------------------------------------*/        psInfo->pszInfoPath =(char*)CPLMalloc((strlen(psInfo->pszCoverPath)+9)*                                           sizeof(char));#ifdef WIN32#  define AVC_INFOPATH "..\\info\\"#else#  define AVC_INFOPATH "../info/"#endif        sprintf(psInfo->pszInfoPath, "%s%s", psInfo->pszCoverPath,                                              AVC_INFOPATH);        AVCAdjustCaseSensitiveFilename(psInfo->pszInfoPath);    }    /*-----------------------------------------------------------------     * For Unix coverages, check that the info directory exists and      * contains the "arc.dir".  In AVCCoverWeird, the arc.dir is      * called "../INFO/ARCDR9".     * PC Coverages have their info tables in the same direcotry as      * the coverage files.     *----------------------------------------------------------------*/    if ((psInfo->eCoverType == AVCCoverV7 &&         ! AVCFileExists(psInfo->pszInfoPath, "arc.dir") ) ||         (psInfo->eCoverType == AVCCoverWeird &&         ! AVCFileExists(psInfo->pszInfoPath, "arcdr9") ) )    {        CPLError(CE_Failure, CPLE_OpenFailed,              "Invalid coverage (%s): 'info' directory not found or invalid.",                                               pszCoverPath);        CPLFree(psInfo->pszCoverName);        CPLFree(psInfo->pszCoverPath);        CPLFree(psInfo->pszInfoPath);        CPLFree(psInfo);        CSLDestroy(papszCoverDir);        return NULL;    }    /*-----------------------------------------------------------------     * Make sure there was no error until now before we build squeleton.     *----------------------------------------------------------------*/    if (CPLGetLastErrorNo() != 0)    {        CPLFree(psInfo->pszCoverName);        CPLFree(psInfo->pszCoverPath);        CPLFree(psInfo->pszInfoPath);        CPLFree(psInfo);        CSLDestroy(papszCoverDir);        return NULL;    }    /*-----------------------------------------------------------------     * Build the E00 file squeleton and be ready to return a E00 header...     * We'll also read the coverage precision by the same way.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品亚洲人成人网| 色婷婷亚洲综合| 精品国产成人系列| 国产精品亚洲午夜一区二区三区 | 国产精品卡一卡二卡三| 99r精品视频| 午夜一区二区三区在线观看| 色综合天天综合狠狠| 日韩av中文字幕一区二区三区| 久久久天堂av| 欧美羞羞免费网站| 国产精品亚洲а∨天堂免在线| 精品系列免费在线观看| 亚洲精品一二三区| 99精品黄色片免费大全| av一区二区三区| 日韩不卡一区二区三区| 蜜桃av一区二区三区| 亚洲视频免费观看| 精品国产乱码久久久久久久久 | 欧美日韩国产精品自在自线| 国产中文一区二区三区| 亚洲一二三区不卡| 国产精品久久久久久一区二区三区 | 欧美亚洲动漫另类| 欧美日韩中字一区| 99精品视频在线观看免费| 99久久国产免费看| 在线免费观看一区| 99天天综合性| 欧美日韩不卡在线| 精品盗摄一区二区三区| 国产精品久久一卡二卡| 亚洲香肠在线观看| 欧美色图天堂网| 欧美tickle裸体挠脚心vk| 91浏览器打开| av亚洲精华国产精华| 欧美视频一区二区三区四区 | 亚洲视频中文字幕| 午夜精品久久久久久久蜜桃app| 日韩电影免费在线观看网站| 精品在线免费视频| 国产福利精品导航| 韩国成人福利片在线播放| 国产精品小仙女| 国产欧美综合色| 91久久国产综合久久| 亚洲成人动漫一区| 久久成人麻豆午夜电影| 中文字幕不卡一区| 日韩一区二区在线看| 99视频一区二区| 欧美浪妇xxxx高跟鞋交| 国产网红主播福利一区二区| 91精品免费在线观看| eeuss鲁片一区二区三区在线看| 色八戒一区二区三区| 欧美老肥妇做.爰bbww视频| wwwwxxxxx欧美| 精品亚洲免费视频| 色综合天天做天天爱| 欧美日韩视频在线第一区| 久久免费的精品国产v∧| 亚洲精品中文字幕在线观看| 日本aⅴ精品一区二区三区| 欧美国产成人精品| 亚洲国产aⅴ天堂久久| 懂色av中文一区二区三区| 欧美人狂配大交3d怪物一区| 久久精品网站免费观看| 一区二区三区欧美久久| 国产欧美日韩三级| 偷窥国产亚洲免费视频| 欧美一区二区三区在线观看视频| 色综合久久中文字幕| 日韩午夜在线观看视频| 亚洲视频狠狠干| 国产尤物一区二区| 欧美视频在线不卡| 91精品久久久久久蜜臀| 亚洲三级电影全部在线观看高清| 麻豆国产精品官网| 在线观看国产精品网站| 国产日韩亚洲欧美综合| 日本va欧美va瓶| 日本高清不卡一区| 欧美国产成人精品| 国产一区二区三区视频在线播放| 国产精品丝袜一区| 美腿丝袜亚洲一区| 91精品国产综合久久国产大片| 椎名由奈av一区二区三区| 国产在线视频精品一区| 91精品国产综合久久精品性色| 亚洲欧美另类小说视频| 国产精品女主播av| 久久精品国产精品亚洲综合| 欧美日韩一区二区不卡| 国产精品国产三级国产普通话蜜臀| 精品亚洲成a人| 日韩视频免费直播| 手机精品视频在线观看| 亚洲激情中文1区| 精品久久人人做人人爰| 日韩精品三区四区| 欧美日韩一级黄| 亚洲午夜一区二区| 欧美伊人精品成人久久综合97| 国产精品国产三级国产aⅴ入口| 久久国产日韩欧美精品| 这里只有精品99re| 亚洲国产日韩一级| 欧美性大战久久久久久久蜜臀| 亚洲色图欧美在线| a在线欧美一区| 国产精品视频麻豆| 99久久精品免费看| 亚洲欧美色一区| 欧美私模裸体表演在线观看| 成人动漫精品一区二区| 91色视频在线| 日韩一区在线免费观看| 99re视频这里只有精品| 日韩美女精品在线| 一本大道久久a久久综合婷婷| 日韩理论电影院| 一本久久a久久精品亚洲| 亚洲欧美日韩中文字幕一区二区三区| 91在线观看视频| 亚洲综合视频在线观看| 欧美顶级少妇做爰| 免费美女久久99| 久久综合色婷婷| 97久久人人超碰| 夜夜爽夜夜爽精品视频| 国产精品视频线看| 91在线丨porny丨国产| 亚洲一区av在线| 宅男噜噜噜66一区二区66| 蜜桃av一区二区三区| 精品国产青草久久久久福利| 精品系列免费在线观看| 亚洲男人的天堂av| 欧美精品久久久久久久久老牛影院 | 欧美艳星brazzers| 亚洲激情五月婷婷| 欧美日韩在线三级| 日本最新不卡在线| 久久精品人人做人人综合| 亚洲精品一区二区在线观看| 久久国产精品99精品国产| 亚洲国产精品成人综合| 日本丶国产丶欧美色综合| 日本亚洲一区二区| 国产区在线观看成人精品| 色婷婷av一区| 九九九久久久精品| 亚洲男人天堂av| 日韩女同互慰一区二区| 亚洲福利一二三区| ww久久中文字幕| 视频一区视频二区中文字幕| 精品成人一区二区三区四区| 粉嫩欧美一区二区三区高清影视| 欧美国产一区二区| 欧美日韩视频在线第一区| 国产曰批免费观看久久久| 国产精品资源在线| 亚洲国产一区二区在线播放| 精品国产伦一区二区三区免费| 97精品久久久午夜一区二区三区 | 99精品欧美一区二区三区小说 | 欧美一区二区福利在线| 不卡一二三区首页| 日产国产高清一区二区三区| 亚洲欧美自拍偷拍色图| 精品国产乱码久久久久久牛牛 | 久久亚洲精品小早川怜子| 欧美日韩国产高清一区二区| 国产精品中文欧美| 午夜伦理一区二区| 国产精品久久免费看| 欧美一区二区三区四区在线观看 | 91精品免费观看| 日本高清不卡视频| 成人av在线播放网址| 精品一区二区免费看| 亚洲男人电影天堂| 亚洲欧美一区二区久久| 久久久久综合网| 91精品国产黑色紧身裤美女| 99久久99久久免费精品蜜臀| 国产一区二区不卡在线| 成人一级黄色片| 激情六月婷婷综合| 婷婷国产v国产偷v亚洲高清| 亚洲视频免费观看| 国产精品久久久久久户外露出| 欧美一区二区三区视频在线|