diff --git a/src/ext/duktape/duktape.h b/src/ext/duktape/duktape.h index 614954e..b86ba43 100644 --- a/src/ext/duktape/duktape.h +++ b/src/ext/duktape/duktape.h @@ -456,21 +456,21 @@ DUK_API_NORETURN(DUK_EXTERNAL_DECL void duk_error_raw(duk_context *ctx, duk_errc #if defined(DUK_API_VARIADIC_MACROS) #define duk_error(ctx,err_code,...) \ - (duk_error_raw((ctx), (duk_errcode_t) (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__), (duk_ret_t) 0) + (duk_error_raw((ctx), (duk_errcode_t) (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__)) #define duk_generic_error(ctx,...) \ - (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__), (duk_ret_t) 0) + (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__)) #define duk_eval_error(ctx,...) \ - (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_EVAL_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__), (duk_ret_t) 0) + (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_EVAL_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__)) #define duk_range_error(ctx,...) \ - (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_RANGE_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__), (duk_ret_t) 0) + (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_RANGE_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__)) #define duk_reference_error(ctx,...) \ - (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_REFERENCE_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__), (duk_ret_t) 0) + (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_REFERENCE_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__)) #define duk_syntax_error(ctx,...) \ - (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_SYNTAX_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__), (duk_ret_t) 0) + (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_SYNTAX_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__)) #define duk_type_error(ctx,...) \ - (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_TYPE_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__), (duk_ret_t) 0) + (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_TYPE_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__)) #define duk_uri_error(ctx,...) \ - (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_URI_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__), (duk_ret_t) 0) + (duk_error_raw((ctx), (duk_errcode_t) DUK_ERR_URI_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__)) #else /* DUK_API_VARIADIC_MACROS */ /* For legacy compilers without variadic macros a macro hack is used to allow * variable arguments. While the macro allows "return duk_error(...)", it diff --git a/src/fs.c b/src/fs.c index 601ac2a..3f10815 100644 --- a/src/fs.c +++ b/src/fs.c @@ -674,7 +674,7 @@ void fsMakeDir(FileSystem* fs, const char* name) #if defined(__WINDOWS__) || defined(__LINUX__) || defined(__MACOSX__) -void fsOpenSystemPath(FileSystem* fs, const char* path) +int fsOpenSystemPath(FileSystem* fs, const char* path) { char command[FILENAME_MAX]; @@ -692,7 +692,7 @@ void fsOpenSystemPath(FileSystem* fs, const char* path) #endif - tic_system(UTF8ToString(command)); + return tic_system(UTF8ToString(command)); } #else diff --git a/src/fs.h b/src/fs.h index 84c908f..ba19168 100644 --- a/src/fs.h +++ b/src/fs.h @@ -67,7 +67,7 @@ bool fsCopyFile(const char* src, const char* dst); void fsGetFileData(GetCallback callback, const char* name, void* buffer, size_t size, u32 mode, void* data); void fsOpenFileData(OpenCallback callback, void* data); void fsOpenWorkingFolder(FileSystem* fs); -void fsOpenSystemPath(FileSystem* fs, const char* path); +int fsOpenSystemPath(FileSystem* fs, const char* path); bool fsIsDir(FileSystem* fs, const char* dir); bool fsIsInPublicDir(FileSystem* fs); bool fsChangeDir(FileSystem* fs, const char* dir);