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

13148 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
172988eeb4 fix <letrec> docs
* doc/ref/compiler.texi (Tree-IL): Fix docs for external representation
  of letrec. Thanks to No Itisnt.
2010-08-27 09:16:44 -07:00
Thien-Thi Nguyen
6832604efa [build] Rewrite guile-func-name-check in Scheme, adding features.
* libguile/guile-func-name-check: Rewrite in Scheme; add inhibition
  directives, string-literal handling, failureful exit on error.
* libguile/guile-snarf-docs.in: Use ‘@top_builddir@/meta/guile’.
* libguile/pairs.c: Add guile-func-name-check inhibition directive.
2010-08-26 23:34:49 +02:00
Thien-Thi Nguyen
e6d67f1e69 [build] Refine libguile/*.doc snarfing.
* libguile/guile-snarf-docs.in: Rewrite to incorporate all
  three phases of snarfing: func-name check, cpp, tokenization.
  Also, require/check new command-line syntax.
* libguile/Makefile.am (AM_V_FILTER): Delete var.
  (AM_V_FILTER_, AM_V_FILTER_0): Likewise.
  (.c.doc): Run ./guile-snarf-docs; use new command-line syntax.
2010-08-26 18:36:48 +02:00
Andy Wingo
d5a1a8cd1b consolidate sitedir definition
* configure.ac (sitedir): Fix definition to point to the
  version-specific sitedir.

* libguile/Makefile.am (libpath.h): Take sitedir definition from
  configure.ac.
2010-08-25 10:24:27 -04:00
Andy Wingo
3c4ecdddab update download location in manual
* doc/ref/intro.texi (Obtaining and Installing Guile): Update download
  location.
2010-08-25 09:49:09 -04:00
Thien-Thi Nguyen
bfebf099d9 [build] Use AM_SILENT_RULES for generating cpp-E.c, cpp-SIG.c.
* libguile/Makefile.am (.syms.c): Prefix first command
  with $(AM_V_GEN); unconditionally silence second command.
2010-08-19 11:15:08 +02:00
Andy Wingo
4b02bf47f4 objcodes.c comments
* libguile/objcodes.c: Comments from Noah Lavine
2010-08-18 23:00:42 -07:00
Noah Lavine
9a690dfb45 Whitespace fix
Add a space in libguile/objcodes.c to comply with the GNU Coding Standards.
2010-08-18 23:00:42 -07:00
Thien-Thi Nguyen
319b53dd1c [build] Fix sed portability bug: Don't use '\n' in sed script.
Regression introduced 2010-07-22, "[build] Overhaul
<errno.h>, <signal.h> cpp symbol extraction/checking".
See: <http://autobuild.josefsson.org/guile/log-201008181002653292000.txt>

* libguile/Makefile.am (.syms.c): Convert
  one-liner sed script to while-read-echo loop.
2010-08-18 19:48:12 +02:00
Thien-Thi Nguyen
b405cdb4c5 [build] Create libguile/version.h using the configure script.
* configure.ac (AC_CONFIG_FILES): Add libguile/version.h.

* libguile/Makefile.am (version.h): Delete target.
  (EXTRA_DIST): Remove version.h.in.
  (BUILT_SOURCES): Remove version.h.
  (MOSTLYCLEANFILES): Remove version.h, version.h.tmp.
* libguile/version.h.in (SCM_MAJOR_VERSION): Use conventional
  @VAR@ instead of @-VAR-@ for ‘GUILE_MAJOR_VERSION’.
  (SCM_MINOR_VERSION, SCM_MICRO_VERSION, SCM_EFFECTIVE_VERSION): Likewise
  for ‘GUILE_MINOR_VERSION’, ‘GUILE_MICRO_VERSION’, ‘GUILE_EFFECTIVE_VERSION’.
2010-08-18 19:48:12 +02:00
Andy Wingo
8996d00ee4 update scsh doc
* doc/ref/scsh.texi (The Scheme shell (scsh)): Remove broken link to
  arglist.com/guile/, and add note about bitrotting.
2010-08-17 08:48:49 -07:00
Andy Wingo
833263ec4a further discouraged excision
* libguile/gen-scmconfig.h.in: Remove a DISCOURAGED define.
2010-08-16 21:36:14 -07:00
Andy Wingo
7545ddd42a a number of doc fixes
* doc/ref/api-control.texi (Handling Errors): Update docs for
  display-error.

* libguile/backtrace.h (scm_i_display_error): Change prototype to
  s/stack/frame/.
* libguile/throw.c (handler_message): Change invocation of
  scm_i_display_error to pass a frame.

* doc/ref/api-deprecated.texi (Deprecation): Update wording.

* doc/ref/api-evaluation.texi (Local Evaluation): Remove section on
  local-eval.

* doc/ref/api-macros.texi: Fix a couple typos.

* doc/ref/api-memory.texi (Objects): Remove terrible section.
* doc/ref/api-procedures.texi (Procedure Properties): Remove docs for
  closure?.
  (Compiled Procedures): Update wording.

* doc/ref/guile.texi (API Reference): Remove reference to "Objects".
2010-08-16 21:36:14 -07:00
Andy Wingo
46088b2629 minor NEWS tweaks
* NEWS: Minor tweaks.
2010-08-16 21:36:14 -07:00
Andy Wingo
8fad25c25f reindent psyntax.scm
* module/ice-9/psyntax.scm: Reindent.
2010-08-16 21:36:14 -07:00
Andy Wingo
565c8e30cd update comments in psyntax.scm
* module/ice-9/psyntax.scm: Update comments. Fix a couple of needless
  conses in and-map.

* module/ice-9/psyntax-pp.scm (#{and-map*\ 35}): Regen.
2010-08-16 21:36:14 -07:00
Andy Wingo
efa360afc3 @apply for multiple args in the boot memoizer
* libguile/memoize.c (m_apply): Fix for multiple arguments, as in
  (@apply proc foo bar baz).
2010-08-16 21:36:14 -07:00
Ludovic Courtès
252f9f187a Fix i18n tests when no French locale is available.
* test-suite/tests/i18n.test ("number->locale-string")["French"]: Move
  `under-french-locale-or-unresolved' within each `pass-if'.
2010-08-16 12:27:14 +02:00
Andreas Rottmann
b6dcf01abc Link test-srfi-1 to libguile as well
With an installed copy of libguile in place, test-srfi-1 would be run
using that instead of the in-tree libguile.

* test-suite/standalone/Makefile.am (test_srfi_1_LDADD): Add libguile.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2010-08-15 16:52:00 +02:00
Ludovic Courtès
fa2a89a6d1 Add string->pointer' and pointer->string' to the FFI.
* libguile/foreign.c (scm_string_to_pointer, scm_pointer_to_string): New
  functions.

* libguile/foreign.h (scm_string_to_pointer, scm_pointer_to_string): New
  declarations.

* module/system/foreign.scm: Export `string->pointer' and
  `pointer->string'.

* test-suite/tests/foreign.test ("pointer<->string"): New test prefix.

* doc/ref/api-foreign.texi (Void Pointers and Byte Access): Add
  `string->pointer' and `pointer->string'.
2010-08-15 16:43:39 +02:00
Ludovic Courtès
61d1d4a83a Add `number->locale-string' tests.
* test-suite/tests/i18n.test ("number->locale-string"): New test prefix.
2010-08-15 16:43:39 +02:00
Julian Graham
802b47bdc6 Explicit definitions for memp' and assp' in `(rnrs list)'; the predicate
argument to Guile's `member' and `assoc' functions has a different expected
arity.

* module/rnrs/lists.scm (memp, assp): Wrap the predicate function with a
  two-argument wrapper before calling Guile's underlying implemenation.
* test-suite/Makefile.am: Add test-suite/tests/r6rs-lists.test to
  SCM_TESTS.
* test-suite/tests/r6rs-lists.test: New file.
2010-08-08 20:23:14 -04:00
Julian Graham
b24b7deb00 Explicit definitions for vector-for-each' and vector-map'; Guile's SRFI-1
`for-each' and `map' implementations do not operate on lists and vectors
interchangeably.

* module/rnrs/base.scm (vector-for-each, vector-map): New functions.
* test-suite/Makefile.am: Add test-suite/tests/r6rs-base.test to SCM_TESTS.
* test-suite/tests/r6rs-base.test: New file.
2010-08-08 19:32:23 -04:00
Andy Wingo
58daadd982 further rnrs incompat note
* doc/ref/r6rs.texi: Note about rnrs io ports.
2010-08-08 14:33:46 +02:00
Andy Wingo
1435c7dcf8 loose ends from "discouraged" removal
* README: Remove docs on "discouraged".

* configure.ac: Remove one more "discouraged" thing.

* doc/ref/api-deprecated.texi: Rename from api-discdepr.texi, and remove
  sections on "discouraged".

* doc/ref/Makefile.am:
* doc/ref/guile.texi: Update referrers.
2010-08-08 14:26:26 +02:00
Andy Wingo
8a4ed2dd34 remove "discouraged" infrastructure
* 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-08 14:15:47 +02:00
Andy Wingo
220058a835 deprecated all discouraged functions
* 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-08-08 13:48:35 +02:00
Andy Wingo
3470a29911 more r6rs incompat
* doc/ref/r6rs.texi (R6RS Incompatibilities): Add section on string
  syntax.
2010-08-08 13:00:57 +02:00
Andy Wingo
08fc523b0e add section on toplevel expansion to r6rs incompatibilities
* doc/ref/r6rs.texi (R6RS Incompatibilities): Add a section about
  toplevel expansion, before taking a look at fixing it...
2010-08-08 12:58:05 +02:00
Andy Wingo
4f9691174d more NEWS updates
* NEWS: Update some more.
2010-08-06 17:42:04 +02:00
Andy Wingo
3d4f8e3c2d fix stack narrowing for tail-call to throw
* module/system/repl/debug.scm (narrow-stack->vector): Fix for the
  tail-call to `throw' case, as in `(quit)'.
2010-08-06 17:39:51 +02:00
Andy Wingo
5bc97ad5dd ,x unbound does not quit repl
* module/system/repl/repl.scm (run-repl): Catch errors executing
  metacommands. Feature on top of feature...
2010-08-06 17:28:10 +02:00
Andy Wingo
66ad445dcf update NEWS for 1.9.12 (mostly)
* NEWS: Update for 1.9.12.
2010-08-06 13:45:26 +02:00
Andy Wingo
e5f7f675d0 add docs for extensiondir; misc other fixes
* libguile/foreign.c (scm_i_pointer_print): Print in hexadecimal.

* doc/ref/api-foreign.texi (Modules and Extensions): Update for
  "extensiondir", and a discussion of Guile versions.
  (Foreign Variables): Fix discussion of types.
  (Void Pointers and Byte Access): Fix typo.
2010-08-06 13:43:47 +02:00
Andy Wingo
ba270f8c26 remove type discusison from dynamic-pointer docstring
* doc/ref/api-foreign.texi:
* libguile/dynl.c (scm_dynamic_pointer): Remove discussion of types from
  the docstring.
2010-08-06 13:41:58 +02:00
Andy Wingo
869bfe86af s/extensionsdir/extensiondir/
* libguile/Makefile.am (libpath.h): Change "extensionsdir" to
  "extensiondir".
* meta/guile-2.0.pc.in (extensiondir): Likewise.
2010-08-06 13:15:58 +02:00
Andy Wingo
bc325e763f %site-dir is specific to the effective version
* libguile/load.h:
* libguile/load.c (scm_sys_global_site_dir): New API, is what %site-dir
  used to be.
  (scm_sys_site_dir): Changed to be a version-specific dir.
  (scm_init_load_path): Search the version-specific sitedir before the
  global one.

* libguile/Makefile.am (libpath.h): Update SCM_SITE_DIR and
  SCM_GLOBAL_SITE_DIR, as appropriate.
2010-08-06 13:15:29 +02:00
Andy Wingo
ca290a89f3 only one Value History section
* doc/ref/repl-modules.texi: Remove section on Value History, it's
  covered in scheme-using.
* doc/ref/scheme-using.texi: Rename "Value Historyx" section to "Value
  History".
* doc/ref/guile.texi: Update xref.
2010-08-06 12:27:11 +02:00
Andy Wingo
69724dde0a add settable identifier syntax docs
* doc/ref/api-macros.texi (Identifier Macros): Add documentation for
  settable identifier syntax.
2010-08-06 12:16:49 +02:00
Andy Wingo
935c7acac7 letrec* in docs, and some r6rs fixes
* doc/ref/api-binding.texi: Add docs for letrec*, and revise some other
  text.
* doc/ref/compiler.texi: Update <letrec> for in-order?.
* doc/ref/r6rs.texi: Add letrec* entry.

* module/rnrs.scm:
* module/rnrs/base.scm: Export letrec*.
2010-08-06 11:52:27 +02:00
Andy Wingo
18e90860d1 fold 1.9.11 news into main body
* NEWS: Update.
2010-08-05 11:17:09 +02:00
Andy Wingo
551b96d294 fix vector-move-right! and vector-move-left!
* libguile/vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
  Fix some bugs reported by Michael Lucy -- both variants would happily
  write beyond the end, and vector-move-right! didn't increment the
  counter before copying in the reverse direction.

* test-suite/tests/vectors.test ("vector-move-left!"):
  ("vector-move-right!"): Add tests.
2010-08-04 21:48:00 +02:00
Yan Li
f9560a348e Compiling DOT_X_FILES requires version.h
There was a race condition when building Guile since DOT_X_FILES didn't
depend on version.h, which is dynamically generated. Sometimes the
DOT_X_FILES are compiled before the version.h is generated and leads to
build failure. This patch fixed this problem.

Signed-off-by: Yan Li <yan.i.li@intel.com>
2010-08-04 20:07:27 +02:00
Andreas Rottmann
2af6e1351d Fix the range of `random' on 64-bit platforms
For > 32 bit integers still in the fixnum range, scm_random() would
return random numbers with a lower range than specified.

* libguile/random.c (scm_i_mask32): New static inline function.
  (scm_c_random): Use `scm_i_mask32'.
  (scm_c_random64): New function, 64-bit variant of scm_c_random.
  (scm_random): Use `scm_c_random64' instead of forming the 64-bit random
  number in a bogus way.
* libguile/random.h: Added `scm_c_random64'.
2010-08-01 21:53:29 +02:00
Ludovic Courtès
7387c231ee Fix `parse-c-struct'.
* module/system/foreign.scm (parse-c-struct): Update use of
  `pointer->bytevector' to the new API.

* test-suite/tests/foreign.test ("structs"): New test prefix.
2010-07-28 12:24:25 +02:00
Ludovic Courtès
183a2a224b Update the FFI doc.
* doc/ref/api-foreign.texi (Foreign Types): Remove bits about typed
  foreign pointers.  Add `void'.
  (Foreign Variables): Update the doc of `dynamic-pointer' and the
  `numptob' example.  Remove `foreign-set!' and `foreign-ref'.  Add
  `pointer-address', `make-pointer', `%null-pointer', and
  `null-pointer?'
  (Void Pointers and Byte Access): Make it clear that wrapped pointers
  are untyped.  Remove `void' from here.  Replace `foreign->bytevector'
  and `bytevector->foreign' by `pointer->bytevector' and
  `bytevector->pointer'.  Add `dereference-pointer' and the rest of the
  `numptob' example.
  (Dynamic FFI): Update examples.  Remove `%null-pointer' from here.

* libguile/dynl.c (scm_dynamic_pointer): Update docstring.

* libguile/foreign.c (scm_dereference_pointer,
  scm_pointer_to_bytevector): Likewise.

* module/system/foreign.scm (null-pointer?): Add docstring.
2010-07-28 12:24:25 +02:00
Ludovic Courtès
22697acbc9 Remove unused parameter from `bytevector->pointer'.
* libguile/foreign.c (scm_bytevector_to_pointer): Remove unused LEN
  parameter.  Update docstring.
2010-07-28 12:24:25 +02:00
Ludovic Courtès
854aa906b4 Always return `%null-pointer' when creating a NULL pointer with no finalizer.
* libguile/foreign.c (scm_make_pointer): Always call out to
  `scm_from_pointer'.
  (scm_from_pointer): Return NULL_POINTER when PTR and FINALIZER are
  NULL.
2010-07-28 12:24:25 +02:00
Ludovic Courtès
5b46a8c2c8 Use "pointer" instead of "foreign" when dealing with wrapped pointers.
* libguile/foreign.h (scm_t_foreign_finalizer): Rename to...
  (scm_t_pointer_finalizer): ... this.
  (SCM_FOREIGN_P): Rename to...
  (SCM_POINTER_P): this.
  (SCM_VALIDATE_FOREIGN): Rename to...
  (SCM_VALIDATE_POINTER): ... this.
  (SCM_FOREIGN_HAS_FINALIZER): Rename to...
  (SCM_POINTER_HAS_FINALIZER): ... this.
  (scm_take_foreign_pointer): Rename to...
  (scm_from_pointer): ... this.
  (scm_foreign_address): Rename to...
  (scm_pointer_address): ... this.
  (scm_foreign_to_bytevector): Rename to...
  (scm_pointer_to_bytevector): ... this.
  (scm_foreign_set_finalizer_x): Rename to...
  (scm_set_pointer_finalizer_x): ... this.
  (scm_bytevector_to_foreign): Rename to...
  (scm_bytevector_to_pointer): ... this.
  (scm_i_foreign_print): Rename to...
  (scm_i_pointer_print): ... this.

* libguile/foreign.c: Update accordingly.

* libguile/tags.h (scm_tc7_foreign): Rename to...
  (scm_tc7_pointer): ... this.

* libguile/foreign.c, libguile/deprecated.c, libguile/dynl.c,
  libguile/evalext.c, libguile/gc.c, libguile/goops.c, libguile/gsubr.c,
  libguile/gsubr.h, libguile/print.c, libguile/snarf.h,
  libguile/vm-i-system.c, module/system/foreign.scm,
  test-suite/standalone/test-ffi, test-suite/tests/foreign.test: Update
  accordingly.
2010-07-28 12:24:25 +02:00