define-module for elisp special modules
[bpt/guile.git] / module / ice-9 / binary-ports.scm
CommitLineData
dd0d987f
AW
1;;;; binary-ports.scm --- Binary IO on ports
2
7f6c3f8f 3;;;; Copyright (C) 2009, 2010, 2011, 2013 Free Software Foundation, Inc.
dd0d987f
AW
4;;;;
5;;;; This library is free software; you can redistribute it and/or
6;;;; modify it under the terms of the GNU Lesser General Public
7;;;; License as published by the Free Software Foundation; either
8;;;; version 3 of the License, or (at your option) any later version.
9;;;;
10;;;; This library is distributed in the hope that it will be useful,
11;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13;;;; Lesser General Public License for more details.
14;;;;
15;;;; You should have received a copy of the GNU Lesser General Public
16;;;; License along with this library; if not, write to the Free Software
17;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
19;;; Author: Ludovic Courtès <ludo@gnu.org>
20
21;;; Commentary:
22;;;
23;;; The I/O port API of the R6RS is provided by this module. In many areas
24;;; it complements or refines Guile's own historical port API. For instance,
25;;; it allows for binary I/O with bytevectors.
26;;;
27;;; Code:
28
29(define-module (ice-9 binary-ports)
30 #:use-module (rnrs bytevectors)
31 #:export (eof-object
32 open-bytevector-input-port
33 make-custom-binary-input-port
34 get-u8
35 lookahead-u8
36 get-bytevector-n
37 get-bytevector-n!
38 get-bytevector-some
39 get-bytevector-all
a6c377f7 40 get-string-n!
dd0d987f
AW
41 put-u8
42 put-bytevector
7f6c3f8f 43 unget-bytevector
dd0d987f
AW
44 open-bytevector-output-port
45 make-custom-binary-output-port))
46
47;; Note that this extension also defines %make-transcoded-port, which is
48;; not exported but is used by (rnrs io ports).
49
50(load-extension (string-append "libguile-" (effective-version))
51 "scm_init_r6rs_ports")