30#ifndef COMMONUTILS_H_INCLUDED
31#define COMMONUTILS_H_INCLUDED
37#if defined(WIN32) && (defined(_MSC_VER) || defined(SUPPORTS_WMAIN))
46 char **m_papszList =
nullptr;
47 ARGVDestroyer(
const ARGVDestroyer &) =
delete;
48 ARGVDestroyer &operator=(
const ARGVDestroyer &) =
delete;
51 explicit ARGVDestroyer(
char **papszList) : m_papszList(papszList)
56 CSLDestroy(m_papszList);
60extern "C" int wmain(
int argc,
wchar_t **argv_w,
wchar_t ** );
62#define MAIN_START(argc, argv) \
63 extern "C" int wmain(int argc, wchar_t **argv_w, wchar_t ** ) \
66 static_cast<char **>(CPLCalloc(argc + 1, sizeof(char *))); \
67 for (int i = 0; i < argc; i++) \
70 CPLRecodeFromWChar(argv_w[i], CPL_ENC_UCS2, CPL_ENC_UTF8); \
72 ARGVDestroyer argvDestroyer(argv);
78#define MAIN_START(argc, argv) int main(int argc, char **argv)
87void CPL_DLL EarlySetConfigOptions(
int argc,
char **argv);
96std::vector<CPLString> CPL_DLL GetOutputDriversFor(
const char *pszDestFilename,
97 int nFlagRasterVector);
98CPLString CPL_DLL GetOutputDriverForRaster(
const char *pszDestFilename);
Convenient string class based on std::string.
Definition cpl_string.h:312
Various convenience functions for CPL.
Core portability definitions for CPL.
#define CPL_C_END
Macro to end a block of C symbols.
Definition cpl_port.h:317
#define CPL_C_START
Macro to start a block of C symbols.
Definition cpl_port.h:313
Various convenience functions for working with strings and string lists.