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

90 commits

Author SHA1 Message Date
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
Neil Jerram
c96d76b88d * First batch of libguile changes for Elisp support.
* Fixed a few typos.
* Minor rationalization of macros relating to source breakpoints.
2002-01-22 23:31:39 +00:00
Marius Vollmer
53e82297cd Turn off debugging output in scm_compile_shell_switches. 2001-11-06 12:53:22 +00:00
Marius Vollmer
3682a51a35 (scm_shell_usage, scm_compile_shell_switches): Prepend
a call to turn-on-debugging when --debug has been given instead of
turning it on directly.  Also, handle new `--no-debug' option,
which might suppress the call to turn-on-debugging.
2001-11-05 23:11:50 +00:00
Martin Grabmüller
58ade1022c * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
	feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
	gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
	gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
	guile-func-name-check.in, guile-snarf-docs-texi.in,
	guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
	hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
	objprop.c, objprop.h, options.c, options.h, random.h,
	regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
	strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
	version.c, version.h: Updated copyright notice.
2001-07-19 21:08:49 +00:00
Thien-Thi Nguyen
a06e3a75b2 Remove "face-lift" comment. 2001-07-09 07:36:48 +00:00
Martin Grabmüller
7beabedb0a * posix.c (getlogin): getlogin() implementation for Windows.
* backtrace.c, ioext.c: Include <stdio.h>.

	* unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
	exist.

	* cpp_sig_symbols.in: Added SIGBREAK.
2001-07-03 15:27:56 +00:00
Keisuke Nishida
1afff62054 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
scm_list_n): New functions.
	(SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
	SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
	(lots of files): Use the new functions.

	* goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.

	* strings.c: #include "libguile/deprecation.h".
2001-06-28 01:11:59 +00:00
Michael Livshin
1be6b49ccb * validate.h
(SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
new macros.

* unif.h: type renaming:
scm_array -> scm_array_t
scm_array_dim -> scm_array_dim_t
the old names are deprecated, all in-Guile uses changed.

* tags.h (scm_ubits_t): new typedef, representing unsigned
scm_bits_t.

* stacks.h: type renaming:
scm_info_frame -> scm_info_frame_t
scm_stack -> scm_stack_t
the old names are deprecated, all in-Guile uses changed.

* srcprop.h: type renaming:
scm_srcprops -> scm_srcprops_t
scm_srcprops_chunk -> scm_srcprops_chunk_t
the old names are deprecated, all in-Guile uses changed.

* gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
vectors.c, vports.c, weaks.c:
various int/size_t -> size_t/scm_bits_t changes.

* random.h: type renaming:
scm_rstate -> scm_rstate_t
scm_rng -> scm_rng_t
scm_i_rstate -> scm_i_rstate_t
the old names are deprecated, all in-Guile uses changed.

* procs.h: type renaming:
scm_subr_entry -> scm_subr_entry_t
the old name is deprecated, all in-Guile uses changed.

* options.h (scm_option_t.val): unsigned long -> scm_bits_t.
type renaming:
scm_option -> scm_option_t
the old name is deprecated, all in-Guile uses changed.

* objects.c: various long -> scm_bits_t changes.
(scm_i_make_class_object): flags: unsigned long -> scm_ubits_t

* numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
SCM_I_FIXNUM_BIT.

* num2integral.i.c: new file, multiply included by numbers.c, used
to "templatize" the various integral <-> num conversion routines.

* numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
deprecated.
(scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
scm_num2size): new functions.

* modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.x

* load.c: change int -> size_t in various places (where the
variable is used to store a string length).
(search-path): call scm_done_free, not scm_done_malloc.

* list.c (scm_ilength): return a scm_bits_t, not long.
some other {int,long} -> scm_bits_t changes.

* hashtab.c: various [u]int -> scm_bits_t changes.
scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
(scm_ihashx): n: uint -> scm_bits_t
use scm_bits2num instead of scm_ulong2num.

* gsubr.c: various int -> scm_bits_t changes.

* gh_data.c (gh_scm2double): no loss of precision any more.

* gh.h (gh_str2scm): len: int -> size_t
(gh_{get,set}_substr): start: int -> scm_bits_t,
len: int -> size_t
(gh_<num>2scm): n: int -> scm_bits_t
(gh_*vector_length): return scm_[u]size_t, not unsigned long.
(gh_length): return scm_bits_t, not unsigned long.

* fports.h: type renaming:
scm_fport -> scm_fport_t
the old name is deprecated, all in-Guile uses changed.

* fports.c (fport_fill_input): count: int -> scm_bits_t
(fport_flush): init_size, remaining, count: int -> scm_bits_t

* debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
those prototypes, as the functions they prototype don't exist.

* fports.c (default_buffer_size): int -> size_t
(scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
default_size: int -> size_t
(scm_setvbuf): csize: int -> scm_bits_t

* fluids.c (n_fluids): int -> scm_bits_t
(grow_fluids): old_length, i: int -> scm_bits_t
(next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
scm_bits_t
(scm_c_with_fluids): flen, vlen: int -> scm_bits_t

* filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
the new and shiny SCM_NUM2INT.

* extensions.c: extension -> extension_t (and made a typedef).

* eval.h (SCM_IFRAME): cast to scm_bits_t, not int.  just so
there are no nasty surprises if/when the various deeply magic tag
bits move somewhere else.

* eval.c: changed the locals used to store results of SCM_IFRAME,
scm_ilength and such to be of type scm_bits_t (and not int/long).
(iqq): depth, edepth: int -> scm_bits_t
(scm_eval_stack): int -> scm_bits_t
(SCM_CEVAL): various vars are not scm_bits_t instead of int.
(check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
i: int -> scm_bits_t

* environments.c: changed the many calls to scm_ulong2num to
scm_ubits2num.
(import_environment_fold): proc_as_ul: ulong -> scm_ubits_t

* dynwind.c (scm_dowinds): delta: long -> scm_bits_t

* debug.h: type renaming:
scm_debug_info -> scm_debug_info_t
scm_debug_frame -> scm_debug_frame_t
the old names are deprecated, all in-Guile uses changed.
(scm_debug_eframe_size): int -> scm_bits_t

* debug.c (scm_init_debug): use scm_c_define instead of the
deprecated scm_define.

* continuations.h: type renaming:
scm_contregs -> scm_contregs_t
the old name is deprecated, all in-Guile uses changed.
(scm_contregs_t.num_stack_items): size_t -> scm_bits_t
(scm_contregs_t.num_stack_items): ulong -> scm_ubits_t

* continuations.c (scm_make_continuation): change the type of
stack_size form long to scm_bits_t.

* ports.h: type renaming:
scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
scm_port -> scm_port_t
scm_ptob_descriptor -> scm_ptob_descriptor_t
the old names are deprecated, all in-Guile uses changed.
(scm_port_t.entry): int -> scm_bits_t.
(scm_port_t.line_number): int -> long.
(scm_port_t.putback_buf_size): int -> size_t.

* __scm.h (long_long, ulong_long): deprecated (they pollute the
global namespace and have little value besides that).
(SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
SCM handle).
(ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
exist (for size_t & ptrdiff_t)
(scm_sizet): deprecated.

* Makefile.am (noinst_HEADERS): add num2integral.i.c
2001-05-24 00:50:51 +00:00
Marius Vollmer
deec8fc26c (scm_shell): Evaluate the compiled switches in the
current module, not in the root module.
2001-05-19 00:22:51 +00:00