summaryrefslogtreecommitdiff
path: root/libguile/init.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2011-12-15 01:23:23 +0100
committerLudovic Courtès <ludo@gnu.org>2011-12-15 01:31:23 +0100
commited4c3739668b4b111b38555b8bc101cb74c87c1c (patch)
treebebdd170764e27c853187118cf36d79fec78697c /libguile/init.c
parentc2c2b5a49b1ce37a42417037c3515864a808e53b (diff)
downloadguile-ed4c3739668b4b111b38555b8bc101cb74c87c1c.tar.gz
Arrange to convert command-line arguments from the right encoding.
This is a temporary workaround for the 2.0 stable series. The next stable series should have an implicit `setlocale (LC_ALL, "")' call, which will make this unnecessary. * libguile/feature.c (progargs_fluid): Rename to... (scm_program_arguments_fluid): ... this. Update users. * libguile/feature.h (scm_program_arguments_fluid): New internal declaration. * libguile/init.c (invoke_main_func): Call `scm_i_set_boot_program_arguments' instead of `scm_set_program_arguments'. * libguile/script.c (locale_arguments_to_string_list, scm_i_set_boot_program_arguments): New functions. (scm_compile_shell_switches): Use `locale_arguments_to_string_list'. * libguile/script.h (scm_i_set_boot_program_arguments): New internal declaration. * test-suite/standalone/Makefile.am (check_SCRIPTS, TESTS): Add `test-command-line-encoding'. * test-suite/standalone/test-command-line-encoding: New file.
Diffstat (limited to 'libguile/init.c')
-rw-r--r--libguile/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/init.c b/libguile/init.c
index 8e3888d3e..633f8c681 100644
--- a/libguile/init.c
+++ b/libguile/init.c
@@ -332,7 +332,7 @@ invoke_main_func (void *body_data)
{
struct main_func_closure *closure = (struct main_func_closure *) body_data;
- scm_set_program_arguments (closure->argc, closure->argv, 0);
+ scm_i_set_boot_program_arguments (closure->argc, closure->argv);
(*closure->main_func) (closure->closure, closure->argc, closure->argv);
scm_restore_signals ();