summaryrefslogtreecommitdiff
path: root/libguile/script.c
AgeCommit message (Collapse)AuthorFilesLines
2011-12-15Arrange to convert command-line arguments from the right encoding.Ludovic Courtès1-1/+38
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.
2011-07-29fix a leak on startup from script.cAndy Wingo1-0/+2
* libguile/script.c (scm_get_meta_args): Free nargv. Thanks to http://article.gmane.org/gmane.lisp.guile.devel/12685. We leak narg though.
2011-04-25Update Gnulib to v0.0-5158-g7d06b32; remove `strcase' and `version-etc-fsf'.Ludovic Courtès1-2/+0
* m4/gnulib-cache.m4: Remove `strcase' and `version-etc-fsf'. * configure.ac (POTENTIAL_GCC_CFLAGS): Remove `-Wundef'. * libguile/script.c: Don't include <version-etc.h>.
2011-04-14script.c calls out to (ice-9 command-line)Andy Wingo1-449/+16
* libguile/script.c (scm_shell_usage): Call (ice-9 command-line)'s shell-usage. (scm_compile_shell_switches): Likewise, call (ice-9 command-line)'s compile-shell-switches.
2011-02-13autocompile -> auto-compileAndy Wingo1-9/+9
* NEWS: * check-guile.in: * doc/guile.1: * doc/ref/scheme-scripts.texi: * libguile/init.c: * libguile/load.c: * libguile/load.h: * libguile/script.c: * module/Makefile.am: * module/ice-9/boot-9.scm: * module/scripts/compile.scm: * module/system/base/compile.scm: * test-suite/Makefile.am: * test-suite/tests/popen.test: Change "autocompile" to "auto-compile" or "auto_compile", as appropriate, in variable names, function names, command line arguments, and the documentation.
2011-01-07use scm_from_latin1_symboln for string literals and load-symbolAndy Wingo1-4/+4
* libguile/bytevectors.c: * libguile/eval.c: * libguile/goops.c: * libguile/i18n.c: * libguile/load.c: * libguile/memoize.c: * libguile/modules.c: * libguile/ports.c: * libguile/print.c: * libguile/procs.c: * libguile/programs.c: * libguile/read.c: * libguile/script.c: * libguile/srfi-14.c: * libguile/stacks.c: * libguile/strings.c: * libguile/throw.c: * libguile/vm.c: Use scm_from_latin1_symboln to make symbols from string literals, because they aren't in the user's locale -- they are in ASCII, and we can optimize this case. * libguile/vm-i-loader.c: Also use scm_from_latin1_symboln when loading narrow symbols.
2010-11-20Allow specifying load extensions on the command lineAndreas Rottmann1-1/+21
Add a new command-line switch `-x', which manipulates the %load-extensions list. * libguile/script.c (scm_compile_shell_switches): Process the new "-x" switch. (scm_shell_usage): Mention the "-x" switch. * doc/ref/scheme-scripts.texi (Invoking Guile): Add "-x" switch to the list of command-line switches. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2010-10-10add --listen command line argument.Andy Wingo1-0/+56
* libguile/script.c (scm_shell_usage, scm_compile_shell_switches): Add a --listen argument to spawn a REPL server, possibly specifying the port or path to listen on. The goal is for this to be the default way to allow debugging via Emacs or simply using netcat.
2010-10-01deprecate turn-on-debugging, it is obsoleteAndy Wingo1-4/+1
* libguile/script.c (scm_compile_shell_switches): Don't generate calls to turn-on-debugging. * module/ice-9/boot-9.scm (turn-on-debugging): Remove. * module/ice-9/deprecated.scm (turn-on-debugging): Add deprecated shim.
2010-09-28default to regular vm for noninteractive useAndy Wingo1-0/+4
* libguile/script.c (scm_compile_shell_switches): Select the debugging VM in the cases that we previously would select deval -- when running interactively without --no-debug, or otherwise with --debug. * libguile/vm.c: Default to the regular engine. (scm_c_set_vm_engine_x): Remove requirement for the VM to have no pending computations.
2010-08-27Assorted `syntax-check' fixes.Ludovic Courtès1-2/+3
* doc/ref/Makefile.am ($(snarf_doc).am): Untabify. * libguile/eval.c: Remove unnecessary <assert.h> inclusion. * .x-sc_m4_quote_check: Update. * libguile/error.c (scm_error_scm): Use `EXIT_FAILURE' instead of 1. * libguile/init.c (fixconfig, scm_boot_guile): Likewise. * libguile/null-threads.h (scm_i_pthread_exit): Likewise. * libguile/script.c (scm_compile_shell_switches): Likewise. * test-suite/standalone/test-conversion.c: Likewise. * test-suite/standalone/test-list.c: Likewise. * test-suite/standalone/test-unwind.c: Likewise. * libguile/async.c: Remove unnecessary inclusion of <signal.h>. * NEWS: "filesystem" -> "file system". * doc/ref/r6rs.texi: Ditto. * cfg.mk (local-checks-to-skip): New variable. * .x-sc_m4_quote_check, .x-sc_obsolete_symbols, .x-sc_program_name, .x-sc_prohibit_atoi_atof, .x-sc_prohibit_magic_number_exit: New files. * .gitignore: Update.
2010-06-22top-repl out to its own moduleAndy Wingo1-1/+6
* module/ice-9/boot-9.scm: * module/ice-9/top-repl.scm: Move top-repl out here. * module/Makefile.am: Add new file. * module/ice-9/deprecated.scm (top-repl): Deprecated shim. * libguile/script.c (scm_compile_shell_switches): Invoke top-repl from its new location.
2010-06-22deprecate named-module-use!, load-emacs-interface, and remove --emacsAndy Wingo1-8/+0
* module/ice-9/boot-9.scm: * module/ice-9/deprecated.scm (named-module-use!) (load-emacs-interface): Deprecate these. * module/ice-9/gds-client.scm (run-utility): Redefine to not use named-module-use!. * libguile/script.c (scm_shell_usage): Remove --emacs option. (scm_compile_shell_switches): Remove support for --emacs. * module/ice-9/boot-9.scm (top-repl): Don't muck with --emacs. * doc/ref/scheme-scripts.texi (Invoking Guile): Remove note about --emacs.
2010-03-30correctly handle --no-autocompile (fixed broken previous patch)Andy Wingo1-18/+6
* libguile/load.c (scm_init_load): Initialize %load-should-autocompile to false. * libguile/init.c (scm_i_init_guile): * libguile/load.h: * libguile/load.c (scm_init_load_should_autocompile): At the end of init, check GUILE_AUTO_COMPILE. * libguile/script.c (scm_compile_shell_switches): Instead of making --autocompile / --no-autocompile render into the s-expression, just handle them immediately, so that --no-autocompile takes effect for the expander.
2010-03-30going through scm_shell not necessary to get autocompilationAndy Wingo1-5/+3
* libguile/load.c (scm_init_load): Initialize %load-should-autocompile from the environment variable here, so that apps that don't go through scm_shell get autocompilation. * libguile/script.c (scm_compile_shell_switches): Explicitly enable or disable autocompilation here, if told to do so.
2010-03-12prompt around REPL evaluations, and around `guile' program invocationAndy Wingo1-1/+8
* module/ice-9/control.scm (%): Add a single-argument case, which instates a default prompt with a default handler. * libguile/script.c (scm_compile_shell_switches): Wrap user programs in a default prompt. * module/system/repl/common.scm (repl-eval): REPL expressions are user programs too; wrap each one in a default prompt.
2009-11-17Use Gnulib's `version-etc-fsf' for `--version' and `--help' output.Ludovic Courtès1-14/+12
* m4/gnulib-cache.m4: Add `version-etc-fsf'. Switch to LGPLv3+. * GUILE-VERSION (PACKAGE): Change to "GNU Guile". * Makefile.am (distdir): New variable. * libguile/script.c (scm_shell_usage): Improve formatting. Use `emit_bug_reporting_address ()'. (scm_compile_shell_switches): Use `version_etc ()'.
2009-06-17Change Guile license to LGPLv3+Neil Jerram1-6/+7
(Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* )
2009-06-03implement autocompilationAndy Wingo1-0/+30
* am/guilec (.scm.go): Set GUILE_AUTO_COMPILE=0 when compiling individual files, and remove the mkdir -p as compile-file takes care of that now. * libguile/load.c (do_try_autocompile, autocompile_catch_handler) (scm_try_autocompile, scm_init_load): Implement autocompilation. * libguile/script.c (scm_shell_usage, scm_compile_shell_switches): Add --autocompile / --no-autocompile command-line options, and support for the GUILE_AUTO_COMPILE environment variable, defaulting to autocompilation enabled.
2008-12-10Revert "(scm_shell_usage): Note need for subscription to bug-guile@gnu.org."Neil Jerram1-3/+1
This reverts commit f3e3f530c28cfa5c7830c5d9b01de6fc388bc42a, which is appropriate because subscription is not now required for someone to send a message to bug-guile@gnu.org. Conflicts:
2008-09-28Remove GH and its traces.Han-Wen Nienhuys1-4/+7
2008-09-13Include <config.h> in all C files; use `#ifdef HAVE_CONFIG_H' rather than `#if'.Ludovic Courtès1-1/+1
2008-02-21Merge 1.8.4 release commit.Ludovic Courtès1-2/+2
2007-07-17Changes from arch/CVS synchronizationLudovic Courtès1-2/+2
2006-11-17(scm_shell_usage): Note need for subscription to bug-guile@gnu.org.Neil Jerram1-1/+3
2006-04-17merge from 1.8 branchKevin Ryde1-2/+2
2005-12-06(scm_find_executable): Compile fix -- fgetc returns anMarius Vollmer1-3/+6
unsigned char cast to an int, or -1 for EOS.
2005-05-23The FSF has a new address.Marius Vollmer1-1/+1
2005-03-09(scm_compile_shell_switches): Added 2005 to Copyright years.Marius Vollmer1-1/+1
2005-01-16(scm_compile_shell_switches): Removed debugging output.Marius Vollmer1-3/+0
2005-01-14(sym_at, sym_atat, sym_main, all_symbols): New.Marius Vollmer1-1/+37
(scm_compile_shell_switches): Use them to recognize and convert 1.4 "-e" syntax.
2004-09-22*** empty log message ***Marius Vollmer1-5/+5
2004-08-27(scm_compile_shell_switches): Added 2003 and 2004 toMarius Vollmer1-1/+1
the Copyright years.
2004-08-25(scm_compile_shell_switches): Use scm_from_locale_string instead ofMarius Vollmer1-6/+7
scm_makfrom0str.
2004-08-22(scm_compile_shell_switches): added '-L' switch to add to theMarius Vollmer1-1/+25
%load-path.
2004-08-19* strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,Marius Vollmer1-4/+4
scm_i_string_writable_chars, scm_i_string_stop_writing): New, to replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all uses. (scm_i_make_string, scm_c_make_string): New, to replace scm_allocate_string. Updated all uses. (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Deprecated. (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string, scm_str2string, scm_makfrom0str, scm_makfrom0str_opt): Discouraged. Replaced all uses with scm_from_locale_string or similar, as appropriate. (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x, scm_c_substring, scm_c_substring_shared, scm_c_substring_copy, scm_substring_shared, scm_substring_copy): New. * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC, SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS, SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol, scm_str2symbol, scm_mem2uninterned_symbol): Discouraged. (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str): Deprecated. (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS, SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed. (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln): New, to replace scm_str2symbol and scm_mem2symbol, respectively. Updated all uses. (scm_gensym): Generate only the number suffix in the buffer, just string-append the prefix.
2004-08-12Convert version to locale string before printing it.Marius Vollmer1-1/+1
2004-08-02* numbers.h, numbers.c, discouraged.h, discouraged.c (scm_short2num,Marius Vollmer1-1/+1
scm_ushort2num, scm_int2num, scm_uint2num, scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint, scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff, scm_long_long2num, scm_ulong_long2num, scm_num2long_long, scm_num2ulong_long): Discouraged by moving to discouraged.h and discouraged.c and reimplementing in terms of scm_from_* and scm_to_*. Changed all uses to the new scm_from_* and scm_to_* functions.
2004-07-06* deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,Marius Vollmer1-1/+1
SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h". Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and scm_is_bool, respectively.
2004-06-16(scm_shell_usage): minor phrasing change.Rob Browning1-1/+1
2004-02-18(scm_shell_usage): Print to stdout for --help, per GNU standard.Kevin Ryde1-3/+5
2004-02-15(scm_shell_usage): Print bug-guile email address, as perKevin Ryde1-1/+3
GNU standard. Reported by Han-Wen Nienhuys.
2003-11-17(scm_compile_shell_switches): Use scm_c_read_string for the "-e"Marius Vollmer1-2/+2
option instead of scm_str2symbol. This allows things like (@ ...) to be specified for the entry point.
2003-08-30Make -s switch optional.Neil Jerram1-3/+4
2003-04-05Changed license terms to the plain LGPL thru-out.Marius Vollmer1-36/+12
2003-03-25* script.c: #include <config.h> if HAVE_CONFIG_H.Rob Browning1-0/+3
2002-10-09(scm_compile_shell_switches): Do not set scm_mask_ints. Asyncs areMarius Vollmer1-2/+0
enabled by default.
2002-10-03Refer to provided? rather than the deprecated feature?.Neil Jerram1-2/+2
2002-08-26(scm_compile_shell_switches): Added "2002" to Copyright years. ThanksMarius Vollmer1-2/+2
to Martin Grabmüller!
2002-08-16* mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead ofHan-Wen Nienhuys1-3/+3
malloc. * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft: only use SCM_MIN_HEAP_SEG_SIZE. * ports.c (scm_add_to_port_table): add backwards compatibility function * ports.h: use scm_i_ prefix for port table and port table size.