1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 20:30:28 +02:00
Commit graph

1871 commits

Author SHA1 Message Date
Andy Wingo
e6709db63f flesh out docs on multiple languages a bit more
* doc/ref/api-languages.texi: Move here from api-translation. Still
  stubbed in parts, but it's getting better.
* doc/ref/Makefile.am: Adapt to api-languages.texi name change.
* doc/ref/guile.texi: Likewise.
2010-04-16 10:36:04 +02:00
Neil Jerram
0a864beb31 Improvements to Introduction chapter
* doc/ref/intro.texi (Introduction): Change "some" to "the".
  (Guile and Scheme): "multithreading" -> "multithreaded".
  (Combining with C): Mention "libguile" as library name.
  (Guile and the GNU Project): New text.
  (Interactive Programming): New text.
  (Supporting Multiple Languages): New text, reflecting currently
  supported languages.
  (Obtaining and Installing Guile): Use @var for version placeholder.
  Remove mention of separate tutorial.
2010-04-11 01:25:12 +01:00
Neil Jerram
26b9f90900 Merge branch 'master' into wip-manual-2
Conflicts:

	doc/ref/api-procedures.texi
	doc/ref/misc-modules.texi

(Caused by me removing `@page' from a couple of sections that have been modified
by others.)
2010-04-10 13:32:42 +01:00
Andy Wingo
92a61010bd change remaining %nil -> #nil
* doc/ref/vm.texi:
* libguile/boolean.h:
* libguile/pairs.h:
* module/language/elisp/README:
* test-suite/tests/elisp-compiler.test:
* test-suite/tests/load.test: Change remaining mentions of %nil to #nil.
2010-04-09 21:06:29 +02:00
Andy Wingo
b9264dc5f3 finish ffi docs
* libguile/foreign.c: Some doc tweaks.
* doc/ref/api-foreign.texi: Finish FFI docs.
2010-04-06 23:17:10 +02:00
Andy Wingo
71725997c7 more ffi docs
* libguile/foreign.c (scm_make_foreign_function): Doc a little.
* doc/ref/api-foreign.texi (Foreign Function Interface): Document some
  more.
2010-04-06 00:45:35 +02:00
Andy Wingo
43cd9cec23 deprecate dynamic-args-call, and update docs some more
* libguile/deprecated.h (scm_dynamic_args_call): Deprecate.
* libguile/deprecated.c:
* libguile/dynl.h:
* libguile/dynl.c:

* doc/ref/api-foreign.texi: More doc updates.
2010-04-02 00:34:49 +02:00
Andy Wingo
726b8ba3fd add api-foreign.texi
* doc/ref/api-foreign.texi: New file.
* doc/ref/api-modules.texi: Reorganize bits about dynamic linking into
  api-foreign.

* doc/ref/guile.texi:
* doc/ref/Makefile.am: Adapt to api-foreign.texi.
2010-04-02 00:23:24 +02:00
Andy Wingo
a587d6a973 more fixes to equal? for arrays
* libguile/array-map.c (array_compare, scm_array_equal_p): Rewrite as
  something that operates on the generic array handle infrastructure.
  Based on array->list.
  (scm_i_array_equal_p): Change the docs, as array-equal? is now the same
  as equal?, except that it typechecks its args.

* doc/ref/api-compound.texi (Array Procedures): Update array-equal?
  docs.

* libguile/deprecated.h:
* libguile/deprecated.c (scm_raequal): Deprecate.

* libguile/bytevectors.c (scm_bytevector_eq_p): Bugfix: bytevectors are
  bytevector=? only if their element type is the same.

* libguile/eq.c (scm_equal_p): Only dispatch to scm_array_equal_p if
  both args are arrays (generically).

* test-suite/tests/arrays.test ("equal?"): Add some more tests.
2010-04-01 00:25:06 +02:00
Ludovic Courtès
2115b8eb40 Mention `(system base lalr)' in the manual.
* doc/ref/Makefile.am (guile_TEXINFOS): Add `api-lalr.texi'.

* doc/ref/api-lalr.texi: New file.

* doc/ref/guile.texi (API Reference): Include it.
2010-03-31 00:42:00 +02:00
Andy Wingo
1ea8aa7d8e Update manual examples of how to link with Guile
* doc/ref/intro.texi (Linking Guile into Programs):
* doc/ref/libguile-linking.texi (A Sample Guile Main Program): Update
  examples of how to link with guile.
2010-03-22 22:13:35 +01:00
Andy Wingo
6ffd4131ff finish macro docs
* doc/ref/api-macros.texi: Finish macro docs.
2010-03-19 13:16:57 +01:00
Andy Wingo
1fc8dcc7ac document syntax-case
* doc/ref/api-macros.texi: Document syntax-case, and tweak defmacro
  docs.

* doc/ref/api-debug.texi: Move cons-source here.
2010-03-19 12:30:38 +01:00
Andy Wingo
e4955559c6 A start at syntax-rules docs
* doc/ref/api-macros.texi: New file, documenting macros. Removed some
  old cruft, and started documenting hygienic macros.

* doc/ref/api-procedures.texi: Moved macro things out of here.

* doc/ref/guile.texi: Separate macros from procedures.

* doc/ref/api-data.texi: Update some xrefs.

* doc/ref/Makefile.am: Add api-macros.texi.
2010-03-18 23:39:44 +01:00
Ludovic Courtès
d12f974b43 Change `dynamic-link' to return a global handle when the argument is omitted.
* libguile/dynl.c (sysdep_dynl_link): Handle FNAME == NULL.
  (scm_dynamic_link): Make argument optional.  Adjust body accordingly.

* test-suite/standalone/test-ffi (global, strerror, strlen): New
  bindings.
  Add test for these bindings.

* doc/ref/api-modules.texi (Low level dynamic linking): Update
  description of `dynamic-link'.
2010-03-17 00:54:01 +01:00
Andy Wingo
17ed90df48 add a section to the manual on prompts
* doc/ref/api-control.texi (Prompts): Add a section on prompts.
2010-03-16 22:47:35 +01:00
Ludovic Courtès
deec8986ff doc: Update "Multi-Threading" node.
* doc/ref/libguile-concepts.texi (Multi-Threading): Remove bits about
  the requirement not to block in guile mode.
2010-03-14 23:41:10 +01:00
Ludovic Courtès
d3b5628c6d doc: Remove obsolete reference to the lack of Unicode support.
* doc/ref/api-data.texi (Bytevectors as Strings): Remove obsolete
  footnote on the lack of Unicode support.

* test-suite/tests/bytevectors.test ("2.9 Operations on
  Strings")["string->utf8 [latin-1]", "utf8->string [latin-1]"]: Remove
  use of `with-latin1-locale'.
  ["string->utf32 [Greek]"]: New tests.
2010-03-14 23:41:10 +01:00
Andy Wingo
f11871d6c5 small vm.texi updates
* doc/ref/vm.texi (A Virtual Machine for Guile):
  (VM Concepts, Variables and the VM, Branch Instructions): Small
  updates.
2010-03-14 23:28:26 +01:00
Andy Wingo
7e08f8a6c1 add some vm hook docs
* doc/ref/api-evaluation.texi (VM Behaviour): Add docs for
  vm-trace-level and set-vm-trace-level!.
2010-03-14 23:09:56 +01:00
Andy Wingo
42cb9b0311 Update api-debug.texi; there is a ways to go.
* doc/ref/api-debug.texi: Update a bit.
2010-03-14 23:05:42 +01:00
Andy Wingo
9d832dda45 fix critical bug in history.texi
* doc/ref/history.texi (A Timeline of Selected Guile Releases): Ahem :)
2010-03-14 15:07:44 +01:00
Andy Wingo
0f7e6c56cd update "data representation" part of guile internals doc
* doc/ref/api-control.texi (Handling Errors): Move the "Signalling Type
  Errors" section here.

* doc/ref/data-rep.texi (Data Representation): Refactor, lopping and
  cropping and stitching.

* doc/ref/libguile-concepts.texi (Dynamic Types):
* doc/ref/libguile-smobs.texi (Describing a New Type, Double Smobs):
* doc/ref/guile.texi (Guile Implementation, Programming in C): Adapt to
  refactorings.

* doc/ref/history.texi (A Scheme of Many Maintainers):
  (A Timeline of Selected Guile Releases, Status): Update.
2010-03-14 14:39:47 +01:00
Ken Raeburn
87bc7c8165 The load-module routine tries to interpret relative paths relative to
the module currently being loaded (i.e., make-texinfo.scm itself),
resulting in confusing behavior for offset builds.  So, don't use
them.

* doc/ref/Makefile.am ($(snarf_doc).texi): Use an absolute path for
  the input file.
2010-03-04 02:27:18 -05:00
Andy Wingo
e10cf6b9c7 deprecate lazy-catch
* libguile/deprecated.h:
* libguile/deprecated.c (scm_internal_lazy_catch, scm_lazy_catch):
  Deprecate, and print out a nasty warning that people should change to
  with-throw-handler.

* libguile/throw.h:
* libguile/throw.c (scm_c_with_throw_handler): Deprecate the use of the
  lazy_catch_p argument, printing out a nasty warning if someone
  actually passes 1 as that argument. The combination of the pre-unwind
  and post-unwind handlers should be sufficient.

* test-suite/tests/exceptions.test: Remove lazy-catch tests, as they are
  deprecated. Two of them fail:
  * throw/catch: effect of lazy-catch unwinding on throw to another key
  * throw/catch: repeat of previous test but with lazy-catch
  Hopefully people are not depending on this behavior, and the warning is
  sufficiently nasty for people to switch. We will see.

* test-suite/tests/eval.test ("promises"): Use with-throw-handler
  instead of lazy-catch.

* doc/ref/api-debug.texi:
* doc/ref/api-control.texi: Update to remove references to lazy-catch,
  folding in the useful bits to with-throw-handler.
2010-02-26 11:56:02 +01:00
Ludovic Courtès
d2add8ae11 Remove misplaced tabs from the manual.
* doc/ref/posix.texi (Network Databases): Remove tabs from `getaddrinfo'
  example.

* .dir-locals.el: Set `indent-tabs-mode' to `t' for `texinfo-mode'.
2010-02-17 00:31:04 +01:00
Ludovic Courtès
55ae00ea73 Add `getaddrinfo' and related procedures.
* libguile/net_db.c (sym_getaddrinfo_error, sym_ai_passive,
  sym_ai_canonname, sym_ai_numerichost, sym_ai_numericserv,
  sym_ai_v4mapped, sym_ai_all, sym_ai_addrconfig, sym_eai_badflags,
  sym_eai_noname, sym_eai_again, sym_eai_fail, sym_eai_family,
  sym_eai_socktype, sym_eai_service, sym_eai_memory, sym_eai_system,
  sym_eai_overflow, sym_eai_nodata, sym_eai_addrfamily,
  sym_eai_inprogress, sym_eai_canceled, sym_eai_notcanceled,
  sym_eai_alldone, sym_eai_intr, sym_eai_idn_encode): New variables.
  (scm_from_addrinfo, scm_getaddrinfo, scm_gai_strerror): New functions.

* libguile/net_db.h (scm_getaddrinfo, scm_gai_strerror): New functions.

* module/ice-9/networking.scm (addrinfo:flags, addrinfo:fam,
  addrinfo:socktype, addrinfo:protocol, addrinfo:addr,
  addrinfo:canonname): New procedures.

* test-suite/tests/net-db.test: New file.

* test-suite/Makefile.am (SCM_TESTS): Add `tests/net-db.test'.

* doc/ref/posix.texi (Network Databases)[getaddrinfo]: New subsection.
  [The Host Database]: Suggest using `getaddrinfo'.
2010-02-14 20:56:47 +01:00
Ludovic Courtès
4adf9a7e27 Document the maximum number of arguments for a subr.
* doc/ref/api-procedures.texi (Primitive Procedures): Specify the
  maximum number of arguments.  Patch by guign@mails.selgrad.org.
2010-02-13 23:50:06 +01:00
Ludovic Courtès
524aa8ae68 Fix documentation of the string->utf' and utf->string' functions.
* doc/ref/api-data.texi (Bytevectors as Strings): Describe optional
  parameter of `string->utf{16,32}' and `utf{16,32}->string'.
2010-02-10 00:40:01 +01:00
Andy Wingo
997659f898 make scm_make_continuation internal
* libguile/continuations.h:
* libguile/continuations.c (scm_i_make_continuation): Change from
  scm_make_continuation, and make internal.

* libguile/vm-i-system.c (call/cc, tail-call/cc): Adapt callers.

* test-suite/standalone/test-unwind.c (check_cont_body): Adapt a test.

* doc/ref/api-control.texi (Continuations): Update docs.
2010-02-08 13:35:06 +01:00
Ludovic Courtès
22ec6a31ed Add `(ice-9 vlist)'.
* module/ice-9/vlist.scm, test-suite/tests/vlist.test,
  benchmark-suite/benchmarks/vlists.bm: New files.

* module/Makefile.am (ICE_9_SOURCES): Add `vlist.scm'.

* test-suite/Makefile.am (SCM_TESTS): Add `tests/vlist.test'.

* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add
  `benchmarks/vlists.bm'.

* doc/ref/api-compound.texi (VLists, VHashes): New nodes.
2010-02-03 00:02:14 +01:00
Ludovic Courtès
2ff9bf8522 Revert "Install `standard-library.info'."
This reverts commit 0e64cbea3d.
2010-01-23 17:03:11 +01:00
Ludovic Courtès
0e64cbea3d Install `standard-library.info'.
* doc/ref/Makefile.am (BUILT_SOURCES): Move `standard-library.texi'
  to...
  (nodist_info_TEXINFOS): ... here.  New variable.
2010-01-22 16:55:24 +01:00
Ludovic Courtès
788cf40239 Document `guile-tools compile'.
* doc/ref/api-evaluation.texi (Compilation): Document `guile-tools
  compile'.
2010-01-19 22:28:38 +01:00
Michael Gran
912a870246 Document modal encodings problem in ref doc
* doc/ref/api-io.texi (Ports): note that modal encodings are not
  supported
2010-01-19 08:42:44 -08:00
Michael Gran
5b6b22e8ea Move string internals description in ref doc
* doc/ref/api-data.texi: move string internals section
2010-01-18 07:07:34 -08:00
Michael Gran
67af975c0b String ref doc updates for case and conversion
* doc/ref/api-data.texi: clarifications on Alphabetic Case Mapping and
  Conversion To/From C.
2010-01-17 20:10:15 -08:00
Michael Gran
d85ae24dfb Document string-bytes-per-char and %string-dump
* doc/ref/api-data.texi (String Internals): new subsubsection.  Document
  string-bytes-per-char and %string-dump.
2010-01-17 15:25:40 -08:00
Andy Wingo
06bfe276c8 nanosecond timestamp support in stat and utime
* libguile/posix.h:
* libguile/posix.c (scm_utime): Add optional nanosecond arguments. This
  is an incompatible change on the C level, but it's unlikely people are
  using this POSIX wrapper function, because they would just use the
  POSIX function directly. Hopefully, anyway.

* module/system/base/compile.scm (call-with-output-file/atomic):
  Propagate source timestamps to targets with nanosecond precision, if
  available. Fixes build on systems with ext4 filesystems.

* libguile/filesys.c (scm_stat2scm):
* module/ice-9/posix.scm (stat:atimensec, stat:mtimensec)
  (stat:ctimensec): Add three new elements to Scheme stat structures,
  for nanosecond-level timestamps.

* configure.ac: Add checks for utimensat, and for nanosecond fields in
  struct stat. We should switch to using Gnulib things for these,
  though.

* doc/ref/posix.texi (File System): Add documentation for utime's
  additional arguments, and nanosecond stat timestamp accessors.
2010-01-17 16:56:34 +01:00
Michael Gran
6ea3048785 Document R6RS hex escapes
* doc/ref/api-data.texi (Characters, String Syntax): document r6rs hex
  escapes

* doc/ref/api-options.texi (Reader Options): document r6rs-hex-escapes
  reader option
2010-01-13 07:26:10 -08:00
Andy Wingo
136b5494d1 programs print as #<procedure ...>
* module/system/vm/program.scm (write-program): Print as #<procedure
  ...>. Fix stdin printing.

* doc/ref/vm.texi: Update a little bit.
2010-01-12 00:19:18 +01:00
Andy Wingo
dfe13aa2c8 remove section on enclose-array
* doc/ref/api-compound.texi (Array Procedures): Remove section on
  `enclose-array', as it doesn't exist any more.
2010-01-11 22:29:38 +01:00
Michael Gran
67a4a16d8e Add R6RS backspace string escape
R6RS suggests that '\b' should be a string escape for the backspace
character.

* libguile/read.c (scm_read_string): parse backspace escape

* test-suite/tests/strings.test (R6RS backslash escapes): new test
  (Guile extensions backslash escapes): remove R6RS escapes from test.

* doc/ref/api-data.texi (Strings): document new string escape
2010-01-10 15:41:37 -08:00
Michael Gran
15b6a6b284 Add R6RS character names
R6RS adds new names for some of the control characters.

* libguile/chars.c (scm_r6rs_charnames, scm_r6rs_charnums)
  (SCM_N_R6RS_CHARNAMES): new character name constants
  (scm_alt_charnames, scm_alt_charnums): modified to remove duplicates
  (scm_i_charname, scm_i_charname_to_char): use new constants

* test-suite/tests/chars.test (R5RS character names, R6RS character names):
  new tests

* doc/ref/api-data.texi (Characters): updated
2010-01-10 15:16:55 -08:00
Ludovic Courtès
c5e05a1c70 Use HORIZONTAL ELLIPSIS' when available in truncated-print'.
* module/ice-9/pretty-print.scm (truncated-print): Set
  `%default-port-encoding' to the encoding of PORT.  Choose either
  U+2026 or "..." depending on PORT's encoding.

* test-suite/tests/print.test ("truncated-print")[tprint]: New ENCODING
  argument.  Update existing tests accordingly. Add UTF-8 tests.

* doc/ref/misc-modules.texi (Pretty Printing): Mention the possible use
  of U+2026.
2010-01-08 10:57:32 +01:00
Andy Wingo
27219b32c7 update uniform vector docs
* doc/ref/api-compound.texi (Uniform Numeric Vectors): Make a subsection
  of "Vectors", and link out to SRFI-4, where the main text has been
  moved.

* doc/ref/api-data.texi (Bytevectors as Uniform Vectors): New section.

* doc/ref/srfi-modules.texi (SRFI-4): Move body of uniform vector docs
  here. Discuss new module separation. Discuss relation to bytevectors.
2010-01-07 23:30:02 +01:00
Ludovic Courtès
7b0419128b Have string ports honor `%default-port-encoding'.
* libguile/strports.c (scm_i_mkstrport): Remove.
  (scm_mkstrport): Don't change the port's encoding to UTF-8; convert
  STR to the default port encoding.
  (scm_strport_to_string): Fix documentation & indentation.

* libguile/strports.h (scm_i_mkstrport): Remove.

* test-suite/lib.scm (exception:encoding-error): New variable.
  (format-test-name): Set `%default-port-encoding' to "UTF-8".

* test-suite/tests/ports.test ("string ports")["%default-port-encoding
  is honored", "suitable encoding [latin-1]", "suitable encoding
  [latin-3]", "wrong encoding"]: New tests.

* test-suite/tests/r6rs-ports.test ("7.2.11 Binary
  Output")["put-bytevector with UTF-16 string port", "put-bytevector
  with wrong-encoding string port"]: New tests.

* test-suite/tests/reader.test (read-string): Set
  `%default-port-encoding' to `#f'.
  ("reading")["unprintable symbol"]: Use a string that doesn't contain
  zeros.

* doc/ref/api-io.texi (String Ports): Document encoding issues with
  `call-with-output-string' and `with-output-to-string'.
2010-01-07 11:10:35 +01:00
Ludovic Courtès
e3eefae0e5 Remove dependency on GNU Make and reliance on /usr/bin/env.
Both were introduced in commit c55cb58a ("integrate guile-lib docs").

* doc/ref/Makefile.am ($(snarf_doc)scmfiles): Rename target to...
  ($(snarf_doc)-scmfiles): ... this.  Change to generate a makefile
  snippet containing a variable definition.  Automake-include the
  generated snippet, `standard-library.am'.
  (EXTRA_DIST): Add `$(snarf_doc).am'.
  (CLEANFILES): Remove `$(snarf_doc)scmfiles'.

* doc/ref/make-texinfo.scm: Remove executable bit and "#!/usr/bin/env".

* doc/ref/standard-library.am: New file.
2010-01-03 19:06:52 +01:00
Andy Wingo
a5bbb22e83 rename goto/args and friends to tail-call, tail-apply, etc
* libguile/vm-i-system.c (tail-call, tail-call/nargs, tail-apply)
  (tail-call/cc): Rename these back to tail-* from goto/*. We should
  reserve the rename-then-goto name for when you actually do a rename
  and goto, not when you shuffle the stack.

* doc/ref/vm.texi:
* module/language/glil/decompile-assembly.scm:
* module/language/tree-il/compile-glil.scm:
* test-suite/tests/tree-il.test: Adapt all callers and documentation.
2010-01-03 14:49:40 +01:00
Andy Wingo
87a6a23669 add truncated-print tests
* doc/ref/misc-modules.texi (Pretty Printing): Fix an error in
  truncated-print example.

* test-suite/Makefile.am:
 * test-suite/tests/print.test: Add truncated-print tests.
2010-01-03 13:35:35 +01:00