Browse Source

msvc compat for print utils

Signed-off-by: falkTX <falktx@falktx.com>
pull/1775/head
falkTX 1 year ago
parent
commit
aea5dcc302
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 12 additions and 12 deletions
  1. +12
    -12
      source/utils/CarlaUtils.hpp

+ 12
- 12
source/utils/CarlaUtils.hpp View File

@@ -113,8 +113,8 @@ void carla_debug(const char* const fmt, ...) noexcept
static FILE* const output = __carla_fopen("/tmp/carla.debug.log", stdout); static FILE* const output = __carla_fopen("/tmp/carla.debug.log", stdout);


try { try {
::va_list args;
::va_start(args, fmt);
va_list args;
va_start(args, fmt);


if (output == stdout) if (output == stdout)
{ {
@@ -134,7 +134,7 @@ void carla_debug(const char* const fmt, ...) noexcept
} }


std::fflush(output); std::fflush(output);
::va_end(args);
va_end(args);
} CARLA_CATCH_UNWIND catch (...) {} } CARLA_CATCH_UNWIND catch (...) {}
} }
#endif #endif
@@ -148,8 +148,8 @@ void carla_stdout(const char* const fmt, ...) noexcept
static FILE* const output = __carla_fopen("/tmp/carla.stdout.log", stdout); static FILE* const output = __carla_fopen("/tmp/carla.stdout.log", stdout);


try { try {
::va_list args;
::va_start(args, fmt);
va_list args;
va_start(args, fmt);
std::fprintf(output, "[carla] "); std::fprintf(output, "[carla] ");
std::vfprintf(output, fmt, args); std::vfprintf(output, fmt, args);
std::fprintf(output, "\n"); std::fprintf(output, "\n");
@@ -157,7 +157,7 @@ void carla_stdout(const char* const fmt, ...) noexcept
if (output != stdout) if (output != stdout)
#endif #endif
std::fflush(output); std::fflush(output);
::va_end(args);
va_end(args);
} CARLA_CATCH_UNWIND catch (...) {} } CARLA_CATCH_UNWIND catch (...) {}
} }


@@ -170,8 +170,8 @@ void carla_stderr(const char* const fmt, ...) noexcept
static FILE* const output = __carla_fopen("/tmp/carla.stderr.log", stderr); static FILE* const output = __carla_fopen("/tmp/carla.stderr.log", stderr);


try { try {
::va_list args;
::va_start(args, fmt);
va_list args;
va_start(args, fmt);
std::fprintf(output, "[carla] "); std::fprintf(output, "[carla] ");
std::vfprintf(output, fmt, args); std::vfprintf(output, fmt, args);
std::fprintf(output, "\n"); std::fprintf(output, "\n");
@@ -179,7 +179,7 @@ void carla_stderr(const char* const fmt, ...) noexcept
if (output != stderr) if (output != stderr)
#endif #endif
std::fflush(output); std::fflush(output);
::va_end(args);
va_end(args);
} CARLA_CATCH_UNWIND catch (...) {} } CARLA_CATCH_UNWIND catch (...) {}
} }


@@ -192,8 +192,8 @@ void carla_stderr2(const char* const fmt, ...) noexcept
static FILE* const output = __carla_fopen("/tmp/carla.stderr2.log", stderr); static FILE* const output = __carla_fopen("/tmp/carla.stderr2.log", stderr);


try { try {
::va_list args;
::va_start(args, fmt);
va_list args;
va_start(args, fmt);


if (output == stderr) if (output == stderr)
{ {
@@ -209,7 +209,7 @@ void carla_stderr2(const char* const fmt, ...) noexcept
} }


std::fflush(output); std::fflush(output);
::va_end(args);
va_end(args);
} CARLA_CATCH_UNWIND catch (...) {} } CARLA_CATCH_UNWIND catch (...) {}
} }




Loading…
Cancel
Save