From 4b68d460bb99ca31bf0b2bf805e412329899da39 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 17 Apr 2009 11:12:13 +0000 Subject: [PATCH] doc scheme/gui editor-stream method updates svn: r14538 original commit: a99c653997d179f88a7a4909941be8bf59a79bfc --- .../scribblings/gui/editor-stream-in-base-class.scrbl | 8 ++++++++ collects/scribblings/gui/editor-stream-in-class.scrbl | 10 ++++++++-- collects/scribblings/gui/editor-stream-out-class.scrbl | 3 ++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/collects/scribblings/gui/editor-stream-in-base-class.scrbl b/collects/scribblings/gui/editor-stream-in-base-class.scrbl index ce4cfc89..77d66c3a 100644 --- a/collects/scribblings/gui/editor-stream-in-base-class.scrbl +++ b/collects/scribblings/gui/editor-stream-in-base-class.scrbl @@ -37,6 +37,14 @@ Reads bytes to fill the supplied byte string. The return value is the next call to @method[editor-stream-in-base% bad?] must return @scheme[#t].} +@defmethod[(read-byte) (or/c byte? #f)]{ + +Reads a single byte and return it, or returns @scheme[#f] if no more +bytes are available. The default implementation of this method uses +@method[editor-stream-in-base% read-bytes]. + +} + @defmethod[(seek [pos exact-nonnegative-integer?]) void?]{ diff --git a/collects/scribblings/gui/editor-stream-in-class.scrbl b/collects/scribblings/gui/editor-stream-in-class.scrbl index 25f0e964..5d67b067 100644 --- a/collects/scribblings/gui/editor-stream-in-class.scrbl +++ b/collects/scribblings/gui/editor-stream-in-class.scrbl @@ -54,12 +54,18 @@ Returns the next integer value in the stream. @defmethod[(get-fixed [v (box/c (and/c exact? integer?))]) (is-a?/c editor-stream-in%)]{ +@boxisfill[(scheme v) @elem{a fixed-size integer from the stream obtained through + @method[editor-stream-in% get-fixed-exact]}] + +} + +@defmethod[(get-fixed-exact) + (and/c exact? integer?)]{ + Gets a fixed-sized integer from the stream. See @method[editor-stream-out% put-fixed] for more information. Reading from a bad stream always gives @scheme[0]. -@boxisfill[(scheme v) @elem{the fixed-size integer from the stream}] - } @defmethod[(get-inexact) diff --git a/collects/scribblings/gui/editor-stream-out-class.scrbl b/collects/scribblings/gui/editor-stream-out-class.scrbl index d869eaf2..30bdb2b4 100644 --- a/collects/scribblings/gui/editor-stream-out-class.scrbl +++ b/collects/scribblings/gui/editor-stream-out-class.scrbl @@ -86,7 +86,8 @@ Puts a fixed-sized integer into the stream. This method is needed fixed-size number. Numbers written to a stream with @method[editor-stream-out% put-fixed] - must be read with @method[editor-stream-in% get-fixed].} + must be read with @method[editor-stream-in% get-fixed-exact] + or @method[editor-stream-in% get-fixed].} @defmethod[(put-unterminated [v bytes?]) (is-a?/c editor-stream-out%)]{