db.c File Reference

#include "frontier.h"
#include "standard.h"
#include "memory.h"
#include "cursor.h"
#include "dialogs.h"
#include "error.h"
#include "file.h"
#include "resources.h"
#include "strings.h"
#include "shell.h"
#include "db.h"
#include "dbinternal.h"
#include "ops.h"
#include "byteorder.h"
#include "frontierdebug.h"

Include dependency graph for db.c:

Go to the source code of this file.

Defines

#define dberrorlist   256
#define setdirty(hdb)   ((**hdb).flags |= dbdirtymask)
#define cleardirty(hdb)   ((**hdb).flags &= ~dbdirtymask)
#define isdirty(hdb)   ((**hdb).flags & dbdirtymask)
#define majorversion(v)   (v & 0x00f0)
#define minorversion(v)   (v & 0x000f)
#define dblogerror(errnum)
#define ctdatabasestack   10

Enumerations

enum  tydberror {
  dbnoerror, dbwrongversionerror, dbfreeblockerror, dbfreelisterror,
  dbinconsistentavaillisterror, dbassignfreeblockerror, dbfilesizeerror, dbreleasefreeblockerror,
  dbreleaseinvalidblockerror, dbmergeinvalidblockerror
}

Functions

static void dberror (short errnum)
static boolean dbseteof (long eof)
static boolean dbrelease (dbaddress)
static boolean dballocate (long databytes, ptrvoid pdata, dbaddress *paddress)
boolean dbpushdatabase (hdldatabaserecord hdatabase)
boolean dbpopdatabase (void)
static void dbswapglobals (void)
static boolean dbseek (dbaddress adr)
static boolean dbwrite (dbaddress adr, long ctbytes, ptrvoid pdata)
static boolean dbread (dbaddress adr, long ctbytes, ptrvoid pdata)
static boolean dbwriteswap (dbaddress adr, long ctbytes, ptrvoid pdata)
static boolean dbreadswap (dbaddress adr, long ctbytes, ptrvoid pdata)
boolean dbgeteof (long *eof)
static void dbheaderdirty (void)
static boolean dbflushheader (void)
boolean dbreadheader (dbaddress adr, boolean *flfree, long *ctbytes, tyvariance *variance)
boolean dbreadtrailer (dbaddress adr, boolean *flfree, long *ctbytes)
static boolean dbwriteheader (dbaddress adr, boolean flfree, long ctbytes, tyvariance variance)
static boolean dbwritetrailer (dbaddress adr, boolean flfree, long ctbytes)
static boolean dbwriteheaderandtrailer (dbaddress adr, boolean flfree, long ctbytes, tyvariance variance)
boolean dbreadavailnode (dbaddress adr, boolean *flfree, long *ctbytes, dbaddress *link)
static boolean dbwriteavailnode (dbaddress adr, long ctbytes, dbaddress nextlink)
static boolean dbsetavaillink (dbaddress adr, dbaddress link)
static boolean dbwritedatablock (dbaddress adr, long databytes, long nodebytes, ptrvoid pdata)
static boolean dbfindpreviousavail (dbaddress adr, dbaddress *prev, long *ixshadow)
static boolean dbwriteshadowavaillist (void)
static boolean dbreadshadowavaillist (void)
static boolean dbshadowavaillist (void)
static boolean dbinsertavailshadow (long ixshadow, dbaddress adr, long ctbytes)
static boolean dbdeleteavailshadow (long ixshadow)
static boolean dbsetavailshadow (long ixshadow, dbaddress adr, long ctbytes)
static boolean dbgetsizeandvariance (dbaddress adr, long *size, tyvariance *variance)
static boolean dbsetsize (dbaddress adr, long size, tyvariance variance)
boolean dbreference (dbaddress adr, long maxbytes, ptrvoid pdata)
boolean dbrefhandle (dbaddress adr, Handle *h)
static boolean dbmergeleft (boolean flmerged, dbaddress adr, boolean *ptrflmergedleft)
static boolean dbmergeright (dbaddress adr, long ctbytes, boolean *ptrflmergedright)
static boolean dbmove (ptrvoid pdata, long ctbytes, dbaddress adr)
boolean dbassign (dbaddress *padr, long newsize, ptrvoid pdata)
static boolean dbgetsize (dbaddress adr, long *logicalsize)
boolean dbcopy (dbaddress adrorig, dbaddress *adrcopy)
static boolean dballocstring (dbaddress *adr, bigstring bs)
static boolean dbrefstring (dbaddress adr, bigstring bs)
static boolean dbassignstring (dbaddress *adr, bigstring bs)
static boolean dbreleasestring (dbaddress adr)
boolean dbrefheapstring (dbaddress adr, hdlstring *hstring)
boolean dbassignheapstring (dbaddress *adr, hdlstring hstring)
boolean dballochandle (Handle halloc, dbaddress *adr)
boolean dbassignhandle (Handle h, dbaddress *adr)
boolean dbsavehandle (Handle hsave, dbaddress *adr)
void dbsetview (short viewnumber, dbaddress adrtext)
void dbgetview (short viewnumber, dbaddress *adrtext)
void dbcurrentdatabase (hdldatabaserecord hdb)
void dbgetcurrentdatabase (hdldatabaserecord *hdb)
boolean dbfnumchanged (hdlfilenum newfnum)
boolean dbpushreleasestack (dbaddress adr, long valtype)
boolean dbflushreleasestack (void)
static void dbzeroreleasestack (void)
boolean dbdispose (void)
boolean dbnew (hdlfilenum fnum)
boolean dbopenfile (hdlfilenum fnum, boolean flreadonly)
boolean dbclose (void)
boolean dbstartsaveas (hdlfilenum fnum)
boolean dbendsaveas (void)

Variables

hdldatabaserecord databasedata
boolean fldatabasesaveas = false
static hdldatabaserecord databasedestination
short topdatabasestack = 0
hdldatabaserecord databasestack [ctdatabasestack]


Define Documentation

#define cleardirty hdb   )     ((**hdb).flags &= ~dbdirtymask)
 

Definition at line 49 of file db.c.

Referenced by dbflushheader().

#define ctdatabasestack   10
 

Definition at line 215 of file db.c.

Referenced by dbpushdatabase().

#define dberrorlist   256
 

Definition at line 46 of file db.c.

Referenced by dberror().

#define dblogerror errnum   ) 
 

Definition at line 189 of file db.c.

Referenced by dbmergeleft(), dbmergeright(), and dbrelease().

#define isdirty hdb   )     ((**hdb).flags & dbdirtymask)
 

Definition at line 50 of file db.c.

Referenced by dbflushheader().

#define majorversion v   )     (v & 0x00f0)
 

Definition at line 52 of file db.c.

#define minorversion v   )     (v & 0x000f)
 

Definition at line 53 of file db.c.

#define setdirty hdb   )     ((**hdb).flags |= dbdirtymask)
 

Definition at line 48 of file db.c.

Referenced by dbclose(), dbfnumchanged(), dbnew(), and dbsetview().


Enumeration Type Documentation

enum tydberror
 

Enumerator:
dbnoerror 
dbwrongversionerror 
dbfreeblockerror 
dbfreelisterror 
dbinconsistentavaillisterror 
dbassignfreeblockerror 
dbfilesizeerror 
dbreleasefreeblockerror 
dbreleaseinvalidblockerror 
dbmergeinvalidblockerror 

Definition at line 55 of file db.c.


Function Documentation

static boolean dballocate long  databytes,
ptrvoid  pdata,
dbaddress paddress
[static]
 

Definition at line 1292 of file db.c.

References databasedata, dbdeleteavailshadow(), dbsetavaillink(), dbsetavailshadow(), dbswapglobals(), dbwritedatablock(), dbwriteheaderandtrailer(), tydatabaserecord::extensions, fldebug, i, max, minblocksize, nildbaddress, sizeheader, sizeof(), sizetrailer, and tydatabaserecord::u.

Referenced by dballochandle(), dballocstring(), dbassign(), dbcopy(), dbsavehandle(), and dbwriteshadowavaillist().

Here is the call graph for this function:

boolean dballochandle Handle  halloc,
dbaddress adr
 

Definition at line 2111 of file db.c.

References dballocate(), fl, gethandlesize(), h, lockhandle(), nil, nildbaddress, and unlockhandle().

Referenced by dbassignhandle().

Here is the call graph for this function:

static boolean dballocstring dbaddress adr,
bigstring  bs
[static]
 

Definition at line 2036 of file db.c.

References dballocate(), and stringlength.

Referenced by dbassignstring().

Here is the call graph for this function:

boolean dbassign dbaddress padr,
long  newsize,
ptrvoid  pdata
 

Definition at line 1905 of file db.c.

References DB_MSG_2, dballocate(), dbassignfreeblockerror, dberror(), dbmove(), dbreadheader(), dbrelease(), dbsetsize(), fldatabasesaveas, and nildbaddress.

Referenced by ccsavefile(), dbassignhandle(), dbassignstring(), dbsavehandle(), mesavemenustructure(), odbNewFile(), and odbSaveFile().

Here is the call graph for this function:

boolean dbassignhandle Handle  h,
dbaddress adr
 

Definition at line 2133 of file db.c.

References dballochandle(), dbassign(), fl, gethandlesize(), lockhandle(), nil, nildbaddress, and unlockhandle().

Referenced by ccsavefile(), hashpackscalar(), opverbpack(), pictverbpack(), and wpverbpack().

Here is the call graph for this function:

boolean dbassignheapstring dbaddress adr,
hdlstring  hstring
 

Definition at line 2091 of file db.c.

References bigstring, copyheapstring(), dbassignstring(), dbreleasestring(), fldatabasesaveas, isemptystring, and nildbaddress.

Referenced by ccsavefile().

Here is the call graph for this function:

static boolean dbassignstring dbaddress adr,
bigstring  bs
[static]
 

Definition at line 2053 of file db.c.

References dballocstring(), dbassign(), nildbaddress, and stringlength.

Referenced by dbassignheapstring().

Here is the call graph for this function:

boolean dbclose void   ) 
 

Definition at line 2574 of file db.c.

References databasedata, dbflushheader(), dbzeroreleasestack(), and setdirty.

Referenced by dbendsaveas(), and odbNewFile().

Here is the call graph for this function:

boolean dbcopy dbaddress  adrorig,
dbaddress adrcopy
 

Definition at line 1992 of file db.c.

References dballocate(), dbgetsize(), dbreference(), disposehandle(), h, lockhandle(), newhandle(), nildbaddress, and unlockhandle().

Referenced by hashpackscalar(), mesaveasscriptvisit(), opverbpack(), pictverbpack(), and wpverbpack().

Here is the call graph for this function:

void dbcurrentdatabase hdldatabaserecord  hdb  ) 
 

Definition at line 2223 of file db.c.

References databasedata, and nil.

static boolean dbdeleteavailshadow long  ixshadow  )  [static]
 

Definition at line 1114 of file db.c.

References assert, handlestream::eof, nil, handlestream::pos, pullfromhandlestream(), and sizeof().

Referenced by dballocate(), and dbmergeleft().

Here is the call graph for this function:

boolean dbdispose void   ) 
 

Definition at line 2420 of file db.c.

References databasedata, dbzeroreleasestack(), disposehandle(), and nil.

Referenced by ccdisposerecord(), ccloadfile(), ccnewrecord(), dbendsaveas(), dbnew(), odbCloseFile(), odbNewFile(), and odbOpenFile().

Here is the call graph for this function:

boolean dbendsaveas void   ) 
 

Definition at line 2602 of file db.c.

References dbclose(), dbdispose(), dbswapglobals(), fl, and fldatabasesaveas.

Referenced by ccsavefile().

Here is the call graph for this function:

static void dberror short  errnum  )  [static]
 

Definition at line 191 of file db.c.

References bigstring, dberrorlist, getstringlist(), and shellerrormessage().

Referenced by dbassign(), dbreference(), dbrefhandle(), dbrelease(), dbseteof(), and dbshadowavaillist().

Here is the call graph for this function:

static boolean dbfindpreviousavail dbaddress  adr,
dbaddress prev,
long ixshadow
[static]
 

Definition at line 602 of file db.c.

References databasedata, tydatabaserecord::extensions, i, nildbaddress, sizeof(), and tydatabaserecord::u.

Referenced by dbmergeleft(), and dbmergeright().

Here is the call graph for this function:

static boolean dbflushheader void   )  [static]
 

Definition at line 378 of file db.c.

References assert, tydatabaserecord::availlist, clearbytes(), cleardirty, ctviews, databasedata, dbwrite(), tydatabaserecord::extensions, fl, tydatabaserecord::flags, flushvolumechanges(), tydatabaserecord::growthspace, tydatabaserecord::headerLength, i, isdirty, tydatabaserecord::longversionMajor, tydatabaserecord::longversionMinor, nil, sizeof(), tydatabaserecord::u, and tydatabaserecord::views.

Referenced by dbclose(), dbfnumchanged(), dbnew(), and dbsetview().

Here is the call graph for this function:

boolean dbflushreleasestack void   ) 
 

Definition at line 2372 of file db.c.

References dbrelease(), disposehandle(), gethandlesize(), nil, and rollbeachball().

Referenced by ccsavefile(), and odbSaveFile().

Here is the call graph for this function:

boolean dbfnumchanged hdlfilenum  newfnum  ) 
 

Definition at line 2236 of file db.c.

References databasedata, dbflushheader(), tydatabaserecord::fnumdatabase, long, and setdirty.

Referenced by ccfnumchanged().

Here is the call graph for this function:

void dbgetcurrentdatabase hdldatabaserecord hdb  ) 
 

Definition at line 2230 of file db.c.

References databasedata.

boolean dbgeteof long eof  ) 
 

Definition at line 362 of file db.c.

References filegeteof().

Referenced by dbmergeleft(), dbmergeright(), dbreadshadowavaillist(), dbrelease(), dbshadowavaillist(), dbwriteshadowavaillist(), and statscompute().

Here is the call graph for this function:

static boolean dbgetsize dbaddress  adr,
long logicalsize
[static]
 

Definition at line 1969 of file db.c.

References dbgetsizeandvariance(), and nildbaddress.

Referenced by dbcopy().

Here is the call graph for this function:

static boolean dbgetsizeandvariance dbaddress  adr,
long size,
tyvariance variance
[static]
 

Definition at line 1153 of file db.c.

References dbreadheader().

Referenced by dbgetsize().

Here is the call graph for this function:

void dbgetview short  viewnumber,
dbaddress adrtext
 

Definition at line 2217 of file db.c.

Referenced by ccfindusedblocks(), ccloadfile(), ccsavefile(), odbOpenFile(), and odbSaveFile().

static void dbheaderdirty void   )  [static]
 

Definition at line 368 of file db.c.

References dbdirtymask.

Referenced by dbrelease(), and dbsetavaillink().

static boolean dbinsertavailshadow long  ixshadow,
dbaddress  adr,
long  ctbytes
[static]
 

Definition at line 1092 of file db.c.

References availnodeshadow::adr, assert, handlestream::eof, mergehandlestreamdata(), handlestream::pos, availnodeshadow::size, and sizeof().

Referenced by dbrelease().

Here is the call graph for this function:

static boolean dbmergeleft boolean  flmerged,
dbaddress  adr,
boolean ptrflmergedleft
[static]
 

Definition at line 1507 of file db.c.

References assert, dbdeleteavailshadow(), dbfindpreviousavail(), dbgeteof(), dblogerror, dbmergeinvalidblockerror, dbreadavailnode(), dbreadheader(), dbreadtrailer(), dbsetavaillink(), dbsetavailshadow(), dbwriteheaderandtrailer(), firstphysicaladdress, minblocksize, and sizeheader.

Referenced by dbrelease().

Here is the call graph for this function:

static boolean dbmergeright dbaddress  adr,
long  ctbytes,
boolean ptrflmergedright
[static]
 

Definition at line 1640 of file db.c.

References assert, dbfindpreviousavail(), dbgeteof(), dblogerror, dbmergeinvalidblockerror, dbreadavailnode(), dbreadtrailer(), dbsetavaillink(), dbsetavailshadow(), dbwriteavailnode(), firstphysicaladdress, minblocksize, and sizeheader.

Referenced by dbrelease().

Here is the call graph for this function:

static boolean dbmove ptrvoid  pdata,
long  ctbytes,
dbaddress  adr
[static]
 

Definition at line 1892 of file db.c.

References dbwrite(), and sizeheader.

Referenced by dbassign().

Here is the call graph for this function:

boolean dbnew hdlfilenum  fnum  ) 
 

Definition at line 2438 of file db.c.

References assert, databasedata, dbdispose(), dbflushheader(), dbshadowavaillist(), dbsystemidMac, dbsystemidWin32, dbversionnumber, dbversionnumberminor, firstphysicaladdress, tydatabaserecord::fnumdatabase, long, newclearhandle(), and setdirty.

Referenced by ccnewrecord(), dbstartsaveas(), and odbNewFile().

Here is the call graph for this function:

boolean dbopenfile hdlfilenum  fnum,
boolean  flreadonly
 

Definition at line 2484 of file db.c.

References assert, tydatabaserecord::availlist, ctviews, databasedata, dbread(), error, tydatabaserecord::extensions, tydatabaserecord::flags, tydatabaserecord::fnumdatabase, tydatabaserecord::headerLength, long, longsizeof, tydatabaserecord::longversionMajor, tydatabaserecord::longversionMinor, newclearhandle(), tydatabaserecord::u, and tydatabaserecord::views.

Referenced by ccloadfile(), and odbOpenFile().

Here is the call graph for this function:

boolean dbpopdatabase void   ) 
 

Definition at line 248 of file db.c.

References databasedata, and databasestack.

Referenced by additemtopagetable(), dbstatsmessage(), decompilespecialtable(), disposehashnode(), hashassign(), hashpackscalar(), hashresolvevalue(), langexternalrefdata(), medisposemenurecord(), meloadscriptoutline(), menuverbinmemory(), mereleaserefconroutine(), mesavemenurecord(), opverbcopyvalue(), opverbinmemory(), pictverbinmemory(), and tableverbinmemory().

boolean dbpushdatabase hdldatabaserecord  hdatabase  ) 
 

Definition at line 225 of file db.c.

References ctdatabasestack, databasedata, databasestack, DebugStr(), nil, and STR_database_stack_overflow.

Referenced by additemtopagetable(), dbstatsmessage(), decompilespecialtable(), disposehashnode(), hashassign(), hashpackscalar(), hashresolvevalue(), langexternalrefdata(), medisposemenurecord(), meloadscriptoutline(), menuverbinmemory(), mereleaserefconroutine(), mesavemenurecord(), opverbcopyvalue(), opverbinmemory(), pictverbinmemory(), and tableverbinmemory().

Here is the call graph for this function:

boolean dbpushreleasestack dbaddress  adr,
long  valtype
 

Definition at line 2341 of file db.c.

References enlargehandle(), newclearhandle(), nil, and nildbaddress.

Referenced by disposevaluerecord(), hashresolvevalue(), hashunpacktable(), langexternaldisposevariable(), medisposemenurecord(), and mereleaserefconroutine().

Here is the call graph for this function:

static boolean dbread dbaddress  adr,
long  ctbytes,
ptrvoid  pdata
[static]
 

Definition at line 291 of file db.c.

References dbseek(), and fileread().

Referenced by dbopenfile(), dbreadheader(), dbreadtrailer(), dbreference(), and dbrefhandle().

Here is the call graph for this function:

boolean dbreadavailnode dbaddress  adr,
boolean flfree,
long ctbytes,
dbaddress link
 

Definition at line 524 of file db.c.

References dbreadheader(), dbreadswap(), and sizeheader.

Referenced by dbmergeleft(), dbmergeright(), dbshadowavaillist(), dbwriteshadowavaillist(), and statscompute().

Here is the call graph for this function:

boolean dbreadheader dbaddress  adr,
boolean flfree,
long ctbytes,
tyvariance variance
 

Definition at line 445 of file db.c.

References dbread(), tysizefreeword::size, tyheader::sizefreeword, sizeheader, and tyheader::variance.

Referenced by dbassign(), dbgetsizeandvariance(), dbmergeleft(), dbreadavailnode(), dbreference(), dbrefhandle(), dbrelease(), dbwriteshadowavaillist(), statsblockinuse(), statscompute(), and statscountreleasestack().

Here is the call graph for this function:

static boolean dbreadshadowavaillist void   )  [static]
 

Definition at line 892 of file db.c.

References assert, ct, databasedata, dbgeteof(), dbrefhandle(), gethandlesize(), h, nil, and nildbaddress.

Referenced by dbshadowavaillist().

Here is the call graph for this function:

static boolean dbreadswap dbaddress  adr,
long  ctbytes,
ptrvoid  pdata
[static]
 

Definition at line 336 of file db.c.

References dbseek(), and fileread().

Referenced by dbreadavailnode().

Here is the call graph for this function:

boolean dbreadtrailer dbaddress  adr,
boolean flfree,
long ctbytes
 

Definition at line 465 of file db.c.

References dbread(), tysizefreeword::size, tytrailer::sizefreeword, and sizetrailer.

Referenced by dbmergeleft(), dbmergeright(), dbrelease(), and statscompute().

Here is the call graph for this function:

boolean dbreference dbaddress  adr,
long  maxbytes,
ptrvoid  pdata
 

Definition at line 1173 of file db.c.

References dberror(), dbfreeblockerror, dbread(), dbreadheader(), min, and sizeheader.

Referenced by ccfindusedblocks(), ccloadfile(), ccsavefile(), dbcopy(), dbrefstring(), loadversion2cancoonfile(), meloadmenurecord(), odbOpenFile(), and odbSaveFile().

Here is the call graph for this function:

boolean dbrefhandle dbaddress  adr,
Handle h
 

Definition at line 1208 of file db.c.

References ct, dberror(), dbfreeblockerror, dbread(), dbreadheader(), fl, lockhandle(), long, newclearhandle(), nil, nildbaddress, sizeheader, and unlockhandle().

Referenced by copyvaluerecord(), dbreadshadowavaillist(), hashpackscalar(), hashresolvevalue(), hashunpacktable(), langexternalrefdata(), meloadoutline(), meloadscriptoutline(), mepackscriptvisit(), opverbcopyvalue(), opverbinmemory(), pictverbinmemory(), tableverbinmemory(), and tableverbpack().

Here is the call graph for this function:

boolean dbrefheapstring dbaddress  adr,
hdlstring hstring
 

Definition at line 2080 of file db.c.

References bigstring, dbrefstring(), and newheapstring().

Here is the call graph for this function:

static boolean dbrefstring dbaddress  adr,
bigstring  bs
[static]
 

Definition at line 2042 of file db.c.

References bigstring, dbreference(), nildbaddress, and setstringlength.

Referenced by dbrefheapstring().

Here is the call graph for this function:

static boolean dbrelease dbaddress   )  [static]
 

Definition at line 1762 of file db.c.

References dberror(), dbgeteof(), dbheaderdirty(), dbinsertavailshadow(), dblogerror, dbmergeleft(), dbmergeright(), dbreadheader(), dbreadtrailer(), dbreleasefreeblockerror, dbreleaseinvalidblockerror, dbwriteavailnode(), nildbaddress, and sizeheader.

Referenced by dbassign(), dbflushreleasestack(), and dbreleasestring().

Here is the call graph for this function:

static boolean dbreleasestring dbaddress  adr  )  [static]
 

Definition at line 2062 of file db.c.

References DB_MSG_2, and dbrelease().

Referenced by dbassignheapstring().

Here is the call graph for this function:

boolean dbsavehandle Handle  hsave,
dbaddress adr
 

Definition at line 2158 of file db.c.

References dballocate(), dbassign(), fl, gethandlesize(), h, lockhandle(), nildbaddress, and unlockhandle().

Referenced by mesaveoutline(), and tableverbpack().

Here is the call graph for this function:

static boolean dbseek dbaddress  adr  )  [static]
 

Definition at line 276 of file db.c.

References filesetposition().

Referenced by dbread(), dbreadswap(), dbwrite(), and dbwriteswap().

Here is the call graph for this function:

static boolean dbsetavaillink dbaddress  adr,
dbaddress  link
[static]
 

Definition at line 560 of file db.c.

References assert, dbheaderdirty(), dbwriteswap(), nildbaddress, and sizeheader.

Referenced by dballocate(), dbmergeleft(), and dbmergeright().

Here is the call graph for this function:

static boolean dbsetavailshadow long  ixshadow,
dbaddress  adr,
long  ctbytes
[static]
 

Definition at line 1131 of file db.c.

References availnodeshadow::adr, assert, handlestream::eof, mergehandlestreamdata(), handlestream::pos, availnodeshadow::size, and sizeof().

Referenced by dballocate(), dbmergeleft(), and dbmergeright().

Here is the call graph for this function:

static boolean dbseteof long  eof  )  [static]
 

Definition at line 200 of file db.c.

References dberror(), dbfilesizeerror, and fileseteof().

Here is the call graph for this function:

static boolean dbsetsize dbaddress  adr,
long  size,
tyvariance  variance
[static]
 

Definition at line 1167 of file db.c.

References dbwriteheader().

Referenced by dbassign().

Here is the call graph for this function:

void dbsetview short  viewnumber,
dbaddress  adrtext
 

Definition at line 2199 of file db.c.

References databasedata, dbflushheader(), dbswapglobals(), setdirty, and tydatabaserecord::views.

Referenced by ccnewrecord(), ccsavefile(), odbNewFile(), and odbSaveFile().

Here is the call graph for this function:

static boolean dbshadowavaillist void   )  [static]
 

Definition at line 1023 of file db.c.

References availnodeshadow::adr, dberror(), dbfreelisterror, dbgeteof(), dbreadavailnode(), dbreadshadowavaillist(), disposehandlestream(), error, nil, nildbaddress, openhandlestream(), rollbeachball(), availnodeshadow::size, and writehandlestream().

Referenced by dbnew().

Here is the call graph for this function:

boolean dbstartsaveas hdlfilenum  fnum  ) 
 

Definition at line 2584 of file db.c.

References dbnew(), dbswapglobals(), fl, and fldatabasesaveas.

Referenced by ccsavefile().

Here is the call graph for this function:

static void dbswapglobals void   )  [static]
 

Definition at line 259 of file db.c.

References databasedata, databasedestination, and fldatabasesaveas.

Referenced by dballocate(), dbendsaveas(), dbsetview(), and dbstartsaveas().

static boolean dbwrite dbaddress  adr,
long  ctbytes,
ptrvoid  pdata
[static]
 

Definition at line 282 of file db.c.

References dbseek(), and filewrite().

Referenced by dbflushheader(), dbmove(), dbwritedatablock(), dbwriteheader(), and dbwritetrailer().

Here is the call graph for this function:

static boolean dbwriteavailnode dbaddress  adr,
long  ctbytes,
dbaddress  nextlink
[static]
 

Definition at line 541 of file db.c.

References assert, dbwriteheader(), dbwriteswap(), dbwritetrailer(), nil, nildbaddress, and sizeheader.

Referenced by dbmergeright(), and dbrelease().

Here is the call graph for this function:

static boolean dbwritedatablock dbaddress  adr,
long  databytes,
long  nodebytes,
ptrvoid  pdata
[static]
 

Definition at line 582 of file db.c.

References dbwrite(), dbwriteheader(), dbwritetrailer(), nil, and sizeheader.

Referenced by dballocate(), and dbwriteshadowavaillist().

Here is the call graph for this function:

static boolean dbwriteheader dbaddress  adr,
boolean  flfree,
long  ctbytes,
tyvariance  variance
[static]
 

Definition at line 482 of file db.c.

References dbwrite(), tysizefreeword::size, tyheader::sizefreeword, sizeheader, and tyheader::variance.

Referenced by dbsetsize(), dbwriteavailnode(), dbwritedatablock(), and dbwriteheaderandtrailer().

Here is the call graph for this function:

static boolean dbwriteheaderandtrailer dbaddress  adr,
boolean  flfree,
long  ctbytes,
tyvariance  variance
[static]
 

Definition at line 515 of file db.c.

References dbwriteheader(), dbwritetrailer(), and sizeheader.

Referenced by dballocate(), and dbmergeleft().

Here is the call graph for this function:

static boolean dbwriteshadowavaillist void   )  [static]
 

Definition at line 739 of file db.c.

References availnodeshadow::adr, assert, closehandlestream(), copyhandle(), ct, databasedata, dballocate(), dbgeteof(), dbreadavailnode(), dbreadheader(), dbwritedatablock(), disposehandle(), error, fl, fldatabasesaveas, gethandlesize(), h, lockhandle(), nil, nildbaddress, rollbeachball(), availnodeshadow::size, and unlockhandle().

Here is the call graph for this function:

static boolean dbwriteswap dbaddress  adr,
long  ctbytes,
ptrvoid  pdata
[static]
 

Definition at line 300 of file db.c.

References dbseek(), and filewrite().

Referenced by dbsetavaillink(), and dbwriteavailnode().

Here is the call graph for this function:

static boolean dbwritetrailer dbaddress  adr,
boolean  flfree,
long  ctbytes
[static]
 

Definition at line 500 of file db.c.

References dbwrite(), tysizefreeword::size, tytrailer::sizefreeword, and sizetrailer.

Referenced by dbwriteavailnode(), dbwritedatablock(), and dbwriteheaderandtrailer().

Here is the call graph for this function:

static void dbzeroreleasestack void   )  [static]
 

Definition at line 2412 of file db.c.

References disposehandle(), and nil.

Referenced by dbclose(), and dbdispose().

Here is the call graph for this function:


Variable Documentation

hdldatabaserecord databasedata
 

Definition at line 79 of file db.c.

Referenced by ccloadfile(), ccnewrecord(), ccsavefile(), ccsetdatabase(), clearcancoonglobals(), dballocate(), dbclose(), dbcurrentdatabase(), dbdispose(), dbfindpreviousavail(), dbflushheader(), dbfnumchanged(), dbgetcurrentdatabase(), dbnew(), dbopenfile(), dbpopdatabase(), dbpushdatabase(), dbreadshadowavaillist(), dbsetview(), dbswapglobals(), dbwriteshadowavaillist(), initializetableoutline(), langexternaldisposevariable(), langnewexternalvariable(), newoutlinevariable(), odbOpenFile(), and setcancoonglobals().

hdldatabaserecord databasedestination [static]
 

Definition at line 92 of file db.c.

Referenced by dbswapglobals().

hdldatabaserecord databasestack[ctdatabasestack]
 

Definition at line 219 of file db.c.

Referenced by dbpopdatabase(), and dbpushdatabase().

boolean fldatabasesaveas = false
 

Definition at line 87 of file db.c.

short topdatabasestack = 0
 

Definition at line 217 of file db.c.


Generated on Thu Jun 1 05:05:45 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6