<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta name="robots" content="noindex"> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>cpl_csv.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body bgcolor="#ffffff"> <!-- Generated by Doxygen 1.2.3-20001105 on Thu Mar 28 09:47:27 2002 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> </center> <hr><h1>cpl_csv.h</h1><div class="fragment"><pre>00001 <font class="comment">/******************************************************************************</font> 00002 <font class="comment"> * $Id: cpl_csv_h-source.html,v 1.10 2002/04/16 13:11:47 warmerda Exp $</font> 00003 <font class="comment"> *</font> 00004 <font class="comment"> * Project: Common Portability Library</font> 00005 <font class="comment"> * Purpose: Functions for reading and scaning CSV (comma separated,</font> 00006 <font class="comment"> * variable length text files holding tables) files. </font> 00007 <font class="comment"> * Author: Frank Warmerdam, warmerda@home.com</font> 00008 <font class="comment"> *</font> 00009 <font class="comment"> ******************************************************************************</font> 00010 <font class="comment"> * Copyright (c) 1999, Frank Warmerdam</font> 00011 <font class="comment"> *</font> 00012 <font class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a</font> 00013 <font class="comment"> * copy of this software and associated documentation files (the "Software"),</font> 00014 <font class="comment"> * to deal in the Software without restriction, including without limitation</font> 00015 <font class="comment"> * the rights to use, copy, modify, merge, publish, distribute, sublicense,</font> 00016 <font class="comment"> * and/or sell copies of the Software, and to permit persons to whom the</font> 00017 <font class="comment"> * Software is furnished to do so, subject to the following conditions:</font> 00018 <font class="comment"> *</font> 00019 <font class="comment"> * The above copyright notice and this permission notice shall be included</font> 00020 <font class="comment"> * in all copies or substantial portions of the Software.</font> 00021 <font class="comment"> *</font> 00022 <font class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS</font> 00023 <font class="comment"> * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</font> 00024 <font class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL</font> 00025 <font class="comment"> * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</font> 00026 <font class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</font> 00027 <font class="comment"> * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</font> 00028 <font class="comment"> * DEALINGS IN THE SOFTWARE.</font> 00029 <font class="comment"> ******************************************************************************</font> 00030 <font class="comment"> *</font> 00031 <font class="comment"> * $Log: cpl_csv_h-source.html,v $ 00031 <font class="comment"> * Revision 1.10 2002/04/16 13:11:47 warmerda 00031 <font class="comment"> * updated 00031 <font class="comment"> *</font> 00032 <font class="comment"> * Revision 1.1 2000/04/05 21:55:59 warmerda</font> 00033 <font class="comment"> * New</font> 00034 <font class="comment"> *</font> 00035 <font class="comment"> */</font> 00036 00037 <font class="preprocessor">#ifndef CPL_CSV_H_INCLUDED</font> 00038 <font class="preprocessor"></font><font class="preprocessor">#define CPL_CSV_H_INCLUDED</font> 00039 <font class="preprocessor"></font> 00040 <font class="preprocessor">#include "<a class="code" href="cpl_conv_h.html">cpl_conv.h</a>"</font> 00041 <font class="preprocessor">#include "cpl_string.h"</font> 00042 <font class="preprocessor">#include "<a class="code" href="cpl_vsi_h.html">cpl_vsi.h</a>"</font> 00043 00044 CPL_C_START 00045 00046 <font class="keyword">typedef</font> <font class="keyword">enum</font> { 00047 CC_ExactString, 00048 CC_ApproxString, 00049 CC_Integer 00050 } CSVCompareCriteria; 00051 00052 <font class="keyword">const</font> <font class="keywordtype">char</font> *CSVFilename( <font class="keyword">const</font> <font class="keywordtype">char</font> * ); 00053 00054 <font class="keywordtype">char</font> **CSVReadParseLine( FILE * ); 00055 <font class="keywordtype">char</font> **CSVScanLines( FILE *, <font class="keywordtype">int</font>, <font class="keyword">const</font> <font class="keywordtype">char</font> *, CSVCompareCriteria ); 00056 <font class="keywordtype">char</font> **CSVScanFile( <font class="keyword">const</font> <font class="keywordtype">char</font> *, <font class="keywordtype">int</font>, <font class="keyword">const</font> <font class="keywordtype">char</font> *, 00057 CSVCompareCriteria ); 00058 <font class="keywordtype">char</font> **CSVScanFileByName( <font class="keyword">const</font> <font class="keywordtype">char</font> *, <font class="keyword">const</font> <font class="keywordtype">char</font> *, <font class="keyword">const</font> <font class="keywordtype">char</font> *, 00059 CSVCompareCriteria ); 00060 <font class="keywordtype">int</font> CSVGetFieldId( FILE *, <font class="keyword">const</font> <font class="keywordtype">char</font> * ); 00061 <font class="keywordtype">int</font> CSVGetFileFieldId( <font class="keyword">const</font> <font class="keywordtype">char</font> *, <font class="keyword">const</font> <font class="keywordtype">char</font> * ); 00062 00063 <font class="keywordtype">void</font> CSVDeaccess( <font class="keyword">const</font> <font class="keywordtype">char</font> * ); 00064 00065 <font class="keyword">const</font> <font class="keywordtype">char</font> *CSVGetField( <font class="keyword">const</font> <font class="keywordtype">char</font> *, <font class="keyword">const</font> <font class="keywordtype">char</font> *, <font class="keyword">const</font> <font class="keywordtype">char</font> *, 00066 CSVCompareCriteria, <font class="keyword">const</font> <font class="keywordtype">char</font> * ); 00067 00068 <font class="keywordtype">void</font> CPL_DLL SetCSVFilenameHook( <font class="keyword">const</font> <font class="keywordtype">char</font> *(*)(<font class="keyword">const</font> <font class="keywordtype">char</font> *) ); 00069 00070 CPL_C_END 00071 00072 <font class="preprocessor">#endif </font><font class="comment">/* ndef CPL_CSV_H_INCLUDED */</font> 00073 </div></pre><hr><address><small>Generated at Thu Mar 28 09:47:27 2002 for GDAL by <a href="http://www.stack.nl/~dimitri/doxygen/index.html"> <img src="doxygen.gif" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.3-20001105 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, © 1997-2000</small></address> </body> </html>