diff options
author | drh <drh@noemail.net> | 2005-11-30 03:20:31 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2005-11-30 03:20:31 +0000 |
commit | 054889ec6d2df4754468d2acfe6c92973f54ea2c (patch) | |
tree | 0dd1f8d5015e064fd666cb6253ad10c202ba4e34 /src/date.c | |
parent | 392b3ddf2ebe613d701ff3f912ac04b294ce0070 (diff) | |
download | sqlite-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/date.c')
-rw-r--r-- | src/date.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/date.c b/src/date.c index 35c0bf64a..e4b8f3ab4 100644 --- a/src/date.c +++ b/src/date.c @@ -16,7 +16,7 @@ ** sqlite3RegisterDateTimeFunctions() found at the bottom of the file. ** All other code has file scope. ** -** $Id: date.c,v 1.45 2005/06/25 18:42:14 drh Exp $ +** $Id: date.c,v 1.46 2005/11/30 03:20:31 drh Exp $ ** ** NOTES: ** @@ -311,7 +311,7 @@ static int parseDateOrTime(const char *zDate, DateTime *p){ return 0; }else if( sqlite3StrICmp(zDate,"now")==0){ double r; - sqlite3OsCurrentTime(&r); + sqlite3Os.xCurrentTime(&r); p->rJD = r; p->validJD = 1; return 0; @@ -409,7 +409,7 @@ static double localtimeOffset(DateTime *p){ x.validJD = 0; computeJD(&x); t = (x.rJD-2440587.5)*86400.0 + 0.5; - sqlite3OsEnterMutex(); + sqlite3Os.xEnterMutex(); pTm = localtime(&t); y.Y = pTm->tm_year + 1900; y.M = pTm->tm_mon + 1; @@ -417,7 +417,7 @@ static double localtimeOffset(DateTime *p){ y.h = pTm->tm_hour; y.m = pTm->tm_min; y.s = pTm->tm_sec; - sqlite3OsLeaveMutex(); + sqlite3Os.xLeaveMutex(); y.validYMD = 1; y.validHMS = 1; y.validJD = 0; @@ -942,9 +942,9 @@ static void currentTimeFunc( } #endif - sqlite3OsEnterMutex(); + sqlite3Os.xEnterMutex(); strftime(zBuf, 20, zFormat, gmtime(&t)); - sqlite3OsLeaveMutex(); + sqlite3Os.xLeaveMutex(); sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT); } |