summaryrefslogtreecommitdiff
path: root/libguile/init.c
AgeCommit message (Collapse)AuthorFilesLines
2014-07-03Fix problems with Windows file names that use backslashes.Eli Zaretskii1-0/+3
* libguile/load.c (scm_i_mirror_backslashes): New function. (scm_init_load_path): Call it to produce MS-Windows file names with forward slashes. (FILE_NAME_SEPARATOR_STRING): Define as "/" on all platforms. * libguile/load.h (scm_i_mirror_backslashes): Add prototype. * libguile/init.c (scm_boot_guile): Call scm_i_mirror_backslashes on argv[0]. * libguile/filesys.c (scm_getcwd): Call scm_i_mirror_backslashes on the directory name returned by getcwd. * test-suite/tests/ports.test ("file name separators"): New test.
2014-04-28Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo1-0/+1
Conflicts: .gitignore doc/example-smob/Makefile doc/ref/api-smobs.texi doc/ref/libguile-concepts.texi doc/ref/libguile-smobs.texi libguile.h libguile/finalizers.c libguile/finalizers.h libguile/goops.c module/language/tree-il/compile-glil.scm module/oop/goops.scm
2014-04-28New foreign object facility, to replace SMOBsAndy Wingo1-0/+1
* libguile/foreign-object.c: * libguile/foreign-object.h: * module/system/foreign-object.scm: * test-suite/standalone/test-foreign-object-c.c: * test-suite/standalone/test-foreign-object-scm: New files. * test-suite/standalone/Makefile.am: * module/Makefile.am: * libguile/Makefile.am: Add new files. * libguile.h: Add foreign-object.h. * libguile/init.c (scm_i_init_guile): Call scm_register_foreign_object.
2014-04-25Merge branch 'stable-2.0'v2.1.0Mark H Weaver1-3/+2
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
2014-03-22Define a C fluid for current-warning-portAndy Wingo1-1/+2
* libguile/ports.c (scm_current_input_port, scm_current_output_port) (scm_current_error_port): Fix declarations to C99. (scm_current_warning_port, scm_set_current_warning_port): Rework to use a C fluid, like scm_current_error_port. (scm_init_ports): Initialize and define the warning port fluid. * libguile/init.c (scm_init_standard_ports): Init the current warning port. * module/ice-9/boot-9.scm: Remove definitions for current-warning-port. Instead, steal it from the boot objtable with port-parameterize!.
2014-02-27Rely on Gnulib for <unistd.h>.Mark H Weaver1-3/+2
* 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>.
2013-11-27Remove nonfunctional gdb interfaceAndy Wingo1-2/+0
* libguile/gdb_interface.h: * libguile/gdbint.c: * libguile/gdbint.h: Remove. These were last modified significantly in 1997 and I think they are unused. * libguile/guile.c: Remove use. * libguile.h: Remove inclusion. * libguile/Makefile.am: Remove reference. * libguile/init.c: Remove use.
2013-11-19Rename objcodes?.{scm,c,h} to loader.{scm,c,h}Andy Wingo1-2/+2
* libguile/loader.c: * libguile/loader.h: Rename from objcodes.[ch]. * module/system/vm/loader.scm: Rename from objcode.scm. * libguile/Makefile.am: * libguile/gsubr.c: * libguile/init.c: * libguile/procs.c: * libguile/vm.c: * module/Makefile.am: * module/ice-9/eval-string.scm: * module/language/rtl/spec.scm: * module/system/base/target.scm: * module/system/repl/command.scm: * module/system/repl/common.scm: * module/system/vm/debug.scm: * module/system/vm/disassembler.scm: * module/system/vm/objcode.scm: * test-suite/tests/compiler.test: * test-suite/tests/dwarf.test: * test-suite/tests/rtl-compilation.test: * test-suite/tests/rtl.test: Adapt.
2013-04-14Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver1-0/+1
Conflicts: GUILE-VERSION libguile/array-map.c libguile/fports.h libguile/gc.h libguile/inline.h libguile/ports.c libguile/ports.h libguile/print.c libguile/r6rs-ports.c libguile/read.c test-suite/tests/00-socket.test
2013-04-07Add keyword arguments to file opening procedures.Mark H Weaver1-0/+1
* libguile/fports.c (scm_open_file_with_encoding): New API function, containing the code previously found in 'scm_open_file', but modified to accept the new 'guess_encoding' and 'encoding' arguments. (scm_open_file): Now just a simple wrapper that calls 'scm_open_file_with_encoding'. (scm_i_open_file): New implementation of 'open-file' that accepts keyword arguments '#:guess-encoding' and '#:encoding', and calls 'scm_open_file_with_encoding'. (scm_init_fports_keywords): New initialization function that gets called after keywords are initialized. * libguile/fports.h (scm_open_file_with_encoding, scm_init_fports_keywords): Add prototypes. * libguile/init.c (scm_i_init_guile): Call 'scm_init_fports_keywords'. * module/ice-9/boot-9.scm: Add enhanced versions of 'open-input-file', 'open-output-file', 'call-with-input-file', 'call-with-output-file', 'with-input-from-file', 'with-output-to-file', and 'with-error-to-file', that accept keyword arguments '#:binary', '#:encoding', and (for input port constructors) '#:guess-encoding'. * doc/ref/api-io.texi (File Ports): Update documentation. * test-suite/tests/ports.test ("keyword arguments for file openers"): Add tests.
2013-03-28Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver1-2/+1
Conflicts: configure.ac libguile/deprecated.c libguile/deprecated.h libguile/filesys.h libguile/fluids.c libguile/fports.c libguile/gc.c libguile/guile.c libguile/numbers.c libguile/objcodes.c libguile/r6rs-ports.c libguile/smob.c libguile/socket.c libguile/threads.h module/language/scheme/decompile-tree-il.scm module/language/tree-il/peval.scm test-suite/tests/syncase.test
2013-03-09remove init.c iselect includeAndy Wingo1-2/+1
* libguile/init.c: Remove iselect include.
2012-03-08Merge remote-tracking branch 'local-2.0/stable-2.0'Andy Wingo1-2/+2
Conflicts: configure.ac libguile/finalizers.c libguile/finalizers.h libguile/gc.c libguile/gc.h libguile/inline.c libguile/inline.h libguile/ports.c libguile/smob.c libguile/smob.h module/ice-9/deprecated.scm module/ice-9/r4rs.scm
2012-03-08run finalizers asynchronously in asyncsAndy Wingo1-0/+2
* libguile/finalizers.c: New excitement! We'll be running finalizers asynchronously, from asyncs. This will make it safer to allocate while holding a mutex. (GC_set_finalizer_notifier): Add back-compat shim. * libguile/init.c (scm_i_init_guile): Init the async finalizer mechanism during boot. * libguile/gc.c (scm_storage_prehistory): Tell libgc we'll be finalizing on demand. (scm_gc): Explicitly run finalizers here. * libguile/threads.c (guilify_self_2): Run finalizers here if queue_finalizer_async happened to run during guilify_self_1. * configure.ac: Add check for GC_set_finalizer_notifier.
2012-03-07Fix a segfault when /dev/urandom is not accessibleGiuseppe Scrivano1-2/+2
* libguile/init.c (scm_i_init_guile): Call `scm_init_random' before `scm_init_macros'.
2012-02-24run finalizers asynchronously (in asyncs and/or pthreads)Andy Wingo1-0/+5
* libguile/finalizers.c: New excitement! We'll be running finalizers in threads, if that's available. If it's not available, during early boot, we can run finalizers in asyncs. This will make it safer to allocate while holding a mutex. * libguile/posix.c (scm_fork): Shut down the finalizer thread before forking. * libguile/init.c (scm_i_init_guile): Init the async finalizer mechanism during boot and, if available, initialialize the finalizer thread at the very end. * libguile/gc.c (scm_storage_prehistory): Tell libgc we'll be finalizing on demand. (scm_gc): Explicitly run finalizers here. If you're calling this function, you probably want synchronous GC.
2012-02-23Revert "with a threaded guile, lock weak sets and tables during a fork"Andy Wingo1-1/+0
This reverts commit f609480611cfd1585409fd6b1b90beb730b026cf.
2012-02-19move revealed-count mechanism to fports.cAndy Wingo1-2/+1
* libguile/fports.c (scm_revealed_count, scm_port_revealed) (scm_set_port_revealed_x, scm_adjust_port_revealed_x): Move these APIs here, and only operate on fports. To keep revealed ports alive, now we will just keep them in a data structure that the GC knows about -- a static list. * libguile/fports.h: Add revealed count to scm_t_fport, and move decls of revealed-count functions here. * libguile/ports.h: * libguile/ports.c: Adapt to change. Remove SCM_REVEALED and SCM_SETREVEALED; since they only apply to fports now, keeping them around would be inviting type errors. (finalize_port): We don't need to worry about resuscitating ports here. * libguile/init.c: Use the scm_set_port_revealed_x function to set the revealed counts on stream ports.
2012-02-17with a threaded guile, lock weak sets and tables during a forkAndy Wingo1-0/+1
* libguile/weak-set.c (make_weak_set): * libguile/weak-table.c (make_weak_table): If we have a threaded Guile, * keep a weak set (table) of weak sets (tables). Use this and the pthread_atfork mechanism to lock and unlock weak sets and weak tables during a fork(). * libguile/weak-set.h (scm_weak_set_prehistory): New internal API. * libguile/init.c: Add call to scm_weak_set_prehistory().
2012-02-08Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo1-4/+5
Conflicts: GUILE-VERSION libguile/gc-malloc.c libguile/ports.c
2012-02-03Use Gnulib's `regex' module.Ludovic Courtès1-4/+5
This should help with regex portability, as reported in <http://bugs.gnu.org/10684> for Darwin 8.11. * m4/gnulib-cache.m4 (gl_MODULES): Add `regex'. * configure.ac: Remove header checks for regex.h, rxposix.h, and rx/rxposix.h. Remove check for the `regcomp' function. Remove definition of `HAVE_REGCOMP'. Define `ENABLE_REGEX'. * libguile/init.c: Check for `ENABLE_REGEX' instead of `HAVE_REGCOMP'. * libguile/regex-posix.c: Always include <regex.h>. Remove #ifdefs for rxposix.h and co.
2011-12-19Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo1-1/+1
Conflicts: libguile/feature.c m4/gnulib-cache.m4 module/ice-9/deprecated.scm module/language/tree-il/peval.scm
2011-12-15Arrange to convert command-line arguments from the right encoding.Ludovic Courtès1-1/+1
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-10-27Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo1-2/+2
Conflicts: GUILE-VERSION libguile/deprecated.c libguile/gc-malloc.c module/language/tree-il/peval.scm
2011-10-24remove weak pairs, rewrite weak vectorsAndy Wingo1-4/+2
* libguile/weak-vector.c: * libguile/weak-vector.h: Renamed from weaks.[ch]. Remove weak pairs. They were not safe to access with `car' and `cdr'. Remove weak alist vectors, as we have weak tables and sets. Reimplement weak vectors, moving the implementation here. * libguile/vectors.c: * libguile/vectors.h: Remove the extra header word. Use scm_c_weak_vector_ref / scm_c_weak_vector_set_x to access weak vectors. * libguile/snarf.h: Remove the extra header word in vectors. * libguile/threads.c (do_thread_exit, fat_mutex_lock, fat_mutex_unlock): Instead of weak pairs, store thread-owned mutexes in a list of one-element weak vectors. * libguile/guardians.c (finalize_guarded): Similarly, store object guardians in a list of one-element weak vectors. * libguile/modules.c (scm_module_reverse_lookup): We no longer need to handle the case of weak references. * libguile/print.c (iprin1): Use the standard vector accessor to print vectors. * libguile.h: * libguile/Makefile.am: * libguile/gc-malloc.c: * libguile/gc.c: * libguile/goops.c: * libguile/init.c: * libguile/objprop.c: * libguile/struct.c: Update includes. * module/ice-9/weak-vector.scm: Load weak vector definitions using an extension instead of %init-weaks-builtins. * test-suite/tests/weaks.test: Use the make-...-hash-table names instead of the old alist vector names.
2011-10-24add weak table implementationAndy Wingo1-0/+2
* libguile/weak-table.c: * libguile/weak-table.h: New files, implementing open-addressed weak hash tables, similar to the implementation of weak sets. This will let us remove weak pairs. * libguile.h: * libguile/Makefile.am: * libguile/evalext.c: * libguile/gc.c: * libguile/init.c: * libguile/print.c: * libguile/tags.h: Update all the pieces for the new files and tc7.
2011-10-23add weak setsAndy Wingo1-0/+1
* libguile/weak-set.c: * libguile/weak-set.h: New files, implementing weak sets, for use in the symbol table and port set. Eventually we will be able to remove weak pairs. * libguile.h: * libguile/Makefile.am: Add new files. * libguile/evalext.c: * libguile/gc.c: * libguile/init.c: * libguile/print.c: * libguile/tags.h: Add support for the new types.
2011-10-22Initialize `get_internal_run_time' before it is used.Ludovic Courtès1-2/+2
* libguile/init.c (scm_i_init_guile): Call `scm_init_stime' before `scm_init_gc'. Fixes <https://savannah.gnu.org/bugs/?34616> reported by Bake Timmons.
2011-06-30Merge remote-tracking branch 'local-2.0/stable-2.0'Andy Wingo1-0/+2
Conflicts: libguile/deprecated.c module/ice-9/psyntax-pp.scm
2011-06-30fix --disable-modules buildAndy Wingo1-0/+2
* configure.ac (HAVE_MODULES): Define HAVE_MODULES iff --enable-modules. * libguile/deprecated.c (scm_dynamic_args_call) * libguile/extensions.c (load_extension): * libguile/init.c (scm_i_init_guile): Use HAVE_MODULES in a few places.
2011-05-15remove #define STACK_CHECKING from __scm.h.Andy Wingo1-2/+0
* libguile/__scm.h: Remove #define STACK_CHECKING and #undef NO_CEVAL_STACK_CHECKING. * libguile/debug.c (scm_debug_options) * libguile/init.c (scm_i_init_guile): * libguile/stackchk.c (scm_report_stack_overflow): * libguile/stackchk.h: Always enable stack checking.
2011-04-25Make the `sizeof (mpz_t)' check at compile-time.Ludovic Courtès1-7/+0
* libguile/init.c (scm_i_init_guile): Remove the `sizeof (mpz_t)' run-time check. * libguile/numbers.c: Add a compile-time check for `sizeof (mpz_t)'.
2011-04-15Allow compilation with `--disable-posix'.Ludovic Courtès1-1/+1
Reported by Dmitry Dzhus <dima@dzhus.org>. * configure.ac: Remove `AC_LIBOBJ([filesys])'. Document `--disable-posix' as omitting non-essential POSIX interfaces. * libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): Add `filesys.c'. (DOT_DOC_FILES): Add `filesys.doc'. (EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): Remove `filesys.c'. * libguile/posix.c (scm_mkstemp, scm_access): Move to `filesys.c'. (scm_init_posix): Move `R_OK' etc. to `filesys.c'. * libguile/filesys.c (scm_chown, scm_chmod, scm_umask, scm_open_fdes, scm_open, scm_close, scm_close_fdes, scm_link, scm_tc16_dir, scm_directory_stream_p, scm_opendir, scm_readdir, scm_rewinddir, scm_closedir, scm_dir_print, scm_dir_free, scm_chdir, scm_getcwd, set_element, fill_select_type, get_element, retrieve_select_type, scm_select, scm_fcntl, scm_fsync, scm_symlink, scm_readlink, scm_lstat, scm_copy_file): Conditionalize on HAVE_POSIX. (scm_mkstemp, scm_access): New functions. (scm_init_filesys): Conditionalize `scm_tc16_dir', `O_RDONLY', etc. on HAVE_POSIX. Define `R_OK', `W_OK', etc. * libguile/fports.c (fport_print): Use `scm_ttyname' only when HAVE_POSIX. * libguile/i18n.c (lock_locale_mutex, unlock_locale_mutex): New functions. Update users of `scm_i_locale_mutex' to use them. * libguile/init.c (scm_i_init_guile): Always call `scm_init_filesys'. * meta/guile-tools.in (main): Use `setlocale' only when it is defined. * module/ice-9/boot-9.scm: Always load `ice-9/posix'.
2011-03-25threading / with_guile refactor to use more GC_stack_baseAndy Wingo1-7/+1
* libguile/init.h: * libguile/init.c (scm_i_init_guile): Change arg to this internal function from SCM_STACKITEM* to void*. Actually it's a struct GC_stack_base*. * libguile/bdw-gc.h: Don't do pthread redirects, because we don't want to affect applications' pthread_* bindings. * libguile/pthread-threads.h (scm_i_pthread_create) (scm_i_pthread_detach, scm_i_pthread_exit, scm_i_pthread_cancel) (scm_i_pthread_sigmask): Do pthread redirects here, in this internal header. * libguile/threads.h: Remove declaration of internal scm_i_with_guile_and_parent. Remove declaration of undefined scm_threads_init_first_thread. Make declaration of internal scm_threads_prehistory actually internal, and take a void* (actually a struct GC_stack_base*). * libguile/threads.c (GC_get_stack_base): Implement a shim if this function is unavailable, and fold in the implementations of get_thread_stack_base. (GC_call_with_stack_base): Actually implement. (guilify_self_1): Take a GC_stack_base* as an arg. (scm_i_init_thread_for_guile): Likewise, and set up libgc for registration of other threads. (scm_init_guile): Use GC_get_stack_base instead of our own guesswork. (with_guile_and_parent, scm_i_with_guile_and_parent): Rework to trampoline through a GC_call_with_stack_base. (scm_threads_prehistory): Pass the "base" arg on to guilify_self_1.
2011-03-11fix port-filename without readline to match the docsAndy Wingo1-15/+5
* libguile/init.c (stream_body, scm_standard_stream_to_port): Don't name stdin, stdout, and stderr -- at least not as strings. That confuses any code which tries to treat port-filename as a real filename, like the syntax expander, or the `load' procedure/macro. Also this behavior matches the docs now.
2011-02-13autocompile -> auto-compileAndy Wingo1-1/+1
* 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-10deprecate primitive propertiesAndy Wingo1-2/+0
* libguile.h: * libguile/Makefile.am: * libguile/deprecated.h: * libguile/deprecated.c: * libguile/init.c: * libguile/properties.c: * libguile/properties.h: Deprecate the "primitive properties" interface. It was only used to implement object properties, and that is no longer the case. * module/ice-9/boot-9.scm (make-object-property): Reimplement just in terms of weak hash tables, and make threadsafe. * NEWS: * doc/ref/api-utility.texi: Update.
2011-02-09remove dead code in init.cAndy Wingo1-38/+1
* libguile/init.c: Remove some dead code.
2010-12-03add (ice-9 poll), a poll wrapperAndy Wingo1-0/+2
* libguile/poll.c: * libguile/poll.h: * module/ice-9/poll.scm: New module, (ice-9 poll). * module/Makefile.am: * libguile/init.c: * libguile/Makefile.am: Adapt. * configure.ac: Check for poll.h and poll.
2010-10-08Register `scm_init_r6rs_ports' as an extension.Ludovic Courtès1-0/+1
* libguile/r6rs-ports.c (scm_register_r6rs_ports): New function. * libguile/r6rs-ports.h (scm_register_r6rs_ports): New declaration. * libguile/init.c (scm_i_init_guile): Call it.
2010-09-12move srfi-1 and srfi-60 C impl to libguile, without public C apiAndy Wingo1-1/+5
* libguile/srfi-1.c: * libguile/srfi-1.h: * libguile/srfi-60.c: * libguile/srfi-60.h: * libguile/ChangeLog-srfi: Move here, from the srfi/ dir. The C API is internal. Add API to register the extensions, called by init.c. * libguile/init.c: Verily, register srfi extensions. * libguile/Makefile.am: Add srfi files. * module/srfi/srfi-1.scm: * module/srfi/srfi-60.scm: Update load-extension invocation. * Makefile.am: * configure.ac: Remove srfi/ dir. * test-suite/standalone/Makefile.am: * test-suite/standalone/test-srfi-1.c: Remove srfi-1 C test, we don't support this API any more.
2010-08-27Assorted `syntax-check' fixes.Ludovic Courtès1-4/+5
* 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-08remove "discouraged" infrastructureAndy Wingo1-1/+0
* libguile/discouraged.h: Remove. * libguile/deprecated.c (scm_internal_select, scm_thread_sleep) (scm_thread_usleep): Deprecate formerly discouraged names. * libguile/eq.h (SCM_EQ_P): * libguile/pairs.h (SCM_NULLP, SCM_NNULLP, SCM_CONSP, SCM_NCONSP): * libguile/boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL): (SCM_NEGATE_BOOL, SCM_BOOL_NOT): Undiscourage these names, because I'm not sure deprecating them will do any good. * libguile.h: * libguile/gen-scmconfig.c: * libguile/numbers.c: * libguile/init.c: * libguile/Makefile.am: * configure.ac: Remove bits that referenced discouraged.h, and dealt with the "discouraging" system.
2010-08-08deprecated all discouraged functionsAndy Wingo1-4/+0
* libguile/Makefile.am: * libguile/discouraged.c: Remove discouraged.c. * libguile/deprecated.c: * libguile/deprecated.h: * libguile/discouraged.h: All functions and declarations moved from discouraged.[ch] to deprecated.[ch], adding deprecation warnings. * libguile/init.c: Remove discouraged init. * libguile/numbers.c (scm_num2float, scm_num2double): Deprecate. * test-suite/standalone/test-num2integral.c: Port to modern API.
2010-07-10capture default dynamic state in (guile-user)Andy Wingo1-2/+4
* libguile/init.c (scm_i_init_guile): Move the call to scm_init_threads_default_dynamic_state after the call to scm_load_startup_files, so that the default dynamic state is in the (guile-user) module, not (guile).
2010-05-19separate boot expansion from memoizationAndy Wingo1-0/+2
* libguile/Makefile.am: * libguile/init.c: * libguile/expand.c: * libguile/expand.h: Add new expander. The idea is that macroexpansion is one thing, and whether to compile or interpret the result of that is another thing. * libguile/memoize.c: Adapt to expand as necessary, and then memoize expanded source without worrying about syntax errors. * module/ice-9/eval.scm (make-general-closure): Allow alt clauses to not possess the full make-general-closure arity.
2010-04-09remove libguile/lang.h, deprecate %nil (in favor of #nil)Andy Wingo1-2/+0
* libguile/Makefile.am: * libguile/init.c: * libguile/lang.c: * libguile/lang.h: Remove lang.c and lang.h. * libguile/pairs.h (SCM_NIL_P, SCM_NULL_OR_NIL_P): Moved here. * module/ice-9/deprecated.scm (%nil): %nil definition moved here. * libguile/alist.c: * libguile/async.c: * libguile/backtrace.c: * libguile/boolean.c: * libguile/dynl.c: * libguile/eval.c: * libguile/filesys.c: * libguile/fluids.c: * libguile/list.c: * libguile/load.c: * libguile/options.c: * libguile/posix.c: * libguile/print.c: * libguile/promises.c: * libguile/sort.c: * libguile/throw.c: * libguile/trees.c: * libguile/vectors.c: * libguile/vm.c: * libguile/weaks.c: * srfi/srfi-1.c: <libguile/lang.h> references removed.
2010-04-09lisp nil always enabledAndy Wingo1-2/+0
* configure.ac: Remove --disable-elisp option. Lisp nil is always enabled. * libguile/boolean.h: * libguile/gen-scmconfig.c: * libguile/gen-scmconfig.h.in: * libguile/init.c: * libguile/lang.c: * libguile/lang.h: * libguile/pairs.h: * libguile/private-options.h: * libguile/read.c: Remove conditionals for disabling elisp.
2010-03-30correctly handle --no-autocompile (fixed broken previous patch)Andy Wingo1-0/+1
* 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-02-24add %default-prompt-tag, and error (not abort()) on an abort to bad tagAndy Wingo1-1/+1
* libguile/init.c (scm_i_init_guile): Call scm_init_control after initing fluids. * libguile/control.h (scm_sys_default_prompt_tag): New internal var. * libguile/control.c (scm_c_abort): If abort is called for an unknown tag, raise an exception, except if the tag was the default prompt tag, in which case really abort -- to prevent recursion when some other patches land. (scm_init_control): Define %default-prompt-tag in the default environment.