GDAL
cpl_conv.h
Go to the documentation of this file.
1 /******************************************************************************
2  * $Id: cpl_conv.h 34931 2016-08-05 17:13:05Z rouault $
3  *
4  * Project: CPL - Common Portability Library
5  * Purpose: Convenience functions declarations.
6  * This is intended to remain light weight.
7  * Author: Frank Warmerdam, warmerdam@pobox.com
8  *
9  ******************************************************************************
10  * Copyright (c) 1998, Frank Warmerdam
11  * Copyright (c) 2007-2013, Even Rouault <even dot rouault at mines-paris dot org>
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining a
14  * copy of this software and associated documentation files (the "Software"),
15  * to deal in the Software without restriction, including without limitation
16  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17  * and/or sell copies of the Software, and to permit persons to whom the
18  * Software is furnished to do so, subject to the following conditions:
19  *
20  * The above copyright notice and this permission notice shall be included
21  * in all copies or substantial portions of the Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29  * DEALINGS IN THE SOFTWARE.
30  ****************************************************************************/
31 
32 #ifndef CPL_CONV_H_INCLUDED
33 #define CPL_CONV_H_INCLUDED
34 
35 #include "cpl_port.h"
36 #include "cpl_vsi.h"
37 #include "cpl_error.h"
38 
46 /* -------------------------------------------------------------------- */
47 /* Runtime check of various configuration items. */
48 /* -------------------------------------------------------------------- */
50 
52 void CPL_DLL CPLVerifyConfiguration(void);
55 const char CPL_DLL * CPL_STDCALL
56 CPLGetConfigOption( const char *, const char * ) CPL_WARN_UNUSED_RESULT;
57 const char CPL_DLL * CPL_STDCALL
58 CPLGetThreadLocalConfigOption( const char *, const char * ) CPL_WARN_UNUSED_RESULT;
59 void CPL_DLL CPL_STDCALL CPLSetConfigOption( const char *, const char * );
60 void CPL_DLL CPL_STDCALL CPLSetThreadLocalConfigOption( const char *pszKey,
61  const char *pszValue );
63 void CPL_DLL CPL_STDCALL CPLFreeConfig(void);
66 /* -------------------------------------------------------------------- */
67 /* Safe malloc() API. Thin cover over VSI functions with fatal */
68 /* error reporting if memory allocation fails. */
69 /* -------------------------------------------------------------------- */
70 void CPL_DLL *CPLMalloc( size_t ) CPL_WARN_UNUSED_RESULT;
71 void CPL_DLL *CPLCalloc( size_t, size_t ) CPL_WARN_UNUSED_RESULT;
72 void CPL_DLL *CPLRealloc( void *, size_t ) CPL_WARN_UNUSED_RESULT;
73 char CPL_DLL *CPLStrdup( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
74 char CPL_DLL *CPLStrlwr( char *);
75 
77 #define CPLFree VSIFree
78 
79 /* -------------------------------------------------------------------- */
80 /* Read a line from a text file, and strip of CR/LF. */
81 /* -------------------------------------------------------------------- */
82 char CPL_DLL *CPLFGets( char *, int, FILE *);
83 const char CPL_DLL *CPLReadLine( FILE * );
84 const char CPL_DLL *CPLReadLineL( VSILFILE * );
85 #ifdef __cplusplus
86 const char CPL_DLL *CPLReadLine2L( VSILFILE * , int nMaxCols,
87  const char * const * papszOptions );
88 #else
89 const char CPL_DLL *CPLReadLine2L( VSILFILE * , int nMaxCols,
90  char** papszOptions );
91 #endif
92 
93 /* -------------------------------------------------------------------- */
94 /* Convert ASCII string to floating point number */
95 /* (THESE FUNCTIONS ARE NOT LOCALE AWARE!). */
96 /* -------------------------------------------------------------------- */
97 double CPL_DLL CPLAtof(const char *);
98 double CPL_DLL CPLAtofDelim(const char *, char);
99 double CPL_DLL CPLStrtod(const char *, char **);
100 double CPL_DLL CPLStrtodDelim(const char *, char **, char);
101 float CPL_DLL CPLStrtof(const char *, char **);
102 float CPL_DLL CPLStrtofDelim(const char *, char **, char);
103 
104 /* -------------------------------------------------------------------- */
105 /* Convert number to string. This function is locale agnostic */
106 /* (i.e. it will support "," or "." regardless of current locale) */
107 /* -------------------------------------------------------------------- */
108 double CPL_DLL CPLAtofM(const char *);
109 
110 /* -------------------------------------------------------------------- */
111 /* Read a numeric value from an ASCII character string. */
112 /* -------------------------------------------------------------------- */
113 char CPL_DLL *CPLScanString( const char *, int, int, int );
114 double CPL_DLL CPLScanDouble( const char *, int );
115 long CPL_DLL CPLScanLong( const char *, int );
116 unsigned long CPL_DLL CPLScanULong( const char *, int );
117 GUIntBig CPL_DLL CPLScanUIntBig( const char *, int );
118 GIntBig CPL_DLL CPLAtoGIntBig( const char* pszString );
119 GIntBig CPL_DLL CPLAtoGIntBigEx( const char* pszString, int bWarn, int *pbOverflow );
120 void CPL_DLL *CPLScanPointer( const char *, int );
121 
122 /* -------------------------------------------------------------------- */
123 /* Print a value to an ASCII character string. */
124 /* -------------------------------------------------------------------- */
125 int CPL_DLL CPLPrintString( char *, const char *, int );
126 int CPL_DLL CPLPrintStringFill( char *, const char *, int );
127 int CPL_DLL CPLPrintInt32( char *, GInt32 , int );
128 int CPL_DLL CPLPrintUIntBig( char *, GUIntBig , int );
129 int CPL_DLL CPLPrintDouble( char *, const char *, double, const char * );
130 int CPL_DLL CPLPrintTime( char *, int , const char *, const struct tm *,
131  const char * );
132 int CPL_DLL CPLPrintPointer( char *, void *, int );
133 
134 /* -------------------------------------------------------------------- */
135 /* Fetch a function from DLL / so. */
136 /* -------------------------------------------------------------------- */
137 
138 void CPL_DLL *CPLGetSymbol( const char *, const char * );
139 
140 /* -------------------------------------------------------------------- */
141 /* Fetch executable path. */
142 /* -------------------------------------------------------------------- */
143 int CPL_DLL CPLGetExecPath( char *pszPathBuf, int nMaxLength );
144 
145 /* -------------------------------------------------------------------- */
146 /* Filename handling functions. */
147 /* -------------------------------------------------------------------- */
148 const char CPL_DLL *CPLGetPath( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
149 const char CPL_DLL *CPLGetDirname( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
150 const char CPL_DLL *CPLGetFilename( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
151 const char CPL_DLL *CPLGetBasename( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
152 const char CPL_DLL *CPLGetExtension( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
153 char CPL_DLL *CPLGetCurrentDir(void);
154 const char CPL_DLL *CPLFormFilename( const char *pszPath,
155  const char *pszBasename,
156  const char *pszExtension ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
157 const char CPL_DLL *CPLFormCIFilename( const char *pszPath,
158  const char *pszBasename,
159  const char *pszExtension ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
160 const char CPL_DLL *CPLResetExtension( const char *, const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
161 const char CPL_DLL *CPLProjectRelativeFilename( const char *pszProjectDir,
162  const char *pszSecondaryFilename ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
163 int CPL_DLL CPLIsFilenameRelative( const char *pszFilename );
164 const char CPL_DLL *CPLExtractRelativePath(const char *, const char *, int *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
165 const char CPL_DLL *CPLCleanTrailingSlash( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
166 char CPL_DLL **CPLCorrespondingPaths( const char *pszOldFilename,
167  const char *pszNewFilename,
168  char **papszFileList ) CPL_WARN_UNUSED_RESULT;
169 int CPL_DLL CPLCheckForFile( char *pszFilename, char **papszSiblingList );
170 
171 const char CPL_DLL *CPLGenerateTempFilename( const char *pszStem ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
172 
173 /* -------------------------------------------------------------------- */
174 /* Find File Function */
175 /* -------------------------------------------------------------------- */
176 
178 typedef const char *(*CPLFileFinder)(const char *, const char *);
179 
180 const char CPL_DLL *CPLFindFile(const char *pszClass,
181  const char *pszBasename);
182 const char CPL_DLL *CPLDefaultFindFile(const char *pszClass,
183  const char *pszBasename);
184 void CPL_DLL CPLPushFileFinder( CPLFileFinder pfnFinder );
185 CPLFileFinder CPL_DLL CPLPopFileFinder(void);
186 void CPL_DLL CPLPushFinderLocation( const char * );
187 void CPL_DLL CPLPopFinderLocation(void);
188 void CPL_DLL CPLFinderClean(void);
189 
190 /* -------------------------------------------------------------------- */
191 /* Safe version of stat() that works properly on stuff like "C:". */
192 /* -------------------------------------------------------------------- */
193 int CPL_DLL CPLStat( const char *, VSIStatBuf * ) CPL_WARN_UNUSED_RESULT;
194 
195 /* -------------------------------------------------------------------- */
196 /* Reference counted file handle manager. Makes sharing file */
197 /* handles more practical. */
198 /* -------------------------------------------------------------------- */
199 
201 typedef struct {
202  FILE *fp;
203  int nRefCount;
204  int bLarge;
205  char *pszFilename;
206  char *pszAccess;
208 
209 FILE CPL_DLL *CPLOpenShared( const char *, const char *, int );
210 void CPL_DLL CPLCloseShared( FILE * );
211 CPLSharedFileInfo CPL_DLL *CPLGetSharedList( int * );
212 void CPL_DLL CPLDumpSharedList( FILE * );
214 void CPL_DLL CPLCleanupSharedFileMutex( void );
217 /* -------------------------------------------------------------------- */
218 /* DMS to Dec to DMS conversion. */
219 /* -------------------------------------------------------------------- */
220 double CPL_DLL CPLDMSToDec( const char *is );
221 const char CPL_DLL *CPLDecToDMS( double dfAngle, const char * pszAxis,
222  int nPrecision );
223 double CPL_DLL CPLPackedDMSToDec( double );
224 double CPL_DLL CPLDecToPackedDMS( double dfDec );
225 
226 void CPL_DLL CPLStringToComplex( const char *pszString,
227  double *pdfReal, double *pdfImag );
228 
229 /* -------------------------------------------------------------------- */
230 /* Misc other functions. */
231 /* -------------------------------------------------------------------- */
232 int CPL_DLL CPLUnlinkTree( const char * );
233 int CPL_DLL CPLCopyFile( const char *pszNewPath, const char *pszOldPath );
234 int CPL_DLL CPLCopyTree( const char *pszNewPath, const char *pszOldPath );
235 int CPL_DLL CPLMoveFile( const char *pszNewPath, const char *pszOldPath );
236 int CPL_DLL CPLSymlink( const char* pszOldPath, const char* pszNewPath, char** papszOptions );
237 
238 /* -------------------------------------------------------------------- */
239 /* ZIP Creation. */
240 /* -------------------------------------------------------------------- */
241 
243 #define CPL_ZIP_API_OFFERED
244 
245 void CPL_DLL *CPLCreateZip( const char *pszZipFilename, char **papszOptions );
246 CPLErr CPL_DLL CPLCreateFileInZip( void *hZip, const char *pszFilename,
247  char **papszOptions );
248 CPLErr CPL_DLL CPLWriteFileInZip( void *hZip, const void *pBuffer, int nBufferSize );
249 CPLErr CPL_DLL CPLCloseFileInZip( void *hZip );
250 CPLErr CPL_DLL CPLCloseZip( void *hZip );
251 
252 /* -------------------------------------------------------------------- */
253 /* ZLib compression */
254 /* -------------------------------------------------------------------- */
255 
256 void CPL_DLL *CPLZLibDeflate( const void* ptr, size_t nBytes, int nLevel,
257  void* outptr, size_t nOutAvailableBytes,
258  size_t* pnOutBytes );
259 void CPL_DLL *CPLZLibInflate( const void* ptr, size_t nBytes,
260  void* outptr, size_t nOutAvailableBytes,
261  size_t* pnOutBytes );
262 
263 /* -------------------------------------------------------------------- */
264 /* XML validation. */
265 /* -------------------------------------------------------------------- */
266 int CPL_DLL CPLValidateXML(const char* pszXMLFilename,
267  const char* pszXSDFilename,
268  char** papszOptions);
269 
270 /* -------------------------------------------------------------------- */
271 /* Locale handling. Prevents parallel executions of setlocale(). */
272 /* -------------------------------------------------------------------- */
273 char* CPLsetlocale (int category, const char* locale);
275 void CPLCleanupSetlocaleMutex(void);
278 CPL_C_END
279 
280 /* -------------------------------------------------------------------- */
281 /* C++ object for temporarily forcing a LC_NUMERIC locale to "C". */
282 /* -------------------------------------------------------------------- */
283 
285 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
286 
287 class CPL_DLL CPLLocaleC
288 {
289 public:
290  CPLLocaleC();
291  ~CPLLocaleC();
292 
293 private:
294  char *pszOldLocale;
295 
296  /* Make it non-copyable */
297  CPLLocaleC(const CPLLocaleC&);
298  CPLLocaleC& operator=(const CPLLocaleC&);
299 };
300 
301 // Does the same as CPLLocaleC except that, when available, it tries to
302 // only affect the current thread. But code that would be dependent of
303 // setlocale(LC_NUMERIC, NULL) returning "C", such as current proj.4 versions,
304 // will not work depending on the actual implementation
305 class CPL_DLL CPLThreadLocaleC
306 {
307 public:
308  CPLThreadLocaleC();
309  ~CPLThreadLocaleC();
310 
311 private:
312 #ifdef HAVE_USELOCALE
313  locale_t nNewLocale;
314  locale_t nOldLocale;
315 #else
316 #if defined(_MSC_VER)
317  int nOldValConfigThreadLocale;
318 #endif
319  char *pszOldLocale;
320 #endif
321 
322  /* Make it non-copyable */
323  CPLThreadLocaleC(const CPLThreadLocaleC&);
324  CPLThreadLocaleC& operator=(const CPLThreadLocaleC&);
325 };
326 
327 #endif /* def __cplusplus */
328 
330 #endif /* ndef CPL_CONV_H_INCLUDED */
const char * CPLGetExtension(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Extract filename extension from full filename.
Definition: cpl_path.cpp:345
int CPLIsFilenameRelative(const char *pszFilename)
Is filename relative or absolute?
Definition: cpl_path.cpp:778
const char * CPLCleanTrailingSlash(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Remove trailing forward/backward slash from the path for UNIX/Windows resp.
Definition: cpl_path.cpp:911
int CPLPrintString(char *, const char *, int)
Copy the string pointed to by pszSrc, NOT including the terminating `\0' character, to the array pointed to by pszDest.
Definition: cpl_conv.cpp:1178
int CPLSymlink(const char *pszOldPath, const char *pszNewPath, char **papszOptions)
Create a symbolic link.
Definition: cpl_conv.cpp:2606
void * CPLRealloc(void *, size_t) CPL_WARN_UNUSED_RESULT
Safe version of realloc().
Definition: cpl_conv.cpp:219
double CPLDecToPackedDMS(double dfDec)
Convert decimal degrees into packed DMS value (DDDMMMSSS.SS).
Definition: cpl_conv.cpp:2066
void CPLPopFinderLocation(void)
CPLPopFinderLocation.
Definition: cpl_findfile.cpp:285
Standard C Covers.
const char * CPLGetThreadLocalConfigOption(const char *, const char *) CPL_WARN_UNUSED_RESULT
Same as CPLGetConfigOption() but only with options set with CPLSetThreadLocalConfigOption() ...
Definition: cpl_conv.cpp:1662
void CPLPushFinderLocation(const char *)
CPLPushFinderLocation.
Definition: cpl_findfile.cpp:246
int CPLPrintDouble(char *, const char *, double, const char *)
Print double value into specified string buffer.
Definition: cpl_conv.cpp:1399
const char * CPLGetConfigOption(const char *, const char *) CPL_WARN_UNUSED_RESULT
Get the value of a configuration option.
Definition: cpl_conv.cpp:1624
Core portability definitions for CPL.
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:352
void * CPLMalloc(size_t) CPL_WARN_UNUSED_RESULT
Safe version of malloc().
Definition: cpl_conv.cpp:162
int CPLPrintStringFill(char *, const char *, int)
Copy the string pointed to by pszSrc, NOT including the terminating `\0' character, to the array pointed to by pszDest.
Definition: cpl_conv.cpp:1222
int CPLPrintPointer(char *, void *, int)
Print pointer value into specified string buffer.
Definition: cpl_conv.cpp:1355
int GInt32
Int32 type.
Definition: cpl_port.h:197
double CPLAtof(const char *)
Converts ASCII string to floating point number.
Definition: cpl_strtod.cpp:117
const char * CPLFormFilename(const char *pszPath, const char *pszBasename, const char *pszExtension) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Build a full file path from a passed path, file basename and extension.
Definition: cpl_path.cpp:501
FILE VSILFILE
Opaque type for a FILE that implements the VSIVirtualHandle API.
Definition: cpl_vsi.h:154
void * CPLGetSymbol(const char *, const char *)
Fetch a function pointer from a shared library / DLL.
Definition: cplgetsymbol.cpp:89
CPLErr CPLWriteFileInZip(void *hZip, const void *pBuffer, int nBufferSize)
Write in current file inside a ZIP file.
Definition: cpl_conv.cpp:2848
CPLErr CPLCloseFileInZip(void *hZip)
Close current file inside ZIP file.
Definition: cpl_conv.cpp:2854
void CPLPushFileFinder(CPLFileFinder pfnFinder)
CPLPushFileFinder.
Definition: cpl_findfile.cpp:200
int CPLGetExecPath(char *pszPathBuf, int nMaxLength)
Fetch path of executable.
Definition: cpl_getexecpath.cpp:132
const char * CPLResetExtension(const char *, const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Replace the extension with the provided one.
Definition: cpl_path.cpp:422
char * CPLsetlocale(int category, const char *locale)
Prevents parallel executions of setlocale().
Definition: cpl_conv.cpp:2745
int CPLValidateXML(const char *pszXMLFilename, const char *pszXSDFilename, char **papszOptions)
Validate a XML file against a XML schema.
Definition: cpl_xml_validate.cpp:1073
const char * CPLReadLine(FILE *)
Simplified line reading from text file.
Definition: cpl_conv.cpp:564
void * CPLZLibInflate(const void *ptr, size_t nBytes, void *outptr, size_t nOutAvailableBytes, size_t *pnOutBytes)
Uncompress a buffer compressed with ZLib DEFLATE compression.
Definition: cpl_conv.cpp:2875
float CPLStrtof(const char *, char **)
Converts ASCII string to floating point number.
Definition: cpl_strtod.cpp:397
char * CPLStrlwr(char *)
Convert each characters of the string to lower case.
Definition: cpl_conv.cpp:319
void CPLSetThreadLocalConfigOption(const char *pszKey, const char *pszValue)
Set a configuration option for GDAL/OGR use.
Definition: cpl_conv.cpp:1759
const char *(* CPLFileFinder)(const char *, const char *)
Callback for CPLPushFileFinder.
Definition: cpl_conv.h:178
int bLarge
Whether fp must be interpreted as VSIFILE*.
Definition: cpl_conv.h:204
double CPLStrtodDelim(const char *, char **, char)
Converts ASCII string to floating point number using specified delimiter.
Definition: cpl_strtod.cpp:231
void * CPLCreateZip(const char *pszZipFilename, char **papszOptions)
Create ZIP file.
Definition: cpl_conv.cpp:2833
int CPLUnlinkTree(const char *)
Recursively unlink a directory.
Definition: cpl_conv.cpp:2363
const char * CPLReadLineL(VSILFILE *)
Simplified line reading from text file.
Definition: cpl_conv.cpp:628
CPLSharedFileInfo * CPLGetSharedList(int *)
Fetch list of open shared files.
Definition: cpl_conv.cpp:2303
const char * CPLDecToDMS(double dfAngle, const char *pszAxis, int nPrecision)
Translate a decimal degrees value to a DMS string with hemisphere.
Definition: cpl_conv.cpp:1939
char * CPLStrdup(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Safe version of strdup() function.
Definition: cpl_conv.cpp:286
const char * CPLProjectRelativeFilename(const char *pszProjectDir, const char *pszSecondaryFilename) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Find a file relative to a project file.
Definition: cpl_path.cpp:714
float CPLStrtofDelim(const char *, char **, char)
Converts ASCII string to floating point number using specified delimiter.
Definition: cpl_strtod.cpp:347
void CPLStringToComplex(const char *pszString, double *pdfReal, double *pdfImag)
Fetch the real and imaginary part of a serialized complex number.
Definition: cpl_conv.cpp:2083
int CPLPrintTime(char *, int, const char *, const struct tm *, const char *)
Print specified time value accordingly to the format options and specified locale name...
Definition: cpl_conv.cpp:1457
Information on a shared file.
Definition: cpl_conv.h:201
CPLErr CPLCloseZip(void *hZip)
Close ZIP file.
Definition: cpl_conv.cpp:2860
const char * CPLDefaultFindFile(const char *pszClass, const char *pszBasename)
CPLDefaultFindFile.
Definition: cpl_findfile.cpp:149
const char * CPLFormCIFilename(const char *pszPath, const char *pszBasename, const char *pszExtension) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Case insensitive file searching, returning full path.
Definition: cpl_path.cpp:621
FILE * CPLOpenShared(const char *, const char *, int)
Open a shared file handle.
Definition: cpl_conv.cpp:2145
char * CPLFGets(char *, int, FILE *)
Reads in at most one less than nBufferSize characters from the fp stream and stores them into the buf...
Definition: cpl_conv.cpp:360
int CPLMoveFile(const char *pszNewPath, const char *pszOldPath)
Move a file.
Definition: cpl_conv.cpp:2588
GIntBig CPLAtoGIntBig(const char *pszString)
Convert a string to a 64 bit signed integer.
Definition: cpl_conv.cpp:961
int CPLCheckForFile(char *pszFilename, char **papszSiblingList)
Check for file existence.
Definition: cpl_conv.cpp:2795
CPL error handling services.
const char * CPLGenerateTempFilename(const char *pszStem) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Generate temporary file name.
Definition: cpl_path.cpp:1067
void CPLDumpSharedList(FILE *)
Report open shared files.
Definition: cpl_conv.cpp:2325
CPLFileFinder CPLPopFileFinder(void)
CPLPopFileFinder.
Definition: cpl_findfile.cpp:235
unsigned long CPLScanULong(const char *, int)
Scan up to a maximum number of characters from a string and convert the result to a unsigned long...
Definition: cpl_conv.cpp:899
char * pszAccess
Access mode.
Definition: cpl_conv.h:206
FILE * fp
File pointer.
Definition: cpl_conv.h:202
double CPLDMSToDec(const char *is)
CPLDMSToDec.
Definition: cpl_conv.cpp:1861
const char * CPLFindFile(const char *pszClass, const char *pszBasename)
CPLFindFile.
Definition: cpl_findfile.cpp:177
const char * CPLGetPath(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Extract directory path portion of filename.
Definition: cpl_path.cpp:153
void * CPLScanPointer(const char *, int)
Extract pointer from string.
Definition: cpl_conv.cpp:1063
unsigned long long GUIntBig
Large unsigned integer type (generally 64-bit unsigned integer type).
Definition: cpl_port.h:253
GIntBig CPLAtoGIntBigEx(const char *pszString, int bWarn, int *pbOverflow)
Convert a string to a 64 bit signed integer.
Definition: cpl_conv.cpp:1012
int CPLStat(const char *, VSIStatBuf *) CPL_WARN_UNUSED_RESULT
Same as VSIStat() except it works on "C:" as if it were "C:\".
Definition: cpl_conv.cpp:1811
const char * CPLReadLine2L(VSILFILE *, int nMaxCols, const char *const *papszOptions)
Simplified line reading from text file.
Definition: cpl_conv.cpp:653
double CPLStrtod(const char *, char **)
Converts ASCII string to floating point number.
Definition: cpl_strtod.cpp:321
int nRefCount
Reference counter.
Definition: cpl_conv.h:203
GUIntBig CPLScanUIntBig(const char *, int)
Extract big integer from string.
Definition: cpl_conv.cpp:929
char * CPLGetCurrentDir(void)
Get the current working directory name.
Definition: cpl_path.cpp:387
int CPLPrintInt32(char *, GInt32, int)
Print GInt32 value into specified string buffer.
Definition: cpl_conv.cpp:1266
void CPLSetConfigOption(const char *, const char *)
Set a configuration option for GDAL/OGR use.
Definition: cpl_conv.cpp:1714
double CPLScanDouble(const char *, int)
Extract double from string.
Definition: cpl_conv.cpp:1126
char ** CPLCorrespondingPaths(const char *pszOldFilename, const char *pszNewFilename, char **papszFileList) CPL_WARN_UNUSED_RESULT
Identify corresponding paths.
Definition: cpl_path.cpp:962
long CPLScanLong(const char *, int)
Scan up to a maximum number of characters from a string and convert the result to a long...
Definition: cpl_conv.cpp:871
#define CPL_RETURNS_NONNULL
Qualifier for a function that does not return NULL.
Definition: cpl_port.h:1025
void * CPLCalloc(size_t, size_t) CPL_WARN_UNUSED_RESULT
Safe version of calloc().
Definition: cpl_conv.cpp:132
void CPLFinderClean(void)
CPLFinderClean.
Definition: cpl_findfile.cpp:134
double CPLAtofM(const char *)
Converts ASCII string to floating point number using any numeric locale.
Definition: cpl_strtod.cpp:142
double CPLAtofDelim(const char *, char)
Converts ASCII string to floating point number.
Definition: cpl_strtod.cpp:73
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:354
int CPLCopyFile(const char *pszNewPath, const char *pszOldPath)
Copy a file.
Definition: cpl_conv.cpp:2448
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:250
int CPLPrintUIntBig(char *, GUIntBig, int)
Print GUIntBig value into specified string buffer.
Definition: cpl_conv.cpp:1305
char * pszFilename
Filename.
Definition: cpl_conv.h:205
double CPLPackedDMSToDec(double)
Convert a packed DMS value (DDDMMMSSS.SS) into decimal degrees.
Definition: cpl_conv.cpp:2032
const char * CPLGetFilename(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Extract non-directory portion of filename.
Definition: cpl_path.cpp:260
void * CPLZLibDeflate(const void *ptr, size_t nBytes, int nLevel, void *outptr, size_t nOutAvailableBytes, size_t *pnOutBytes)
Compress a buffer with ZLib DEFLATE compression.
Definition: cpl_conv.cpp:2866
char * CPLScanString(const char *, int, int, int)
Scan up to a maximum number of characters from a given string, allocate a buffer for a new string and...
Definition: cpl_conv.cpp:817
CPLErr CPLCreateFileInZip(void *hZip, const char *pszFilename, char **papszOptions)
Create a file in a ZIP file.
Definition: cpl_conv.cpp:2841
const char * CPLGetDirname(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Extract directory path portion of filename.
Definition: cpl_path.cpp:208
const char * CPLExtractRelativePath(const char *, const char *, int *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Get relative path from directory to target file.
Definition: cpl_path.cpp:819
CPLErr
Error category.
Definition: cpl_error.h:52
void CPLCloseShared(FILE *)
Close shared file.
Definition: cpl_conv.cpp:2218
int CPLCopyTree(const char *pszNewPath, const char *pszOldPath)
Recursively copy a tree.
Definition: cpl_conv.cpp:2509
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition: cpl_port.h:992
const char * CPLGetBasename(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Extract basename (non-directory, non-extension) portion of filename.
Definition: cpl_path.cpp:292

Generated for GDAL by doxygen 1.8.8.