-C Add\ssome\sextra\scomments\sto\sthe\sheader\sin\stest_async.c.\s(CVS\s4407)
-D 2007-09-06T07:47:18
+C Updated\scomments\son\sjournal.c.\s\sNo\schanges\sto\scode.\s(CVS\s4408)
+D 2007-09-06T13:49:37
F Makefile.in cbfb898945536a8f9ea8b897e1586dd1fdbcc5db
F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/hash.c 45a7005aac044b6c86bd7e49c44bc15d30006d6c
F src/hash.h 031cd9f915aff27e12262cb9eb570ac1b8326b53
F src/insert.c df9712e1f67201573a9677d3a2fe401d52d84dda
-F src/journal.c a45147d798f4d8dbdeed200ca7f740579bd8591b
+F src/journal.c 807bed7a158979ac8d63953e1774e8d85bff65e2
F src/legacy.c 4ac53191fad2e3c4d59bde1228879b2dc5a96d66
F src/limits.h 71ab25f17e35e0a9f3f6f234b8ed49cc56731d35
F src/loadext.c 6894dbbf1666577d957922811620375d6c2f058d
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 96aa96ac11ab63b51e4322e88ded4f931e1e78c8
-R 822408f19109fa4e09fe9b9979527829
-U danielk1977
-Z 68602741cdf9332e0c40304397107c48
+P 79cf4e886cd5f1cd22574ce13135d4e32c1047b6
+R e940832e4042881361230f79ce400588
+U drh
+Z 99beef2eb5ea70985d445f46a130fc96
**
*************************************************************************
**
-** @(#) $Id: journal.c,v 1.6 2007/09/03 15:19:35 drh Exp $
+** @(#) $Id: journal.c,v 1.7 2007/09/06 13:49:37 drh Exp $
*/
#ifdef SQLITE_ENABLE_ATOMIC_WRITE
#include "sqliteInt.h"
-struct JournalFile {
- sqlite3_io_methods *pMethod;
-
- int nBuf;
- char *zBuf;
- int iSize;
- int flags;
- sqlite3_vfs *pVfs;
- sqlite3_file *pReal;
- const char *zJournal;
+/*
+** A JournalFile object is a subclass of sqlite3_file used by
+** as an open file handle for journal files.
+*/
+struct JournalFile {
+ sqlite3_io_methods *pMethod; /* I/O methods on journal files */
+ int nBuf; /* Size of zBuf[] in bytes */
+ char *zBuf; /* Space to buffer journal writes */
+ int iSize; /* Amount of zBuf[] currently used */
+ int flags; /* xOpen flags */
+ sqlite3_vfs *pVfs; /* The "real" underlying VFS */
+ sqlite3_file *pReal; /* The "real" underlying file descriptor */
+ const char *zJournal; /* Name of the journal file */
};
typedef struct JournalFile JournalFile;
** Read data from the file.
*/
static int jrnlRead(
- sqlite3_file *pJfd,
- void *zBuf,
- int iAmt,
- sqlite_int64 iOfst
+ sqlite3_file *pJfd, /* The journal file from which to read */
+ void *zBuf, /* Put the results here */
+ int iAmt, /* Number of bytes to read */
+ sqlite_int64 iOfst /* Begin reading at this offset */
){
int rc = SQLITE_OK;
JournalFile *p = (JournalFile *)pJfd;
** Write data to the file.
*/
static int jrnlWrite(
- sqlite3_file *pJfd,
- const void *zBuf,
- int iAmt,
- sqlite_int64 iOfst
+ sqlite3_file *pJfd, /* The journal file into which to write */
+ const void *zBuf, /* Take data to be written from here */
+ int iAmt, /* Number of bytes to write */
+ sqlite_int64 iOfst /* Begin writing at this offset into the file */
){
int rc = SQLITE_OK;
JournalFile *p = (JournalFile *)pJfd;
** Open a journal file.
*/
int sqlite3JournalOpen(
- sqlite3_vfs *pVfs,
- const char *zName,
- sqlite3_file *pJfd,
- int flags,
- int nBuf
+ sqlite3_vfs *pVfs, /* The VFS to use for actual file I/O */
+ const char *zName, /* Name of the journal file */
+ sqlite3_file *pJfd, /* Preallocated, blank file handle */
+ int flags, /* Opening flags */
+ int nBuf /* Bytes buffered before opening the file */
){
JournalFile *p = (JournalFile *)pJfd;
memset(p, 0, sqlite3JournalSize(pVfs));