Commit a7ae1c66 authored by Dan Leinir Turthra Jensen's avatar Dan Leinir Turthra Jensen 🌈 Committed by Halla Rempt
Browse files

Make gmic plugin compile on windows (lolmsvc)

parent 3309bcd4
......@@ -1579,7 +1579,11 @@ CImgList<char> gmic::commands_line_to_CImgList(const char *const commands_line)
//-------------------------------
gmic& gmic::assign(const char *const custom_commands, const bool include_default_commands,
float *const p_progress, int *const p_cancel) {
#if defined(_WIN32) || defined(_WIN64)
setlocale(LC_NUMERIC,"C");
#else
std::setlocale(LC_NUMERIC,"C");
#endif
cimg::srand();
verbosity = 0;
nb_carriages = 0;
......@@ -11164,8 +11168,13 @@ gmic& gmic::parse(const CImgList<char>& commands_line, unsigned int& position,
_filename0,stype,
gmic_selection);
 
#if defined(_WIN32) || defined(_WIN64)
#define what_strcasecmp _stricmp
#else
#define what_strcasecmp strcasecmp
#endif
#define gmic_load_raw(value_type,svalue_type) \
if (!strcasecmp(stype,svalue_type)) \
if (!what_strcasecmp(stype,svalue_type)) \
CImg<value_type>::get_load_raw(filename,(unsigned int)dx,(unsigned int)dy,\
(unsigned int)dz,(unsigned int)dc).\
move_to(input_images);
......
......@@ -297,7 +297,11 @@ struct gmic {
gmic_list<T> &images, gmic_list<char> &images_names) {
const unsigned int variables_sizes[256] = { 0 };
unsigned int position = 0;
#if defined(_WIN32) || defined(_WIN64)
setlocale(LC_NUMERIC,"C");
#else
std::setlocale(LC_NUMERIC,"C");
#endif
scope.assign(1U);
scope._data[0].assign(2,1,1,1);
scope._data[0]._data[0] = '.';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment