Unified · Split
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | 20070714 |
| 2 | − add Sys->readn | |
| 2 | + add Sys->readn, update sys-read(2) | |
| 3 | 3 | copy two repairs from emu/port/inferno.c to os/port/inferno.c |
| 4 | 4 | 20070619 |
| 5 | 5 | remembered to include /appl/cmd/trfs.b /dis/trfs.dis |
| @@ -7,6 +7,7 @@ include "sys.m"; · 6 unmodified lines | ||
| 7 | 7 | sys := load Sys Sys->PATH; |
| 8 | 8 | |
| 9 | 9 | read: fn(fd: ref FD, buf: array of byte, nbytes: int): int; |
| 10 | +readn: fn(fd: ref FD, buf: array of byte, nbytes: int): int; | |
| 10 | 11 | write: fn(fd: ref FD, buf: array of byte, nbytes: int): int; |
| 11 | 12 | |
| 12 | 13 | pread: fn(fd: ref FD, buf: array of byte, nbytes: int, |
| @@ -36,6 +37,19 @@ In any event the number of bytes read is returned. · 23 unmodified lines | ||
| 36 | 37 | A return value of |
| 37 | 38 | 0 is conventionally interpreted as end of file. |
| 38 | 39 | .PP |
| 40 | +.B Readn | |
| 41 | +continues to | |
| 42 | +.B read | |
| 43 | +from | |
| 44 | +.I fd | |
| 45 | +sequentially into | |
| 46 | +.IR buf , | |
| 47 | +until | |
| 48 | +.I nbytes | |
| 49 | +have been read, or | |
| 50 | +.B read | |
| 51 | +returns a non-positive count. | |
| 52 | +.PP | |
| 39 | 53 | .B Write |
| 40 | 54 | writes |
| 41 | 55 | .I nbytes |