diff --git a/src/bindings/fluid_cmd.c b/src/bindings/fluid_cmd.c index d206ab642..623db9171 100644 --- a/src/bindings/fluid_cmd.c +++ b/src/bindings/fluid_cmd.c @@ -441,14 +441,14 @@ fluid_command(fluid_cmd_handler_t *handler, const char *cmd, fluid_ostream_t out return 1; } - if(!g_shell_parse_argv(cmd, &num_tokens, &tokens, NULL)) + if(!fluid_shell_parse_argv(cmd, &num_tokens, &tokens)) { fluid_ostream_printf(out, "Error parsing command\n"); return FLUID_FAILED; } result = fluid_cmd_handler_handle(handler, num_tokens, &tokens[0], out); - g_strfreev(tokens); + fluid_strfreev(tokens); return result; } diff --git a/src/fluidsynth.c b/src/fluidsynth.c index 721dc7299..3d074e175 100644 --- a/src/fluidsynth.c +++ b/src/fluidsynth.c @@ -857,7 +857,7 @@ int main(int argc, char **argv) } /* if the automatically selected command file does not exist, do not even attempt to open it */ - if(!g_file_test(config_file, G_FILE_TEST_EXISTS)) + if(!fluid_file_test(config_file, FLUID_FILE_TEST_EXISTS)) { config_file = NULL; } diff --git a/src/utils/fluid_sys.c b/src/utils/fluid_sys.c index ea4682624..4e8bee492 100644 --- a/src/utils/fluid_sys.c +++ b/src/utils/fluid_sys.c @@ -1730,14 +1730,14 @@ FILE* fluid_file_open(const char* path, const char** errMsg) FILE* handle = NULL; - if(!g_file_test(path, G_FILE_TEST_EXISTS)) + if(!fluid_file_test(path, FLUID_FILE_TEST_EXISTS)) { if(errMsg != NULL) { *errMsg = ErrExist; } } - else if(!g_file_test(path, G_FILE_TEST_IS_REGULAR)) + else if(!fluid_file_test(path, FLUID_FILE_TEST_IS_REGULAR)) { if(errMsg != NULL) { diff --git a/src/utils/fluid_sys.h b/src/utils/fluid_sys.h index 86a47f32d..ac8dfa43f 100644 --- a/src/utils/fluid_sys.h +++ b/src/utils/fluid_sys.h @@ -200,6 +200,12 @@ char* fluid_get_windows_error(void); */ char *fluid_strtok(char **str, char *delim); +#define FLUID_FILE_TEST_EXISTS G_FILE_TEST_EXISTS +#define FLUID_FILE_TEST_IS_REGULAR G_FILE_TEST_IS_REGULAR +#define fluid_file_test(path, flags) g_file_test(path, flags) + +#define fluid_shell_parse_argv(command_line, argcp, argvp) g_shell_parse_argv(command_line, argcp, argvp, NULL) +#define fluid_strfreev g_strfreev #if defined(__OS2__) #define INCL_DOS diff --git a/src/utils/fluidsynth_priv.h b/src/utils/fluidsynth_priv.h index f8f36381f..999b32451 100644 --- a/src/utils/fluidsynth_priv.h +++ b/src/utils/fluidsynth_priv.h @@ -29,10 +29,10 @@ #ifndef _FLUIDSYNTH_PRIV_H #define _FLUIDSYNTH_PRIV_H -#include - #include "config.h" +#include + #if HAVE_STDLIB_H #include // malloc, free #endif