[m-rev.] diff: document limitations of io__putback_byte
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Oct 25 00:06:35 AEST 2002
Estimated hours taken: 0.25
Branches: main
library/io.m:
Fix a documentation bug: copy the caveat about io__putback_char
only guaranteeing one character of putback to the documentation
for io__putback_byte, since it also applies there.
Workspace: /home/ceres/fjh/mercury
Index: library/io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.269
diff -u -d -r1.269 io.m
--- library/io.m 19 Oct 2002 14:10:51 -0000 1.269
+++ library/io.m 24 Oct 2002 14:05:34 -0000
@@ -763,6 +763,10 @@
% You can put back as many bytes as you like.
% You can even put back something that you didn't actually read.
% The byte is taken from the bottom 8 bits of an integer.
+% Note: `io__putback_byte' uses the C library function ungetc().
+% On some systems only one byte of pushback is guaranteed.
+% `io__putback_byte' will throw an io__error exception
+% if ungetc() fails.
:- pred io__putback_byte(io__binary_input_stream, int, io__state, io__state).
:- mode io__putback_byte(in, in, di, uo) is det.
@@ -770,6 +774,10 @@
% You can put back as many bytes as you like.
% You can even put back something that you didn't actually read.
% The byte is returned in the bottom 8 bits of an integer.
+% Note: `io__putback_byte' uses the C library function ungetc().
+% On some systems only one byte of pushback is guaranteed.
+% `io__putback_byte' will throw an io__error exception
+% if ungetc() fails.
%-----------------------------------------------------------------------------%
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list