<!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_conv.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_conv.h</h1><a href="cpl_conv_h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/******************************************************************************</font> 00002 <font class="comment"> * $Id: cpl_conv_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: CPL - Common Portability Library</font> 00005 <font class="comment"> * Purpose: Convenience functions declarations.</font> 00006 <font class="comment"> * This is intended to remain light weight.</font> 00007 <font class="comment"> * Author: Frank Warmerdam, warmerdam@pobox.com</font> 00008 <font class="comment"> *</font> 00009 <font class="comment"> ******************************************************************************</font> 00010 <font class="comment"> * Copyright (c) 1998, 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_conv_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.14 2002/02/01 20:39:50 warmerda</font> 00033 <font class="comment"> * ensure CPLReadLine() is exported from DLL</font> 00034 <font class="comment"> *</font> 00035 <font class="comment"> * Revision 1.13 2001/12/12 17:06:57 warmerda</font> 00036 <font class="comment"> * added CPLStat</font> 00037 <font class="comment"> *</font> 00038 <font class="comment"> * Revision 1.12 2001/03/16 22:15:08 warmerda</font> 00039 <font class="comment"> * added CPLResetExtension</font> 00040 <font class="comment"> *</font> 00041 <font class="comment"> * Revision 1.1 1998/10/18 06:15:11 warmerda</font> 00042 <font class="comment"> * Initial implementation.</font> 00043 <font class="comment"> *</font> 00044 <font class="comment"> */</font> 00045 00046 <font class="preprocessor">#ifndef CPL_CONV_H_INCLUDED</font> 00047 <font class="preprocessor"></font><font class="preprocessor">#define CPL_CONV_H_INCLUDED</font> 00048 <font class="preprocessor"></font> 00049 <font class="preprocessor">#include "<a class="code" href="cpl_port_h.html">cpl_port.h</a>"</font> 00050 <font class="preprocessor">#include "<a class="code" href="cpl_vsi_h.html">cpl_vsi.h</a>"</font> 00051 <font class="preprocessor">#include "<a class="code" href="cpl_error_h.html">cpl_error.h</a>"</font> 00052 00060 <font class="comment">/* -------------------------------------------------------------------- */</font> 00061 <font class="comment">/* Runtime check of various configuration items. */</font> 00062 <font class="comment">/* -------------------------------------------------------------------- */</font> 00063 CPL_C_START 00064 00065 <font class="keywordtype">void</font> CPL_DLL CPLVerifyConfiguration(); 00066 00067 <font class="comment">/* -------------------------------------------------------------------- */</font> 00068 <font class="comment">/* Safe malloc() API. Thin cover over VSI functions with fatal */</font> 00069 <font class="comment">/* error reporting if memory allocation fails. */</font> 00070 <font class="comment">/* -------------------------------------------------------------------- */</font> 00071 <font class="keywordtype">void</font> CPL_DLL *<a class="code" href="cpl_conv_h.html#a3">CPLMalloc</a>( size_t ); 00072 <font class="keywordtype">void</font> CPL_DLL *<a class="code" href="cpl_conv_h.html#a4">CPLCalloc</a>( size_t, size_t ); 00073 <font class="keywordtype">void</font> CPL_DLL *<a class="code" href="cpl_conv_h.html#a5">CPLRealloc</a>( <font class="keywordtype">void</font> *, size_t ); 00074 <font class="keywordtype">char</font> CPL_DLL *<a class="code" href="cpl_conv_h.html#a6">CPLStrdup</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> * ); 00075 00076 <font class="preprocessor">#define CPLFree VSIFree</font> 00077 <font class="preprocessor"></font> 00078 <font class="comment">/* -------------------------------------------------------------------- */</font> 00079 <font class="comment">/* Read a line from a text file, and strip of CR/LF. */</font> 00080 <font class="comment">/* -------------------------------------------------------------------- */</font> 00081 <font class="keyword">const</font> <font class="keywordtype">char</font> CPL_DLL *<a class="code" href="cpl_conv_h.html#a7">CPLReadLine</a>( FILE * ); 00082 00083 <font class="comment">/* -------------------------------------------------------------------- */</font> 00084 <font class="comment">/* Fetch a function from DLL / so. */</font> 00085 <font class="comment">/* -------------------------------------------------------------------- */</font> 00086 00087 <font class="keywordtype">void</font> CPL_DLL *<a class="code" href="cpl_conv_h.html#a8">CPLGetSymbol</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> *, <font class="keyword">const</font> <font class="keywordtype">char</font> * ); 00088 00089 <font class="comment">/* -------------------------------------------------------------------- */</font> 00090 <font class="comment">/* Read a directory (cpl_dir.c) */</font> 00091 <font class="comment">/* -------------------------------------------------------------------- */</font> 00092 <font class="keywordtype">char</font> CPL_DLL **<a class="code" href="cpl_conv_h.html#a9">CPLReadDir</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> *pszPath ); 00093 00094 <font class="comment">/* -------------------------------------------------------------------- */</font> 00095 <font class="comment">/* Filename handling functions. */</font> 00096 <font class="comment">/* -------------------------------------------------------------------- */</font> 00097 <font class="keyword">const</font> <font class="keywordtype">char</font> CPL_DLL *<a class="code" href="cpl_conv_h.html#a10">CPLGetPath</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> * ); 00098 <font class="keyword">const</font> <font class="keywordtype">char</font> CPL_DLL *<a class="code" href="cpl_conv_h.html#a11">CPLGetFilename</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> * ); 00099 <font class="keyword">const</font> <font class="keywordtype">char</font> CPL_DLL *<a class="code" href="cpl_conv_h.html#a12">CPLGetBasename</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> * ); 00100 <font class="keyword">const</font> <font class="keywordtype">char</font> CPL_DLL *<a class="code" href="cpl_conv_h.html#a13">CPLGetExtension</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> * ); 00101 <font class="keyword">const</font> <font class="keywordtype">char</font> CPL_DLL *<a class="code" href="cpl_conv_h.html#a14">CPLFormFilename</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> *pszPath, 00102 <font class="keyword">const</font> <font class="keywordtype">char</font> *pszBasename, 00103 <font class="keyword">const</font> <font class="keywordtype">char</font> *pszExtension ); 00104 <font class="keyword">const</font> <font class="keywordtype">char</font> CPL_DLL *<a class="code" href="cpl_conv_h.html#a15">CPLFormCIFilename</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> *pszPath, 00105 <font class="keyword">const</font> <font class="keywordtype">char</font> *pszBasename, 00106 <font class="keyword">const</font> <font class="keywordtype">char</font> *pszExtension ); 00107 <font class="keyword">const</font> <font class="keywordtype">char</font> CPL_DLL *<a class="code" href="cpl_conv_h.html#a16">CPLResetExtension</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> *, <font class="keyword">const</font> <font class="keywordtype">char</font> * ); 00108 00109 <font class="comment">/* -------------------------------------------------------------------- */</font> 00110 <font class="comment">/* Find File Function */</font> 00111 <font class="comment">/* -------------------------------------------------------------------- */</font> 00112 <font class="keyword">typedef</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *(*CPLFileFinder)(<font class="keyword">const</font> <font class="keywordtype">char</font> *, <font class="keyword">const</font> <font class="keywordtype">char</font> *); 00113 00114 <font class="keyword">const</font> <font class="keywordtype">char</font> CPL_DLL *CPLFindFile(<font class="keyword">const</font> <font class="keywordtype">char</font> *pszClass, 00115 <font class="keyword">const</font> <font class="keywordtype">char</font> *pszBasename); 00116 <font class="keyword">const</font> <font class="keywordtype">char</font> CPL_DLL *CPLDefaultFindFile(<font class="keyword">const</font> <font class="keywordtype">char</font> *pszClass, 00117 <font class="keyword">const</font> <font class="keywordtype">char</font> *pszBasename); 00118 <font class="keywordtype">void</font> CPL_DLL CPLPushFileFinder( CPLFileFinder pfnFinder ); 00119 CPLFileFinder CPL_DLL CPLPopFileFinder(); 00120 <font class="keywordtype">void</font> CPL_DLL CPLPushFinderLocation( <font class="keyword">const</font> <font class="keywordtype">char</font> * ); 00121 <font class="keywordtype">void</font> CPL_DLL CPLPopFinderLocation(); 00122 00123 <font class="comment">/* -------------------------------------------------------------------- */</font> 00124 <font class="comment">/* Safe version of stat() that works properly on stuff like "C:". */</font> 00125 <font class="comment">/* -------------------------------------------------------------------- */</font> 00126 <font class="keywordtype">int</font> CPL_DLL CPLStat( <font class="keyword">const</font> <font class="keywordtype">char</font> *, VSIStatBuf * ); 00127 00128 CPL_C_END 00129 00130 <font class="preprocessor">#endif </font><font class="comment">/* ndef CPL_CONV_H_INCLUDED */</font> </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>