1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00
guile/module/ice-9
Mark H Weaver 3ace9a8e4e Add keyword arguments to file opening procedures.
* 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-04-07 15:37:23 -04:00
..
and-let-star.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
arrays.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
binary-ports.scm Implement efficient 'scm_unget_bytes' and 'unget-bytevector'. 2013-04-07 10:14:44 -04:00
boot-9.scm Add keyword arguments to file opening procedures. 2013-04-07 15:37:23 -04:00
buffered-input.scm bugfixes and simplifications to ice-9 buffered-input. 2010-10-05 19:55:37 +02:00
calling.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
ChangeLog-2008
channel.scm deprecate arity access via (procedure-properties proc 'arity) 2010-04-17 16:28:52 +02:00
command-line.scm Bump 'copyright-year' to 2013. 2013-04-06 15:52:08 -04:00
common-list.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
compile-psyntax.scm Minimize size of embedded syntax objects in psyntax-pp.scm 2012-03-03 18:06:59 -05:00
control.scm Add call/ec' and let/ec'. 2013-04-05 22:54:14 +02:00
curried-definitions.scm `define-public' is no a longer curried definition by default. 2012-09-06 13:08:33 +01:00
debug.scm gut ice-9 debug 2010-07-16 17:35:43 +02:00
deprecated.scm deprecate generalized vectors in favor of arrays 2013-02-18 16:57:15 +01:00
documentation.scm remove program-name, program-documentation 2010-04-17 15:21:08 +02:00
eval-string.scm current-language is a parameter in boot-9 2013-01-22 15:38:04 +01:00
eval.scm case-lambda* clauses fail to match if too many positionals 2013-01-14 11:38:09 +01:00
expect.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
format.scm Micro-optimize (ice-9 format). 2012-08-21 00:36:50 +02:00
ftw.scm scandir: Use lstat' instead of stat'. 2012-11-01 00:48:59 +01:00
futures.scm Add call/ec' and let/ec'. 2013-04-05 22:54:14 +02:00
gap-buffer.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
getopt-long.scm Fix record constructor in getopt-long. 2012-11-08 21:53:36 -05:00
hcons.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
history.scm Use `define-module*' in (ice-9 history). 2010-11-20 00:47:12 +01:00
i18n.scm i18n: Provide default values for when Gnulib has no replacement. 2012-02-03 20:11:00 +01:00
iconv.scm add read-string and read-string! to (ice-9 rdelim) 2013-01-22 15:15:43 +01:00
lineio.scm remove (ice-9 lineio)'s dependency on (ice-9 readline) 2009-08-18 17:52:46 +02:00
list.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
local-eval.scm Fix 'local-eval' when the specified environment is a module 2012-01-30 03:02:32 -05:00
ls.scm nested module fixen to (ice-9 ls) 2010-04-24 17:42:00 +02:00
mapping.scm deprecate (ice-9 mapping) 2013-02-24 15:11:14 +01:00
match.scm Update (ice-9 match) from Chibi-Scheme. 2012-06-08 12:42:08 +02:00
match.upstream.scm Update (ice-9 match) from Chibi-Scheme. 2012-06-08 12:42:08 +02:00
networking.scm Add `getaddrinfo' and related procedures. 2010-02-14 20:56:47 +01:00
null.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
occam-channel.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
optargs.scm more define-syntax-rule usage 2011-09-02 11:36:14 +02:00
poe.scm (ice-9 poe) does not get handles from weak hash tables 2011-05-01 23:01:13 +02:00
poll.scm ice-9/poll: verify sizeof(struct pollfd) 2011-12-04 22:45:03 +01:00
popen.scm slight open-pipe* / open-process refactor 2013-01-08 12:58:05 +01:00
posix.scm nanosecond timestamp support in stat and utime 2010-01-17 16:56:34 +01:00
pretty-print.scm Have string ports honor `%default-port-conversion-strategy'. 2012-05-31 00:54:21 +02:00
psyntax-pp.scm Do not scan for coding declarations in open-file. 2013-04-07 10:11:41 -04:00
psyntax.scm Do not scan for coding declarations in open-file. 2013-04-07 10:11:41 -04:00
q.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
quasisyntax.scm add quasisyntax 2009-11-14 17:25:12 +01:00
r4rs.scm deprecate close-io-port 2012-03-05 23:52:28 +01:00
r5rs.scm fix some uses of %module-public-interface 2010-04-24 17:43:52 +02:00
r6rs-libraries.scm R6RS srfi library names should ignore first identifier after the :n 2012-11-25 12:28:41 +00:00
rdelim.scm docstring in rdelim 2013-01-22 15:39:37 +01:00
README
receive.scm more define-syntax-rule usage 2011-09-02 11:36:14 +02:00
regex.scm In fold-matches, set regexp/notbol unless matching string start. 2012-09-26 23:46:05 +02:00
runq.scm Remove unused top-level variables. 2010-01-11 01:21:14 +01:00
rw.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
safe-r5rs.scm fix some uses of %module-public-interface 2010-04-24 17:43:52 +02:00
safe.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
save-stack.scm deprecate the-last-stack 2010-06-19 13:43:33 +02:00
scm-style-repl.scm remove evaluator-traps-interface 2010-09-24 18:44:21 +02:00
serialize.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
session.scm better procedure-arguments for interpreted procs with opt, rest, kwargs 2012-07-06 12:19:12 +02:00
slib.scm fix ice-9/slib 2013-01-10 17:30:38 +01:00
stack-catch.scm deprecate save-stack, stack-saved? 2010-06-19 12:57:31 +02:00
streams.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
string-fun.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
syncase.scm deprecated sc-expand in deprecated (ice-9 syncase) 2010-04-07 00:05:34 +02:00
test.scm Placate a number of `syntax-check' verifications. 2012-01-05 23:38:10 +01:00
threads.scm Update `par-map' to use nested futures. 2012-11-21 23:33:30 +01:00
time.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
top-repl.scm current-language is a parameter in boot-9 2013-01-22 15:38:04 +01:00
vlist.scm vlist: Remove Texinfo markup from docstrings. 2012-11-27 23:02:15 +01:00
weak-vector.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00

This directory contains various bits of Guile Scheme code.
Most of these are packaged as modules, with foo.scm implementing
the module `(ice-9 foo)'.

The non-module files are:

boot-9.scm	-- loaded on guile startup
		   implements module system + lots of other stuff
arrays.scm	-- loaded by boot-9.scm
networking.scm	-- loaded by boot-9.scm
posix.scm	-- loaded by boot-9.scm
r4rs.scm	-- loaded by boot-9.scm