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

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

?? avc_e00parse.c

?? 支持各種柵格圖像和矢量圖像讀取的庫
?? C
?? 第 1 頁 / 共 5 頁
字號:
/********************************************************************** * $Id: avc_e00parse.c,v 1.18 2006/06/27 18:06:34 dmorissette Exp $ * * Name:     avc_e00parse.c * Project:  Arc/Info vector coverage (AVC)  E00->BIN conversion library * Language: ANSI C * Purpose:  Functions to parse ASCII E00 lines and fill binary structures. * 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_e00parse.c,v $ * Revision 1.18  2006/06/27 18:06:34  dmorissette * Applied patch for EOP processing from James F. (bug 1497) * * Revision 1.17  2006/06/19 14:35:47  dmorissette * New patch from James F. for E00 read support in OGR (bug 1497) * * Revision 1.16  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.15  2006/03/02 22:46:26  daniel * Accept empty subclass names for TX6/TX7 sections (bug 1261) * * Revision 1.14  2005/06/03 03:49:58  daniel * Update email address, website url, and copyright dates * * Revision 1.13  2002/08/27 15:43:02  daniel * Small typo in type 40 fix (forgot to commit to CVS on 2002-08-05) * * Revision 1.12  2002/08/05 20:20:17  daniel * Fixed parsing type 40 fields to properly detect negative exp. (bug 1272) * * Revision 1.11  2001/11/25 21:15:23  daniel * Added hack (AVC_MAP_TYPE40_TO_DOUBLE) to map type 40 fields bigger than 8 * digits to double precision as we generate E00 output (bug599) * * Revision 1.10  2001/11/25 19:45:32  daniel * Fixed reading of type 40 when not in exponent format (bug599) * * Revision 1.9  2001/07/12 20:59:34  daniel * Properly handle PAL entries with 0 arcs * * Revision 1.8  2000/09/22 19:45:20  daniel * Switch to MIT-style license * * Revision 1.7  2000/03/16 03:48:00  daniel * Accept 0-length text strings in TX6/TX7 objects * * Revision 1.6  2000/02/03 07:21:40  daniel * TXT/TX6 with string longer than 80 chars: split string in 80 chars chunks * * Revision 1.5  1999/12/05 03:40:13  daniel * Fixed signed/unsigned mismatch compile warning * * Revision 1.4  1999/11/23 05:27:58  daniel * Added AVCE00Str2Int() to extract integer values in E00 lines * * Revision 1.3  1999/08/23 18:20:49  daniel * Fixed support for attribute fields type 40 * * Revision 1.2  1999/05/17 16:20:48  daniel * Added RXP + TXT/TX6/TX7 write support + some simple problems fixed * * Revision 1.1  1999/05/11 02:34:46  daniel * Initial revision * **********************************************************************/#include "avc.h"#include <ctype.h>      /* toupper() *//********************************************************************** *                          AVCE00Str2Int() * * Convert a portion of a string to an integer value. * The difference between this function and atoi() is that this version * takes only the specified number of characters... so it can handle the  * case of 2 numbers that are part of the same string but are not separated  * by a space. **********************************************************************/int    AVCE00Str2Int(const char *pszStr, int numChars){    int nValue = 0;    if (pszStr && numChars >= (int)strlen(pszStr))        return atoi(pszStr);    else if (pszStr)    {        char cNextDigit;        char *pszTmp;        /* Get rid of const */        pszTmp = (char*)pszStr;        cNextDigit = pszTmp[numChars];        pszTmp[numChars] = '\0';        nValue = atoi(pszTmp);        pszTmp[numChars] = cNextDigit;    }    return nValue;}/********************************************************************** *                          AVCE00ParseInfoAlloc() * * Allocate and initialize a new AVCE00ParseInfo structure. * * AVCE00ParseStartSection() will have to be called at least once * to specify the type of objects to parse. * * The structure will eventually have to be freed with AVCE00ParseInfoFree(). **********************************************************************/AVCE00ParseInfo  *AVCE00ParseInfoAlloc(){    AVCE00ParseInfo       *psInfo;    psInfo = (AVCE00ParseInfo*)CPLCalloc(1,sizeof(AVCE00ParseInfo));    psInfo->eFileType = AVCFileUnknown;    psInfo->eSuperSectionType = AVCFileUnknown;    /* Allocate output buffer.       * 2k should be enough... the biggest thing we'll need to store     * in it will be 1 complete INFO table record.     */    psInfo->nBufSize = 2048;    psInfo->pszBuf = (char *)CPLMalloc(psInfo->nBufSize*sizeof(char));    /* Set a default precision, but this value will be set on a section     * by section basis inside AVCE00ParseStartSection()     */    psInfo->nPrecision = AVC_SINGLE_PREC;    return psInfo;}/********************************************************************** *                         _AVCE00ParseDestroyCurObject() * * Release mem. associated with the psInfo->cur.* object we are * currently using. **********************************************************************/void    _AVCE00ParseDestroyCurObject(AVCE00ParseInfo  *psInfo){    if (psInfo->eFileType == AVCFileUnknown)        return;    if (psInfo->eFileType == AVCFileARC)    {        CPLFree(psInfo->cur.psArc->pasVertices);        CPLFree(psInfo->cur.psArc);    }    else if (psInfo->eFileType == AVCFilePAL ||             psInfo->eFileType == AVCFileRPL )    {        CPLFree(psInfo->cur.psPal->pasArcs);        CPLFree(psInfo->cur.psPal);    }    else if (psInfo->eFileType == AVCFileCNT)    {        CPLFree(psInfo->cur.psCnt->panLabelIds);        CPLFree(psInfo->cur.psCnt);    }    else if (psInfo->eFileType == AVCFileLAB)    {        CPLFree(psInfo->cur.psLab);    }    else if (psInfo->eFileType == AVCFileTOL)    {        CPLFree(psInfo->cur.psTol);    }    else if (psInfo->eFileType == AVCFilePRJ)    {        CSLDestroy(psInfo->cur.papszPrj);    }    else if (psInfo->eFileType == AVCFileTXT ||              psInfo->eFileType == AVCFileTX6)    {        CPLFree(psInfo->cur.psTxt->pasVertices);        CPLFree(psInfo->cur.psTxt->pszText);        CPLFree(psInfo->cur.psTxt);    }    else if (psInfo->eFileType == AVCFileRXP)    {        CPLFree(psInfo->cur.psRxp);    }    else if (psInfo->eFileType == AVCFileTABLE)    {        _AVCDestroyTableFields(psInfo->hdr.psTableDef, psInfo->cur.pasFields);        _AVCDestroyTableDef(psInfo->hdr.psTableDef);        psInfo->bTableHdrComplete = FALSE;    }    else    {        CPLError(CE_Failure, CPLE_NotSupported,                 "_AVCE00ParseDestroyCurObject(): Unsupported file type!");    }    psInfo->eFileType = AVCFileUnknown;    psInfo->cur.psArc = NULL;}/********************************************************************** *                          AVCE00ParseInfoFree() * * Free any memory associated with a AVCE00ParseInfo structure. **********************************************************************/void    AVCE00ParseInfoFree(AVCE00ParseInfo  *psInfo){    if (psInfo)    {        CPLFree(psInfo->pszSectionHdrLine);        psInfo->pszSectionHdrLine = NULL;        CPLFree(psInfo->pszBuf);        _AVCE00ParseDestroyCurObject(psInfo);    }    CPLFree(psInfo);}/********************************************************************** *                          AVCE00ParseReset() * * Reset the fields in a AVCE00ParseInfo structure so that further calls * to the API will be ready to process a new object. **********************************************************************/void    AVCE00ParseReset(AVCE00ParseInfo  *psInfo){    psInfo->iCurItem = psInfo->numItems = 0;    psInfo->bForceEndOfSection = FALSE;}/********************************************************************** *                          AVCE00ParseSuperSectionHeader() * * Check if pszLine is a valid "supersection" header line, if it is one  * then store the supersection type in the ParseInfo structure. * * What I call a "supersection" is a section that contains several * files, such as the TX6/TX7, RPL, RXP, ... and also the IFO (TABLEs). * * The ParseInfo structure won't be ready to read objects until * a call to AVCE00ParseSectionHeader() (see below) succesfully * recognizes the beginning of a subsection of this type. * * Returns the new supersection type, or AVCFileUnknown if the line is * not recognized. **********************************************************************/AVCFileType  AVCE00ParseSuperSectionHeader(AVCE00ParseInfo  *psInfo,                                           const char *pszLine){    /*-----------------------------------------------------------------     * If we're already inside a supersection or a section, then     * return AVCFileUnknown right away.     *----------------------------------------------------------------*/    if (psInfo == NULL ||        psInfo->eSuperSectionType != AVCFileUnknown ||        psInfo->eFileType != AVCFileUnknown )    {        return AVCFileUnknown;    }    /*-----------------------------------------------------------------     * Check if pszLine is a valid supersection header line.     *----------------------------------------------------------------*/    if (EQUALN(pszLine, "RPL  ", 5))        psInfo->eSuperSectionType = AVCFileRPL;    else if (EQUALN(pszLine, "TX6  ", 5) || EQUALN(pszLine, "TX7  ", 5))        psInfo->eSuperSectionType = AVCFileTX6;    else if (EQUALN(pszLine, "RXP  ", 5))        psInfo->eSuperSectionType = AVCFileRXP;    else if (EQUALN(pszLine, "IFO  ", 5))        psInfo->eSuperSectionType = AVCFileTABLE;    else        return AVCFileUnknown;    /*-----------------------------------------------------------------     * Record the start of the supersection (for faster seeking)     *----------------------------------------------------------------*/    psInfo->nStartLineNum = psInfo->nCurLineNum;    /*-----------------------------------------------------------------     * OK, we have a valid new section header. Set the precision and      * get ready to read objects from it.     *----------------------------------------------------------------*/    if (atoi(pszLine+4) == 2)        psInfo->nPrecision = AVC_SINGLE_PREC;    else if (atoi(pszLine+4) == 3)        psInfo->nPrecision = AVC_DOUBLE_PREC;    else    {        CPLError(CE_Failure, CPLE_AppDefined,                  "Parse Error: Invalid section header line (\"%s\")!",                  pszLine);        psInfo->eSuperSectionType = AVCFileUnknown;        /* psInfo->nStartLineNum = -1; */    }    return psInfo->eSuperSectionType;}/********************************************************************** *                          AVCE00ParseSuperSectionEnd() * * Check if pszLine marks the end of a supersection, and if it is the * case, then reset the supersection flag in the ParseInfo. *  * Supersections always end with the line "JABBERWOCKY", except for * the IFO section. **********************************************************************/GBool  AVCE00ParseSuperSectionEnd(AVCE00ParseInfo  *psInfo,                                  const char *pszLine ){    if (psInfo->eFileType == AVCFileUnknown &&        psInfo->eSuperSectionType != AVCFileUnknown &&        (EQUALN(pszLine, "JABBERWOCKY", 11) ||         (psInfo->eSuperSectionType == AVCFileTABLE &&           EQUALN(pszLine, "EOI", 3) )  ) )    {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品77777竹菊影视小说| 一区二区三区欧美视频| 欧美日韩国产天堂| 99久久婷婷国产综合精品电影 | 亚洲在线一区二区三区| 亚洲欧洲精品一区二区三区| 久久精品日韩一区二区三区| 精品国产亚洲在线| 日韩免费高清av| 精品免费一区二区三区| 精品少妇一区二区三区在线播放| 日韩亚洲欧美在线观看| 精品国产一区二区在线观看| 精品国产伦一区二区三区观看体验| 欧美一区二区三区精品| 91精品国产一区二区| 91精品久久久久久久91蜜桃| 91精品蜜臀在线一区尤物| 3d成人动漫网站| 日韩免费观看高清完整版| 久久老女人爱爱| 亚洲视频资源在线| 亚洲综合另类小说| 久久福利资源站| 高清不卡一区二区| 在线免费观看一区| 欧美一区二区三区视频免费播放| 91精品国产综合久久久久久| 精品奇米国产一区二区三区| 久久九九全国免费| 亚洲精品久久久蜜桃| 午夜久久福利影院| 国产高清亚洲一区| 欧美亚洲综合色| 精品国产91亚洲一区二区三区婷婷| 欧美经典一区二区三区| 亚洲一区在线播放| 国产在线视频一区二区三区| 成人一区二区视频| 欧美乱熟臀69xxxxxx| 久久嫩草精品久久久精品| 国产精品国产三级国产专播品爱网| 亚洲一区二区影院| 国产福利一区二区| 欧美美女喷水视频| 国产精品国产自产拍高清av王其| 日韩电影在线看| av男人天堂一区| 精品久久人人做人人爽| 亚洲激情图片小说视频| 国产一区二区精品久久| 欧美日韩免费不卡视频一区二区三区| 精品少妇一区二区| 丝袜美腿亚洲综合| 在线免费视频一区二区| 国产精品麻豆一区二区| 麻豆精品久久久| 欧美体内she精高潮| 国产精品嫩草影院av蜜臀| 日本欧美久久久久免费播放网| 成人激情av网| 亚洲国产精品成人久久综合一区| 日本亚洲电影天堂| 欧美日韩国产精品成人| 自拍偷拍亚洲激情| 成人深夜福利app| www国产精品av| 精品一区二区日韩| 欧美大度的电影原声| 日本在线播放一区二区三区| 欧美日韩成人综合在线一区二区| 日韩一区有码在线| 99久久伊人久久99| 国产精品久久久久影院亚瑟 | 久久亚洲捆绑美女| 久久66热偷产精品| 精品少妇一区二区三区在线视频| 午夜精品久久久久久久蜜桃app| 欧日韩精品视频| 一区二区三区日韩欧美精品| 99精品视频在线观看免费| 亚洲欧洲日产国产综合网| av不卡在线观看| ...xxx性欧美| 欧美色大人视频| 免费三级欧美电影| 日韩三级.com| 国产精品一品视频| 亚洲国产精品ⅴa在线观看| 国产在线国偷精品产拍免费yy| 精品久久一区二区三区| 国产黄色91视频| 亚洲欧美日韩电影| 在线精品视频免费播放| 日本 国产 欧美色综合| 337p日本欧洲亚洲大胆色噜噜| 国产一区不卡视频| 亚洲欧美一区二区三区极速播放| 91网站在线播放| 丝袜脚交一区二区| 国产肉丝袜一区二区| av在线不卡免费看| 香蕉成人啪国产精品视频综合网| 日韩一级视频免费观看在线| 久久爱另类一区二区小说| 国产网红主播福利一区二区| 99久久免费精品| 日韩精品亚洲专区| 2014亚洲片线观看视频免费| 91碰在线视频| 韩国成人在线视频| 亚洲免费在线观看| 91精品国产91久久久久久一区二区| 国产精品亚洲成人| 亚洲综合无码一区二区| 精品免费国产一区二区三区四区| 成人午夜碰碰视频| 日韩影院精彩在线| 中文字幕巨乱亚洲| 91精品国产入口在线| 国产大陆精品国产| 日韩电影免费在线| 亚洲精品伦理在线| 久久久国际精品| 91精品国产91综合久久蜜臀| 色综合中文字幕国产| 国产主播一区二区| 日韩国产欧美视频| 亚洲精品免费播放| 国产精品成人一区二区艾草 | 国产精品亚洲一区二区三区妖精 | 日本免费在线视频不卡一不卡二| 欧美高清在线精品一区| 欧美mv日韩mv国产网站app| 欧美午夜宅男影院| av电影在线观看一区| 激情综合色丁香一区二区| 天堂在线一区二区| 一区二区三区成人| 国产精品久久看| 久久久99精品久久| 久久久高清一区二区三区| 在线成人免费视频| 国产精品无遮挡| 色哟哟精品一区| 99久久精品久久久久久清纯| 国产在线国偷精品产拍免费yy| 国产欧美日韩中文久久| 欧美日韩视频在线第一区| 成人精品国产免费网站| 国产激情一区二区三区桃花岛亚洲| 舔着乳尖日韩一区| 精品av综合导航| 精品国产成人在线影院 | 亚洲色图一区二区三区| 亚洲一区二区三区视频在线| 久久精品久久综合| 日本韩国视频一区二区| 日韩欧美一二区| 中文字幕中文字幕一区二区 | 一个色综合av| 精品一区二区在线视频| 91在线免费看| 精品欧美乱码久久久久久1区2区| 亚洲欧美另类久久久精品| 看片网站欧美日韩| 91成人免费网站| 国产视频一区在线观看| 日本不卡一区二区三区| 91性感美女视频| 国产亚洲欧美色| 免费在线观看日韩欧美| 在线精品国精品国产尤物884a| 国产欧美在线观看一区| 日韩高清一区二区| 91丨porny丨国产| 久久精品人人做人人爽人人| 性欧美大战久久久久久久久| 粉嫩13p一区二区三区| 日韩视频国产视频| 亚洲成人www| 日本道免费精品一区二区三区| 精品国精品国产| 日本大胆欧美人术艺术动态| 日本乱码高清不卡字幕| 国产精品人人做人人爽人人添| 久草精品在线观看| 91精品国产综合久久香蕉的特点 | 午夜在线电影亚洲一区| av动漫一区二区| 国产欧美一区二区精品忘忧草| 另类欧美日韩国产在线| 日韩午夜在线影院| 男人的j进女人的j一区| 欧美日韩亚洲丝袜制服| 亚洲一区在线观看视频| 日本黄色一区二区| 亚洲动漫第一页| 在线不卡中文字幕| 日韩在线一区二区三区|