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 @@
120070814
2 bufio.b didn't update the buffer pointers correctly on write errors
120070807320070807
2 libinterp/keyring.c don't include owner= if owner is nil or ""4 libinterp/keyring.c don't include owner= if owner is nil or ""
3 add auth/rsagen5 add auth/rsagen
appl/lib/bufio.b+6−5
@@ -88,17 +88,16 @@ readchunk(b: ref Iobuf): int · 87 unmodified lines
88 88
89writechunk(b: ref Iobuf): int89writechunk(b: ref Iobuf): int
90{90{
91 if (b.fd == nil)91 err := (b.fd == nil);
92 return ERROR;
93 if (b.filpos != b.bufpos) {92 if (b.filpos != b.bufpos) {
94 if (sys->seek(b.fd, b.bufpos, 0) != b.bufpos)93 if (sys->seek(b.fd, b.bufpos, 0) != b.bufpos)
95 return ERROR;94 err = 1;
96 b.filpos = b.bufpos;95 b.filpos = b.bufpos;
97 }96 }
98 if ((size := b.size) > Bufsize)97 if ((size := b.size) > Bufsize)
99 size = Bufsize;98 size = Bufsize;
100 if (sys->write(b.fd, b.buffer, size) != size)99 if (sys->write(b.fd, b.buffer, size) != size)
101 return ERROR;100 err = 1;
102 b.filpos += big size;101 b.filpos += big size;
103 b.size -= size;102 b.size -= size;
104 if (b.size) {103 if (b.size) {
@@ -108,6 +107,8 @@ writechunk(b: ref Iobuf): int · 3 unmodified lines
108 b.dirty = 0;107 b.dirty = 0;
109 b.bufpos += big size;108 b.bufpos += big size;
110 b.index -= size;109 b.index -= size;
110 if(err)
111 return ERROR;
111 return size;112 return size;
112}113}
113 114
@@ -295,7 +296,7 @@ Iobuf.ungetc(b: self ref Iobuf): int · 181 unmodified lines
295 stop = 0;296 stop = 0;
296 buf := b.buffer[0:b.size];297 buf := b.buffer[0:b.size];
297 for(i := b.index-1; i >= stop; i--){298 for(i := b.index-1; i >= stop; i--){
298 (r, n, s) := sys->byte2char(buf, i);299 (nil, n, s) := sys->byte2char(buf, i);
299 if(s && i + n == b.index){300 if(s && i + n == b.index){
300 b.index = i;301 b.index = i;
301 return 1;302 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)"