History

20070814-1659

Charles.Forsyth committed 19 years ago

Commit 35e45381 parent 86a0c854 files · +8 −5Browse files

Unified · Split

4 files
  1. CHANGES +2 −0
  2. appl/lib/bufio.b +6 −5
  3. dis/lib/bufio.dis +0 −0
  4. include/version.h +1 −1
CHANGES+2−0
@@ -1,3 +1,5 @@
1+20070814
2+ bufio.b didn't update the buffer pointers correctly on write errors
13 20070807
24 libinterp/keyring.c don't include owner= if owner is nil or ""
35 add auth/rsagen
appl/lib/bufio.b+6−5
@@ -88,17 +88,16 @@ readchunk(b: ref Iobuf): int · 87 unmodified lines
8888
8989 writechunk(b: ref Iobuf): int
9090 {
91− if (b.fd == nil)
92− return ERROR;
91+ err := (b.fd == nil);
9392 if (b.filpos != b.bufpos) {
9493 if (sys->seek(b.fd, b.bufpos, 0) != b.bufpos)
95− return ERROR;
94+ err = 1;
9695 b.filpos = b.bufpos;
9796 }
9897 if ((size := b.size) > Bufsize)
9998 size = Bufsize;
10099 if (sys->write(b.fd, b.buffer, size) != size)
101− return ERROR;
100+ err = 1;
102101 b.filpos += big size;
103102 b.size -= size;
104103 if (b.size) {
@@ -108,6 +107,8 @@ writechunk(b: ref Iobuf): int · 3 unmodified lines
108107 b.dirty = 0;
109108 b.bufpos += big size;
110109 b.index -= size;
110+ if(err)
111+ return ERROR;
111112 return size;
112113 }
113114
@@ -295,7 +296,7 @@ Iobuf.ungetc(b: self ref Iobuf): int · 181 unmodified lines
295296 stop = 0;
296297 buf := b.buffer[0:b.size];
297298 for(i := b.index-1; i >= stop; i--){
298− (r, n, s) := sys->byte2char(buf, i);
299+ (nil, n, s) := sys->byte2char(buf, i);
299300 if(s && i + n == b.index){
300301 b.index = i;
301302 return 1;
dis/lib/bufio.dis+0−0

Binary file not shown.

include/version.h+1−1
@@ -1 +1 @@
1−#define VERSION "Fourth Edition (20070807)"
1+#define VERSION "Fourth Edition (20070814)"