1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-09 10:21:35 +03:00

Updated comments on journal.c. No changes to code. (CVS 4408)

FossilOrigin-Name: 3298441086330d1d24c30b7c061dfec98e9ea3ac
This commit is contained in:
drh
2007-09-06 13:49:37 +00:00
parent bd468510ee
commit 24e824c4eb
3 changed files with 35 additions and 32 deletions

View File

@@ -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

View File

@@ -1 +1 @@
79cf4e886cd5f1cd22574ce13135d4e32c1047b6
3298441086330d1d24c30b7c061dfec98e9ea3ac

View 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
@@ -33,17 +33,20 @@
#include "sqliteInt.h"
/*
** 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;
int nBuf;
char *zBuf;
int iSize;
int flags;
sqlite3_vfs *pVfs;
sqlite3_file *pReal;
const char *zJournal;
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));