summaryrefslogtreecommitdiff
path: root/libguile/script.c
Commit message (Expand)AuthorAgeFilesLines
* Merge branch 'stable-2.0'...Conflicts: GUILE-VERSION NEWS guile-readline/ice-9/readline.scm libguile/async.c libguile/backtrace.c libguile/deprecated.h libguile/gc-malloc.c libguile/gdbint.c libguile/init.c libguile/ioext.c libguile/mallocs.c libguile/print.c libguile/rw.c libguile/scmsigs.c libguile/script.c libguile/simpos.c libguile/snarf.h libguile/strports.c libguile/threads.c libguile/vm-i-scheme.c libguile/vm-i-system.c module/srfi/srfi-18.scm test-suite/Makefile.am test-suite/standalone/test-num2integral.c Mark H Weaver2014-04-251-6/+20
|\
| * Fix memory leak on `realloc' failure...* libguile/script.c (realloc0): New helper. (script_read_arg, scm_get_meta_args): Use realloc0, not realloc. Signed-off-by: Dmitry Bogatov <KAction@gnu.org> Dmitry Bogatov2014-04-221-3/+18
| * Rely on Gnulib for <unistd.h>....* libguile/async.c: * libguile/backtrace.c: * libguile/error.c: * libguile/filesys.c: * libguile/fports.c: * libguile/gc-malloc.c: * libguile/gc.c: * libguile/gdbint.c: * libguile/init.c: * libguile/ioext.c: * libguile/load.c: * libguile/mallocs.c: * libguile/mkstemp.c: * libguile/ports.c: * libguile/posix.c: * libguile/r6rs-ports.c: * libguile/random.c: * libguile/rw.c: * libguile/scmsigs.c: * libguile/script.c: * libguile/simpos.c: * libguile/socket.c: * libguile/stime.c: * libguile/strports.c: * libguile/threads.c: Unconditionally include <unistd.h>. Mark H Weaver2014-02-271-3/+1
* | Remove private-gc.h...* libguile/simpos.c (scm_getenv_int): Move here, from gc.c. * libguile/private-gc.h: Remove, unused. * libguile/simpos.h: Move scm_getenv_int declaration here. * libguile/vm.c: * libguile/gc.c: Adapt scm_getenv_int users. * libguile/gc-malloc.c: * libguile/load.c: * libguile/script.c: Remove private-gc includes from non-users of scm_getenv_int. * libguile/Makefile.am: Adapt. Andy Wingo2013-11-281-2/+1
|/
* 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. Ludovic Courtès2011-12-151-1/+38
* fix a leak on startup from script.c...* libguile/script.c (scm_get_meta_args): Free nargv. Thanks to http://article.gmane.org/gmane.lisp.guile.devel/12685. We leak narg though. Andy Wingo2011-07-291-0/+2
* Update Gnulib to v0.0-5158-g7d06b32; remove `strcase' and `version-etc-fsf'....* 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>. Ludovic Courtès2011-04-251-2/+0
* script.c calls out to (ice-9 command-line)...* 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. Andy Wingo2011-04-141-449/+16
* autocompile -> auto-compile...* 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. Andy Wingo2011-02-131-9/+9
* use scm_from_latin1_symboln for string literals and load-symbol...* 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. Andy Wingo2011-01-071-4/+4
* Allow specifying load extensions on the command line...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> Andreas Rottmann2010-11-201-1/+21
* add --listen command line argument....* 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. Andy Wingo2010-10-101-0/+56
* deprecate turn-on-debugging, it is obsolete...* 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. Andy Wingo2010-10-011-4/+1
* default to regular vm for noninteractive use...* 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. Andy Wingo2010-09-281-0/+4
* Assorted `syntax-check' fixes....* 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. Ludovic Courtès2010-08-271-2/+3
* top-repl out to its own module...* 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. Andy Wingo2010-06-221-1/+6
* deprecate named-module-use!, load-emacs-interface, and remove --emacs...* 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. Andy Wingo2010-06-221-8/+0
* correctly handle --no-autocompile (fixed broken previous patch)...* 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. Andy Wingo2010-03-301-18/+6
* going through scm_shell not necessary to get autocompilation...* 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. Andy Wingo2010-03-301-5/+3
* prompt around REPL evaluations, and around `guile' program invocation...* 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. Andy Wingo2010-03-121-1/+8
* Use Gnulib's `version-etc-fsf' for `--version' and `--help' output....* 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 ()'. Ludovic Courtès2009-11-171-14/+12
* Change Guile license to LGPLv3+...(Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* ) Neil Jerram2009-06-171-6/+7
* implement autocompilation...* 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. Andy Wingo2009-06-031-0/+30
* Revert "(scm_shell_usage): Note need for subscription to bug-guile@gnu.org."...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: Neil Jerram2008-12-101-3/+1
* Remove GH and its traces.Han-Wen Nienhuys2008-09-281-4/+7
* Include <config.h> in all C files; use `#ifdef HAVE_CONFIG_H' rather than `#if'.Ludovic Courtès2008-09-131-1/+1
* Merge 1.8.4 release commit.Ludovic Courtès2008-02-211-2/+2
* Changes from arch/CVS synchronizationLudovic Courtès2007-07-171-2/+2
* (scm_shell_usage): Note need for subscription to bug-guile@gnu.org.Neil Jerram2006-11-171-1/+3
* merge from 1.8 branchKevin Ryde2006-04-171-2/+2
* (scm_find_executable): Compile fix -- fgetc returns an...unsigned char cast to an int, or -1 for EOS. Marius Vollmer2005-12-061-3/+6
* The FSF has a new address.Marius Vollmer2005-05-231-1/+1
* (scm_compile_shell_switches): Added 2005 to Copyright years.Marius Vollmer2005-03-091-1/+1
* (scm_compile_shell_switches): Removed debugging output.Marius Vollmer2005-01-161-3/+0
* (sym_at, sym_atat, sym_main, all_symbols): New....(scm_compile_shell_switches): Use them to recognize and convert 1.4 "-e" syntax. Marius Vollmer2005-01-141-1/+37
* *** empty log message ***Marius Vollmer2004-09-221-5/+5
* (scm_compile_shell_switches): Added 2003 and 2004 to...the Copyright years. Marius Vollmer2004-08-271-1/+1
* (scm_compile_shell_switches): Use scm_from_locale_string instead of...scm_makfrom0str. Marius Vollmer2004-08-251-6/+7
* (scm_compile_shell_switches): added '-L' switch to add to the...%load-path. Marius Vollmer2004-08-221-1/+25
* * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,...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. Marius Vollmer2004-08-191-4/+4
* Convert version to locale string before printing it.Marius Vollmer2004-08-121-1/+1
* * numbers.h, numbers.c, discouraged.h, discouraged.c (scm_short2num,...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. Marius Vollmer2004-08-021-1/+1
* * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,...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. Marius Vollmer2004-07-061-1/+1
* (scm_shell_usage): minor phrasing change.Rob Browning2004-06-161-1/+1
* (scm_shell_usage): Print to stdout for --help, per GNU standard.Kevin Ryde2004-02-181-3/+5
* (scm_shell_usage): Print bug-guile email address, as per...GNU standard. Reported by Han-Wen Nienhuys. Kevin Ryde2004-02-151-1/+3
* (scm_compile_shell_switches): Use scm_c_read_string for the "-e"...option instead of scm_str2symbol. This allows things like (@ ...) to be specified for the entry point. Marius Vollmer2003-11-171-2/+2
* Make -s switch optional.Neil Jerram2003-08-301-3/+4
* Changed license terms to the plain LGPL thru-out.Marius Vollmer2003-04-051-36/+12
* * script.c: #include <config.h> if HAVE_CONFIG_H.Rob Browning2003-03-251-0/+3