[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

set-program-arguments from scheme

From: Kevin Ryde
Subject: set-program-arguments from scheme
Date: Sun, 14 Jan 2007 09:25:17 +1100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

How about making scm_set_program_arguments() available at the scheme
level too?  As say

        (set-program-arguments lst)

(without the "first" arg business of the C level).

The C func is good for when you munch some options at the C level in
an scm_boot_guile, having it at the scheme level would be for the same
thing if do it in scheme instead.

--- feature.c.~       2006-02-14 08:58:57.000000000 +1100
+++ feature.c   2007-01-13 17:41:19.000000000 +1100
@@ -76,6 +76,21 @@
   scm_fluid_set_x (progargs_fluid, args);
+SCM_DEFINE (scm_set_program_arguments_scm, "set-program-arguments", 1, 0, 0, 
+           (SCM lst),
+           "Set the command line arguments to be returned by\n"
+           "@code{program-arguments} (and @code{command-line}).  @var{lst}\n"
+           "should be a list of strings, the first of which is the program\n"
+           "name (either a script name, or just @code{\"guile\"}).\n"
+           "\n"
+           "Program arguments are held in a fluid and therefore have a\n"
+           "separate value in each Guile thread.")
+#define FUNC_NAME s_scm_program_arguments
+  return scm_fluid_set_x (progargs_fluid, lst);
+#undef FUNC_NAME

reply via email to

[Prev in Thread] Current Thread [Next in Thread]