aboutsummaryrefslogtreecommitdiff
path: root/src/test2.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2005-11-30 03:20:31 +0000
committerdrh <drh@noemail.net>2005-11-30 03:20:31 +0000
commit054889ec6d2df4754468d2acfe6c92973f54ea2c (patch)
tree0dd1f8d5015e064fd666cb6253ad10c202ba4e34 /src/test2.c
parent392b3ddf2ebe613d701ff3f912ac04b294ce0070 (diff)
downloadsqlite-054889ec6d2df4754468d2acfe6c92973f54ea2c.tar.gz
sqlite-054889ec6d2df4754468d2acfe6c92973f54ea2c.zip
Restructure the OS interface yet again. This time make the OsFile object
a virtual base class which is subclassed for unix, windows, and the crash test simulator. Add the new file "os.c" for common os layer code. Move all OS-specific routines into the sqlite3Os structure. (CVS 2795) FossilOrigin-Name: bd8740d1aecba69e1b5d64d43db07e8ad8841f07
Diffstat (limited to 'src/test2.c')
-rw-r--r--src/test2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test2.c b/src/test2.c
index 39e914897..b7b1c487e 100644
--- a/src/test2.c
+++ b/src/test2.c
@@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
-** $Id: test2.c,v 1.37 2005/11/29 03:13:22 drh Exp $
+** $Id: test2.c,v 1.38 2005/11/30 03:20:32 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -532,20 +532,20 @@ static int fake_big_file(
return TCL_ERROR;
}
if( Tcl_GetInt(interp, argv[1], &n) ) return TCL_ERROR;
- rc = sqlite3Io.xOpenReadWrite(argv[2], &fd, &readOnly);
+ rc = sqlite3Os.xOpenReadWrite(argv[2], &fd, &readOnly);
if( rc ){
Tcl_AppendResult(interp, "open failed: ", errorName(rc), 0);
return TCL_ERROR;
}
offset = n;
offset *= 1024*1024;
- rc = sqlite3Io.xSeek(fd, offset);
+ rc = sqlite3OsSeek(fd, offset);
if( rc ){
Tcl_AppendResult(interp, "seek failed: ", errorName(rc), 0);
return TCL_ERROR;
}
- rc = sqlite3Io.xWrite(fd, "Hello, World!", 14);
- sqlite3Io.xClose(&fd);
+ rc = sqlite3OsWrite(fd, "Hello, World!", 14);
+ sqlite3OsClose(&fd);
if( rc ){
Tcl_AppendResult(interp, "write failed: ", errorName(rc), 0);
return TCL_ERROR;