for review: fix comment in io.m

Simon Taylor stayl at cs.mu.OZ.AU
Wed Mar 10 14:14:32 AEDT 1999


library/io.m:
	Fix a misleading comment on `io__putback_char' - the implementation
	uses ungetc() so only one character of pushback per stream is
	guaranteed.

Index: io.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/io.m,v
retrieving revision 1.173
diff -u -u -r1.173 io.m
--- io.m	1999/01/28 11:34:50	1.173
+++ io.m	1999/03/10 00:48:00
@@ -137,6 +137,9 @@
 %		Un-reads a character from the current input stream.
 %		You can put back as many characters as you like.
 %		You can even put back something that you didn't actually read.
+%		Note: `io__putback_char' uses the C library function ungetc().
+%		On some systems only one character of pushback is guaranteed.
+%		`io__putback_char' will abort with an error if ungetc() fails.
 
 :- pred io__read_char(io__input_stream, io__result(char),
 				io__state, io__state).
@@ -178,6 +181,9 @@
 %		Un-reads a character from specified stream.
 %		You can put back as many characters as you like.
 %		You can even put back something that you didn't actually read.
+%		Note: `io__putback_char' uses the C library function ungetc().
+%		On some systems only one character of pushback is guaranteed.
+%		`io__putback_char' will abort with an error if ungetc() fails.
 
 :- pred io__read(io__read_result(T), io__state, io__state).
 :- mode io__read(out, di, uo) is det.




More information about the developers mailing list