Skip to content
Snippets Groups Projects
Commit 4d9f55ed authored by Stephen R. van den Berg's avatar Stephen R. van den Berg
Browse files

Renamed FILE.unget() to FILE.unread(), updated docs and Changelog

Rev: CHANGES:1.114
Rev: lib/modules/Stdio.pmod/module.pmod:1.242
parent 07d806c4
Branches
Tags
No related merge requests found
......@@ -762,6 +762,9 @@ o Stdio
- Stdio.File->openat() opens a file relative to an open directory.
- Stdio.FILE->unread() allows pushing back binary strings into the
input stream, as opposed to ungets() which pushes back lines.
o String
- The function int2size has been rewritten to fixpoint as well as
......
// $Id: module.pmod,v 1.241 2008/07/14 08:49:02 srb Exp $
// $Id: module.pmod,v 1.242 2008/07/14 09:12:13 srb Exp $
#pike __REAL_VERSION__
inherit files;
......@@ -1830,7 +1830,7 @@ class FILE
//! input conversion.
//!
//! @seealso
//! @[Stdio.File()->read()], @[set_charset()]
//! @[Stdio.File()->read()], @[set_charset()], @[unread()]
string read(int|void bytes,void|int(0..1) now)
{
if (!query_num_arg()) {
......@@ -1867,9 +1867,9 @@ class FILE
//! can then be read with eg @[read()], @[gets()] or @[getchar()].
//!
//! @seealso
//! @[read()], @[gets()], @[getchar()]
//! @[read()], @[gets()], @[getchar()], @[ungets()]
//!
void unget(string s)
void unread(string s)
{
cached_lines = ({});
lp = 0;
......@@ -1884,7 +1884,7 @@ class FILE
//! The string is autoterminated by an extra line-feed.
//!
//! @seealso
//! @[read()], @[gets()], @[getchar()]
//! @[read()], @[gets()], @[getchar()], @[unread()]
//!
void ungets(string s)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment