From 2200c689814c2aa7c2a90c68d24d15de141b6280 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 13 Apr 2019 23:47:20 -0700 Subject: 5091 --- subx/Readme.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'subx') diff --git a/subx/Readme.md b/subx/Readme.md index cc5d7b07..66449ead 100644 --- a/subx/Readme.md +++ b/subx/Readme.md @@ -619,9 +619,12 @@ allocated memory for it.)_ - Will silently stop reading when destination runs out of space. * `read-byte`: buffered-file -> byte * `read-line`: buffered-file -> stream + - Will abort the entire program if there isn't enough room. #### non-IO operations on streams -* `new-stream`: allocates space for a stream of size `n`. +* `new-stream`: allocates space for a stream of `n` elements, each occupying + `b` bytes. + - Will abort the entire program if `n*b` requires more than 32 bits. * `clear-stream`: resets everything in the stream to `0` (except its `length`). * `rewind-stream`: resets the read index of the stream to `0` without modifying its contents. @@ -645,8 +648,8 @@ from a stream: from a slice: * `next-token-from-slice`: start, end, delimiter byte -> slice - Given a slice and a delimiter byte, returns a new slice inside the input - that ends at the delimiter byte. + - Given a slice and a delimiter byte, returns a new slice inside the input + that ends at the delimiter byte. * `skip-chars-matching-in-slice`: curr, end, delimiter byte -> new-curr (in `EAX`) * `skip-chars-not-matching-in-slice`: curr, end, delimiter byte -> new-curr (in `EAX`) -- cgit 1.4.1-2-gfad0