diff options
author | Thomas Bushnell, BSG <tb@debian.org> | 2008-02-04 20:29:13 -0500 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:41 -0800 |
commit | 71dab84adaa579f9386dd8ee09006d3cac625723 (patch) | |
tree | 8022514642d25edffdb4bdd130020674b0efd844 /byte.txi | |
parent | 897451458bd8eec628c7bbfaccba0dd069830f0f (diff) | |
parent | 4684239efa63dc1b2c1cbe37ef7d3062029f5532 (diff) | |
download | slib-debian/3b1-1.tar.gz slib-debian/3b1-1.zip |
Import Debian changes 3b1-1debian/3b1-1
slib (3b1-1) unstable; urgency=low
* New upstream release.
* guile.init (library-vicinity): Repeat change from 3a4-2.
* slib.texi (Library Catalogs): Repeat change from 3a3-3.
* slib.sh: Repeat change from 3a5-3.
* slib.1: Repeat change from 3a5-4.
* Makefile: Repeat change from 3a2-1.
Diffstat (limited to 'byte.txi')
-rw-r--r-- | byte.txi | 44 |
1 files changed, 30 insertions, 14 deletions
@@ -48,17 +48,17 @@ nonnegative arguments. @end defun -@defun bytes->list bytes +@defun list->bytes bytes -@code{bytes->list} returns a newly allocated list of the bytes that make up the -given byte-array. +@code{list->bytes} returns a newly allocated byte-array formed from the small +nonnegative integers in the list @var{bytes}. @end defun -@defun list->bytes bytes +@defun bytes->list bytes -@code{list->bytes} returns a newly allocated byte-array formed from the small -nonnegative integers in the list @var{bytes}. +@code{bytes->list} returns a newly allocated list of the bytes that make up the +given byte-array. @end defun @noindent @@ -67,6 +67,22 @@ nonnegative integers in the list @var{bytes}. @findex equal? +@defun bytes->string bytes + +Returns a new string formed from applying @code{integer->char} to +each byte in @code{bytes->string}. Note that this may signal an error for bytes +having values between 128 and 255. +@end defun + + +@defun string->bytes string + +Returns a new byte-array formed from applying @code{char->integer} +to each character in @code{string->bytes}. Note that this may signal an error if an +integer is larger than 255. +@end defun + + @defun bytes-copy bytes Returns a newly allocated copy of the given @var{bytes}. @@ -153,7 +169,7 @@ multi-byte sequences produced and used by number conversion routines @code{(abs @var{n})} bytes read from @var{port}. If @var{n} is positive, then the first byte read is stored at index 0; otherwise the last byte read is stored at index 0. Note that the length of the returned -string will be less than @code{(abs @var{n})} if @var{port} reaches +byte-array will be less than @code{(abs @var{n})} if @var{port} reaches end-of-file. @var{port} may be omitted, in which case it defaults to the value returned @@ -181,12 +197,12 @@ relative size of @var{start} and @var{end} determines the order of writing. -@deffn {Procedure} subbytes-read! string start end port +@deffn {Procedure} subbytes-read! bts start end port -@deffnx {Procedure} subbytes-read! string start end -Fills @var{string} with up to @code{(abs (- @var{start} @var{end}))} bytes -read from @var{port}. The first byte read is stored at index @var{string}. +@deffnx {Procedure} subbytes-read! bts start end +Fills @var{bts} with up to @code{(abs (- @var{start} @var{end}))} bytes +read from @var{port}. The first byte read is stored at index @var{bts}. @code{subbytes-read!} returns the number of bytes read. @var{port} may be omitted, in which case it defaults to the value returned @@ -194,12 +210,12 @@ by @code{current-input-port}. @end deffn -@defun subbytes-write string start end port +@defun subbytes-write bts start end port -@defunx subbytes-write string start end +@defunx subbytes-write bts start end @code{subbytes-write} writes @code{(abs (- @var{start} @var{end}))} bytes to -output-port @var{port}. The first byte written is index @var{start} of @var{string}. @code{subbytes-write} +output-port @var{port}. The first byte written is index @var{start} of @var{bts}. @code{subbytes-write} returns the number of bytes written. @var{port} may be omitted, in which case it defaults to the value returned |