unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Subject: set-program-arguments from scheme
Date: Sun, 14 Jan 2007 09:25:17 +1100	[thread overview]
Message-ID: <87k5zqimya.fsf@zip.com.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

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.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: feature.c.set-prog-args.diff --]
[-- Type: text/x-diff, Size: 796 bytes --]

--- feature.c.~1.62.2.1.~	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
+
 
 \f
 

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

             reply	other threads:[~2007-01-13 22:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-13 22:25 Kevin Ryde [this message]
2007-01-13 23:08 ` set-program-arguments from scheme Neil Jerram
2007-01-15 21:24   ` Kevin Ryde
2007-01-15 21:27     ` Kevin Ryde
2007-01-17 19:25     ` Neil Jerram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k5zqimya.fsf@zip.com.au \
    --to=user42@zip.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).