1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
Commit graph

99 commits

Author SHA1 Message Date
Andy Wingo
2700aa43f2 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.
2011-07-29 09:10:37 +02:00
Ludovic Courtès
dd7d0148f2 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>.
2011-04-25 23:59:37 +02:00
Andy Wingo
1693983a61 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.
2011-04-14 16:15:47 +02:00
Andy Wingo
6f06e8d35f 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.
2011-02-13 15:06:11 +01:00
Andy Wingo
4a655e50a3 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.
2011-01-07 09:18:41 -08:00
Andreas Rottmann
b710608c87 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>
2010-11-20 01:11:23 +01:00
Andy Wingo
a531e76a74 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.
2010-10-10 12:56:53 +02:00
Andy Wingo
e2e2631d75 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.
2010-10-01 13:17:44 +02:00
Andy Wingo
97b18a6640 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.
2010-09-28 09:22:38 +02:00
Ludovic Courtès
93003b16b0 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.
2010-08-27 18:59:42 +02:00
Andy Wingo
ff87b2bd7c 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.
2010-06-22 23:50:27 +02:00
Andy Wingo
049ec20299 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.
2010-06-22 22:39:21 +02:00
Andy Wingo
6128f34c4b 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.
2010-03-30 10:53:05 +02:00
Andy Wingo
655aadf4b0 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.
2010-03-30 10:28:51 +02:00
Andy Wingo
32ce4058db 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.
2010-03-12 11:54:26 +01:00
Ludovic Courtès
4f02b98d0e 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 ()'.
2009-11-17 23:42:30 +01:00
Neil Jerram
53befeb700 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/*
)
2009-06-17 00:22:09 +01:00
Andy Wingo
ee00175026 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.
2009-06-03 22:20:55 +02:00
Neil Jerram
55aae98356 Revert "(scm_shell_usage): Note need for subscription to bug-guile@gnu.org."
This reverts commit f3e3f530c2, which is
appropriate because subscription is not now required for someone to
send a message to bug-guile@gnu.org.

Conflicts:
2008-12-10 19:11:28 +00:00
Han-Wen Nienhuys
89bc270db3 Remove GH and its traces. 2008-09-28 18:42:02 -03:00
Ludovic Courtès
dbb605f575 Include <config.h> in all C files; use #ifdef HAVE_CONFIG_H' rather than #if'. 2008-09-13 15:35:27 +02:00
Ludovic Courtès
25a640ca6e Merge 1.8.4 release commit. 2008-02-21 08:41:24 +00:00
Ludovic Courtès
df44972273 Changes from arch/CVS synchronization 2007-07-17 08:39:35 +00:00
Neil Jerram
f3e3f530c2 (scm_shell_usage): Note need for subscription to bug-guile@gnu.org. 2006-11-17 15:52:51 +00:00
Kevin Ryde
2b829bbb3d merge from 1.8 branch 2006-04-17 00:05:42 +00:00
Marius Vollmer
d9c36d2a6f (scm_find_executable): Compile fix -- fgetc returns an
unsigned char cast to an int, or -1 for EOS.
2005-12-06 22:35:05 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Marius Vollmer
d152d44ba8 (scm_compile_shell_switches): Added 2005 to Copyright years. 2005-03-09 22:11:56 +00:00
Marius Vollmer
436be13ae8 (scm_compile_shell_switches): Removed debugging output. 2005-01-16 17:20:36 +00:00
Marius Vollmer
39e707a130 (sym_at, sym_atat, sym_main, all_symbols): New.
(scm_compile_shell_switches): Use them to recognize and convert
1.4 "-e" syntax.
2005-01-14 16:20:36 +00:00
Marius Vollmer
d2e53ed6f8 *** empty log message *** 2004-09-22 17:41:37 +00:00
Marius Vollmer
d910bc032c (scm_compile_shell_switches): Added 2003 and 2004 to
the Copyright years.
2004-08-27 12:46:02 +00:00
Marius Vollmer
7311b3e838 (scm_compile_shell_switches): Use scm_from_locale_string instead of
scm_makfrom0str.
2004-08-25 13:47:52 +00:00
Marius Vollmer
caa29067e7 (scm_compile_shell_switches): added '-L' switch to add to the
%load-path.
2004-08-22 19:25:51 +00:00
Marius Vollmer
cc95e00ac6 * 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.
2004-08-19 17:19:44 +00:00
Marius Vollmer
0d189573e5 Convert version to locale string before printing it. 2004-08-12 17:35:53 +00:00
Marius Vollmer
b9bd8526f0 * 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.
2004-08-02 16:14:04 +00:00
Marius Vollmer
7888309be8 * 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.
2004-07-06 10:59:25 +00:00
Rob Browning
17c22047f8 (scm_shell_usage): minor phrasing change. 2004-06-16 04:08:25 +00:00
Kevin Ryde
48dc9f349d (scm_shell_usage): Print to stdout for --help, per GNU standard. 2004-02-18 00:22:28 +00:00
Kevin Ryde
e69681aef4 (scm_shell_usage): Print bug-guile email address, as per
GNU standard.  Reported by Han-Wen Nienhuys.
2004-02-15 23:49:20 +00:00
Marius Vollmer
8b31d75b34 (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.
2003-11-17 00:22:18 +00:00
Neil Jerram
defdc4b4ee Make -s switch optional. 2003-08-30 21:22:45 +00:00
Marius Vollmer
73be1d9e8e Changed license terms to the plain LGPL thru-out. 2003-04-05 19:15:35 +00:00
Rob Browning
773ca93e88 * script.c: #include <config.h> if HAVE_CONFIG_H. 2003-03-25 23:59:43 +00:00
Marius Vollmer
de46f022e4 (scm_compile_shell_switches): Do not set scm_mask_ints. Asyncs are
enabled by default.
2002-10-09 22:26:37 +00:00
Neil Jerram
480fa28d20 Refer to provided? rather than the deprecated feature?. 2002-10-03 22:23:43 +00:00
Marius Vollmer
e62b37a0a3 (scm_compile_shell_switches): Added "2002" to Copyright years. Thanks
to Martin Grabmüller!
2002-08-26 21:46:22 +00:00
Han-Wen Nienhuys
67329a9eef * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
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.
2002-08-16 22:01:10 +00:00
Thien-Thi Nguyen
a6b844c224 Retire inclusion guard macro SCM_MAGIC_SNARFER. 2002-03-14 03:47:43 +00:00