design documents?

Ross Boylan RossBoylan at stanfordalumni.org
Sat Mar 29 12:02:26 EDT 2008


On Sat, 2008-03-29 at 08:54 -0700, Ross Boylan wrote:
> On Sat, 2008-03-29 at 11:40 -0400, Derek Atkins wrote:
> > I'm afraid that really there are no good design docs.  Certainly
> > nothing coherent.  Many times there are email discussions when a
> > feature is being created, but nothing really gets put down for
> > posterity in the source tree.  Unfortunately I have to say the
> > the design doc is the source code.
> > 
> > -derek
> Could anyone point me to where I can start to understand the log file
> format?  As I said, my main interest is in effecting a repair, possibly
> by using excerpts from a previous log file.
> 
> It looks as if the documentation has moved mostly to doxygen, and I've
> discovered http://svn.gnucash.org/docs/HEAD/index.html.  However, the
> discussion of backup says "The actual file writing is done by
> xaccWriteAccountGroupFile() in in src/engine/FileIOP.hv" and that file
> doesn't seem to exist (nor does a search on doxygen turn up the
> function).
I found this:

void
xaccTransWriteLog 
(
Transaction * 
trans, 


char 
flag
 

)



Parameters:
        
        trans 
        The transaction to
        write out to the log 
        
        flag 
        The engine currently
        uses the log
        mechanism with flag
        char set as follows:
        'B' for 'begin
        edit' (followed by
        the transaction as it
        looks before any
        changes, i.e. the
        'old value') 'D' for
        delete (i.e. delete
        the previous B;
        echoes the data in
        the 'old B') 'C' for
        commit (i.e. accept a
        previous B; data that
        follows is the 'new
        value') 'R' for
        rollback (i.e. revert
        to previous B; data
        that follows should
        be identical to old
        B)

So what if I have a new transaction, i.e., there is no old value?


More information about the gnucash-devel mailing list