diff options
Diffstat (limited to 'src/guile.c')
-rw-r--r-- | src/guile.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/guile.c b/src/guile.c index 7c898d5..7883117 100644 --- a/src/guile.c +++ b/src/guile.c @@ -1,11 +1,11 @@ /* guile.c This file is part of GNU Anubis. - Copyright (C) 2003-2014 The Anubis Team. + Copyright (C) 2003-2024 The Anubis Team. GNU Anubis is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. @@ -19,14 +19,12 @@ */ #include "headers.h" #include "extern.h" #include "rcfile.h" -#ifdef WITH_GUILE - static void guile_ports_open (void); static void guile_ports_close (void); static SCM eval_catch_handler (void *data, SCM tag, SCM throw_args) { @@ -80,14 +78,13 @@ guile_debug (int val) void init_guile () { scm_init_guile (); scm_load_goops (); - guile_init_anubis_info_port (); - guile_init_anubis_error_port (); + guile_init_anubis_log_port (); } void guile_ports_open () { @@ -107,13 +104,13 @@ guile_ports_open () _("cannot open guile output file %s"), options.glogfile); } if (fd >= 0) { - port = scm_fdes_to_port (fd, "a", scm_makfrom0str (name)); + port = scm_fdes_to_port (fd, "a", scm_from_locale_string (name)); guile_ports_close (); scm_set_current_error_port (port); scm_set_current_output_port (port); scm_close_input_port (scm_current_input_port ()); return; } @@ -154,13 +151,13 @@ guile_load_path_append_handler (void *data) return SCM_UNSPECIFIED; } } pscm = SCM_VARIABLE_LOC (scm_c_lookup ("%load-path")); *pscm = scm_append (scm_list_3 (path_scm, - scm_list_1 (scm_makfrom0str (path)), + scm_list_1 (scm_from_locale_string (path)), SCM_EOL)); return SCM_UNSPECIFIED; } void guile_load_path_append (ANUBIS_LIST arglist, MESSAGE msg /* unused */) @@ -264,13 +261,13 @@ list_to_args (ANUBIS_LIST arglist) if (p[0] == '#') { switch (p[1]) { case ':': - val = scm_c_make_keyword (p + 2); + val = scm_from_locale_keyword (p + 2); break; case 'f': val = SCM_BOOL_F; break; @@ -488,16 +485,18 @@ guile_parser (EVAL_ENV env, int key, ANUBIS_LIST arglist, void *inv_data) "please report"), __FILE__, __LINE__, key); } if (setjmp (jmp_env) == 0) - scm_internal_lazy_catch (SCM_BOOL_T, - inner_catch_body, - &closure, - eval_catch_handler, &jmp_env); + { + scm_c_catch (SCM_BOOL_T, + inner_catch_body, &closure, + eval_catch_handler, &jmp_env, + NULL, NULL); + } } static struct rc_secdef_child guile_secdef_child = { NULL, CF_CLIENT, guile_kw, @@ -519,9 +518,7 @@ guile_section_init (void) struct rc_secdef *sp = anubis_add_section ("GUILE"); rc_secdef_add_child (sp, &guile_secdef_child); sp = anubis_add_section ("RULE"); rc_secdef_add_child (sp, &guile_rule_secdef_child); } -#endif /* WITH_GUILE */ - /* EOF */ |