EVOLUTION-MANAGER
Edit File: cpl__conv_8h.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.5"/> <title>SDTS_AL: cpl_conv.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">SDTS_AL </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.5 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_651562d8bf6cfd3e81eff5b570d7df50.html">port</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#nested-classes">Classes</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">cpl_conv.h File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include "<a class="el" href="cpl__port_8h_source.html">cpl_port.h</a>"</code><br/> <code>#include "<a class="el" href="cpl__vsi_8h_source.html">cpl_vsi.h</a>"</code><br/> <code>#include "<a class="el" href="cpl__error_8h_source.html">cpl_error.h</a>"</code><br/> </div> <p><a href="cpl__conv_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Classes</h2></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structCPLSharedFileInfo.html">CPLSharedFileInfo</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:a9dae8658256f2bad583fc27d8c707d29"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL *CPL_STDCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a9dae8658256f2bad583fc27d8c707d29">CPLGetConfigOption</a> (const char *, const char *) CPL_WARN_UNUSED_RESULT</td></tr> <tr class="separator:a9dae8658256f2bad583fc27d8c707d29"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2f9fe89aa77782c5a7b6847656f9e2f0"><td class="memItemLeft" align="right" valign="top">void CPL_DLL CPL_STDCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a2f9fe89aa77782c5a7b6847656f9e2f0">CPLSetConfigOption</a> (const char *, const char *)</td></tr> <tr class="separator:a2f9fe89aa77782c5a7b6847656f9e2f0"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae6826aa74d0b5cc9253f55ffb6b798c1"><td class="memItemLeft" align="right" valign="top">void CPL_DLL CPL_STDCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#ae6826aa74d0b5cc9253f55ffb6b798c1">CPLSetThreadLocalConfigOption</a> (const char *pszKey, const char *pszValue)</td></tr> <tr class="separator:ae6826aa74d0b5cc9253f55ffb6b798c1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aaa9cc4f20fb562f75be86ca3ed220247"><td class="memItemLeft" align="right" valign="top">void CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#aaa9cc4f20fb562f75be86ca3ed220247">CPLMalloc</a> (size_t) CPL_WARN_UNUSED_RESULT</td></tr> <tr class="separator:aaa9cc4f20fb562f75be86ca3ed220247"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a45813ba9f10a9a9769adc22ec13374f2"><td class="memItemLeft" align="right" valign="top">void CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a45813ba9f10a9a9769adc22ec13374f2">CPLCalloc</a> (size_t, size_t) CPL_WARN_UNUSED_RESULT</td></tr> <tr class="separator:a45813ba9f10a9a9769adc22ec13374f2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a859bfed0320b2f68cb5348c2c6e44c44"><td class="memItemLeft" align="right" valign="top">void CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a859bfed0320b2f68cb5348c2c6e44c44">CPLRealloc</a> (void *, size_t) CPL_WARN_UNUSED_RESULT</td></tr> <tr class="separator:a859bfed0320b2f68cb5348c2c6e44c44"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac8a3b50574d007821df262dcf56a1b45"><td class="memItemLeft" align="right" valign="top">char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#ac8a3b50574d007821df262dcf56a1b45">CPLStrdup</a> (const char *) CPL_WARN_UNUSED_RESULT</td></tr> <tr class="separator:ac8a3b50574d007821df262dcf56a1b45"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aee03824a3cc31f5c7af705ad1c06d8b3"><td class="memItemLeft" align="right" valign="top">char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#aee03824a3cc31f5c7af705ad1c06d8b3">CPLStrlwr</a> (char *)</td></tr> <tr class="separator:aee03824a3cc31f5c7af705ad1c06d8b3"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a41845388ae3945f54991e3c7497939e1"><td class="memItemLeft" align="right" valign="top">char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a41845388ae3945f54991e3c7497939e1">CPLFGets</a> (char *, int, FILE *)</td></tr> <tr class="separator:a41845388ae3945f54991e3c7497939e1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a0202438ad0f9f8d260d5fb8a1834e277"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a0202438ad0f9f8d260d5fb8a1834e277">CPLReadLine</a> (FILE *)</td></tr> <tr class="separator:a0202438ad0f9f8d260d5fb8a1834e277"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab38aa2bd6fad1221d899a74ff45b33f2"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#ab38aa2bd6fad1221d899a74ff45b33f2">CPLReadLineL</a> (VSILFILE *)</td></tr> <tr class="separator:ab38aa2bd6fad1221d899a74ff45b33f2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af32c79f087303ae96c422467b705cb34"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#af32c79f087303ae96c422467b705cb34">CPLReadLine2L</a> (VSILFILE *, int nMaxCols, char **papszOptions)</td></tr> <tr class="separator:af32c79f087303ae96c422467b705cb34"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad111b85b1f3a9f2bf848cfc625cbdc05"><td class="memItemLeft" align="right" valign="top">double CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#ad111b85b1f3a9f2bf848cfc625cbdc05">CPLAtof</a> (const char *)</td></tr> <tr class="separator:ad111b85b1f3a9f2bf848cfc625cbdc05"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab7a009dd445bb6211584c81b33cc2bb9"><td class="memItemLeft" align="right" valign="top">double CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#ab7a009dd445bb6211584c81b33cc2bb9">CPLAtofDelim</a> (const char *, char)</td></tr> <tr class="separator:ab7a009dd445bb6211584c81b33cc2bb9"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab2a75cb4f9695cd8ecc67668b45cf960"><td class="memItemLeft" align="right" valign="top">double CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#ab2a75cb4f9695cd8ecc67668b45cf960">CPLStrtod</a> (const char *, char **)</td></tr> <tr class="separator:ab2a75cb4f9695cd8ecc67668b45cf960"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6b08477feabba39c6ddf9962d3c6ed0a"><td class="memItemLeft" align="right" valign="top">double CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a6b08477feabba39c6ddf9962d3c6ed0a">CPLStrtodDelim</a> (const char *, char **, char)</td></tr> <tr class="separator:a6b08477feabba39c6ddf9962d3c6ed0a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:adc9e485bcc4465e7ebdf0ac7c6ec4487"><td class="memItemLeft" align="right" valign="top">float CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#adc9e485bcc4465e7ebdf0ac7c6ec4487">CPLStrtof</a> (const char *, char **)</td></tr> <tr class="separator:adc9e485bcc4465e7ebdf0ac7c6ec4487"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6d25e5dc6c14f0216520fba5c7d94707"><td class="memItemLeft" align="right" valign="top">float CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a6d25e5dc6c14f0216520fba5c7d94707">CPLStrtofDelim</a> (const char *, char **, char)</td></tr> <tr class="separator:a6d25e5dc6c14f0216520fba5c7d94707"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a10dc039c78740b6364675f3d0eabec0e"><td class="memItemLeft" align="right" valign="top">double CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a10dc039c78740b6364675f3d0eabec0e">CPLAtofM</a> (const char *)</td></tr> <tr class="separator:a10dc039c78740b6364675f3d0eabec0e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af61a2ac88007e268ca856c026f7a98ef"><td class="memItemLeft" align="right" valign="top">char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#af61a2ac88007e268ca856c026f7a98ef">CPLScanString</a> (const char *, int, int, int)</td></tr> <tr class="separator:af61a2ac88007e268ca856c026f7a98ef"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3b972410626256ac3ced8ac43f6e4608"><td class="memItemLeft" align="right" valign="top">double CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a3b972410626256ac3ced8ac43f6e4608">CPLScanDouble</a> (const char *, int)</td></tr> <tr class="separator:a3b972410626256ac3ced8ac43f6e4608"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9b459c31663d045216670387e7bd35cd"><td class="memItemLeft" align="right" valign="top">long CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a9b459c31663d045216670387e7bd35cd">CPLScanLong</a> (const char *, int)</td></tr> <tr class="separator:a9b459c31663d045216670387e7bd35cd"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:adb6e3821966f526c4fe71dc1dc78ee93"><td class="memItemLeft" align="right" valign="top">unsigned long CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#adb6e3821966f526c4fe71dc1dc78ee93">CPLScanULong</a> (const char *, int)</td></tr> <tr class="separator:adb6e3821966f526c4fe71dc1dc78ee93"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a488f7d9be4197b2f8e888cc51e602fb5"><td class="memItemLeft" align="right" valign="top">GUIntBig CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a488f7d9be4197b2f8e888cc51e602fb5">CPLScanUIntBig</a> (const char *, int)</td></tr> <tr class="separator:a488f7d9be4197b2f8e888cc51e602fb5"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a80a8c1d28548f84a1704af9d7ce84455"><td class="memItemLeft" align="right" valign="top">void CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a80a8c1d28548f84a1704af9d7ce84455">CPLScanPointer</a> (const char *, int)</td></tr> <tr class="separator:a80a8c1d28548f84a1704af9d7ce84455"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad7c571afb58afd4a4d4d877b2f605f95"><td class="memItemLeft" align="right" valign="top">int CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#ad7c571afb58afd4a4d4d877b2f605f95">CPLPrintString</a> (char *, const char *, int)</td></tr> <tr class="separator:ad7c571afb58afd4a4d4d877b2f605f95"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a08723bfa45a73e5856ac2d97740acf42"><td class="memItemLeft" align="right" valign="top">int CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a08723bfa45a73e5856ac2d97740acf42">CPLPrintStringFill</a> (char *, const char *, int)</td></tr> <tr class="separator:a08723bfa45a73e5856ac2d97740acf42"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a40fa469f70136e695e5d130de5ea396a"><td class="memItemLeft" align="right" valign="top">int CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a40fa469f70136e695e5d130de5ea396a">CPLPrintInt32</a> (char *, GInt32, int)</td></tr> <tr class="separator:a40fa469f70136e695e5d130de5ea396a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a8ea1cd06bc958af6ea693a3145008ac7"><td class="memItemLeft" align="right" valign="top">int CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a8ea1cd06bc958af6ea693a3145008ac7">CPLPrintUIntBig</a> (char *, GUIntBig, int)</td></tr> <tr class="separator:a8ea1cd06bc958af6ea693a3145008ac7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7d65b2cbfa4444c18816f01d13bf0b3f"><td class="memItemLeft" align="right" valign="top">int CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a7d65b2cbfa4444c18816f01d13bf0b3f">CPLPrintDouble</a> (char *, const char *, double, const char *)</td></tr> <tr class="separator:a7d65b2cbfa4444c18816f01d13bf0b3f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a1135cad797264f39c09364da35b82748"><td class="memItemLeft" align="right" valign="top">int CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a1135cad797264f39c09364da35b82748">CPLPrintTime</a> (char *, int, const char *, const struct tm *, const char *)</td></tr> <tr class="separator:a1135cad797264f39c09364da35b82748"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2603dce619cc1d5b4cfc09949eb6f605"><td class="memItemLeft" align="right" valign="top">int CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a2603dce619cc1d5b4cfc09949eb6f605">CPLPrintPointer</a> (char *, void *, int)</td></tr> <tr class="separator:a2603dce619cc1d5b4cfc09949eb6f605"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a8a2b13fc6da8c748e7b0111fc8523ea0"><td class="memItemLeft" align="right" valign="top">void CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a8a2b13fc6da8c748e7b0111fc8523ea0">CPLGetSymbol</a> (const char *, const char *)</td></tr> <tr class="separator:a8a2b13fc6da8c748e7b0111fc8523ea0"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab1b45d3ef191328564f90b0d6ad5a124"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#ab1b45d3ef191328564f90b0d6ad5a124">CPLGetPath</a> (const char *)</td></tr> <tr class="separator:ab1b45d3ef191328564f90b0d6ad5a124"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a04d6a989a67f771ef5a942364430e092"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a04d6a989a67f771ef5a942364430e092">CPLGetDirname</a> (const char *)</td></tr> <tr class="separator:a04d6a989a67f771ef5a942364430e092"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a56f3283147d1d390063a4defed5be0f0"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a56f3283147d1d390063a4defed5be0f0">CPLGetFilename</a> (const char *)</td></tr> <tr class="separator:a56f3283147d1d390063a4defed5be0f0"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:abd20cb16884f11c2d5e9a8aa8d9589bb"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#abd20cb16884f11c2d5e9a8aa8d9589bb">CPLGetBasename</a> (const char *)</td></tr> <tr class="separator:abd20cb16884f11c2d5e9a8aa8d9589bb"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aa4ca34b291e33bae1f0a115022c0c883"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#aa4ca34b291e33bae1f0a115022c0c883">CPLGetExtension</a> (const char *)</td></tr> <tr class="separator:aa4ca34b291e33bae1f0a115022c0c883"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:acd294686b4688f338b824b4d01cf67d0"><td class="memItemLeft" align="right" valign="top">char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#acd294686b4688f338b824b4d01cf67d0">CPLGetCurrentDir</a> (void)</td></tr> <tr class="separator:acd294686b4688f338b824b4d01cf67d0"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a5c87d4a047ba7b91715818188e03879d"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a5c87d4a047ba7b91715818188e03879d">CPLFormFilename</a> (const char *pszPath, const char *pszBasename, const char *pszExtension)</td></tr> <tr class="separator:a5c87d4a047ba7b91715818188e03879d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af74ecf84f9bb448b822841003825e827"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#af74ecf84f9bb448b822841003825e827">CPLFormCIFilename</a> (const char *pszPath, const char *pszBasename, const char *pszExtension)</td></tr> <tr class="separator:af74ecf84f9bb448b822841003825e827"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a8ff285a9f90ba2dc56a9760392792543"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a8ff285a9f90ba2dc56a9760392792543">CPLResetExtension</a> (const char *, const char *)</td></tr> <tr class="separator:a8ff285a9f90ba2dc56a9760392792543"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a0f986cb97eba4dfd95c4725395725045"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a0f986cb97eba4dfd95c4725395725045">CPLProjectRelativeFilename</a> (const char *pszProjectDir, const char *pszSecondaryFilename)</td></tr> <tr class="separator:a0f986cb97eba4dfd95c4725395725045"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9be0b2f019023ef0f2de2c86c3e84472"><td class="memItemLeft" align="right" valign="top">int CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a9be0b2f019023ef0f2de2c86c3e84472">CPLIsFilenameRelative</a> (const char *pszFilename)</td></tr> <tr class="separator:a9be0b2f019023ef0f2de2c86c3e84472"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a1e08cf279ed4ea5638befa89cb8058b3"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a1e08cf279ed4ea5638befa89cb8058b3">CPLExtractRelativePath</a> (const char *, const char *, int *)</td></tr> <tr class="separator:a1e08cf279ed4ea5638befa89cb8058b3"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a1b582ef383eceaadad282ce343503928"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a1b582ef383eceaadad282ce343503928">CPLCleanTrailingSlash</a> (const char *)</td></tr> <tr class="separator:a1b582ef383eceaadad282ce343503928"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:afb7756db0af072aefc8a905a813dea8e"><td class="memItemLeft" align="right" valign="top">char CPL_DLL ** </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#afb7756db0af072aefc8a905a813dea8e">CPLCorrespondingPaths</a> (const char *pszOldFilename, const char *pszNewFilename, char **papszFileList)</td></tr> <tr class="separator:afb7756db0af072aefc8a905a813dea8e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a5ff4348e3035619493230fad6c01e145"><td class="memItemLeft" align="right" valign="top">int CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a5ff4348e3035619493230fad6c01e145">CPLCheckForFile</a> (char *pszFilename, char **papszSiblingList)</td></tr> <tr class="separator:a5ff4348e3035619493230fad6c01e145"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a36444abe87c810a72b14312328201fe2"><td class="memItemLeft" align="right" valign="top">const char CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a36444abe87c810a72b14312328201fe2">CPLGenerateTempFilename</a> (const char *pszStem)</td></tr> <tr class="separator:a36444abe87c810a72b14312328201fe2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a0f4adc3ff7c84eeb7bb435bacad04c22"><td class="memItemLeft" align="right" valign="top">FILE CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a0f4adc3ff7c84eeb7bb435bacad04c22">CPLOpenShared</a> (const char *, const char *, int)</td></tr> <tr class="separator:a0f4adc3ff7c84eeb7bb435bacad04c22"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a19d2fde250077b9d590c58a4788e94ba"><td class="memItemLeft" align="right" valign="top">void CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a19d2fde250077b9d590c58a4788e94ba">CPLCloseShared</a> (FILE *)</td></tr> <tr class="separator:a19d2fde250077b9d590c58a4788e94ba"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae537ad5f113549a8b30dd441bbea728c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structCPLSharedFileInfo.html">CPLSharedFileInfo</a> CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#ae537ad5f113549a8b30dd441bbea728c">CPLGetSharedList</a> (int *)</td></tr> <tr class="separator:ae537ad5f113549a8b30dd441bbea728c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aedca5f7505d22f769f81a2606f961fcd"><td class="memItemLeft" align="right" valign="top">void CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#aedca5f7505d22f769f81a2606f961fcd">CPLDumpSharedList</a> (FILE *)</td></tr> <tr class="separator:aedca5f7505d22f769f81a2606f961fcd"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3fd07859b01fb8b6c97063a73e19795e"><td class="memItemLeft" align="right" valign="top">double CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a3fd07859b01fb8b6c97063a73e19795e">CPLPackedDMSToDec</a> (double)</td></tr> <tr class="separator:a3fd07859b01fb8b6c97063a73e19795e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3c53be9cbb54f932c047da38299987f1"><td class="memItemLeft" align="right" valign="top">double CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a3c53be9cbb54f932c047da38299987f1">CPLDecToPackedDMS</a> (double dfDec)</td></tr> <tr class="separator:a3c53be9cbb54f932c047da38299987f1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a84202bd22f1f3a785bfd5ea9a521ddca"><td class="memItemLeft" align="right" valign="top">int CPL_DLL </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a84202bd22f1f3a785bfd5ea9a521ddca">CPLUnlinkTree</a> (const char *)</td></tr> <tr class="separator:a84202bd22f1f3a785bfd5ea9a521ddca"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a92be91bf8c6f68b821e503d47490f98f"><td class="memItemLeft" align="right" valign="top">void CPL_DLL * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a92be91bf8c6f68b821e503d47490f98f">CPLZLibInflate</a> (const void *ptr, size_t nBytes, void *outptr, size_t nOutAvailableBytes, size_t *pnOutBytes)</td></tr> <tr class="memdesc:a92be91bf8c6f68b821e503d47490f98f"><td class="mdescLeft"> </td><td class="mdescRight">Uncompress a buffer compressed with ZLib DEFLATE compression. <a href="#a92be91bf8c6f68b821e503d47490f98f">More...</a><br/></td></tr> <tr class="separator:a92be91bf8c6f68b821e503d47490f98f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7e7dc242d58045315d7672e252e62e7d"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__conv_8h.html#a7e7dc242d58045315d7672e252e62e7d">CPLsetlocale</a> (int category, const char *locale)</td></tr> <tr class="separator:a7e7dc242d58045315d7672e252e62e7d"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Various convenience functions for CPL. </p> </div><h2 class="groupheader">Function Documentation</h2> <a class="anchor" id="ad111b85b1f3a9f2bf848cfc625cbdc05"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double CPL_DLL CPLAtof </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>nptr</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Converts ASCII string to floating point number.</p> <p>This function converts the initial portion of the string pointed to by nptr to double floating point representation. The behaviour is the same as</p> <p>CPLStrtod(nptr, (char **)NULL);</p> <p>This function does the same as standard atof(3), but does not take locale in account. That means, the decimal delimiter is always '.' (decimal point). Use <a class="el" href="cpl__conv_8h.html#ab7a009dd445bb6211584c81b33cc2bb9">CPLAtofDelim()</a> function if you want to specify custom delimiter.</p> <p>IMPORTANT NOTE. Existance of this function does not mean you should always use it. Sometimes you should use standard locale aware atof(3) and its family. When you need to process the user's input (for example, command line parameters) use atof(3), because user works in localized environment and her input will be done accordingly the locale set. In particular that means we should not make assumptions about character used as decimal delimiter, it can be either "." or ",". But when you are parsing some ASCII file in predefined format, you most likely need <a class="el" href="cpl__conv_8h.html#ad111b85b1f3a9f2bf848cfc625cbdc05">CPLAtof()</a>, because such files distributed across the systems with different locales and floating point representation shoudl be considered as a part of file format. If the format uses "." as a delimiter the same character must be used when parsing number regardless of actual locale setting.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">nptr</td><td>Pointer to string to convert.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Converted value, if any. </dd></dl> </div> </div> <a class="anchor" id="ab7a009dd445bb6211584c81b33cc2bb9"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double CPL_DLL CPLAtofDelim </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>nptr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char </td> <td class="paramname"><em>point</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Converts ASCII string to floating point number.</p> <p>This function converts the initial portion of the string pointed to by nptr to double floating point representation. The behaviour is the same as</p> <p>CPLStrtodDelim(nptr, (char **)NULL, point);</p> <p>This function does the same as standard atof(3), but does not take locale in account. Instead of locale defined decimal delimiter you can specify your own one. Also see notes for <a class="el" href="cpl__conv_8h.html#ad111b85b1f3a9f2bf848cfc625cbdc05">CPLAtof()</a> function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">nptr</td><td>Pointer to string to convert. </td></tr> <tr><td class="paramname">point</td><td>Decimal delimiter.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Converted value, if any. </dd></dl> </div> </div> <a class="anchor" id="a10dc039c78740b6364675f3d0eabec0e"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double CPL_DLL CPLAtofM </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>nptr</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Converts ASCII string to floating point number using any numeric locale.</p> <p>This function converts the initial portion of the string pointed to by nptr to double floating point representation. This function does the same as standard atof(), but it allows a variety of locale representations. That is it supports numeric values with either a comma or a period for the decimal delimiter.</p> <p>PS. The M stands for Multi-lingual.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">nptr</td><td>The string to convert.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Converted value, if any. Zero on failure. </dd></dl> </div> </div> <a class="anchor" id="a45813ba9f10a9a9769adc22ec13374f2"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void CPL_DLL* CPLCalloc </td> <td>(</td> <td class="paramtype">size_t </td> <td class="paramname"><em>nCount</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>nSize</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Safe version of calloc().</p> <p>This function is like the C library calloc(), but raises a CE_Fatal error with CPLError() if it fails to allocate the desired memory. It should be used for small memory allocations that are unlikely to fail and for which the application is unwilling to test for out of memory conditions. It uses VSICalloc() to get the memory, so any hooking of VSICalloc() will apply to <a class="el" href="cpl__conv_8h.html#a45813ba9f10a9a9769adc22ec13374f2">CPLCalloc()</a> as well. CPLFree() or VSIFree() can be used free memory allocated by <a class="el" href="cpl__conv_8h.html#a45813ba9f10a9a9769adc22ec13374f2">CPLCalloc()</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">nCount</td><td>number of objects to allocate. </td></tr> <tr><td class="paramname">nSize</td><td>size (in bytes) of object to allocate. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>pointer to newly allocated memory, only NULL if nSize * nCount is NULL. </dd></dl> </div> </div> <a class="anchor" id="a5ff4348e3035619493230fad6c01e145"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int CPL_DLL CPLCheckForFile </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"><em>pszFilename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char ** </td> <td class="paramname"><em>papszSiblingFiles</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Check for file existance.</p> <p>The function checks if a named file exists in the filesystem, hopefully in an efficient fashion if a sibling file list is available. It exists primarily to do faster file checking for functions like GDAL open methods that get a list of files from the target directory.</p> <p>If the sibling file list exists (is not NULL) it is assumed to be a list of files in the same directory as the target file, and it will be checked (case insensitively) for a match. If a match is found, pszFilename is updated with the correct case and TRUE is returned.</p> <p>If papszSiblingFiles is NULL, a <a class="el" href="cpl__vsi_8h.html#a53fa8f8ab6154aa522ef9bb25ffe0c99" title="Get filesystem object info. ">VSIStatL()</a> is used to test for the files existance, and no case insensitive testing is done.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFilename</td><td>name of file to check for - filename case updated in some cases. </td></tr> <tr><td class="paramname">papszSiblingFiles</td><td>a list of files in the same directory as pszFilename if available, or NULL. This list should have no path components.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>TRUE if a match is found, or FALSE if not. </dd></dl> </div> </div> <a class="anchor" id="a1b582ef383eceaadad282ce343503928"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLCleanTrailingSlash </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszPath</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Remove trailing forward/backward slash from the path for unix/windows resp.</p> <p>Returns a string containing the portion of the passed path string with trailing slash removed. If there is no path in the passed filename an empty string will be returned (not NULL).</p> <pre> CPLCleanTrailingSlash( "abc/def/" ) == "abc/def" CPLCleanTrailingSlash( "abc/def" ) == "abc/def" CPLCleanTrailingSlash( "c:\abc\def\" ) == "c:\abc\def" CPLCleanTrailingSlash( "c:\abc\def" ) == "c:\abc\def" CPLCleanTrailingSlash( "abc" ) == "abc" </pre><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszPath</td><td>the path to be cleaned up</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Path in an internal string which must not be freed. The string may be destroyed by the next CPL filename handling call. </dd></dl> </div> </div> <a class="anchor" id="a19d2fde250077b9d590c58a4788e94ba"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void CPL_DLL CPLCloseShared </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"><em>fp</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Close shared file.</p> <p>Dereferences the indicated file handle, and closes it if the reference count has dropped to zero. A CPLError() is issued if the file is not in the shared file list.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>file handle from <a class="el" href="cpl__conv_8h.html#a0f4adc3ff7c84eeb7bb435bacad04c22">CPLOpenShared()</a> to deaccess. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="afb7756db0af072aefc8a905a813dea8e"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">char CPL_DLL** CPLCorrespondingPaths </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszOldFilename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszNewFilename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char ** </td> <td class="paramname"><em>papszFileList</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Identify corresponding paths.</p> <p>Given a prototype old and new filename this function will attempt to determine corresponding names for a set of other old filenames that will rename them in a similar manner. This correspondance assumes there are two possibly kinds of renaming going on. A change of path, and a change of filename stem.</p> <p>If a consistent renaming cannot be established for all the files this function will return indicating an error.</p> <p>The returned file list becomes owned by the caller and should be destroyed with <a class="el" href="cpl__string_8h.html#ace6799a8ba4bbb58318f17aecd9f55dd">CSLDestroy()</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszOldFilename</td><td>path to old prototype file. </td></tr> <tr><td class="paramname">pszNewFilename</td><td>path to new prototype file. </td></tr> <tr><td class="paramname">papszFileList</td><td>list of other files associated with pszOldFilename to rename similarly.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>a list of files corresponding to papszFileList but renamed to correspond to pszNewFilename. </dd></dl> </div> </div> <a class="anchor" id="a3c53be9cbb54f932c047da38299987f1"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double CPL_DLL CPLDecToPackedDMS </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"><em>dfDec</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Convert decimal degrees into packed DMS value (DDDMMMSSS.SS).</p> <p>This function converts a value, specified in decimal degrees into packed DMS angle. The standard packed DMS format is:</p> <p>degrees * 1000000 + minutes * 1000 + seconds</p> <p>See also <a class="el" href="cpl__conv_8h.html#a3fd07859b01fb8b6c97063a73e19795e">CPLPackedDMSToDec()</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">dfDec</td><td>Angle in decimal degrees.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Angle in packed DMS format. </dd></dl> </div> </div> <a class="anchor" id="aedca5f7505d22f769f81a2606f961fcd"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void CPL_DLL CPLDumpSharedList </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"><em>fp</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Report open shared files.</p> <p>Dumps all open shared files to the indicated file handle. If the file handle is NULL information is sent via the CPLDebug() call.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>File handle to write to. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="a1e08cf279ed4ea5638befa89cb8058b3"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLExtractRelativePath </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszBaseDir</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszTarget</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"><em>pbGotRelative</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Get relative path from directory to target file.</p> <p>Computes a relative path for pszTarget relative to pszBaseDir. Currently this only works if they share a common base path. The returned path is normally into the pszTarget string. It should only be considered valid as long as pszTarget is valid or till the next call to this function, whichever comes first.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszBaseDir</td><td>the name of the directory relative to which the path should be computed. pszBaseDir may be NULL in which case the original target is returned without relitivizing.</td></tr> <tr><td class="paramname">pszTarget</td><td>the filename to be changed to be relative to pszBaseDir.</td></tr> <tr><td class="paramname">pbGotRelative</td><td>Pointer to location in which a flag is placed indicating that the returned path is relative to the basename (TRUE) or not (FALSE). This pointer may be NULL if flag is not desired.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>an adjusted path or the original if it could not be made relative to the pszBaseFile's path. </dd></dl> </div> </div> <a class="anchor" id="a41845388ae3945f54991e3c7497939e1"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">char CPL_DLL* CPLFGets </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"><em>pszBuffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nBufferSize</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">FILE * </td> <td class="paramname"><em>fp</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Reads in at most one less than nBufferSize characters from the fp stream and stores them into the buffer pointed to by pszBuffer. Reading stops after an EOF or a newline. If a newline is read, it is <em>not</em> stored into the buffer. A '\0' is stored after the last character in the buffer. All three types of newline terminators recognized by the <a class="el" href="cpl__conv_8h.html#a41845388ae3945f54991e3c7497939e1">CPLFGets()</a>: single '\r' and '\n' and '\r\n' combination.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszBuffer</td><td>pointer to the targeting character buffer. </td></tr> <tr><td class="paramname">nBufferSize</td><td>maximum size of the string to read (not including termonating '\0'). </td></tr> <tr><td class="paramname">fp</td><td>file pointer to read from. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>pointer to the pszBuffer containing a string read from the file or NULL if the error or end of file was encountered. </dd></dl> </div> </div> <a class="anchor" id="af74ecf84f9bb448b822841003825e827"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLFormCIFilename </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszPath</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszBasename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszExtension</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Case insensitive file searching, returing full path.</p> <p>This function tries to return the path to a file regardless of whether the file exactly matches the basename, and extension case, or is all upper case, or all lower case. The path is treated as case sensitive. This function is equivelent to <a class="el" href="cpl__conv_8h.html#a5c87d4a047ba7b91715818188e03879d">CPLFormFilename()</a> on case insensitive file systems (like Windows).</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszPath</td><td>directory path to the directory containing the file. This may be relative or absolute, and may have a trailing path separator or not. May be NULL.</td></tr> <tr><td class="paramname">pszBasename</td><td>file basename. May optionally have path and/or extension. May not be NULL.</td></tr> <tr><td class="paramname">pszExtension</td><td>file extension, optionally including the period. May be NULL.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>a fully formed filename in an internal static string. Do not modify or free the returned string. The string may be destroyed by the next CPL call. </dd></dl> </div> </div> <a class="anchor" id="a5c87d4a047ba7b91715818188e03879d"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLFormFilename </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszPath</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszBasename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszExtension</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Build a full file path from a passed path, file basename and extension.</p> <p>The path, and extension are optional. The basename may in fact contain an extension if desired.</p> <pre> CPLFormFilename("abc/xyz","def", ".dat" ) == "abc/xyz/def.dat" CPLFormFilename(NULL,"def", NULL ) == "def" CPLFormFilename(NULL,"abc/def.dat", NULL ) == "abc/def.dat" CPLFormFilename("/abc/xyz/","def.dat", NULL ) == "/abc/xyz/def.dat" </pre><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszPath</td><td>directory path to the directory containing the file. This may be relative or absolute, and may have a trailing path separator or not. May be NULL.</td></tr> <tr><td class="paramname">pszBasename</td><td>file basename. May optionally have path and/or extension. Must <em>NOT</em> be NULL.</td></tr> <tr><td class="paramname">pszExtension</td><td>file extension, optionally including the period. May be NULL.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>a fully formed filename in an internal static string. Do not modify or free the returned string. The string may be destroyed by the next CPL call. </dd></dl> </div> </div> <a class="anchor" id="a36444abe87c810a72b14312328201fe2"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLGenerateTempFilename </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszStem</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Generate temporary file name.</p> <p>Returns a filename that may be used for a temporary file. The location of the file tries to follow operating system semantics but may be forced via the CPL_TMPDIR configuration option.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszStem</td><td>if non-NULL this will be part of the filename.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>a filename which is valid till the next CPL call in this thread. </dd></dl> </div> </div> <a class="anchor" id="abd20cb16884f11c2d5e9a8aa8d9589bb"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLGetBasename </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFullFilename</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Extract basename (non-directory, non-extension) portion of filename.</p> <p>Returns a string containing the file basename portion of the passed name. If there is no basename (passed value ends in trailing directory separator, or filename starts with a dot) an empty string is returned.</p> <pre> CPLGetBasename( "abc/def.xyz" ) == "def" CPLGetBasename( "abc/def" ) == "def" CPLGetBasename( "abc/def/" ) == "" </pre><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFullFilename</td><td>the full filename potentially including a path.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>just the non-directory, non-extension portion of the path in an internal string which must not be freed. The string may be destroyed by the next CPL filename handling call. </dd></dl> </div> </div> <a class="anchor" id="a9dae8658256f2bad583fc27d8c707d29"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPL_STDCALL CPLGetConfigOption </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszKey</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszDefault</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Get the value of a configuration option.</p> <p>The value is the value of a (key, value) option set with <a class="el" href="cpl__conv_8h.html#a2f9fe89aa77782c5a7b6847656f9e2f0">CPLSetConfigOption()</a>. If the given option was no defined with <a class="el" href="cpl__conv_8h.html#a2f9fe89aa77782c5a7b6847656f9e2f0">CPLSetConfigOption()</a>, it tries to find it in environment variables.</p> <p>Note: the string returned by <a class="el" href="cpl__conv_8h.html#a9dae8658256f2bad583fc27d8c707d29">CPLGetConfigOption()</a> might be short-lived, and in particular it will become invalid after a call to <a class="el" href="cpl__conv_8h.html#a2f9fe89aa77782c5a7b6847656f9e2f0">CPLSetConfigOption()</a> with the same key.</p> <p>To override temporary a potentially existing option with a new value, you can use the following snippet : </p> <pre> // backup old value const char* pszOldValTmp = CPLGetConfigOption(pszKey, NULL); char* pszOldVal = pszOldValTmp ? CPLStrdup(pszOldValTmp) : NULL; // override with new value CPLSetConfigOption(pszKey, pszNewVal); // do something usefull // restore old value CPLSetConfigOption(pszKey, pszOldVal); CPLFree(pszOldVal); </pre><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszKey</td><td>the key of the option to retrieve </td></tr> <tr><td class="paramname">pszDefault</td><td>a default value if the key does not match existing defined options (may be NULL) </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the value associated to the key, or the default value if not found</dd></dl> <dl class="section see"><dt>See Also</dt><dd><a class="el" href="cpl__conv_8h.html#a2f9fe89aa77782c5a7b6847656f9e2f0">CPLSetConfigOption()</a>, <a href="http://trac.osgeo.org/gdal/wiki/ConfigOptions">http://trac.osgeo.org/gdal/wiki/ConfigOptions</a> </dd></dl> </div> </div> <a class="anchor" id="acd294686b4688f338b824b4d01cf67d0"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">char CPL_DLL* CPLGetCurrentDir </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Get the current working directory name.</p> <dl class="section return"><dt>Returns</dt><dd>a pointer to buffer, containing current working directory path or NULL in case of error. User is responsible to free that buffer after usage with CPLFree() function. If HAVE_GETCWD macro is not defined, the function returns NULL. </dd></dl> </div> </div> <a class="anchor" id="a04d6a989a67f771ef5a942364430e092"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLGetDirname </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFilename</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Extract directory path portion of filename.</p> <p>Returns a string containing the directory path portion of the passed filename. If there is no path in the passed filename the dot will be returned. It is the only difference from <a class="el" href="cpl__conv_8h.html#ab1b45d3ef191328564f90b0d6ad5a124">CPLGetPath()</a>.</p> <pre> CPLGetDirname( "abc/def.xyz" ) == "abc" CPLGetDirname( "/abc/def/" ) == "/abc/def" CPLGetDirname( "/" ) == "/" CPLGetDirname( "/abc/def" ) == "/abc" CPLGetDirname( "abc" ) == "." </pre><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFilename</td><td>the filename potentially including a path.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Path in an internal string which must not be freed. The string may be destroyed by the next CPL filename handling call. The returned will generally not contain a trailing path separator. </dd></dl> </div> </div> <a class="anchor" id="aa4ca34b291e33bae1f0a115022c0c883"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLGetExtension </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFullFilename</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Extract filename extension from full filename.</p> <p>Returns a string containing the extention portion of the passed name. If there is no extension (the filename has no dot) an empty string is returned. The returned extension will not include the period.</p> <pre> CPLGetExtension( "abc/def.xyz" ) == "xyz" CPLGetExtension( "abc/def" ) == "" </pre><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFullFilename</td><td>the full filename potentially including a path.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>just the extension portion of the path in an internal string which must not be freed. The string may be destroyed by the next CPL filename handling call. </dd></dl> </div> </div> <a class="anchor" id="a56f3283147d1d390063a4defed5be0f0"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLGetFilename </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFullFilename</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Extract non-directory portion of filename.</p> <p>Returns a string containing the bare filename portion of the passed filename. If there is no filename (passed value ends in trailing directory separator) an empty string is returned.</p> <pre> CPLGetFilename( "abc/def.xyz" ) == "def.xyz" CPLGetFilename( "/abc/def/" ) == "" CPLGetFilename( "abc/def" ) == "def" </pre><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFullFilename</td><td>the full filename potentially including a path.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>just the non-directory portion of the path (points back into original string). </dd></dl> </div> </div> <a class="anchor" id="ab1b45d3ef191328564f90b0d6ad5a124"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLGetPath </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFilename</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Extract directory path portion of filename.</p> <p>Returns a string containing the directory path portion of the passed filename. If there is no path in the passed filename an empty string will be returned (not NULL).</p> <pre> CPLGetPath( "abc/def.xyz" ) == "abc" CPLGetPath( "/abc/def/" ) == "/abc/def" CPLGetPath( "/" ) == "/" CPLGetPath( "/abc/def" ) == "/abc" CPLGetPath( "abc" ) == "" </pre><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFilename</td><td>the filename potentially including a path.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Path in an internal string which must not be freed. The string may be destroyed by the next CPL filename handling call. The returned will generally not contain a trailing path separator. </dd></dl> </div> </div> <a class="anchor" id="ae537ad5f113549a8b30dd441bbea728c"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structCPLSharedFileInfo.html">CPLSharedFileInfo</a> CPL_DLL* CPLGetSharedList </td> <td>(</td> <td class="paramtype">int * </td> <td class="paramname"><em>pnCount</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Fetch list of open shared files.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pnCount</td><td>place to put the count of entries.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the pointer to the first in the array of shared file info structures. </dd></dl> </div> </div> <a class="anchor" id="a8a2b13fc6da8c748e7b0111fc8523ea0"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void CPL_DLL* CPLGetSymbol </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszLibrary</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszSymbolName</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Fetch a function pointer from a shared library / DLL.</p> <p>This function is meant to abstract access to shared libraries and DLLs and performs functions similar to dlopen()/dlsym() on Unix and LoadLibrary() / GetProcAddress() on Windows.</p> <p>If no support for loading entry points from a shared library is available this function will always return NULL. Rules on when this function issues a CPLError() or not are not currently well defined, and will have to be resolved in the future.</p> <p>Currently <a class="el" href="cpl__conv_8h.html#a8a2b13fc6da8c748e7b0111fc8523ea0">CPLGetSymbol()</a> doesn't try to: </p> <ul> <li> prevent the reference count on the library from going up for every request, or given any opportunity to unload the library. </li> <li> Attempt to look for the library in non-standard locations. </li> <li> Attempt to try variations on the symbol name, like pre-prending or post-pending an underscore. </li> </ul> <p>Some of these issues may be worked on in the future.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszLibrary</td><td>the name of the shared library or DLL containing the function. May contain path to file. If not system supplies search paths will be used. </td></tr> <tr><td class="paramname">pszSymbolName</td><td>the name of the function to fetch a pointer to. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>A pointer to the function if found, or NULL if the function isn't found, or the shared library can't be loaded. </dd></dl> </div> </div> <a class="anchor" id="a9be0b2f019023ef0f2de2c86c3e84472"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int CPL_DLL CPLIsFilenameRelative </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFilename</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Is filename relative or absolute?</p> <p>The test is filesystem convention agnostic. That is it will test for Unix style and windows style path conventions regardless of the actual system in use.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFilename</td><td>the filename with path to test.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>TRUE if the filename is relative or FALSE if it is absolute. </dd></dl> </div> </div> <a class="anchor" id="aaa9cc4f20fb562f75be86ca3ed220247"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void CPL_DLL* CPLMalloc </td> <td>(</td> <td class="paramtype">size_t </td> <td class="paramname"><em>nSize</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Safe version of malloc().</p> <p>This function is like the C library malloc(), but raises a CE_Fatal error with CPLError() if it fails to allocate the desired memory. It should be used for small memory allocations that are unlikely to fail and for which the application is unwilling to test for out of memory conditions. It uses VSIMalloc() to get the memory, so any hooking of VSIMalloc() will apply to <a class="el" href="cpl__conv_8h.html#aaa9cc4f20fb562f75be86ca3ed220247">CPLMalloc()</a> as well. CPLFree() or VSIFree() can be used free memory allocated by <a class="el" href="cpl__conv_8h.html#aaa9cc4f20fb562f75be86ca3ed220247">CPLMalloc()</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">nSize</td><td>size (in bytes) of memory block to allocate. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>pointer to newly allocated memory, only NULL if nSize is zero. </dd></dl> </div> </div> <a class="anchor" id="a0f4adc3ff7c84eeb7bb435bacad04c22"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">FILE CPL_DLL* CPLOpenShared </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFilename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszAccess</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>bLarge</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Open a shared file handle.</p> <p>Some operating systems have limits on the number of file handles that can be open at one time. This function attempts to maintain a registry of already open file handles, and reuse existing ones if the same file is requested by another part of the application.</p> <p>Note that access is only shared for access types "r", "rb", "r+" and "rb+". All others will just result in direct VSIOpen() calls. Keep in mind that a file is only reused if the file name is exactly the same. Different names referring to the same file will result in different handles.</p> <p>The VSIFOpen() or <a class="el" href="cpl__vsi_8h.html#a8cd4933a84fe46b00733ecae85dd75f4" title="Open file. ">VSIFOpenL()</a> function is used to actually open the file, when an existing file handle can't be shared.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFilename</td><td>the name of the file to open. </td></tr> <tr><td class="paramname">pszAccess</td><td>the normal fopen()/VSIFOpen() style access string. </td></tr> <tr><td class="paramname">bLarge</td><td>If TRUE <a class="el" href="cpl__vsi_8h.html#a8cd4933a84fe46b00733ecae85dd75f4" title="Open file. ">VSIFOpenL()</a> (for large files) will be used instead of VSIFOpen().</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>a file handle or NULL if opening fails. </dd></dl> </div> </div> <a class="anchor" id="a3fd07859b01fb8b6c97063a73e19795e"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double CPL_DLL CPLPackedDMSToDec </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"><em>dfPacked</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Convert a packed DMS value (DDDMMMSSS.SS) into decimal degrees.</p> <p>This function converts a packed DMS angle to seconds. The standard packed DMS format is:</p> <p>degrees * 1000000 + minutes * 1000 + seconds</p> <p>Example: ang = 120025045.25 yields deg = 120 min = 25 sec = 45.25</p> <p>The algorithm used for the conversion is as follows:</p> <ol type="1"> <li>The absolute value of the angle is used.</li> <li>The degrees are separated out: deg = ang/1000000 (fractional portion truncated)</li> <li>The minutes are separated out: min = (ang - deg * 1000000) / 1000 (fractional portion truncated)</li> <li>The seconds are then computed: sec = ang - deg * 1000000 - min * 1000</li> <li>The total angle in seconds is computed: sec = deg * 3600.0 + min * 60.0 + sec</li> <li>The sign of sec is set to that of the input angle.</li> </ol> <p>Packed DMS values used by the USGS GCTP package and probably by other software.</p> <p>NOTE: This code does not validate input value. If you give the wrong value, you will get the wrong result.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">dfPacked</td><td>Angle in packed DMS format.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Angle in decimal degrees. </dd></dl> </div> </div> <a class="anchor" id="a7d65b2cbfa4444c18816f01d13bf0b3f"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int CPL_DLL CPLPrintDouble </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"><em>pszBuffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFormat</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"><em>dfValue</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszLocale</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Print double value into specified string buffer. Exponential character flag 'E' (or 'e') will be replaced with 'D', as in Fortran. Resulting string will not to be NULL-terminated.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszBuffer</td><td>Pointer to the destination string buffer. Should be large enough to hold the resulting string. Note, that the string will not be NULL-terminated, so user should do this himself, if needed.</td></tr> <tr><td class="paramname">pszFormat</td><td>Format specifier (for example, "%16.9E").</td></tr> <tr><td class="paramname">dfValue</td><td>Numerical value to print.</td></tr> <tr><td class="paramname">pszLocale</td><td>Pointer to a character string containing locale name ("C", "POSIX", "us_US", "ru_RU.KOI8-R" etc.). If NULL we will not manipulate with locale settings and current process locale will be used for printing. With the pszLocale option we can control what exact locale will be used for printing a numeric value to the string (in most cases it should be C/POSIX).</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Number of characters printed. </dd></dl> </div> </div> <a class="anchor" id="a40fa469f70136e695e5d130de5ea396a"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int CPL_DLL CPLPrintInt32 </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"><em>pszBuffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GInt32 </td> <td class="paramname"><em>iValue</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nMaxLen</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Print GInt32 value into specified string buffer. This string will not be NULL-terminated.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszBuffer</td><td>Pointer to the destination string buffer. Should be large enough to hold the resulting string. Note, that the string will not be NULL-terminated, so user should do this himself, if needed.</td></tr> <tr><td class="paramname">iValue</td><td>Numerical value to print.</td></tr> <tr><td class="paramname">nMaxLen</td><td>Maximum length of the resulting string. If string length is greater than nMaxLen, it will be truncated.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Number of characters printed. </dd></dl> </div> </div> <a class="anchor" id="a2603dce619cc1d5b4cfc09949eb6f605"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int CPL_DLL CPLPrintPointer </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"><em>pszBuffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void * </td> <td class="paramname"><em>pValue</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nMaxLen</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Print pointer value into specified string buffer. This string will not be NULL-terminated.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszBuffer</td><td>Pointer to the destination string buffer. Should be large enough to hold the resulting string. Note, that the string will not be NULL-terminated, so user should do this himself, if needed.</td></tr> <tr><td class="paramname">pValue</td><td>Pointer to ASCII encode.</td></tr> <tr><td class="paramname">nMaxLen</td><td>Maximum length of the resulting string. If string length is greater than nMaxLen, it will be truncated.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Number of characters printed. </dd></dl> </div> </div> <a class="anchor" id="ad7c571afb58afd4a4d4d877b2f605f95"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int CPL_DLL CPLPrintString </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"><em>pszDest</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszSrc</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nMaxLen</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Copy the string pointed to by pszSrc, NOT including the terminating `\0' character, to the array pointed to by pszDest.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszDest</td><td>Pointer to the destination string buffer. Should be large enough to hold the resulting string.</td></tr> <tr><td class="paramname">pszSrc</td><td>Pointer to the source buffer.</td></tr> <tr><td class="paramname">nMaxLen</td><td>Maximum length of the resulting string. If string length is greater than nMaxLen, it will be truncated.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Number of characters printed. </dd></dl> </div> </div> <a class="anchor" id="a08723bfa45a73e5856ac2d97740acf42"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int CPL_DLL CPLPrintStringFill </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"><em>pszDest</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszSrc</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nMaxLen</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Copy the string pointed to by pszSrc, NOT including the terminating `\0' character, to the array pointed to by pszDest. Remainder of the destination string will be filled with space characters. This is only difference from the PrintString().</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszDest</td><td>Pointer to the destination string buffer. Should be large enough to hold the resulting string.</td></tr> <tr><td class="paramname">pszSrc</td><td>Pointer to the source buffer.</td></tr> <tr><td class="paramname">nMaxLen</td><td>Maximum length of the resulting string. If string length is greater than nMaxLen, it will be truncated.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Number of characters printed. </dd></dl> </div> </div> <a class="anchor" id="a1135cad797264f39c09364da35b82748"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int CPL_DLL CPLPrintTime </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"><em>pszBuffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nMaxLen</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFormat</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const struct tm * </td> <td class="paramname"><em>poBrokenTime</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszLocale</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Print specified time value accordingly to the format options and specified locale name. This function does following:</p> <ul> <li>if locale parameter is not NULL, the current locale setting will be stored and replaced with the specified one;</li> <li>format time value with the strftime(3) function;</li> <li>restore back current locale, if was saved.</li> </ul> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszBuffer</td><td>Pointer to the destination string buffer. Should be large enough to hold the resulting string. Note, that the string will not be NULL-terminated, so user should do this himself, if needed.</td></tr> <tr><td class="paramname">nMaxLen</td><td>Maximum length of the resulting string. If string length is greater than nMaxLen, it will be truncated.</td></tr> <tr><td class="paramname">pszFormat</td><td>Controls the output format. Options are the same as for strftime(3) function.</td></tr> <tr><td class="paramname">poBrokenTime</td><td>Pointer to the broken-down time structure. May be requested with the VSIGMTime() and VSILocalTime() functions.</td></tr> <tr><td class="paramname">pszLocale</td><td>Pointer to a character string containing locale name ("C", "POSIX", "us_US", "ru_RU.KOI8-R" etc.). If NULL we will not manipulate with locale settings and current process locale will be used for printing. Be aware that it may be unsuitable to use current locale for printing time, because all names will be printed in your native language, as well as time format settings also may be ajusted differently from the C/POSIX defaults. To solve these problems this option was introdiced.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Number of characters printed. </dd></dl> </div> </div> <a class="anchor" id="a8ea1cd06bc958af6ea693a3145008ac7"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int CPL_DLL CPLPrintUIntBig </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"><em>pszBuffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GUIntBig </td> <td class="paramname"><em>iValue</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nMaxLen</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Print GUIntBig value into specified string buffer. This string will not be NULL-terminated.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszBuffer</td><td>Pointer to the destination string buffer. Should be large enough to hold the resulting string. Note, that the string will not be NULL-terminated, so user should do this himself, if needed.</td></tr> <tr><td class="paramname">iValue</td><td>Numerical value to print.</td></tr> <tr><td class="paramname">nMaxLen</td><td>Maximum length of the resulting string. If string length is greater than nMaxLen, it will be truncated.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Number of characters printed. </dd></dl> </div> </div> <a class="anchor" id="a0f986cb97eba4dfd95c4725395725045"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLProjectRelativeFilename </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszProjectDir</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszSecondaryFilename</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Find a file relative to a project file.</p> <p>Given the path to a "project" directory, and a path to a secondary file referenced from that project, build a path to the secondary file that the current application can use. If the secondary path is already absolute, rather than relative, then it will be returned unaltered.</p> <p>Examples: </p> <pre> CPLProjectRelativeFilename("abc/def","tmp/abc.gif") == "abc/def/tmp/abc.gif" CPLProjectRelativeFilename("abc/def","/tmp/abc.gif") == "/tmp/abc.gif" CPLProjectRelativeFilename("/xy", "abc.gif") == "/xy/abc.gif" CPLProjectRelativeFilename("/abc/def","../abc.gif") == "/abc/def/../abc.gif" CPLProjectRelativeFilename("C:\WIN","abc.gif") == "C:\WIN\abc.gif" </pre><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszProjectDir</td><td>the directory relative to which the secondary files path should be interpreted. </td></tr> <tr><td class="paramname">pszSecondaryFilename</td><td>the filename (potentially with path) that is to be interpreted relative to the project directory.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>a composed path to the secondary file. The returned string is internal and should not be altered, freed, or depending on past the next CPL call. </dd></dl> </div> </div> <a class="anchor" id="a0202438ad0f9f8d260d5fb8a1834e277"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLReadLine </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"><em>fp</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Simplified line reading from text file.</p> <p>Read a line of text from the given file handle, taking care to capture CR and/or LF and strip off ... equivelent of DKReadLine(). Pointer to an internal buffer is returned. The application shouldn't free it, or depend on it's value past the next call to <a class="el" href="cpl__conv_8h.html#a0202438ad0f9f8d260d5fb8a1834e277">CPLReadLine()</a>.</p> <p>Note that <a class="el" href="cpl__conv_8h.html#a0202438ad0f9f8d260d5fb8a1834e277">CPLReadLine()</a> uses VSIFGets(), so any hooking of VSI file services should apply to <a class="el" href="cpl__conv_8h.html#a0202438ad0f9f8d260d5fb8a1834e277">CPLReadLine()</a> as well.</p> <p><a class="el" href="cpl__conv_8h.html#a0202438ad0f9f8d260d5fb8a1834e277">CPLReadLine()</a> maintains an internal buffer, which will appear as a single block memory leak in some circumstances. <a class="el" href="cpl__conv_8h.html#a0202438ad0f9f8d260d5fb8a1834e277">CPLReadLine()</a> may be called with a NULL FILE * at any time to free this working buffer.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>file pointer opened with VSIFOpen().</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>pointer to an internal buffer containing a line of text read from the file or NULL if the end of file was encountered. </dd></dl> </div> </div> <a class="anchor" id="af32c79f087303ae96c422467b705cb34"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLReadLine2L </td> <td>(</td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nMaxCars</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char ** </td> <td class="paramname"><em>papszOptions</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Simplified line reading from text file.</p> <p>Similar to <a class="el" href="cpl__conv_8h.html#a0202438ad0f9f8d260d5fb8a1834e277">CPLReadLine()</a>, but reading from a large file API handle.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>file pointer opened with <a class="el" href="cpl__vsi_8h.html#a8cd4933a84fe46b00733ecae85dd75f4" title="Open file. ">VSIFOpenL()</a>. </td></tr> <tr><td class="paramname">nMaxCars</td><td>maximum number of characters allowed, or -1 for no limit. </td></tr> <tr><td class="paramname">papszOptions</td><td>NULL-terminated array of options. Unused for now.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>pointer to an internal buffer containing a line of text read from the file or NULL if the end of file was encountered or the maximum number of characters allowed readched.</dd></dl> <dl class="section since"><dt>Since</dt><dd>GDAL 1.7.0 </dd></dl> </div> </div> <a class="anchor" id="ab38aa2bd6fad1221d899a74ff45b33f2"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLReadLineL </td> <td>(</td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Simplified line reading from text file.</p> <p>Similar to <a class="el" href="cpl__conv_8h.html#a0202438ad0f9f8d260d5fb8a1834e277">CPLReadLine()</a>, but reading from a large file API handle.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>file pointer opened with <a class="el" href="cpl__vsi_8h.html#a8cd4933a84fe46b00733ecae85dd75f4" title="Open file. ">VSIFOpenL()</a>.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>pointer to an internal buffer containing a line of text read from the file or NULL if the end of file was encountered. </dd></dl> </div> </div> <a class="anchor" id="a859bfed0320b2f68cb5348c2c6e44c44"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void CPL_DLL* CPLRealloc </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname"><em>pData</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>nNewSize</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Safe version of realloc().</p> <p>This function is like the C library realloc(), but raises a CE_Fatal error with CPLError() if it fails to allocate the desired memory. It should be used for small memory allocations that are unlikely to fail and for which the application is unwilling to test for out of memory conditions. It uses VSIRealloc() to get the memory, so any hooking of VSIRealloc() will apply to <a class="el" href="cpl__conv_8h.html#a859bfed0320b2f68cb5348c2c6e44c44">CPLRealloc()</a> as well. CPLFree() or VSIFree() can be used free memory allocated by <a class="el" href="cpl__conv_8h.html#a859bfed0320b2f68cb5348c2c6e44c44">CPLRealloc()</a>.</p> <p>It is also safe to pass NULL in as the existing memory block for <a class="el" href="cpl__conv_8h.html#a859bfed0320b2f68cb5348c2c6e44c44">CPLRealloc()</a>, in which case it uses VSIMalloc() to allocate a new block.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pData</td><td>existing memory block which should be copied to the new block. </td></tr> <tr><td class="paramname">nNewSize</td><td>new size (in bytes) of memory block to allocate. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>pointer to allocated memory, only NULL if nNewSize is zero. </dd></dl> </div> </div> <a class="anchor" id="a8ff285a9f90ba2dc56a9760392792543"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char CPL_DLL* CPLResetExtension </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszPath</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszExt</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Replace the extension with the provided one.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszPath</td><td>the input path, this string is not altered. </td></tr> <tr><td class="paramname">pszExt</td><td>the new extension to apply to the given path.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>an altered filename with the new extension. Do not modify or free the returned string. The string may be destroyed by the next CPL call. </dd></dl> </div> </div> <a class="anchor" id="a3b972410626256ac3ced8ac43f6e4608"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double CPL_DLL CPLScanDouble </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszString</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nMaxLength</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Extract double from string.</p> <p>Scan up to a maximum number of characters from a string and convert the result to a double. This function uses <a class="el" href="cpl__conv_8h.html#ad111b85b1f3a9f2bf848cfc625cbdc05">CPLAtof()</a> to convert string to double value, so it uses a comma as a decimal delimiter.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszString</td><td>String containing characters to be scanned. It may be terminated with a null character.</td></tr> <tr><td class="paramname">nMaxLength</td><td>The maximum number of character to consider as part of the number. Less characters will be considered if a null character is encountered.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Double value, converted from its ASCII form. </dd></dl> </div> </div> <a class="anchor" id="a9b459c31663d045216670387e7bd35cd"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">long CPL_DLL CPLScanLong </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszString</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nMaxLength</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Scan up to a maximum number of characters from a string and convert the result to a long.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszString</td><td>String containing characters to be scanned. It may be terminated with a null character.</td></tr> <tr><td class="paramname">nMaxLength</td><td>The maximum number of character to consider as part of the number. Less characters will be considered if a null character is encountered.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Long value, converted from its ASCII form. </dd></dl> </div> </div> <a class="anchor" id="a80a8c1d28548f84a1704af9d7ce84455"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void CPL_DLL* CPLScanPointer </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszString</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nMaxLength</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Extract pointer from string.</p> <p>Scan up to a maximum number of characters from a string and convert the result to a pointer.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszString</td><td>String containing characters to be scanned. It may be terminated with a null character.</td></tr> <tr><td class="paramname">nMaxLength</td><td>The maximum number of character to consider as part of the number. Less characters will be considered if a null character is encountered.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>pointer value, converted from its ASCII form. </dd></dl> </div> </div> <a class="anchor" id="af61a2ac88007e268ca856c026f7a98ef"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">char CPL_DLL* CPLScanString </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszString</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nMaxLength</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>bTrimSpaces</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>bNormalize</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Scan up to a maximum number of characters from a given string, allocate a buffer for a new string and fill it with scanned characters.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszString</td><td>String containing characters to be scanned. It may be terminated with a null character.</td></tr> <tr><td class="paramname">nMaxLength</td><td>The maximum number of character to read. Less characters will be read if a null character is encountered.</td></tr> <tr><td class="paramname">bTrimSpaces</td><td>If TRUE, trim ending spaces from the input string. Character considered as empty using isspace(3) function.</td></tr> <tr><td class="paramname">bNormalize</td><td>If TRUE, replace ':' symbol with the '_'. It is needed if resulting string will be used in CPL dictionaries.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Pointer to the resulting string buffer. Caller responsible to free this buffer with CPLFree(). </dd></dl> </div> </div> <a class="anchor" id="a488f7d9be4197b2f8e888cc51e602fb5"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GUIntBig CPL_DLL CPLScanUIntBig </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszString</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nMaxLength</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Extract big integer from string.</p> <p>Scan up to a maximum number of characters from a string and convert the result to a GUIntBig.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszString</td><td>String containing characters to be scanned. It may be terminated with a null character.</td></tr> <tr><td class="paramname">nMaxLength</td><td>The maximum number of character to consider as part of the number. Less characters will be considered if a null character is encountered.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>GUIntBig value, converted from its ASCII form. </dd></dl> </div> </div> <a class="anchor" id="adb6e3821966f526c4fe71dc1dc78ee93"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">unsigned long CPL_DLL CPLScanULong </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszString</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nMaxLength</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Scan up to a maximum number of characters from a string and convert the result to a unsigned long.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszString</td><td>String containing characters to be scanned. It may be terminated with a null character.</td></tr> <tr><td class="paramname">nMaxLength</td><td>The maximum number of character to consider as part of the number. Less characters will be considered if a null character is encountered.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Unsigned long value, converted from its ASCII form. </dd></dl> </div> </div> <a class="anchor" id="a2f9fe89aa77782c5a7b6847656f9e2f0"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void CPL_DLL CPL_STDCALL CPLSetConfigOption </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszKey</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszValue</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Set a configuration option for GDAL/OGR use.</p> <p>Those options are defined as a (key, value) couple. The value corresponding to a key can be got later with the <a class="el" href="cpl__conv_8h.html#a9dae8658256f2bad583fc27d8c707d29">CPLGetConfigOption()</a> method.</p> <p>This mechanism is similar to environment variables, but options set with <a class="el" href="cpl__conv_8h.html#a2f9fe89aa77782c5a7b6847656f9e2f0">CPLSetConfigOption()</a> overrides, for <a class="el" href="cpl__conv_8h.html#a9dae8658256f2bad583fc27d8c707d29">CPLGetConfigOption()</a> point of view, values defined in the environment.</p> <p>If <a class="el" href="cpl__conv_8h.html#a2f9fe89aa77782c5a7b6847656f9e2f0">CPLSetConfigOption()</a> is called several times with the same key, the value provided during the last call will be used.</p> <p>Options can also be passed on the command line of most GDAL utilities with the with '–config KEY VALUE'. For example, ogrinfo –config CPL_DEBUG ON ~/data/test/point.shp</p> <p>This function can also be used to clear a setting by passing NULL as the value (note: passing NULL will not unset an existing environment variable; it will just unset a value previously set by <a class="el" href="cpl__conv_8h.html#a2f9fe89aa77782c5a7b6847656f9e2f0">CPLSetConfigOption()</a>).</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszKey</td><td>the key of the option </td></tr> <tr><td class="paramname">pszValue</td><td>the value of the option, or NULL to clear a setting.</td></tr> </table> </dd> </dl> <dl class="section see"><dt>See Also</dt><dd><a href="http://trac.osgeo.org/gdal/wiki/ConfigOptions">http://trac.osgeo.org/gdal/wiki/ConfigOptions</a> </dd></dl> </div> </div> <a class="anchor" id="a7e7dc242d58045315d7672e252e62e7d"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">char* CPLsetlocale </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>category</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>locale</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Prevents parallel executions of setlocale().</p> <p>Calling setlocale() concurrently from two or more threads is a potential data race. A mutex is used to provide a critical region so that only one thread at a time can be executing setlocale().</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">category</td><td>See your compiler's documentation on setlocale. </td></tr> <tr><td class="paramname">locale</td><td>See your compiler's documentation on setlocale.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>See your compiler's documentation on setlocale. </dd></dl> </div> </div> <a class="anchor" id="ae6826aa74d0b5cc9253f55ffb6b798c1"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void CPL_DLL CPL_STDCALL CPLSetThreadLocalConfigOption </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszKey</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszValue</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Set a configuration option for GDAL/OGR use.</p> <p>Those options are defined as a (key, value) couple. The value corresponding to a key can be got later with the <a class="el" href="cpl__conv_8h.html#a9dae8658256f2bad583fc27d8c707d29">CPLGetConfigOption()</a> method.</p> <p>This function sets the configuration option that only applies in the current thread, as opposed to <a class="el" href="cpl__conv_8h.html#a2f9fe89aa77782c5a7b6847656f9e2f0">CPLSetConfigOption()</a> which sets an option that applies on all threads.</p> <p>This function can also be used to clear a setting by passing NULL as the value (note: passing NULL will not unset an existing environment variable; it will just unset a value previously set by <a class="el" href="cpl__conv_8h.html#ae6826aa74d0b5cc9253f55ffb6b798c1">CPLSetThreadLocalConfigOption()</a>).</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszKey</td><td>the key of the option </td></tr> <tr><td class="paramname">pszValue</td><td>the value of the option, or NULL to clear a setting. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="ac8a3b50574d007821df262dcf56a1b45"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">char CPL_DLL* CPLStrdup </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszString</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Safe version of strdup() function.</p> <p>This function is similar to the C library strdup() function, but if the memory allocation fails it will issue a CE_Fatal error with CPLError() instead of returning NULL. It uses VSIStrdup(), so any hooking of that function will apply to <a class="el" href="cpl__conv_8h.html#ac8a3b50574d007821df262dcf56a1b45">CPLStrdup()</a> as well. Memory allocated with <a class="el" href="cpl__conv_8h.html#ac8a3b50574d007821df262dcf56a1b45">CPLStrdup()</a> can be freed with CPLFree() or VSIFree().</p> <p>It is also safe to pass a NULL string into <a class="el" href="cpl__conv_8h.html#ac8a3b50574d007821df262dcf56a1b45">CPLStrdup()</a>. <a class="el" href="cpl__conv_8h.html#ac8a3b50574d007821df262dcf56a1b45">CPLStrdup()</a> will allocate and return a zero length string (as opposed to a NULL string).</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszString</td><td>input string to be duplicated. May be NULL. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>pointer to a newly allocated copy of the string. Free with CPLFree() or VSIFree(). </dd></dl> </div> </div> <a class="anchor" id="aee03824a3cc31f5c7af705ad1c06d8b3"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">char CPL_DLL* CPLStrlwr </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"><em>pszString</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Convert each characters of the string to lower case.</p> <p>For example, "ABcdE" will be converted to "abcde". This function is locale dependent.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszString</td><td>input string to be converted. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>pointer to the same string, pszString. </dd></dl> </div> </div> <a class="anchor" id="ab2a75cb4f9695cd8ecc67668b45cf960"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double CPL_DLL CPLStrtod </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>nptr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char ** </td> <td class="paramname"><em>endptr</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Converts ASCII string to floating point number.</p> <p>This function converts the initial portion of the string pointed to by nptr to double floating point representation. This function does the same as standard strtod(3), but does not take locale in account. That means, the decimal delimiter is always '.' (decimal point). Use <a class="el" href="cpl__conv_8h.html#a6b08477feabba39c6ddf9962d3c6ed0a">CPLStrtodDelim()</a> function if you want to specify custom delimiter. Also see notes for <a class="el" href="cpl__conv_8h.html#ad111b85b1f3a9f2bf848cfc625cbdc05">CPLAtof()</a> function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">nptr</td><td>Pointer to string to convert. </td></tr> <tr><td class="paramname">endptr</td><td>If is not NULL, a pointer to the character after the last character used in the conversion is stored in the location referenced by endptr.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Converted value, if any. </dd></dl> </div> </div> <a class="anchor" id="a6b08477feabba39c6ddf9962d3c6ed0a"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double CPL_DLL CPLStrtodDelim </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>nptr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char ** </td> <td class="paramname"><em>endptr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char </td> <td class="paramname"><em>point</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Converts ASCII string to floating point number using specified delimiter.</p> <p>This function converts the initial portion of the string pointed to by nptr to double floating point representation. This function does the same as standard strtod(3), but does not take locale in account. Instead of locale defined decimal delimiter you can specify your own one. Also see notes for <a class="el" href="cpl__conv_8h.html#ad111b85b1f3a9f2bf848cfc625cbdc05">CPLAtof()</a> function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">nptr</td><td>Pointer to string to convert. </td></tr> <tr><td class="paramname">endptr</td><td>If is not NULL, a pointer to the character after the last character used in the conversion is stored in the location referenced by endptr. </td></tr> <tr><td class="paramname">point</td><td>Decimal delimiter.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Converted value, if any. </dd></dl> </div> </div> <a class="anchor" id="adc9e485bcc4465e7ebdf0ac7c6ec4487"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float CPL_DLL CPLStrtof </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>nptr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char ** </td> <td class="paramname"><em>endptr</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Converts ASCII string to floating point number.</p> <p>This function converts the initial portion of the string pointed to by nptr to single floating point representation. This function does the same as standard strtof(3), but does not take locale in account. That means, the decimal delimiter is always '.' (decimal point). Use <a class="el" href="cpl__conv_8h.html#a6d25e5dc6c14f0216520fba5c7d94707">CPLStrtofDelim()</a> function if you want to specify custom delimiter. Also see notes for <a class="el" href="cpl__conv_8h.html#ad111b85b1f3a9f2bf848cfc625cbdc05">CPLAtof()</a> function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">nptr</td><td>Pointer to string to convert. </td></tr> <tr><td class="paramname">endptr</td><td>If is not NULL, a pointer to the character after the last character used in the conversion is stored in the location referenced by endptr.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Converted value, if any. </dd></dl> </div> </div> <a class="anchor" id="a6d25e5dc6c14f0216520fba5c7d94707"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float CPL_DLL CPLStrtofDelim </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>nptr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char ** </td> <td class="paramname"><em>endptr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char </td> <td class="paramname"><em>point</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Converts ASCII string to floating point number using specified delimiter.</p> <p>This function converts the initial portion of the string pointed to by nptr to single floating point representation. This function does the same as standard strtof(3), but does not take locale in account. Instead of locale defined decimal delimiter you can specify your own one. Also see notes for <a class="el" href="cpl__conv_8h.html#ad111b85b1f3a9f2bf848cfc625cbdc05">CPLAtof()</a> function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">nptr</td><td>Pointer to string to convert. </td></tr> <tr><td class="paramname">endptr</td><td>If is not NULL, a pointer to the character after the last character used in the conversion is stored in the location referenced by endptr. </td></tr> <tr><td class="paramname">point</td><td>Decimal delimiter.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>Converted value, if any. </dd></dl> </div> </div> <a class="anchor" id="a84202bd22f1f3a785bfd5ea9a521ddca"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int CPL_DLL CPLUnlinkTree </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszPath</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <dl class="section return"><dt>Returns</dt><dd>0 on successful completion, -1 if function fails. </dd></dl> </div> </div> <a class="anchor" id="a92be91bf8c6f68b821e503d47490f98f"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void CPL_DLL* CPLZLibInflate </td> <td>(</td> <td class="paramtype">const void * </td> <td class="paramname"><em>ptr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>nBytes</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void * </td> <td class="paramname"><em>outptr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>nOutAvailableBytes</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t * </td> <td class="paramname"><em>pnOutBytes</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Uncompress a buffer compressed with ZLib DEFLATE compression. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">ptr</td><td>input buffer. </td></tr> <tr><td class="paramname">nBytes</td><td>size of input buffer in bytes. </td></tr> <tr><td class="paramname">outptr</td><td>output buffer, or NULL to let the function allocate it. </td></tr> <tr><td class="paramname">nOutAvailableBytes</td><td>size of output buffer if provided, or ignored. </td></tr> <tr><td class="paramname">pnOutBytes</td><td>pointer to a size_t, where to store the size of the output buffer.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the output buffer (to be freed with VSIFree() if not provided) or NULL in case of error.</dd></dl> <dl class="section since"><dt>Since</dt><dd>GDAL 1.10.0 </dd></dl> </div> </div> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.5 </small></address> </body> </html>