From 7596e2e9ba3f04e1b449501c3990e37a368caf34 Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Tue, 13 Feb 2007 16:04:45 +0000 Subject: [PATCH] Added `ports.h'. * src/Makefile.am (r6rsinclude_HEADERS): Added `ports.h'. * src/ports.c: Include it. (scm_r6rs_put_bytevector): Appropriately cast the result of `SCM_R6RS_BYTEVECTOR_CONTENTS ()'. git-archimport-id: lcourtes@laas.fr--2006-libre/guile-r6rs-libs--devo--0--patch-16 --- ChangeLog | 20 ++++++++++++++++++++ src/Makefile.am | 2 +- src/ports.c | 3 ++- src/ports.h | 40 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 src/ports.h diff --git a/ChangeLog b/ChangeLog index 0fb88af..7c6df53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,26 @@ # arch-tag: automatic-ChangeLog--lcourtes@laas.fr--2006-libre/guile-r6rs-libs--devo--0 # +2007-02-13 16:04:45 GMT Ludovic Court`es patch-16 + + Summary: + Added `ports.h'. + Revision: + guile-r6rs-libs--devo--0--patch-16 + + * src/Makefile.am (r6rsinclude_HEADERS): Added `ports.h'. + + * src/ports.c: Include it. + (scm_r6rs_put_bytevector): Appropriately cast the result of + `SCM_R6RS_BYTEVECTOR_CONTENTS ()'. + + new files: + src/ports.h + + modified files: + ChangeLog src/Makefile.am src/ports.c + + 2007-02-13 15:48:23 GMT Ludovic Court`es patch-15 Summary: diff --git a/src/Makefile.am b/src/Makefile.am index 2e0ec5d..db32da4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,7 +7,7 @@ libguile_r6rs_libs_v_0_la_SOURCES = bytevector.c ports.c AM_CPPFLAGS = -I $(builddir) r6rsincludedir = $(includedir)/guile-r6rs-libs -r6rsinclude_HEADERS = bytevector.h +r6rsinclude_HEADERS = bytevector.h ports.h noinst_HEADERS = utils.h ieee754-double.h snarfcppopts = $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ diff --git a/src/ports.c b/src/ports.c index 286000d..ebc61b1 100644 --- a/src/ports.c +++ b/src/ports.c @@ -20,6 +20,7 @@ #include #include +#include "ports.h" #include "bytevector.h" #include "utils.h" @@ -328,7 +329,7 @@ SCM_DEFINE (scm_r6rs_put_bytevector, "put-bytevector", 2, 2, 0, SCM_VALIDATE_R6RS_BYTEVECTOR (2, bv); c_len = SCM_R6RS_BYTEVECTOR_LENGTH (bv); - c_bv = SCM_R6RS_BYTEVECTOR_CONTENTS (bv); + c_bv = (char *) SCM_R6RS_BYTEVECTOR_CONTENTS (bv); if (start != SCM_UNDEFINED) { diff --git a/src/ports.h b/src/ports.h new file mode 100644 index 0000000..a19a2a8 --- /dev/null +++ b/src/ports.h @@ -0,0 +1,40 @@ +/* Guile-R6RS-Libs --- Implementation of R6RS standard libraries. + Copyright (C) 2007 Ludovic Courtès + + Guile-R6RS-Libs is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + Guile-R6RS-Libs is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Guile-R6RS-Libs; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#ifndef GUILE_R6RS_IO_PORTS_H +#define GUILE_R6RS_IO_PORTS_H + +/* R6RS I/O Ports. */ + +#include + +SCM_API void scm_init_r6rs_ports (void); + +SCM_API SCM scm_r6rs_eof_object (void); +SCM_API SCM scm_r6rs_get_u8 (SCM); +SCM_API SCM scm_r6rs_lookahead_u8 (SCM); +SCM_API SCM scm_r6rs_get_bytevector_n (SCM, SCM); +SCM_API SCM scm_r6rs_get_bytevector_n_x (SCM, SCM, SCM, SCM); +SCM_API SCM scm_r6rs_get_bytevector_some (SCM); +SCM_API SCM scm_r6rs_get_bytevector_all (SCM); +SCM_API SCM scm_r6rs_put_u8 (SCM, SCM); +SCM_API SCM scm_r6rs_put_bytevector (SCM, SCM, SCM, SCM); + +#endif + +/* arch-tag: 57bad7db-c4a7-4968-9f87-01d9acda0fb1 + */ -- 2.11.4.GIT