X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Ffile-system.cpp;h=4c643ae3e05272eb5abc695ed254cff0fd21a822;hb=722b34ded15dc5317aa45f205b5fc85a78a394b5;hp=da856f4626b5b87d93e796a6993c5aa4dad7baa8;hpb=bdd3bebca0131db5ecaf7219b6019ee267468538;p=guile-irrlicht.git diff --git a/src/file-system.cpp b/src/file-system.cpp index da856f4..4c643ae 100644 --- a/src/file-system.cpp +++ b/src/file-system.cpp @@ -25,6 +25,7 @@ #include "device.h" #include "file-archive.h" #include "file-system.h" +#include "gsubr.h" #include "gui-environment.h" #include "scene-manager.h" @@ -34,9 +35,8 @@ extern "C" { init_file_system (void) { init_file_system_type (); - scm_c_define_gsubr ("add-file-archive!", 2, 0, 1, (scm_t_subr)irr_io_addFileArchive); - scm_c_define_gsubr ("get-file-system", 1, 0, 0, (scm_t_subr)irr_getFileSystem); - scm_c_export ("add-file-archive!", "get-file-system", NULL); + DEFINE_GSUBR ("add-file-archive!", 2, 0, 1, irr_io_addFileArchive); + DEFINE_GSUBR ("get-file-system", 1, 0, 0, irr_getFileSystem); } DEFINE_WRAPPED_TYPE (irr::io::IFileSystem*, "file-system", @@ -48,11 +48,11 @@ extern "C" { SCM filename, SCM rest) { - SCM ignore_case = scm_from_bool (1); - SCM ignore_paths = scm_from_bool (1); + SCM ignore_case = SCM_BOOL_T; + SCM ignore_paths = SCM_BOOL_T; SCM archive_type = scm_from_utf8_symbol ("unknown"); SCM password = scm_from_utf8_string (""); - SCM ret_archive = scm_from_bool (0); + SCM ret_archive = SCM_BOOL_F; scm_c_bind_keyword_arguments ("add-file-archive!", rest, (scm_t_keyword_arguments_flags)0, scm_from_utf8_keyword ("ignore-case"), &ignore_case,