]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Updated comments on journal.c. No changes to code. (CVS 4408)
authordrh <drh@noemail.net>
Thu, 6 Sep 2007 13:49:37 +0000 (13:49 +0000)
committerdrh <drh@noemail.net>
Thu, 6 Sep 2007 13:49:37 +0000 (13:49 +0000)
FossilOrigin-Name: 3298441086330d1d24c30b7c061dfec98e9ea3ac

manifest
manifest.uuid
src/journal.c

index 0396c72f344666f5cac32317648a8d502cfb199f..b4d56e1913034110de1e6cf3da1a8a47fb6d529f 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-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
@@ -95,7 +95,7 @@ F src/func.c 9d88141c4cffb3a04719e5a0fda65cde34bfa1e5
 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
@@ -570,7 +570,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 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
index 8edf52ac88ea4dbd810dba5fead04d55ff64b58a..4cd35fe7d330068356f485e7f1fe7f4746c7472f 100644 (file)
@@ -1 +1 @@
-79cf4e886cd5f1cd22574ce13135d4e32c1047b6
\ No newline at end of file
+3298441086330d1d24c30b7c061dfec98e9ea3ac
\ No newline at end of file
index 33304f64bd8715f2e490cadf8664448931a9f8e9..7cbe5bc9ff6ba84ba5e1d3aa89f0e88d093d3b5c 100644 (file)
@@ -10,7 +10,7 @@
 **
 *************************************************************************
 **
-** @(#) $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;
 
@@ -83,10 +86,10 @@ static int jrnlClose(sqlite3_file *pJfd){
 ** 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;
@@ -103,10 +106,10 @@ static int jrnlRead(
 ** 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;
@@ -190,11 +193,11 @@ static struct sqlite3_io_methods JournalFileMethods = {
 ** 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));