bjh 01/08/28 09:41:14
Modified: file_io/os2 seek.c
file_io/unix seek.c
file_io/win32 seek.c
Log:
Fix calculation of new offset after a seek on a buffered file.
Revision Changes Path
1.19 +1 -1 apr/file_io/os2/seek.c
Index: seek.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/seek.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- seek.c 2001/08/21 12:09:50 1.18
+++ seek.c 2001/08/28 16:41:14 1.19
@@ -111,7 +111,7 @@
break;
}
- *offset = thefile->filePtr + thefile->bufpos;
+ *offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
return rc;
} else {
switch (where) {
1.24 +1 -1 apr/file_io/unix/seek.c
Index: seek.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/seek.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- seek.c 2001/08/22 15:40:29 1.23
+++ seek.c 2001/08/28 16:41:14 1.24
@@ -110,7 +110,7 @@
break;
}
- *offset = thefile->filePtr + thefile->bufpos;
+ *offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
return rc;
} else {
1.21 +1 -1 apr/file_io/win32/seek.c
Index: seek.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/seek.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- seek.c 2001/08/28 01:56:09 1.20
+++ seek.c 2001/08/28 16:41:14 1.21
@@ -115,7 +115,7 @@
return APR_EINVAL;
}
- *offset = thefile->filePtr + thefile->bufpos;
+ *offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
return rc;
}
else if (thefile->pOverlapped) {