[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH] Make LENGTH argument to read-u8vector, {read,
From: |
Evan Hanson |
Subject: |
[Chicken-hackers] [PATCH] Make LENGTH argument to read-u8vector, {read, write}-string more precise in types.db |
Date: |
Thu, 25 Jun 2015 09:24:13 +1200 |
Also fix up the signature of read-u8vector in the manual.
---
manual/Unit srfi-4 | 2 +-
types.db | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/manual/Unit srfi-4 b/manual/Unit srfi-4
index f2c263b..88c50cd 100644
--- a/manual/Unit srfi-4
+++ b/manual/Unit srfi-4
@@ -75,7 +75,7 @@ not including {{TO}}.
=== Vector I/O
-<procedure>(read-u8vector LENGTH [PORT])</procedure>
+<procedure>(read-u8vector [LENGTH [PORT]])</procedure>
Reads {{LENGTH}} bytes from the {{PORT}} and returns a fresh
{{u8vector}} or less if end-of-file is encountered. {{PORT}} defaults to the
diff --git a/types.db b/types.db
index 0b8226b..82e64b0 100644
--- a/types.db
+++ b/types.db
@@ -1310,13 +1310,13 @@
(read-file (#(procedure #:enforce) read-file (#!optional (or input-port
string) (procedure (input-port) *) fixnum) list))
(read-line (#(procedure #:enforce) read-line (#!optional input-port (or false
fixnum)) (or eof string)))
(read-lines (#(procedure #:enforce) read-lines (#!optional (or input-port
string) fixnum) (list-of string)))
-(read-string (#(procedure #:enforce) read-string (#!optional * input-port)
string))
+(read-string (#(procedure #:enforce) read-string (#!optional (or fixnum false)
input-port) string))
(read-string! (#(procedure #:enforce) read-string! ((or fixnum false) string
#!optional input-port fixnum) fixnum))
(read-token (#(procedure #:enforce) read-token ((procedure (char) *)
#!optional input-port) string))
(sprintf (#(procedure #:enforce) sprintf (string #!rest) string))
(write-byte (#(procedure #:enforce) write-byte (fixnum #!optional output-port)
undefined))
(write-line (#(procedure #:enforce) write-line (string #!optional output-port)
undefined))
-(write-string (#(procedure #:enforce) write-string (string #!optional *
output-port) undefined))
+(write-string (#(procedure #:enforce) write-string (string #!optional (or
fixnum false) output-port) undefined))
;; files
@@ -2466,7 +2466,7 @@
(make-u16vector (#(procedure #:clean #:enforce) make-u16vector (fixnum
#!optional * * *) (struct u16vector)))
(make-u32vector (#(procedure #:clean #:enforce) make-u32vector (fixnum
#!optional * * *) (struct u32vector)))
(make-u8vector (#(procedure #:clean #:enforce) make-u8vector (fixnum
#!optional * * *) (struct u8vector)))
-(read-u8vector (#(procedure #:enforce) read-u8vector (#!optional fixnum
input-port) (struct u8vector)))
+(read-u8vector (#(procedure #:enforce) read-u8vector (#!optional (or fixnum
false) input-port) (struct u8vector)))
(read-u8vector! (#(procedure #:enforce) read-u8vector! ((or fixnum false)
(struct u8vector) #!optional input-port fixnum) number))
(release-number-vector (procedure release-number-vector (*) undefined))
(s16vector (#(procedure #:clean #:enforce) s16vector (#!rest fixnum) (struct
s16vector)))
--
2.1.4
- [Chicken-hackers] [PATCH] Make LENGTH argument to read-u8vector, {read, write}-string more precise in types.db,
Evan Hanson <=