mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
(scm_set_program_arguments_scm): New function,
implementing `set-program-arguments'.
This commit is contained in:
parent
ecf450b1e1
commit
4920a9b613
2 changed files with 18 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -76,6 +76,22 @@ scm_set_program_arguments (int argc, char **argv, char *first)
|
|||
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. Neither the list nor the\n"
|
||||
"strings within it are copied, so should not be modified later.")
|
||||
#define FUNC_NAME s_scm_set_program_arguments_scm
|
||||
{
|
||||
return scm_fluid_set_x (progargs_fluid, lst);
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
SCM_API void scm_add_feature (const char* str);
|
||||
SCM_API SCM scm_program_arguments (void);
|
||||
SCM_API void scm_set_program_arguments (int argc, char **argv, char *first);
|
||||
SCM_API SCM scm_set_program_arguments_scm (SCM lst);
|
||||
SCM_API void scm_init_feature (void);
|
||||
|
||||
#endif /* SCM_FEATURE_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue