summaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)AuthorFilesLines
2023-01-17Doc: clarification on regexes and encodingsJean Abou Samra1-2/+6
* doc/ref/api-regex.texi: make it more obviously clear that regexp matching supports only characters supported by the locale encoding.
2023-01-17doc: Fix eval-when exampleJean Abou Samra1-11/+18
* doc/ref/api-macros.texi: make the macro expand to the literal date, not to a call to the date function. The example previously did not actually need eval-when and did not show the intended effect.
2023-01-14Add 'bytevector-slice'.Ludovic Courtès2-2/+46
* module/rnrs/bytevectors/gnu.scm: New file. * am/bootstrap.am (SOURCES): Add it. * libguile/bytevectors.c (scm_bytevector_slice): New function. * libguile/bytevectors.h (scm_bytevector_slice): New declaration. * test-suite/tests/bytevectors.test ("bytevector-slice"): New tests. * doc/ref/api-data.texi (Bytevector Slices): New node.
2023-01-13Add 'spawn'.Josselin Poiret1-4/+56
* libguile/posix.c: Include spawn.h from Gnulib. (do_spawn, scm_spawn_process): New functions. (kw_environment, hw_input, kw_output, kw_error, kw_search_path): New variables. * doc/ref/posix.texi (Processes): Document it. * test-suite/tests/posix.test ("spawn"): New test prefix. * NEWS: Update. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-01-12Update gnulib to 0.1.5414-8204d and add posix_spawn, posix_spawnp.Josselin Poiret2-3/+3
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-12-21doc: fix documented keyword argument default to match code defaultVijay Marupudi1-1/+1
2022-12-11Doc: document that eq?, eqv? and equal? take any number of argumentsJean Abou Samra1-12/+14
2022-12-10doc: Lee Thomas suggested the name change.Arne Babenhauserheide1-1/+1
See (1994-11-04) https://groups.google.com/g/gnu.misc.discuss/c/0VtEf1fgEJk/m/IMBs2o-ftrgJ > If GEL and GUL and GLUE don't work for the name of the scripting > language, how about: > > GUILE - GNU's Universal Interpreted Language Extension > > (This also implies Scheme-ing, and means that the GNU's Universal > Interpreted Language Developers would be part of a ...) > -- > Lee Thomas and (1994-11-22) https://groups.google.com/g/gnu.misc.discuss/c/9pD9yVoRYFw/m/0z7SLYbx8loJ > Why "GUILE"? (GNU's Universal Interpreted Language Extension) > Two additional reasons: > > 1. It does not give deliberate offense to Dr. Ousterhout or his > supporters, thereby allowing the warring factions to eventually > make peace (along with some others, perhaps - Gloria's 'Usband Is > Linguistically Educated) and get back to work. > 2. By pronunciation it offers appreciation to one of the co-inventors > of Scheme. (Maybe a library package could be named "Scheme User > Supported System Macros And Native-code"? OK, that's a stretch ...) > -- > Lee Thomas, and https://groups.google.com/g/comp.lang.scheme/c/X5GrLVAvGLU/m/Xk11xCrbzCcJ > A while back, I started calling the language being built by the GNU Project > GEL. It turns out that GEL is a trademark of Sybase Inc. Therefore, > we must choose a new name. Please do not refer to the GNU language > as GEL. > > My favorite proposed name, posted recently to comp.lang.scheme, is GUILE. > I like the name, because i think programmers should be encouraged to use > GUILE when writing programs. The name may change yet again; but for now, > please refer to the GNU language as GUILE. > > -t
2022-12-09doc: Fix minor typosColin Woodbury2-2/+2
The spelling mistake is a clear fix, but the Arrays fix might not be as obvious. Previously, with the "arrays" alias, the @ref macro would render a superfluous period after the word "arrays", rendering (at least within Emacs) as: you may wish to use see arrays. instead. Signed-off-by: Mikael Djurfeldt <mikael@djurfeldt.com>
2022-11-01doc: Fix typo in VM instruction name.Ludovic Courtès1-2/+2
* doc/ref/vm.texi (Intrinsic Call Instructions): Fix name of 'call-scm<-thread'.
2022-10-21Define Scheme bindings to ‘openat’ when available.Maxime Devos1-0/+13
* configure.ac: Detect if ‘openat’ is defined. * libguile/filesys.c (flags_to_mode): Extract from ... (scm_mode): ... here. (scm_open_fdes_at, scm_openat): Define the Scheme bindings. * libguile/filesys.h (scm_open_fdes_at, scm_openat): Make them part of the API. * doc/ref/posix.texi (File System): Document them. * test-suite/tests/filesys.test ("openat"): Test ‘openat’. * libguile/syscalls.h (openat_or_openat64): Decide between ‘openat’ and ‘openat64’. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21Define a Scheme binding to ‘fstatat’ when available.Maxime Devos1-0/+8
* configure.ac: Detect if ‘fstatat’ is defined. * libguile/filesys.c (scm_statat): Define a Scheme binding to ‘fstatat’. * libguile/filesys.h (scm_statat): Make it part of the C API. * doc/ref/posix.texi (File System): Document it. * libguile/syscalls.h (fstatat_or_fstatat64): Choose between ‘fstatat’ and ‘fstatat64’. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21Define a Scheme binding to ‘fchownat’ when it exists.Maxime Devos1-0/+11
* configure.ac: Detect whether ‘fchownat’ is available. * libguile/filesys.c (scm_chownat): Define a Scheme binding to ‘fchownat’ when available. * libguile/filesys.h (scm_chownat): Make it part of the API. * doc/ref/posix.texi (File System): Document it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21Define a Scheme binding to ‘unlinkat’ when it exists.Maxime Devos1-0/+12
‘unlinkat’ is used for both unlinking regular files and removing empty directories. * configure.ac: Detect if ‘unlinkat’ exists. * doc/ref/posix.texi (File System): Document why there is no ‘rmdirat’ procedure, and document the ‘delete-file-at’ procedure. * libguile/filesys.c (scm_rmdir): Adjust the docstring here as well. (scm_delete_file_at): Define a Scheme binding to ‘unlinkat’. * libguile/filesys.h (scm_delete_file_at): Make ‘scm_delete_file_at’ part of the C API. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21Define a Scheme binding to ‘renameat’ when it exists.Maxime Devos1-0/+9
* configure.ac: Detect if ‘renameat’ is defined. * libguile/filesys.c (scm_renameat): Define a Scheme binding to the ‘renameat’ system call. * doc/ref/posix.texi (File System): Document it. * libguile/filesys.h (scm_renameat): Make it part of the C API. * test-suite/tests/filesys.test ("rename-file-at"): New tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21Correct documentation of ‘mkdir’ w.r.t. the umask.Maxime Devos1-1/+2
* doc/ref/posix.texi (mkdir): Note that the umask is applied even if the mode argument is set. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21Define bindings to ‘mkdirat’ when the C function exists.Maxime Devos1-0/+6
* configure.ac: Detect if ‘mkdirat’ exists. * libguile/filesys.c (scm_mkdirat): Define the Scheme binding. * doc/ref/posix.texi (File System): Document it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21Define ‘symlinkat’ wrapper when supported.Maxime Devos1-0/+6
* configure.ac: Detect whether ‘symlinkat’ exists. * libguile/filesys.c (scm_symlinkat): Define a Scheme binding when it exists. * libguile/filesys.h: Make the binding part of the public C API. * doc/ref/posix.texi (File System): Document the binding. * test-suite/tests/filesys.test ("symlinkat"): Test it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21Allow file ports in ‘utime’.Maxime Devos1-4/+11
Ports representing symbolic links are currently unsupported. * configure.ac: Detect 'futimens'. * doc/ref/posix.texi (utime): Update documentation. * libguile/posix.c (scm_utime): Support ports. * libguile/posix.h (scm_utime): Rename argument. * test-suite/tests/posix.test ("utime"): Add more tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21Allow file ports in ‘readlink’.Maxime Devos1-2/+7
* configure.ac: Detect whether ‘readlinkat’ is defined. * libguile/filesys.c (scm_readlink): Support file ports when ‘readlinkat’ exists. (scm_init_filesys): Provide ‘chdir-ports’ when it exists. * doc/ref/posix.texi (File System): Document it. * test-suite/tests/filesys.test ("readlink"): Test it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21Allow file ports in ‘chdir’ when supported.Maxime Devos2-2/+6
* configure.ac: Check for ‘fchdir’. * libguile/filesys.c (scm_chdir): Support file ports. (scm_init_filesys): Report support of file ports. * doc/ref/posix.texi (Processes): Update accordingly. * doc/ref/guile.texi: Add copyright line for new documentation in this patch and later patches. * test-suite/tests/filesys.test ("chdir"): Test it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-12doc: Document how (ice-9 format) replaces 'format'.Jean Abou Samra1-0/+10
* doc/ref/misc-modules.texi (Formatted Output): Add paragraph. * module/ice-9/format.scm: Add comment. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-10-12Define SO_RCVTIMEO and SO_SNDTIMEO.Christopher Baines1-0/+2
These are important for reliable networking, since they prevent network operations from hanging indefinitely. * libguile/socket.c (scm_init_socket): Define SO_RCVTIMEO and SO_SNDTIMEO. (scm_getsockopt, scm_setsockopt): Include SO_RCVTIMEO and SO_SNDTIMEO in docstring and handle them. * doc/ref/posix.texi (Network Sockets and Communication): Document them. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-01doc: Fix typo in 'coverage-data->lcov' example.Antoine Kalmbach1-1/+1
* doc/ref/api-coverage.texi (Code Coverage): Close PORT, not FILE, in the example. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-01doc: Fix typo under "CPS Soup".Fulbert1-1/+1
* doc/ref/compiler.texi (CPS Soup) : fix small typo in doc (closing paren out of @code{} tag). Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-01doc: Clarify reference to (sxml transform) module.Fulbert1-8/+8
* doc/ref/sxml.texi (7.21.4 Transforming SXML): Adds a mention to the module to be imported for the procedures introduced in this section of the documentation.. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-09-30Fix doc for string args to error C APIDaniel Llorens1-7/+7
2022-09-19'pipe' now takes an optional 'flags' parameter.Ludovic Courtès1-1/+19
This is the same strategy as used for the 'accept4' bindings introduced in 6e0965104c579431e5a786b60e1a964a112c73b8. * libguile/posix.c (scm_pipe): Rename to... (scm_pipe2): ... this. Add an optional 'flags' parameter and honor it. (scm_pipe): Rewrite as a call to 'scm_pipe2'. * libguile/posix.h (scm_pipe2): New declaration. * test-suite/tests/posix.test ("pipe"): New tests. * configure.ac: Look for 'pipe2'. * NEWS: Update.
2022-09-07Add support for "e" flag (O_CLOEXEC) to 'open-file'.Ludovic Courtès1-0/+3
* libguile/fports.c (scm_i_mode_to_open_flags): Add 'e' case. (scm_open_file_with_encoding): Document it. * test-suite/standalone/test-close-on-exec: New file. * test-suite/standalone/Makefile.am (check_SCRIPTS, TESTS): Add it. * doc/ref/api-io.texi (File Ports): Document it. * NEWS: Update.
2022-09-07doc: Add documentation of the "b" flag to 'open-file'.Ludovic Courtès1-0/+4
* doc/ref/api-io.texi (File Ports): Add documentation of the "b" flag, taken from the 'open-file' docstring.
2022-08-11doc: Add car+cdr examplejgart1-0/+7
2022-07-04Define IPPROTO_IPV6 and IPV6_V6ONLY.Ludovic Courtès1-0/+11
* libguile/socket.c (scm_init_socket): Define IPPROTO_IPV6 and IPV6_V6ONLY. * doc/ref/posix.texi (Network Sockets and Communication): Document them.
2022-07-04Define IN6ADDR_ANY and IN6ADDR_LOOPBACK.Ludovic Courtès1-1/+16
* libguile/socket.c (scm_init_socket): Define IN6ADDR_ANY and IN6ADDR_LOOPBACK. * doc/ref/posix.texi (Network Address Conversion): Document them.
2022-07-04web: Don't hide missing data in the chunked input port.Christopher Baines1-0/+3
This port is of limited use if it cannot be used reliably. Rather than behaving as if the input has finished when it ends unexpectedly, instead raise an exception. * module/web/http.scm (make-chunked-input-port): Raise an exception on premature termination. (&chunked-input-ended-prematurely): New exception type. (chunked-input-ended-prematurely-error?): New procedure. * test-suite/tests/web-http.test (pass-if-named-exception): Rename to pass-if-named-exception. (pass-if-named-exception): New syntax. ("Exception on premature chunk end"): New test for this behaviour. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-02-23Typo fix: Use correct variable name in exampleVijay Marupudi1-1/+1
* doc/ref/api-control.texi
2022-02-04Deprecate symbol properties.Ludovic Courtès1-80/+1
* libguile/strings.c (scm_i_make_symbol): Remove 'props' argument. Use 3 words instead of 'scm_double_cell'. * libguile/strings.h: Adjust accordingly. * libguile/symbols.c (scm_i_str2symbol, scm_i_str2uninterned_symbol): Likewise. (scm_symbol_fref, scm_symbol_pref, scm_symbol_fset_x, scm_symbol_pset_x): Move to... * libguile/deprecated.c: ... here. Rewrite in terms of object properties. (symbol_function_slot, symbol_property_slot): New variables. * libguile/symbols.h (SCM_SYMBOL_FUNC, SCM_SET_SYMBOL_FUNC) (SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS) (scm_symbol_fref, scm_symbol_pref, scm_symbol_fset_x) (scm_symbol_pset_x): Move to... * libguile/deprecated.h: ... here. Mark declarations as 'SCM_DEPRECATED'. * module/system/base/types.scm (cell->object): Remove 'props' field for %TC7-SYMBOL. * doc/ref/api-data.texi (Symbol Props): Remove. * NEWS: Update.
2022-01-13Bignums avoid both custom GMP allocator and finalizersAndy Wingo1-14/+1
* libguile/deprecated.c (make_bignum): Move here from numbers.c, to support scm_i_long2big etc. (scm_i_big2dbl): (scm_i_long2big): (scm_i_ulong2big): (scm_i_clonebig): (scm_i_normbig): Deprecate. (scm_install_gmp_memory_functions): Deprecate, happily! SCM bignums now have digits allocated inline with the bignum itself, so they are completely transparent to the GC already. The price is that if GMP ever allocates digits via the MPZ API, those digits then have to be copied back into managed memory. But we avoid having to install finalizers and we avoid having to muck with GMP's allocator. * libguile/numbers.c (scm_from_mpz): Use scm_integer_from_mpz. (scm_init_numbers): Never muck with GMP's allocators. * doc/ref/guile-invoke.texi (Environment Variables): Remove note about GUILE_INSTALL_GMP_MEMORY_FUNCTIONS. * meta/build-env.in: No need to set GUILE_INSTALL_GMP_MEMORY_FUNCTIONS.
2022-01-04New function bitvector-copy (scm_bitvector_copy)Daniel Llorens1-0/+7
* libguile/bitvectors.h: * libguile/bitvectors.c: As stated. * test-suite/tests/bitvectors.test: Tests. * doc/ref/api-data.texi: Update "Bit vectors" section. * NEWS: Update.
2021-12-13Review REFFIXMEDaniel Llorens3-7/+12
H/t t20kdc on #guile.
2021-12-06New function srfi-4-vector-type-size in (srfi srfi-4 gnu)Daniel Llorens1-0/+6
This patch removes the undocumented function make-srfi-4-vector from (guile). That function is still exported from (srfi srfi-4 gnu). * libguile/srfi-4.h (scm_init_srfi_4): Split into scm_bootstrap_srfi_4() and scm_init_srfi_4(), after the pattern of scm_init_bytevectors() and scm_bootstrap_bytevectors(). * libguile/init.c: Replace scm_init_srfi_4() call by scm_bootstrap_srfi_4(). * module/srfi/srfi-4.scm: Load newly defined srfi-4 extension. This provides undocumented make-srfi-4-vector. * module/srfi/srfi-4/gnu.scm: Export srfi-4-vector-type-size. * doc/ref/srfi-modules.texi: Document srfi-4-vector-type-size.
2021-11-22Fix doc typoDaniel Llorens1-1/+1
H/t to Damien Mattei in guile-devel.
2021-11-15Support C99 complex types in (system foreign)Daniel Llorens1-1/+4
* libguile/foreign.h (SCM_FOREIGN_TYPE_COMPLEX_FLOAT, SCM_FOREIGN_TYPE_COMPLEX_DOUBLE): New enums. * module/system/foreign.scm (complex-float, complex-double): Export new types. (make-c-struct, parse-c-struct): Support the new types. * libguile/foreign.c (complex-float, complex-double): Define new types. (alignof, sizeof, pack, unpack): Support the new types. * test-suite/tests/foreign.test: Test.
2021-11-03Fix typos in SRFI docsArun Isaac2-17/+17
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50127 * doc/ref/api-foreign.texi, doc/ref/srfi-modules.texi: Fix typos.
2021-10-27Update NEWSDaniel Llorens1-1/+1
2021-10-21Fix doc typoDaniel Llorens1-3/+2
2021-10-21Provide xxvector-copy and xxvector-copy! for srfi-4 vectorsDaniel Llorens2-0/+49
These use the argument conventions of vector-copy!, string-copy!, etc. and not that of bytevector-copy! (which is from r6rs). * module/srfi/srfi-4/gnu.scm: As stated. * test-suite/tests/srfi-4.test: Tests. * doc/ref/srfi-modules.texi: Documentation. * libguile/bytevectors.c (bytevector-copy!): Add overlap note to docstring. * libguile/vectors.c (vector-copy!): Reuse text for the overlap note.
2021-09-20doc: Fix wrong @uref argument order.Ludovic Courtès1-2/+2
* doc/ref/sxml.texi (SXML): Fix @uref argument order.
2021-09-14Fix typo in srfi-69 docDaniel Llorens1-1/+1
2021-08-17Extend bytevector-fill! to handle a partial fillDaniel Llorens1-4/+14
* libguile/bytevectors.c (bytevector-fill!): As stated. (scm_bytevector_fill_x): Stub to avoid changing the C API. * doc/ref/api-data.texi: Documentation. * libguile/vectors.c (vector-fill!): Less confusing variable names. * test-suite/tests/bytevectors.test: Test partial fill cases for bytevector-fill!.
2021-08-16Remove the 'simple vector' conceptDaniel Llorens2-47/+40
* Deprecate scm_is_simple_vector. * libguile/vectors.c (scm_vector_elements, scm_vector_writable_elements): These functions take an array; reword to make this clear. * libguile/print.h: Remove reference to 'simple vector'. * doc/ref/api-data.texi: Remove documentation for scm_is_simple_vector. Remove references to 'simple vector'. Fix documentation for scm_vector_elements, scm_vector_writable_elements. * test-suite/tests/arrays.test: * test-suite/tests/vectors.test: Remove references to 'simple vector'.