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
55 const
char CPL_DLL * CPL_STDCALL
56 CPLGetThreadLocalConfigOption( const
char *, const
char * ) CPL_WARN_UNUSED_RESULT;
59 const
char *pszValue );
60 void CPL_DLL CPL_STDCALL CPLFreeConfig(
void);
66 void CPL_DLL *
CPLMalloc(
size_t ) CPL_WARN_UNUSED_RESULT;
67 void CPL_DLL *
CPLCalloc(
size_t,
size_t ) CPL_WARN_UNUSED_RESULT;
68 void CPL_DLL *
CPLRealloc(
void *,
size_t ) CPL_WARN_UNUSED_RESULT;
69 char CPL_DLL *
CPLStrdup( const
char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
72 #define CPLFree VSIFree 77 char CPL_DLL *
CPLFGets(
char *,
int, FILE *);
80 const char CPL_DLL *
CPLReadLine2L( VSILFILE * ,
int nMaxCols,
char** papszOptions);
86 double CPL_DLL
CPLAtof(
const char *);
88 double CPL_DLL
CPLStrtod(
const char *,
char **);
90 float CPL_DLL
CPLStrtof(
const char *,
char **);
97 double CPL_DLL
CPLAtofM(
const char *);
105 unsigned long CPL_DLL
CPLScanULong(
const char *,
int );
108 GIntBig CPL_DLL
CPLAtoGIntBigEx(
const char* pszString,
int bWarn,
int *pbOverflow );
118 int CPL_DLL
CPLPrintDouble(
char *,
const char *,
double,
const char * );
119 int CPL_DLL
CPLPrintTime(
char *,
int ,
const char *,
const struct tm *,
127 void CPL_DLL *
CPLGetSymbol(
const char *,
const char * );
132 int CPL_DLL CPLGetExecPath(
char *pszPathBuf,
int nMaxLength );
137 const char CPL_DLL *
CPLGetPath(
const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
138 const
char CPL_DLL *
CPLGetDirname( const
char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
139 const
char CPL_DLL *
CPLGetFilename( const
char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
140 const
char CPL_DLL *
CPLGetBasename( const
char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
141 const
char CPL_DLL *
CPLGetExtension( const
char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
144 const
char *pszBasename,
145 const
char *pszExtension ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
147 const
char *pszBasename,
148 const
char *pszExtension ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
149 const
char CPL_DLL *
CPLResetExtension( const
char *, const
char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
151 const
char *pszSecondaryFilename ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
153 const
char CPL_DLL *
CPLExtractRelativePath(const
char *, const
char *,
int *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
154 const
char CPL_DLL *
CPLCleanTrailingSlash( const
char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
156 const
char *pszNewFilename,
157 char **papszFileList ) CPL_WARN_UNUSED_RESULT;
158 int CPL_DLL
CPLCheckForFile(
char *pszFilename,
char **papszSiblingList );
165 typedef const
char *(*CPLFileFinder)(const
char *, const
char *);
167 const
char CPL_DLL *CPLFindFile(const
char *pszClass,
168 const
char *pszBasename);
169 const
char CPL_DLL *CPLDefaultFindFile(const
char *pszClass,
170 const
char *pszBasename);
171 void CPL_DLL CPLPushFileFinder( CPLFileFinder pfnFinder );
172 CPLFileFinder CPL_DLL CPLPopFileFinder(
void);
173 void CPL_DLL CPLPushFinderLocation( const
char * );
174 void CPL_DLL CPLPopFinderLocation(
void);
175 void CPL_DLL CPLFinderClean(
void);
180 int CPL_DLL CPLStat( const
char *, VSIStatBuf * ) CPL_WARN_UNUSED_RESULT;
194 FILE CPL_DLL *
CPLOpenShared(
const char *,
const char *,
int );
198 void CPL_DLL CPLCleanupSharedFileMutex(
void );
203 double CPL_DLL CPLDMSToDec(
const char *is );
204 const char CPL_DLL *CPLDecToDMS(
double dfAngle,
const char * pszAxis,
209 void CPL_DLL CPLStringToComplex(
const char *pszString,
210 double *pdfReal,
double *pdfImag );
216 int CPL_DLL CPLCopyFile(
const char *pszNewPath,
const char *pszOldPath );
217 int CPL_DLL CPLCopyTree(
const char *pszNewPath,
const char *pszOldPath );
218 int CPL_DLL CPLMoveFile(
const char *pszNewPath,
const char *pszOldPath );
219 int CPL_DLL CPLSymlink(
const char* pszOldPath,
const char* pszNewPath,
char** papszOptions );
224 #define CPL_ZIP_API_OFFERED 225 void CPL_DLL *CPLCreateZip(
const char *pszZipFilename,
char **papszOptions );
226 CPLErr CPL_DLL CPLCreateFileInZip(
void *hZip,
const char *pszFilename,
227 char **papszOptions );
228 CPLErr CPL_DLL CPLWriteFileInZip(
void *hZip,
const void *pBuffer,
int nBufferSize );
229 CPLErr CPL_DLL CPLCloseFileInZip(
void *hZip );
230 CPLErr CPL_DLL CPLCloseZip(
void *hZip );
236 void CPL_DLL *CPLZLibDeflate(
const void* ptr,
size_t nBytes,
int nLevel,
237 void* outptr,
size_t nOutAvailableBytes,
238 size_t* pnOutBytes );
240 void* outptr,
size_t nOutAvailableBytes,
241 size_t* pnOutBytes );
246 int CPL_DLL CPLValidateXML(
const char* pszXMLFilename,
247 const char* pszXSDFilename,
248 char** papszOptions);
254 void CPLCleanupSetlocaleMutex(
void);
262 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) 264 class CPL_DLL CPLLocaleC
274 CPLLocaleC(
const CPLLocaleC&);
275 CPLLocaleC& operator=(
const CPLLocaleC&);
282 class CPL_DLL CPLThreadLocaleC
289 #ifdef HAVE_USELOCALE 293 #if defined(_MSC_VER) 294 int nOldValConfigThreadLocale;
300 CPLThreadLocaleC(
const CPLThreadLocaleC&);
301 CPLThreadLocaleC& operator=(
const CPLThreadLocaleC&);
double CPL_DLL CPLAtofM(const char *)
Definition: cpl_strtod.cpp:138
double CPL_DLL CPLStrtod(const char *, char **)
Definition: cpl_strtod.cpp:317
int CPL_DLL CPLPrintString(char *, const char *, int)
Definition: cpl_conv.cpp:1154
GUIntBig CPL_DLL CPLScanUIntBig(const char *, int)
Definition: cpl_conv.cpp:905
const char CPL_DLL * CPLFormFilename(const char *pszPath, const char *pszBasename, const char *pszExtension) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Definition: cpl_path.cpp:488
int CPL_DLL CPLPrintInt32(char *, GInt32, int)
Definition: cpl_conv.cpp:1242
const char CPL_DLL * CPLResetExtension(const char *, const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Definition: cpl_path.cpp:409
int CPL_DLL CPLPrintTime(char *, int, const char *, const struct tm *, const char *)
Definition: cpl_conv.cpp:1439
unsigned long CPL_DLL CPLScanULong(const char *, int)
Definition: cpl_conv.cpp:875
GIntBig CPL_DLL CPLAtoGIntBigEx(const char *pszString, int bWarn, int *pbOverflow)
Definition: cpl_conv.cpp:988
char CPL_DLL * CPLStrdup(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Definition: cpl_conv.cpp:261
CPLSharedFileInfo CPL_DLL * CPLGetSharedList(int *)
Definition: cpl_conv.cpp:2280
char * CPLsetlocale(int category, const char *locale)
Definition: cpl_conv.cpp:2717
const char CPL_DLL * CPLReadLine(FILE *)
Definition: cpl_conv.cpp:539
double CPL_DLL CPLDecToPackedDMS(double dfDec)
Definition: cpl_conv.cpp:2043
int CPL_DLL CPLPrintDouble(char *, const char *, double, const char *)
Definition: cpl_conv.cpp:1381
double CPL_DLL CPLScanDouble(const char *, int)
Definition: cpl_conv.cpp:1102
const char CPL_DLL * CPLGetFilename(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Definition: cpl_path.cpp:245
void CPL_DLL CPL_STDCALL CPLSetThreadLocalConfigOption(const char *pszKey, const char *pszValue)
Definition: cpl_conv.cpp:1737
GIntBig CPL_DLL CPLAtoGIntBig(const char *pszString)
Definition: cpl_conv.cpp:937
double CPL_DLL CPLAtofDelim(const char *, char)
Definition: cpl_strtod.cpp:71
const char CPL_DLL * CPLReadLineL(VSILFILE *)
Definition: cpl_conv.cpp:604
char CPL_DLL * CPLStrlwr(char *)
Definition: cpl_conv.cpp:294
void CPL_DLL CPL_STDCALL CPLSetConfigOption(const char *, const char *)
Definition: cpl_conv.cpp:1692
FILE CPL_DLL * CPLOpenShared(const char *, const char *, int)
Definition: cpl_conv.cpp:2121
char CPL_DLL * CPLScanString(const char *, int, int, int)
Definition: cpl_conv.cpp:792
const char CPL_DLL * CPLReadLine2L(VSILFILE *, int nMaxCols, char **papszOptions)
Definition: cpl_conv.cpp:629
Definition: cpl_conv.h:186
const char CPL_DLL * CPLGenerateTempFilename(const char *pszStem) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Definition: cpl_path.cpp:1054
char CPL_DLL * CPLFGets(char *, int, FILE *)
Definition: cpl_conv.cpp:335
char CPL_DLL ** CPLCorrespondingPaths(const char *pszOldFilename, const char *pszNewFilename, char **papszFileList) CPL_WARN_UNUSED_RESULT
Definition: cpl_path.cpp:946
const char CPL_DLL * CPLCleanTrailingSlash(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Definition: cpl_path.cpp:895
char CPL_DLL * CPLGetCurrentDir(void)
Definition: cpl_path.cpp:372
void CPL_DLL * CPLMalloc(size_t) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:136
int CPL_DLL CPLPrintUIntBig(char *, GUIntBig, int)
Definition: cpl_conv.cpp:1281
const char CPL_DLL * CPLGetExtension(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Definition: cpl_path.cpp:331
double CPL_DLL CPLAtof(const char *)
Definition: cpl_strtod.cpp:113
int CPL_DLL CPLPrintPointer(char *, void *, int)
Definition: cpl_conv.cpp:1332
int CPL_DLL CPLPrintStringFill(char *, const char *, int)
Definition: cpl_conv.cpp:1198
const char CPL_DLL * CPLExtractRelativePath(const char *, const char *, int *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Definition: cpl_path.cpp:803
void CPL_DLL CPLDumpSharedList(FILE *)
Definition: cpl_conv.cpp:2302
const char CPL_DLL *CPL_STDCALL CPLGetConfigOption(const char *, const char *) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:1604
const char CPL_DLL * CPLGetDirname(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Definition: cpl_path.cpp:193
void CPL_DLL * CPLRealloc(void *, size_t) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:194
float CPL_DLL CPLStrtofDelim(const char *, char **, char)
Definition: cpl_strtod.cpp:343
const char CPL_DLL * CPLGetBasename(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Definition: cpl_path.cpp:277
const char CPL_DLL * CPLProjectRelativeFilename(const char *pszProjectDir, const char *pszSecondaryFilename) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Definition: cpl_path.cpp:699
float CPL_DLL CPLStrtof(const char *, char **)
Definition: cpl_strtod.cpp:393
long CPL_DLL CPLScanLong(const char *, int)
Definition: cpl_conv.cpp:846
double CPL_DLL CPLStrtodDelim(const char *, char **, char)
Definition: cpl_strtod.cpp:227
const char CPL_DLL * CPLGetPath(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Definition: cpl_path.cpp:138
int CPL_DLL CPLUnlinkTree(const char *)
Definition: cpl_conv.cpp:2339
int CPL_DLL CPLCheckForFile(char *pszFilename, char **papszSiblingList)
Definition: cpl_conv.cpp:2768
void CPL_DLL * CPLCalloc(size_t, size_t) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:106
void CPL_DLL * CPLScanPointer(const char *, int)
Definition: cpl_conv.cpp:1039
const char CPL_DLL * CPLFormCIFilename(const char *pszPath, const char *pszBasename, const char *pszExtension) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL
Definition: cpl_path.cpp:605
void CPL_DLL CPLCloseShared(FILE *)
Definition: cpl_conv.cpp:2194
double CPL_DLL CPLPackedDMSToDec(double)
Definition: cpl_conv.cpp:2009
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:2848
int CPL_DLL CPLIsFilenameRelative(const char *pszFilename)
Definition: cpl_path.cpp:762
void CPL_DLL * CPLGetSymbol(const char *, const char *)
Definition: cplgetsymbol.cpp:84