Extend stream functionality

Writer and reader streams now come with methods to write and read
little-endian numbers. Whether that is the right place for such
methods is debatable, but for now, that's where they live.
This commit is contained in:
Marijn Haverbeke
2011-03-10 16:02:53 +01:00
committed by Graydon Hoare
parent c731d625fe
commit 441697ab35
8 changed files with 147 additions and 96 deletions

View File

@@ -13,6 +13,8 @@ native mod libc = "libc.so.6" {
fn fclose(FILE f);
fn fgetc(FILE f) -> int;
fn ungetc(int c, FILE f);
fn fread(vbuf buf, uint size, uint n, FILE f) -> uint;
fn fseek(FILE f, int offset, int whence) -> int;
type dir;
fn opendir(sbuf d) -> dir;