32 #ifndef CPL_CONV_H_INCLUDED 33 #define CPL_CONV_H_INCLUDED 51 void CPL_DLL CPLVerifyConfiguration(
void);
53 const char CPL_DLL * CPL_STDCALL
57 const
char *pszValue );
58 void CPL_DLL CPL_STDCALL CPLFreeConfig(
void);
64 void CPL_DLL *
CPLMalloc(
size_t ) CPL_WARN_UNUSED_RESULT;
65 void CPL_DLL *
CPLCalloc(
size_t,
size_t ) CPL_WARN_UNUSED_RESULT;
66 void CPL_DLL *
CPLRealloc(
void *,
size_t ) CPL_WARN_UNUSED_RESULT;
67 char CPL_DLL *
CPLStrdup( const
char * ) CPL_WARN_UNUSED_RESULT;
70 #define CPLFree VSIFree 75 char CPL_DLL *
CPLFGets(
char *,
int, FILE *);
78 const char CPL_DLL *
CPLReadLine2L( VSILFILE * ,
int nMaxCols,
char** papszOptions);
84 double CPL_DLL
CPLAtof(
const char *);
86 double CPL_DLL
CPLStrtod(
const char *,
char **);
88 float CPL_DLL
CPLStrtof(
const char *,
char **);
95 double CPL_DLL
CPLAtofM(
const char *);
103 unsigned long CPL_DLL
CPLScanULong(
const char *,
int );
106 GIntBig CPL_DLL
CPLAtoGIntBigEx(
const char* pszString,
int bWarn,
int *pbOverflow );
116 int CPL_DLL CPLPrintDouble(
char *,
const char *,
double,
const char * );
117 int CPL_DLL
CPLPrintTime(
char *,
int ,
const char *,
const struct tm *,
125 void CPL_DLL *
CPLGetSymbol(
const char *,
const char * );
130 int CPL_DLL CPLGetExecPath(
char *pszPathBuf,
int nMaxLength );
135 const char CPL_DLL *
CPLGetPath(
const char * );
142 const char *pszBasename,
143 const char *pszExtension );
145 const char *pszBasename,
146 const char *pszExtension );
149 const char *pszSecondaryFilename );
154 const char *pszNewFilename,
155 char **papszFileList );
156 int CPL_DLL
CPLCheckForFile(
char *pszFilename,
char **papszSiblingList );
163 typedef const char *(*CPLFileFinder)(
const char *,
const char *);
165 const char CPL_DLL *CPLFindFile(
const char *pszClass,
166 const char *pszBasename);
167 const char CPL_DLL *CPLDefaultFindFile(
const char *pszClass,
168 const char *pszBasename);
169 void CPL_DLL CPLPushFileFinder( CPLFileFinder pfnFinder );
170 CPLFileFinder CPL_DLL CPLPopFileFinder(
void);
171 void CPL_DLL CPLPushFinderLocation(
const char * );
172 void CPL_DLL CPLPopFinderLocation(
void);
173 void CPL_DLL CPLFinderClean(
void);
178 int CPL_DLL CPLStat(
const char *, VSIStatBuf * );
192 FILE CPL_DLL *
CPLOpenShared(
const char *,
const char *,
int );
196 void CPL_DLL CPLCleanupSharedFileMutex(
void );
201 double CPL_DLL CPLDMSToDec(
const char *is );
202 const char CPL_DLL *CPLDecToDMS(
double dfAngle,
const char * pszAxis,
207 void CPL_DLL CPLStringToComplex(
const char *pszString,
208 double *pdfReal,
double *pdfImag );
214 int CPL_DLL CPLCopyFile(
const char *pszNewPath,
const char *pszOldPath );
215 int CPL_DLL CPLCopyTree(
const char *pszNewPath,
const char *pszOldPath );
216 int CPL_DLL CPLMoveFile(
const char *pszNewPath,
const char *pszOldPath );
221 #define CPL_ZIP_API_OFFERED 222 void CPL_DLL *CPLCreateZip(
const char *pszZipFilename,
char **papszOptions );
223 CPLErr CPL_DLL CPLCreateFileInZip(
void *hZip,
const char *pszFilename,
224 char **papszOptions );
225 CPLErr CPL_DLL CPLWriteFileInZip(
void *hZip,
const void *pBuffer,
int nBufferSize );
226 CPLErr CPL_DLL CPLCloseFileInZip(
void *hZip );
227 CPLErr CPL_DLL CPLCloseZip(
void *hZip );
233 void CPL_DLL *CPLZLibDeflate(
const void* ptr,
size_t nBytes,
int nLevel,
234 void* outptr,
size_t nOutAvailableBytes,
235 size_t* pnOutBytes );
237 void* outptr,
size_t nOutAvailableBytes,
238 size_t* pnOutBytes );
243 int CPL_DLL CPLValidateXML(
const char* pszXMLFilename,
244 const char* pszXSDFilename,
245 char** papszOptions);
251 void CPLCleanupSetlocaleMutex(
void);
259 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) 261 class CPL_DLL CPLLocaleC
271 CPLLocaleC(CPLLocaleC&);
272 CPLLocaleC& operator=(CPLLocaleC&);
double CPL_DLL CPLAtofM(const char *)
Definition: cpl_strtod.cpp:170
double CPL_DLL CPLStrtod(const char *, char **)
Definition: cpl_strtod.cpp:349
int CPL_DLL CPLPrintString(char *, const char *, int)
Definition: cpl_conv.cpp:1153
GUIntBig CPL_DLL CPLScanUIntBig(const char *, int)
Definition: cpl_conv.cpp:905
const char CPL_DLL * CPLProjectRelativeFilename(const char *pszProjectDir, const char *pszSecondaryFilename)
Definition: cpl_path.cpp:630
int CPL_DLL CPLPrintInt32(char *, GInt32, int)
Definition: cpl_conv.cpp:1242
int CPL_DLL CPLPrintTime(char *, int, const char *, const struct tm *, const char *)
Definition: cpl_conv.cpp:1436
const char CPL_DLL * CPLGetPath(const char *)
Definition: cpl_path.cpp:129
const char CPL_DLL * CPLFormCIFilename(const char *pszPath, const char *pszBasename, const char *pszExtension)
Definition: cpl_path.cpp:535
unsigned long CPL_DLL CPLScanULong(const char *, int)
Definition: cpl_conv.cpp:865
GIntBig CPL_DLL CPLAtoGIntBigEx(const char *pszString, int bWarn, int *pbOverflow)
Definition: cpl_conv.cpp:986
const char CPL_DLL * CPLGetDirname(const char *)
Definition: cpl_path.cpp:182
CPLSharedFileInfo CPL_DLL * CPLGetSharedList(int *)
Definition: cpl_conv.cpp:2244
char * CPLsetlocale(int category, const char *locale)
Definition: cpl_conv.cpp:2615
const char CPL_DLL * CPLGetBasename(const char *)
Definition: cpl_path.cpp:263
const char CPL_DLL * CPLReadLine(FILE *)
Definition: cpl_conv.cpp:519
double CPL_DLL CPLDecToPackedDMS(double dfDec)
Definition: cpl_conv.cpp:2011
double CPL_DLL CPLScanDouble(const char *, int)
Definition: cpl_conv.cpp:1106
void CPL_DLL CPL_STDCALL CPLSetThreadLocalConfigOption(const char *pszKey, const char *pszValue)
Definition: cpl_conv.cpp:1716
GIntBig CPL_DLL CPLAtoGIntBig(const char *pszString)
Definition: cpl_conv.cpp:943
char CPL_DLL * CPLStrdup(const char *) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:248
double CPL_DLL CPLAtofDelim(const char *, char)
Definition: cpl_strtod.cpp:103
const char CPL_DLL * CPLReadLineL(VSILFILE *)
Definition: cpl_conv.cpp:584
char CPL_DLL * CPLStrlwr(char *)
Definition: cpl_conv.cpp:283
const char CPL_DLL * CPLFormFilename(const char *pszPath, const char *pszBasename, const char *pszExtension)
Definition: cpl_path.cpp:460
void CPL_DLL CPL_STDCALL CPLSetConfigOption(const char *, const char *)
Definition: cpl_conv.cpp:1671
FILE CPL_DLL * CPLOpenShared(const char *, const char *, int)
Definition: cpl_conv.cpp:2089
const char CPL_DLL * CPLGenerateTempFilename(const char *pszStem)
Definition: cpl_path.cpp:980
char CPL_DLL * CPLScanString(const char *, int, int, int)
Definition: cpl_conv.cpp:770
const char CPL_DLL * CPLReadLine2L(VSILFILE *, int nMaxCols, char **papszOptions)
Definition: cpl_conv.cpp:609
Definition: cpl_conv.h:184
char CPL_DLL * CPLFGets(char *, int, FILE *)
Definition: cpl_conv.cpp:324
char CPL_DLL * CPLGetCurrentDir(void)
Definition: cpl_path.cpp:348
void CPL_DLL * CPLMalloc(size_t) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:119
int CPL_DLL CPLPrintUIntBig(char *, GUIntBig, int)
Definition: cpl_conv.cpp:1281
const char CPL_DLL * CPLGetExtension(const char *)
Definition: cpl_path.cpp:313
double CPL_DLL CPLAtof(const char *)
Definition: cpl_strtod.cpp:145
int CPL_DLL CPLPrintPointer(char *, void *, int)
Definition: cpl_conv.cpp:1323
int CPL_DLL CPLPrintStringFill(char *, const char *, int)
Definition: cpl_conv.cpp:1197
char CPL_DLL ** CPLCorrespondingPaths(const char *pszOldFilename, const char *pszNewFilename, char **papszFileList)
Definition: cpl_path.cpp:870
void CPL_DLL CPLDumpSharedList(FILE *)
Definition: cpl_conv.cpp:2266
const char CPL_DLL *CPL_STDCALL CPLGetConfigOption(const char *, const char *) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:1609
void CPL_DLL * CPLRealloc(void *, size_t) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:182
const char CPL_DLL * CPLExtractRelativePath(const char *, const char *, int *)
Definition: cpl_path.cpp:727
const char CPL_DLL * CPLGetFilename(const char *)
Definition: cpl_path.cpp:231
float CPL_DLL CPLStrtofDelim(const char *, char **, char)
Definition: cpl_strtod.cpp:375
const char CPL_DLL * CPLCleanTrailingSlash(const char *)
Definition: cpl_path.cpp:821
float CPL_DLL CPLStrtof(const char *, char **)
Definition: cpl_strtod.cpp:430
long CPL_DLL CPLScanLong(const char *, int)
Definition: cpl_conv.cpp:826
double CPL_DLL CPLStrtodDelim(const char *, char **, char)
Definition: cpl_strtod.cpp:259
int CPL_DLL CPLUnlinkTree(const char *)
Definition: cpl_conv.cpp:2305
int CPL_DLL CPLCheckForFile(char *pszFilename, char **papszSiblingList)
Definition: cpl_conv.cpp:2663
void CPL_DLL * CPLCalloc(size_t, size_t) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:87
void CPL_DLL * CPLScanPointer(const char *, int)
Definition: cpl_conv.cpp:1038
void CPL_DLL CPLCloseShared(FILE *)
Definition: cpl_conv.cpp:2164
double CPL_DLL CPLPackedDMSToDec(double)
Definition: cpl_conv.cpp:1975
const char CPL_DLL * CPLResetExtension(const char *, const char *)
Definition: cpl_path.cpp:388
void CPL_DLL * 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:2744
int CPL_DLL CPLIsFilenameRelative(const char *pszFilename)
Definition: cpl_path.cpp:687
void CPL_DLL * CPLGetSymbol(const char *, const char *)
Definition: cplgetsymbol.cpp:84