libsrc/test.cxx File Reference

functions to test 2d, Span and Gran enfilades More...

#include <unistd.h>
#include <memory.h>
#include <stdlib.h>
#include <fcntl.h>
#include <ctype.h>
#include "udanax.h"

Include dependency graph for test.cxx:

Include dependency graph

Go to the source code of this file.

Defines

#define TABSTOP   20

Functions

void graphpoom (FILE *fd, typecorecrum *ptr)
 ???

void graphcrum (FILE *fd, typecorecrum *ptr, typedsp *offsetptr, char *indent)
 ???

void graphwid (FILE *fd, typewid *widptr, int enftype)
 ???

void graphdsp (FILE *fd, typewid *dspptr, int enftype)
 ???

void graphoffset (FILE *fd, typedsp *dspptr, int enftype)
 ???

char * nodeid (typecorecrum *ptr, char *s)
 ???

void foo (char *msg)
 ???

void foospan (char *msg, typespan *span)
 ???

void foospanset (char *msg, typespan *spanset)
 ???

void dumpspanset (typespan *spanset)
 ???

void foocrum (char *msg, typecorecrum *crumptr)
 ???

void foohex (char *msg, int num)
 ???

void foodec (char *msg, int num)
 ???

void foocontext (char *msg, Context *context)
 ???

void foocontextlist (char *msg, Context *context)
 ???

void fooitemset (char *msg, typeitemset iptr)
 ???

void fooitem (char *msg, typeitem *iptr)
 ???

void footumbler (char *msg, Tumbler *tptr)
 ???

void foodsp (char *msg, typedsp *dptr, int enftype)
 ???

void foowid (char *msg, typewid *wptr, int enftype)
 ???

void dumpsubtree (typecuc *father)
 ???

void dumpwholesubtree (typecuc *father)
 ???

void graphwholesubtree (FILE *fd, typecuc *father, typedsp *offsetptr, char *indent)
 ???

void assertspecisstring (typespecset specptr, char *string)
 ???

bool asserttreeisok (typecorecrum *ptr)
 ???

void assertsubtreeisok (typecorecrum *ptr)
 ???

void assertsonswispmatchesfather (typecuc *father)
 ???

void assertwidsarepositive (typecorecrum *ptr)
 ???

void dumpwholetree (typecorecrum *ptr)
 ???

void graphwholetree (char *filename, typecorecrum *ptr, char *graphlabel)
 ???

int checkwholesubtree (typecuc *father)
 ???

int check (typecuc *ptr)
 ???

void dump (typecorecrum *ptr)
 ???

char * safetext (char *s)
 ???

char * nodecolor (typecorecrum *ptr)
 ???

char * nodefillcolor (typecorecrum *ptr)
 ???

void yesdump (typecorecrum *ptr)
 ???

void dumphedr (typecorecrumhedr *ptr)
 ???

void dumpwid (typewid *widptr, int enftype)
 ???

void dumpdsp (typewid *dspptr, int enftype)
 ???

void dumpinfo (typegranbottomcruminfo *infoptr, int enftype)
 ???

void dumptumbler (Tumbler *tumblerptr)
 ???

void displaycutspm (typeknives *knivesptr)
 ???

void dumphint (typehint *hintptr)
 ???

void showsubtree (typecorecrum *father)
 ???

void showistream (typecuc *granfptr)
 ???

void showspanf (typecuc *spanfptr)
 ???

void doshowspanf (typecorecrum *crumptr, typedsp *offsetptr, int enfheight)
 ???

void showspanfcrum (typecorecrum *crumptr, typedsp *offsetptr, int enfheight)
 ???

void dumpmem (char *loc, unsigned count)
 ???

bool dumpgranfwids (Session *sess)
 ???

void showgranwids (typecorecrum *crum, int down, Tumbler *retptr)
 ???

void dumppoomwisps (typecorecrum *orgl)
 ???

void showpoomwisps (typecuc *crum, int down)
 ???

void dumpistreamgr (typecuc *crumptr)
 ???

void dodumpistreamgr (typecuc *crumptr, Tumbler *offsetptr)
 ???

void dumpmoleculegr (Tumbler *offsetptr, typecbc *cbcptr)
 ???

void dumpisagr (Tumbler *offsetptr)
 ???

typecorecrumcheckenftypes (typecuc *father, char *message)
 ???

typecorecrumcheckthebleedingcrum (typecorecrum *crumptr)
 ???

void teststack ()
 ???

char * enftypestring (int type)
 ???

typecorecrumsonoriginok (typecorecrum *father)
 ???

void dumpcontextlist (Context *context)
 ???

void dumpcontext (Context *context)
 ???

void dumpitemset (typeitemset itemset)
 ???

void dumpitem (typeitem *itemptr)
 ???

void dumpspan (typespan *spanptr)
 ???

void dumptext (typetext *textptr)
 ???

bool ioinfo (Session *sess)
 ???

char * itemidstring (typeitem *item)
 ???

void checkitem (char *msg, typeitem *ptr)
 ???

void checkpointer (char *msg, char *ptr)
 ???

void dumpspanpairset (typespanpairset spanpairset)
 ???

void dumpspanpair (typespanpair *spanpair)
 ???

void dumphexstuff (char *ptr)
 ???

void checknumofsons (typecuc *ptr)
 ???

void nchecknumofsons (typecuc *ptr)
 ???


Variables

typecorecrumgrimreaper
int reservnumber
int numfoo = NUMDISKBLOCKSINLOAF
int debug
long nolread
long nowread


Detailed Description

functions to test 2d, Span and Gran enfilades

(to be defined)

Definition in file test.cxx.


Define Documentation

#define TABSTOP   20
 

Definition at line 1729 of file test.cxx.

Referenced by dumpisagr().


Function Documentation

void assertsonswispmatchesfather typecuc father  ) 
 

???

(to be defined)

Definition at line 626 of file test.cxx.

References assert, typediskloafptr::diskblocknumber, DISKPTRNULL, dump(), dumpwholetree(), L, typecuc::numberofsons, setwisp(), typecuc::sonorigin, and typecorecrum.

Referenced by assertsubtreeisok().

00628 {
00629 #ifndef DISTRIBUTION
00630     //UNUSED typecorecrum *son;
00631 
00632     if (father->numberofsons == 0) {
00633         if (father->sonorigin.diskblocknumber != DISKPTRNULL)
00634             return;
00635 
00636         L("zerosons in assert\n");
00637         return;
00638     }
00639 
00640     if (setwisp((typecorecrum *) father)) {
00641         L("assert wisp matched father failed \n");
00642         dump((typecorecrum *) father);
00643         dumpwholetree((typecorecrum *) father);
00644 
00645         assert(0); // father didn't match sons wid and disp
00646     }
00647 #endif
00648 }

void assertspecisstring typespecset  specptr,
char *  string
 

???

(to be defined)

<Input: User's session context

Definition at line 527 of file test.cxx.

References debug, doretrievev(), Session::free(), L, typetext::length, typetext::string, typespecset, typevstuffset, and typevstuff::xxxtext.

00530 {
00531 #ifndef DISTRIBUTION
00532     Session sessfoo;          
00533     typevstuffset vstuffset;
00534     //UNUSED int i;
00535     int savedebug;
00536 
00537     L("assertspecisstring entering \n");
00538     savedebug = debug;
00539 
00540 /* debug = false; */
00541 
00542     //Now done via a ctor:: inittask(&sessfoo);
00543 
00544     doretrievev(&sessfoo, specptr, &vstuffset);
00545 
00546 // for(i=0;(i<vstuffset->length)&&(string[i] == vstuffset->string[i]);i++) ; if(i != vstuffset->length){
00547 // L("in assertspecisstring failedstring1 =%s string2 =%s
00548 // %d\n",string,vstuffset->string,vstuffset->length); debug = true; fooitem("spec is ",specptr); fooitem("\nvstuff is
00549 // ",vstuffset); // crash bang boom // assert(0); /* assertspecisstring asserton failed \n */; } L("in
00550 // assertspecisstring succeded %s \n",string);
00551 
00552     L("in assertspecisstring string2 =%s %d\n", vstuffset->xxxtext.string, vstuffset->xxxtext.length);
00553     sessfoo.free();
00554     debug = savedebug;
00555     L("assertspecisstring leaving \n");
00556 #endif
00557 }

void assertsubtreeisok typecorecrum ptr  ) 
 

???

(to be defined)

Definition at line 588 of file test.cxx.

References typecorecrumhedr::age, assert, assertsonswispmatchesfather(), assertwidsarepositive(), dump(), typecorecrumhedr::height, RESERVED, reservnumber, typecorecrumhedr::rightbro, and typecorecrum.

Referenced by asserttreeisok().

00590 {
00591 #ifndef DISTRIBUTION
00592     typecorecrum *son;
00593 
00594     if (!ptr)
00595         assert(0); // assertsubtreeok failed null ptr
00596 
00597     assertwidsarepositive(ptr);
00598     if (!reservnumber) {
00599         if (ptr->age == RESERVED) {
00600             dump(ptr);
00601             assert(0); // incorrect reserved in assertsubtreeisok
00602         }
00603     }
00604 
00605     if (ptr->height == 0)
00606         return;
00607 
00608 // if (toomanysons(ptr)) { // dump(ptr); L("fatherhas too many sons\n"); // //assert(0); "foo"// }
00609 
00610     assertsonswispmatchesfather((typecuc *) ptr);
00611     for (son = ((typecuc *) ptr)->leftson /* findleftson//getleftson//(ptr) */ ;
00612          son; son = son->rightbro) {
00613         assertsubtreeisok(son);
00614     }
00615 #endif
00616 }

bool asserttreeisok typecorecrum ptr  ) 
 

???

(to be defined)

Definition at line 567 of file test.cxx.

References assertsubtreeisok(), findfather(), isfullcrum(), L, and typecorecrum.

Referenced by docopy(), docopyinternal(), makecutsnd(), setwispupwards(), and splitcrumupwards().

00569 {
00570 //    L("--asserttreeisok is a NOP--\n");
00571 //    return (true);
00572 
00573     L("entering asserttreeisok\n");
00574     for (; !isfullcrum(ptr); ptr = (typecorecrum *) findfather(ptr)); assertsubtreeisok(ptr)
00575         ;
00576         
00577     return(true);
00578 }

void assertwidsarepositive typecorecrum ptr  ) 
 

???

(to be defined)

Definition at line 658 of file test.cxx.

References typecorecrumhedr::cdsp, typecorecrumhedr::cenftype, typecorecrumhedr::cwid, typewid::dsas, dspsize, GRAN, tumblercheckptr(), typecorecrum, and widsize.

Referenced by assertsubtreeisok().

00660 {
00661 #ifndef DISTRIBUTION
00662     int nstreams, i;
00663 
00664     int enftype = ptr->cenftype;
00665 
00666     if (enftype == GRAN)
00667         return;
00668 
00669     nstreams = widsize(enftype);
00670     for (i = 0; i < nstreams; ++i) {
00671         tumblercheckptr(&(ptr->cwid.dsas[i]), (int *) ptr);
00672     }
00673 
00674     nstreams = dspsize(enftype);
00675     for (i = 0; i < nstreams; ++i) {
00676         tumblercheckptr(&(ptr->cdsp.dsas[i]), (int *) ptr);
00677     }
00678 #endif
00679 }

int check typecuc ptr  ) 
 

???

(to be defined)

Definition at line 828 of file test.cxx.

References assert, dump(), typecuc::height, typecuc::leftson, and NULL.

Referenced by checkwholesubtree(), ishouldbother(), and makeithcutonson().

00830 {
00831     return 0;
00832 
00833 #ifdef UnDeeFiNeD
00834     if (ptr->height == 0) {
00835         return 0;
00836     }
00837 
00838     if (ptr->leftson == NULL           /* &&ptr->sonorigin.diskblocknumber==-1 */
00839         && ptr->modified) {
00840         dump(ptr);
00841         assert(0); // in check
00842     } else {
00843         return 0;
00844     }
00845 
00846     assert(0); // check: can't get there
00847     return 0;
00848 #endif
00849 }

typecorecrum* checkenftypes typecuc father,
char *  message
 

???

(to be defined)

Definition at line 1850 of file test.cxx.

References grimreaper, L, NULL, and typecorecrum.

01853 {
01854 #ifndef DISTRIBUTION
01855     //UNUSED typecorecrum *ptr;
01856 
01857     if (grimreaper == NULL)
01858         L("grimreaper tests null");
01859 
01860     return (typecorecrum *) father;
01861 
01862 //    if (!father) {
01863 //        fputs(stderr, message);
01864 //        assert(0); // ARGH!! null father ptr
01865 //    }
01866 //    
01867 //    if (!father->height)
01868 //        return father;
01869 //      
01870 //    if (father->cenftype == SPAN) {
01871 //        if (father->cwid.dsas[ORGLRANGE].exp == 0 && father->cwid.dsas[ORGLRANGE].mantissa[0] > 2) {
01872 //            dumpsubtree(father);
01873 //            fputs(stderr, message);
01874 //            assert(0); // I think the wid is too big
01875 //        }
01876 //    }
01877 //    
01878 //    for (ptr * = father->leftson; ptr; ptr = ptr->rightbro) {
01879 //        if (ptr->cenftype != GRAN && ptr->cenftype != POOM && ptr->cenftype != SPAN) {
01880 //            fputs(stderr, message);
01881 //            assert(0); // bad enftype
01882 //        }
01883 //      
01884 //        if (ptr->cenftype != father->cenftype) {
01885 //            fputs(stderr, message);
01886 //            assert(0); // enftype mismatch
01887 //        }
01888 //      
01889 //        checkenftypes(ptr, message);
01890 //    }
01891 //    return father;
01892 #endif
01893 }

void checkitem char *  msg,
typeitem ptr
 

???

(to be defined)

Definition at line 2249 of file test.cxx.

References assert, checkpointer(), debug, dumpitem(), L, puttumbler(), SPORGLID, TEXTID, typevspan, VSPANID, and VSPECID.

Referenced by Session::freeitemset(), and onitemlist().

02252 {
02253 #ifndef DISTRIBUTION
02254     //UNUSED char buf[100];
02255 
02256     checkpointer(msg, (char *) ptr);
02257     if (!ptr)
02258         return;
02259 
02260     if (debug) {
02261         L(msg);
02262         dumpitem(ptr);
02263     }
02264 
02265     if (((typeitemheader *) ptr)->itemid < TEXTID || ((typeitemheader *) ptr)->itemid > SPORGLID) {
02266         L(msg);
02267         assert(0); // Bad itemtype
02268     }
02269 
02270 /* checkpointer (sprintf (buf, "%s ptr->next: ", msg), ((typeitemheader *)ptr)->next); */
02271     if (((typeitemheader *) ptr)->itemid == VSPANID) {
02272         if (((typevspan *) ptr)->stream.mantissa[0] != 1 && ((typevspan *) ptr)->stream.mantissa[0] != 2) {
02273             L(msg);
02274             puttumbler(stderr, &((typevspan *) ptr)->stream);
02275             L("  ");
02276             assert(0); // Bad span stream address
02277         }
02278     }
02279     if (((typeitemheader *) ptr)->itemid == VSPECID) {
02280         checkitem(msg, (typeitem *) ((typevspec *) ptr)->vspanset);
02281         if (((typevspec *) ptr)->vspanset->itemid != VSPANID)
02282             assert(0); // vspanset doesn't have proper itemid
02283     }
02284 #endif
02285 }

void checknumofsons typecuc ptr  ) 
 

???

(to be defined)

Definition at line 2406 of file test.cxx.

References dumpsubtree(), typecuc::height, L, typecuc::leftson, typecuc::numberofsons, and typecuc::rightbro.

02408 {
02409 #ifndef DISTRIBUTION
02410     typecuc *np;
02411 
02412     int i = 0;
02413     if (!ptr || !ptr->height)
02414         return;
02415 
02416     for (np = (typecuc *) ptr->leftson; np; np = (typecuc *) np->rightbro, i++)
02417         ;
02418 
02419     if (i != ptr->numberofsons) {
02420         dumpsubtree(ptr);
02421         L("i = %d numberofsons = %d\n", i, ptr->numberofsons);
02422 
02423         for (np = (typecuc *) ptr->leftson; np; np = (typecuc *) np->rightbro, i++) {
02424 /* dump(np) */ ;
02425         }
02426         L("numberofson mismach in checknumofsons\n");
02427     }
02428 #endif
02429 }

void checkpointer char *  msg,
char *  ptr
 

???

(to be defined)

Definition at line 2295 of file test.cxx.

Referenced by checkitem(), Session::free(), and Session::freeexplicit().

02298 {
02299     return;
02300     
02301 //    if (!ptr) {
02302 //        if (debug) {
02303 //            L(msg);
02304 //            L("NULL pointer\n");
02305 //        }
02306 //        return;
02307 //    }
02308 //    
02309 //    if (((unsigned) ptr) & 1) {
02310 //        L(msg);
02311 //        assert(0); // Pointer non-aligned
02312 //    }
02313 //    
02314 //    if (ptr > (char *) 0x1bffff) {
02315 //        L(msg);
02316 //
02317 //        if (ptr < (char *) 0x1e0000)
02318 //            L("Pointer in framebuffer\n");
02319 //
02320 //        assert(0); // Pointer in high-mem
02321 //    }
02322 //      
02323 //    if (ptr < (char *) 0x40000) {
02324 //        L(msg);
02325 //        assert(0); // Pointer to hardware protected low memory
02326 //    }
02327 //      
02328 //    if (ptr < &end //etext//) {
02329 //        L(msg);
02330 //        assert(0); // Pointer below end
02331 //    }
02332 }

typecorecrum* checkthebleedingcrum typecorecrum crumptr  ) 
 

???

(to be defined)

Definition at line 1903 of file test.cxx.

References grimreaper, L, NULL, and typecorecrum.

01905 {
01906 #ifndef DISTRIBUTION
01907     if (grimreaper == NULL)
01908         L("grimreaper tests null");
01909 
01910     return crumptr;
01911 
01912 //    assert(crumptr != NULL); // checkbleeding NULL crum
01913 //    
01914 //    if (crumptr->cenftype != GRAN && crumptr->cenftype != SPAN && crumptr->cenftype != POOM) {
01915 //        L("Bad enftype in check the bleeding crum\n\n\n");
01916 //        dump(crumptr);
01917 //        assert(0); // Bad enftype
01918 //    }
01919 //    
01920 //    if (!crumptr->isapex&&crumptr->leftbroorfather..disowned.. && crumptr->cenftype != crumptr->leftbroorfather->cenftype) {
01921 //        dump(crumptr);
01922 //        L("\n\n\n and here comes the spanf \n");
01923 //        dumpsubtree(spanf);
01924 //        dump(crumptr);
01925 //        assert(0); // Enftype mismatch
01926 //    }
01927 //    
01928 //    if (crumptr->cenftype !=GRAN) {
01929 //        if (!tumblercheck(&crumptr->cdsp.dsas[V]))
01930 //            assert(0); // cleckbleeding disp V
01931 //
01932 //        if (!tumblercheck(&crumptr->cdsp.dsas[I]))
01933 //            assert(0); // cleckbleeding disp I
01934 //    }
01935 //    return crumptr;
01936 #endif
01937 }

int checkwholesubtree typecuc father  ) 
 

???

(to be defined)

Definition at line 788 of file test.cxx.

References check(), dumpsubtree(), typecuc::height, L, typecuc::leftson, and typecorecrumhedr::rightbro.

Referenced by makegappm().

00790 {
00791 #ifndef DISTRIBUTION
00792     //UNUSED typecorecrum *ptr;
00793 
00794     return 0;
00795 
00796 #ifdef UndEfIneD
00797     if (!father)
00798         return 0;
00799 
00800     if (check(father)) {
00801         L("found something bad in checkwholesubtree\n");
00802         dumpsubtree(father);
00803 
00804         // assert(0); // in checkwholesubtree
00805         return 1;
00806     }
00807 
00808     if (father->height <= 0)
00809         return 0;
00810 
00811     for (ptr = father->leftson; ptr; ptr = ptr->rightbro)
00812         if (checkwholesubtree(ptr))
00813             return 1;
00814 
00815     return 0;
00816 #endif
00817 #endif
00818 }

void displaycutspm typeknives knivesptr  ) 
 

???

(to be defined)

Definition at line 1365 of file test.cxx.

References typeknives::blades, L, typeknives::nblades, and puttumbler().

Referenced by makeithcutonson().

01367 {
01368 #ifndef DISTRIBUTION
01369     int i;
01370 
01371     L("%x cuts:", knivesptr->nblades);
01372     for (i = 0; i < knivesptr->nblades; ++i) {
01373         L("\n       ");
01374         puttumbler(stderr, &knivesptr->blades[i]);
01375     }
01376     L("\n");
01377 #endif
01378 }

void dodumpistreamgr typecuc crumptr,
Tumbler offsetptr
 

???

(to be defined)

Definition at line 1761 of file test.cxx.

References typecuc::cwid, typewid::dsas, dumpmoleculegr(), findleftson(), typecuc::height, typecorecrumhedr::rightbro, tumbleradd, typecorecrum, and WIDTH.

Referenced by dumpistreamgr().

01764 {
01765 #ifndef DISTRIBUTION
01766     typecorecrum *ptr;
01767 
01768     if (crumptr->height == 0) {
01769         dumpmoleculegr(offsetptr, (typecbc *) crumptr);
01770         tumbleradd(offsetptr, &crumptr->cwid.dsas[WIDTH], offsetptr);
01771         return;
01772     }
01773 
01774     for (ptr = findleftson(crumptr); ptr; ptr = ptr->rightbro)
01775         dodumpistreamgr((typecuc *) ptr, offsetptr);
01776 #endif
01777 }

void doshowspanf typecorecrum crumptr,
typedsp offsetptr,
int  enfheight
 

???

(to be defined)

Definition at line 1472 of file test.cxx.

References typecorecrumhedr::cdsp, typecorecrumhedr::cenftype, dspadd(), findleftson(), typecorecrumhedr::height, NULL, typecorecrumhedr::rightbro, showspanfcrum(), typecorecrum, and typedsp.

Referenced by showspanf().

01476 {
01477 #ifndef DISTRIBUTION
01478     typecorecrum *ptr = NULL;
01479     typedsp loffset;
01480 
01481     showspanfcrum(crumptr, offsetptr, enfheight);
01482     if (crumptr->height <= 0)
01483         return;
01484 
01485     dspadd(offsetptr, &crumptr->cdsp, &loffset, crumptr->cenftype);
01486     for (ptr = findleftson((typecuc *) crumptr); ptr; ptr = ptr->rightbro)
01487         doshowspanf(ptr, &loffset, enfheight);
01488 #endif
01489 }

void dump typecorecrum ptr  ) 
 

???

(to be defined)

Definition at line 860 of file test.cxx.

References typecorecrumhedr::cenftype, dumphedr(), dumpinfo(), typecorecrumhedr::height, L, and typecorecrum.

Referenced by assertsonswispmatchesfather(), assertsubtreeisok(), check(), checkmodifiednotthere(), disown(), disownnomodify(), dumpsubtree(), dumpwholesubtree(), findleftson(), foocrum(), funcrejuvinate(), inorglinternal(), isreapable(), makecontextfromcbc(), makegappm(), makeithcutonson(), slicecbcpm(), subtreewriterecurs(), testforreservedness(), tumblercheckptr(), varpackloaf(), varunpackloaf(), and yesdump().

00862 {
00863 #ifndef DISTRIBUTION
00864     L("\n");
00865     dumphedr(ptr);
00866 
00867     if (ptr->height) {
00868         L("sonorigin = %x insideloaf %x  leftson = %x  #sons = %x\n",
00869                 ((typecuc *) ptr)->sonorigin.diskblocknumber, ((typecuc *) ptr)->sonorigin.insidediskblocknumber,
00870                 (int) ((typecuc *) ptr)->leftson, ((typecuc *) ptr)->numberofsons);
00871     } else {
00872         dumpinfo(&((typecbc *) ptr)->cinfo, ptr->cenftype);
00873     }
00874 #endif
00875 }

void dumpcontext Context context  ) 
 

???

(to be defined)

Definition at line 2042 of file test.cxx.

References Context::contextinfo, ContextBase::contexttype, ContextBase::contextwid, debug, dumpdsp(), dumpinfo(), dumpwid(), enftypestring(), L, NULL, and ContextBase::totaloffset.

Referenced by analyzeanddebug(), dumpcontextlist(), foocontext(), and makecontextfromcbc().

02044 {
02045 #ifndef DISTRIBUTION
02046     L("  context %x:\n", (int) context);
02047 
02048     if (context == NULL) {
02049         L("NULL context\n");
02050         return;
02051     }
02052 
02053     L("    contexttype %s\n", enftypestring(context->contexttype));
02054     L("    totaloffset ");
02055     dumpdsp(&context->totaloffset, context->contexttype);
02056 
02057     L("    contextwid ");
02058     dumpwid(&context->contextwid, context->contexttype);
02059 
02060     if (debug > 1) {
02061         L("    contextinfo ");
02062         dumpinfo((typegranbottomcruminfo *) &context->contextinfo, context->contexttype);
02063     }
02064 #endif
02065 }

void dumpcontextlist Context context  ) 
 

???

(to be defined)

Definition at line 2017 of file test.cxx.

References dumpcontext(), L, and ContextBase::nextcontext.

Referenced by foocontextlist().

02019 {
02020 #ifndef DISTRIBUTION
02021     L("contextlist :\n");
02022 
02023     if (!context) {
02024         L("  contextlist NULL\n");
02025         return;
02026     }
02027 
02028     for (; context; context = (Context *) context->nextcontext) {
02029         dumpcontext(context);
02030     }
02031 #endif
02032 }

void dumpdsp typewid dspptr,
int  enftype
 

???

(to be defined)

Definition at line 1218 of file test.cxx.

References typewid::dsas, dspsize, L, and puttumbler().

Referenced by dumpcontext(), dumphedr(), and foodsp().

01221 {
01222 #ifndef DISTRIBUTION
01223     int i;
01224 
01225 /* if (enftype == GRAN) return; */
01226     int nstreams = dspsize(enftype);
01227     L("dsp = < ");
01228     for (i = 0; i < nstreams; ++i) {
01229         if (i > 0)
01230             L(" , ");
01231         puttumbler(stderr, &dspptr->dsas[i]);
01232     }
01233     L(" >\n");
01234 #endif
01235 }

bool dumpgranfwids Session sess  ) 
 

???

(to be defined)

Parameters:
sess  Input: User's session context

Definition at line 1572 of file test.cxx.

References granf, Session::inp, L, puttumbler(), showgranwids(), tumblereq(), typecorecrum, and WIDTH.

01573                                      : User's session context
01574 {
01575 #ifndef DISTRIBUTION
01576     Tumbler subtreewid;
01577     //UNUSED int fullheight;
01578 
01579 /* fullheight = ((typecorecrum *)granf)->height; */
01580     showgranwids((typecorecrum *) granf, 0, &subtreewid);
01581     if (!tumblereq(&subtreewid, &((typecorecrum *) granf)->cwid.dsas[WIDTH])) {
01582 
01583         L("Granfilade fullcrum wid and widded enfilade don\'t match.\n");
01584         L("gran fullcrum wid ");
01585         puttumbler(stderr, &((typecorecrum *) granf)->cwid.dsas[WIDTH]);
01586 
01587         L("\nreturned wid from subtree ");
01588         puttumbler(stderr, &subtreewid);
01589 
01590         L("\nHit \"<return>\" to continue, \"a<return>\" to abort ");
01591         if (getc(sess->inp) == 'a')
01592             abort();
01593     }
01594     L("\n");
01595 #endif
01596     return true;
01597 }

void dumphedr typecorecrumhedr ptr  ) 
 

???

(to be defined)

Definition at line 1117 of file test.cxx.

References typecorecrumhedr::age, typecorecrumhedr::cdsp, typecorecrumhedr::cenftype, typecorecrumhedr::cwid, dumpdsp(), dumpwid(), GRAN, typecorecrumhedr::height, L, typecorecrumhedr::leftbroorfather, typecorecrumhedr::nextcrum, POOM, typecorecrumhedr::rightbro, and SPAN.

Referenced by dump().

01119 {
01120 #ifndef DISTRIBUTION
01121     char *temp;
01122 
01123     switch (ptr->cenftype) {
01124     case GRAN:  temp = "GRAN";  break;
01125     case SPAN:  temp = "SPAN";  break;
01126     case POOM:  temp = "POOM";  break;
01127     default:    temp = "????";  L(" %d ", ptr->cenftype); break;
01128     }
01129 
01130     const char *full = (ptr->isapex ? "full" : "");
01131 
01132 //                   ===GRAN fullcrum height=0
01133 //  00000000 <  coreaddr@xxxxxxxx  > 00000000
01134 //            | age=dd  modified=1  next@xxxxxxxx
01135 //            | dsp = < 0 >
01136 //            | wid = < 1.7.0.9.0.1.0.1 >
01137 //            \         v               /
01138 //                  00000000
01139 
01140 //            /--GRAN fullcrum h=0
01141 //  00000000 <  coreaddr@xxxxxxxx  > 00000000
01142 //            | age=dd  modified=1  next@xxxxxxxx
01143 //            | dsp = < 0 >
01144 //            | wid = < 1.7.0.9.0.1.0.1 >
01145 //            \         v               /
01146 //                  00000000
01147 
01148 
01149 
01150     L("%s %scrum core location = %x\n", temp, full, (int) ptr);
01151     L("height = %x nextcrum = %x  modified = %x\n", ptr->height, (int) ptr->nextcrum, ptr->modified);
01152     L(" age = %x ", ptr->age);
01153     L("isleftmost = %x leftbro = %x rightbro = %x\n", ptr->isleftmost, (int) ptr->leftbroorfather, (int) ptr->rightbro);
01154 
01155     dumpdsp(&ptr->cdsp, ptr->cenftype);
01156     dumpwid(&ptr->cwid, ptr->cenftype);
01157 #endif
01158 }

void dumphexstuff char *  ptr  ) 
 

???

(to be defined)

Definition at line 2384 of file test.cxx.

References L.

Referenced by findandallocateinsidediskblocknumber(), and varunpackloaf().

02386 {
02387 #ifndef DISTRIBUTION
02388     int i;
02389 
02390     L("\n");
02391 
02392     for (i = 0; i < 120; i++)
02393         L("%x ", *(ptr + i) & 0xff);
02394     L("\n");
02395 #endif
02396 }

void dumphint typehint hintptr  ) 
 

???

(to be defined)

Definition at line 1388 of file test.cxx.

References typehint::atomtype, typehint::hintisa, L, puttumbler(), typehint::subtype, and typehint::supertype.

01390 {
01391 #ifndef DISTRIBUTION
01392     L("\nHINT\n");
01393     L("  supertype: %d\n", hintptr->supertype);
01394     L("  subtype:   %d\n", hintptr->subtype);
01395     L("  atomtype:  %d\n", hintptr->atomtype);
01396     L("  isa:       ");
01397     puttumbler(stderr, &hintptr->hintisa);
01398     L("\n");
01399 #endif
01400 }

void dumpinfo typegranbottomcruminfo infoptr,
int  enftype
 

???

(to be defined)

Definition at line 1294 of file test.cxx.

References assert, typegranorgl::diskorglptr, GRAN, GRANNULL, GRANORGL, typegranbottomcruminfo::granstuff, GRANTEXT, typegranbottomcruminfo::infotype, L, typegranorgl::orglptr, typegranstuff::orglstuff, puttumbler(), typegrantext::textstring, and typegranstuff::textstuff.

Referenced by dump(), and dumpcontext().

01297 {
01298 #ifndef DISTRIBUTION
01299     if (enftype == GRAN) {
01300         switch (infoptr->infotype) {
01301         case GRANTEXT:
01302             L("text:  %s\n", infoptr->granstuff.textstuff.textstring);
01303             break;
01304         case GRANORGL:
01305             L(" diskorgl %x, ", infoptr->granstuff.orglstuff.diskorglptr);
01306             L("orgl %x\n ", (int) infoptr->granstuff.orglstuff.orglptr);
01307             break;
01308         case GRANNULL:
01309             L("GRANNULL info\n");
01310             break;
01311         default:
01312             L("empty infotype: %d\n", infoptr->infotype);
01313             assert(0); // bad in dumpinfo
01314         }
01315     } else {
01316         L("home document: ");
01317         puttumbler(stderr, &((type2dbottomcruminfo *) infoptr)->homedoc);
01318         L("\n");
01319     }
01320 #endif
01321 }

void dumpisagr Tumbler offsetptr  ) 
 

???

(to be defined)

Definition at line 1815 of file test.cxx.

References Tumbler::exp, L, Tumbler::mantissa, movetumbler, NPLACES, nstories(), puttumbler(), and TABSTOP.

01817 {
01818 #ifndef DISTRIBUTION
01819     int i, j, k;
01820     Tumbler offset;
01821 
01822     movetumbler(offsetptr, &offset);
01823 
01824     i = nstories(&offset) - offset.exp;
01825     i += i - 1;
01826     for (j = 0; j < NPLACES; ++j)
01827         for (k = offset.mantissa[j]; k /= 10; ++i)
01828             ;
01829 
01830     i = TABSTOP - i;
01831     if (i < 2) {
01832         L("too long");
01833         i = 8;
01834     } else
01835         puttumbler(stderr, &offset);
01836 
01837     while (i--)
01838         L(" ");
01839 #endif
01840 }

void dumpistreamgr typecuc crumptr  ) 
 

???

(to be defined)

Definition at line 1739 of file test.cxx.

References debug, dodumpistreamgr(), and tumblerclear.

Referenced by showistream().

01741 {
01742 #ifndef DISTRIBUTION
01743     Tumbler offset;
01744 
01745     if (debug < 5)
01746         return;
01747 
01748     tumblerclear(&offset);
01749     dodumpistreamgr(crumptr, &offset);
01750 #endif
01751 }

void dumpitem typeitem itemptr  ) 
 

???

(to be defined)

Definition at line 2100 of file test.cxx.

References assert, debug, dumpitemset(), dumpspan(), dumptext(), ISPANID, L, LINKID, puttumbler(), SPORGLID, TEXTID, typelink, VSPANID, and VSPECID.

Referenced by analyzeanddebug(), checkitem(), dumpitemset(), and fooitem().

02102 {
02103 #ifndef DISTRIBUTION
02104     int bugger = debug;
02105 
02106     debug = 0;
02107 /* checkitem ("dumpitem: ", itemptr); */
02108     L("%x ->%x:", (int) itemptr, (int) ((typeitemheader *) itemptr)->next);
02109     switch (((typeitemheader *) itemptr)->itemid) {
02110     case ISPANID:
02111         L("  ispan\n");
02112         dumpspan((typespan *) itemptr);
02113         break;
02114 
02115     case VSPANID:
02116         L("  vspan\n");
02117         dumpspan((typespan *) itemptr);
02118         break;
02119 
02120     case VSPECID:
02121         L("document: ");
02122         puttumbler(stderr, &((typevspec *) itemptr)->docisa);
02123         L("\nspans");
02124         dumpitemset((typeitem *) ((typevspec *) itemptr)->vspanset);
02125         break;
02126 
02127     case TEXTID:
02128         dumptext((typetext *) itemptr);
02129         break;
02130 
02131     case LINKID:
02132         puttumbler(stderr, &((typelink *) itemptr)->address);
02133         break;
02134 
02135     case SPORGLID:
02136         L("sporgl address: ");
02137         puttumbler(stderr, &((typesporgl *) itemptr)->sporgladdress);
02138         L("\n   sporgl origin: ");
02139         puttumbler(stderr, &((typesporgl *) itemptr)->sporglorigin);
02140         L("\n   sporgl width: ");
02141         puttumbler(stderr, &((typesporgl *) itemptr)->sporglwidth);
02142         L("\n");
02143         break;
02144 
02145     default:
02146         L("illegal item id for dumpitem ");
02147         L("%x  %d\nd", (int) itemptr, ((typeitemheader *) itemptr)->itemid);
02148         assert(0); // Illegal item in dumpitem!
02149     }
02150     debug = bugger;
02151 #endif
02152 }

void dumpitemset typeitemset  itemset  ) 
 

???

(to be defined)

Definition at line 2075 of file test.cxx.

References dumpitem(), L, NULL, TEXTID, and typeitemset.

Referenced by dumpitem(), fooitemset(), and insertpm().

02077 {
02078 #ifndef DISTRIBUTION
02079     if (itemset == NULL)
02080         L("  \nitemset empty\n");
02081 
02082     for (; itemset; itemset = (typeitemset) ((typeitemheader *) itemset)->next) {
02083         dumpitem(itemset);
02084         if (!
02085             (((typeitemheader *) itemset)->next && ((typeitemheader *) itemset)->itemid == TEXTID
02086              && ((typeitemheader *) itemset)->next->itemid == TEXTID))
02087             putc('\n', stderr);
02088     }
02089 #endif
02090 }

void dumpmem char *  loc,
unsigned  count
 

???

(to be defined)

Definition at line 1544 of file test.cxx.

References L.

01547 {
01548 #ifndef DISTRIBUTION
01549     int i;
01550 
01551     L(" loc = %x\n", (int) loc);
01552     for (i = 0; count--; ++loc, (i + 1 < 64 ? ++i : (i = 0))) {
01553         if ((*loc & 0x7f) < ' ')
01554             L("%c", '.');
01555         else
01556             L("%c", *loc);
01557         if (i == 63)
01558             L("\n");
01559     }
01560     L("\n");
01561 #endif
01562 }

void dumpmoleculegr Tumbler offsetptr,
typecbc cbcptr
 

???

(to be defined)

Definition at line 1787 of file test.cxx.

Referenced by dodumpistreamgr().

01790 {
01791 #ifndef DISTRIBUTION
01792     //UNUSED int i;
01793     //UNUSED Tumbler localoffset;
01794 
01795 /* L("\n"); dumpisagr (offsetptr); if (cbcptr->cinfo.infotype == GRANTEXT) { if
01796  * (cbcptr->cinfo.textstring[0] == '\n') L("\\n"); else if (cbcptr->cinfo.textstring[0] == '\t')
01797  * L("\\t"); else L("%c ",cbcptr->cinfo.textstring[0]); L(" | %x ", cbcptr);
01798  * dumpwid (&cbcptr->cwid, GRAN); movetumbler (offsetptr, &localoffset); for (i = 1; i < cbcptr->cinfo.textlength;
01799  * ++i){ tumblerincrement (&localoffset, 0, 1, &localoffset); dumpisagr (&localoffset); if (cbcptr->cinfo.textstring[i]
01800  * == '\n') L("\\n"); else if (cbcptr->cinfo.textstring[i] == '\t') L("\\t"); else
01801  * L("%c ",cbcptr->cinfo.textstring[i]); L(" |\n"); } } else if (cbcptr->cinfo.infotype ==
01802  * GRANORGL) { L("%x",cbcptr->cinfo.orglptr); L(" | %x ", cbcptr); dumpwid (&cbcptr->cwid,
01803  * GRAN); } else { L(" | %x ", cbcptr); dumpwid (&cbcptr->cwid, GRAN); } */
01804 #endif
01805 }

void dumppoomwisps typecorecrum orgl  ) 
 

???

(to be defined)

Definition at line 1668 of file test.cxx.

References L, showpoomwisps(), and typecorecrum.

Referenced by dumpsubtree(), dumpwholesubtree(), and rearrangend().

01670 {
01671     L("Entering dumppoomwisps\n");
01672 
01673 #ifndef DISTRIBUTION
01674     //UNUSED int fullheight;
01675 
01676 /* fullheight = orgl->height; */
01677     showpoomwisps((typecuc *) orgl, 0);
01678     L("\n");
01679 #endif
01680     L("Leaving dumppoomwisps\n");
01681 }

void dumpspan typespan spanptr  ) 
 

???

(to be defined)

Definition at line 2162 of file test.cxx.

References L, puttumbler(), typespan::stream, and typespan::width.

Referenced by analyzeanddebug(), dumpitem(), dumpspanset(), foospan(), and foospanset().

02164 {
02165 #ifndef DISTRIBUTION
02166     if (!spanptr) {
02167         L("null span ptr\n");
02168         return;
02169     }
02170 
02171     L("   span address: ");
02172     puttumbler(stderr, &spanptr->stream);
02173 
02174     L("   span width: ");
02175     puttumbler(stderr, &spanptr->width);
02176 
02177     L("\n");
02178 #endif
02179 }

void dumpspanpair typespanpair spanpair  ) 
 

???

(to be defined)

Definition at line 2359 of file test.cxx.

References dumptumbler(), L, typespanpair::stream1, typespanpair::stream2, and typespanpair::widthofspan.

Referenced by dumpspanpairset().

02361 {
02362 #ifndef DISTRIBUTION
02363     L("stream1:  ");
02364     dumptumbler(&spanpair->stream1);
02365 
02366     L("\nstream2:  ");
02367     dumptumbler(&spanpair->stream2);
02368 
02369     L("\nwidth:  ");
02370     dumptumbler(&spanpair->widthofspan);
02371 
02372     L("\n");
02373 #endif
02374 }

void dumpspanpairset typespanpairset  spanpairset  ) 
 

???

(to be defined)

Definition at line 2342 of file test.cxx.

References dumpspanpair(), typespanpair::nextspanpair, and typespanpairset.

Referenced by ispansetandspecsets2spanpairset().

02344 {
02345 #ifndef DISTRIBUTION
02346     for (; spanpairset; spanpairset = spanpairset->nextspanpair)
02347         dumpspanpair(spanpairset);
02348 #endif
02349 }

void dumpspanset typespan spanset  ) 
 

???

(to be defined)

Definition at line 197 of file test.cxx.

References dumpspan(), L, and typespan::next.

00199 {
00200 #ifndef DISTRIBUTION
00201     if (!spanset) {
00202         L("null spanset\n");
00203     } else {
00204         for (; spanset; spanset = spanset->next) {
00205             dumpspan(spanset);
00206         }
00207     }
00208 #endif
00209 }

void dumpsubtree typecuc father  ) 
 

???

(to be defined)

Definition at line 431 of file test.cxx.

References typecuc::cenftype, dump(), dumppoomwisps(), typecuc::height, typecuc::leftson, POOM, typecorecrumhedr::rightbro, and typecorecrum.

Referenced by actuallyreadrawloaf(), checknumofsons(), checkwholesubtree(), nchecknumofsons(), and subtreewriterecurs().

00433 {
00434 #ifndef DISTRIBUTION
00435     typecorecrum *ptr;
00436 
00437     if (father->cenftype == POOM) {
00438         dumppoomwisps((typecorecrum *) father);
00439         return;
00440     }
00441     dump((typecorecrum *) father);
00442     if (father->height <= 0)
00443         return;
00444     for (ptr = father->leftson; ptr; ptr = ptr->rightbro)
00445         dumpsubtree((typecuc *) ptr);
00446 #endif
00447 }

void dumptext typetext textptr  ) 
 

???

(to be defined)

Definition at line 2189 of file test.cxx.

References typetext::length, and typetext::string.

Referenced by dumpitem().

02191 {
02192 #ifndef DISTRIBUTION
02193     write(2, textptr->string, textptr->length);
02194 #endif
02195 }

void dumptumbler Tumbler tumblerptr  ) 
 

???

(to be defined)

Definition at line 1331 of file test.cxx.

References assert, debug, Tumbler::exp, L, Tumbler::mantissa, NPLACES, puttumbler(), and Tumbler::sign.

Referenced by addtoopen(), analyzeanddebug(), deleteversion(), doclose(), dumpspanpair(), fetchorglgr(), findorgl(), incrementopen(), insertendsetsinorgl(), insertpm(), puttumbler(), removefromopen(), slicecbcpm(), tumblercheckptr(), and tumblerincrement().

01333 {
01334 #ifndef DISTRIBUTION
01335     int i;
01336 
01337     if (!tumblerptr) {
01338         L("NULL POINTER TO TUMBLER");
01339         return;
01340     }
01341 
01342     if (!debug)
01343         puttumbler(stderr, tumblerptr);
01344     else {
01345         L(" %d | ", tumblerptr->sign);
01346         L("%d | ", tumblerptr->exp);
01347         for (i = 0; i < NPLACES; ++i)
01348             L("%d ", tumblerptr->mantissa[i]);
01349         if (tumblerptr->exp > 0) {
01350             L("in dumptumbler exponent positive i.e. negative number of leading zeros!\n");
01351             assert(0); // dumptumbler
01352         }
01353     }
01354 #endif
01355 }

void dumpwholesubtree typecuc father  ) 
 

???

(to be defined)

Definition at line 457 of file test.cxx.

References typecuc::cenftype, dump(), dumppoomwisps(), findleftson(), findrightbro, typecuc::height, L, POOM, and typecorecrum.

Referenced by dumpwholetree(), and showsubtree().

00459 {
00460 #ifndef DISTRIBUTION
00461     L("dump whole subtree");
00462 
00463     if (father->cenftype == POOM) {
00464         dumppoomwisps((typecorecrum *) father);
00465         return;
00466     }
00467 
00468     dump((typecorecrum *) father);
00469 
00470     if (father->height <= 0)
00471         return;
00472 
00473     typecorecrum *ptr;
00474     for (ptr = findleftson(father); ptr; ptr = findrightbro(ptr))
00475         dumpwholesubtree((typecuc *) ptr);
00476 #endif
00477 }

void dumpwholetree typecorecrum ptr  ) 
 

???

(to be defined)

Definition at line 689 of file test.cxx.

References dumpwholesubtree(), findfather(), isfullcrum(), L, and typecorecrum.

Referenced by assertsonswispmatchesfather(), slicecbcpm(), and tumblercheckptr().

00691 {
00692 #ifndef DISTRIBUTION
00693     L("dump whole tree\n");
00694 
00695     for (; !isfullcrum(ptr); ptr = (typecorecrum *) findfather(ptr))
00696         ;
00697 
00698     dumpwholesubtree((typecuc *) ptr);
00699 #endif
00700 }

void dumpwid typewid widptr,
int  enftype
 

???

(to be defined)

Definition at line 1168 of file test.cxx.

References typewid::dsas, L, puttumbler(), and widsize.

Referenced by dumpcontext(), dumphedr(), foowid(), insertcutsectionnd(), insertpm(), makeithcutonson(), and slicecbcpm().

01171 {
01172 #ifndef DISTRIBUTION
01173     int i;
01174 
01175     int nstreams = widsize(enftype);
01176     L("wid = < ");
01177     for (i = 0; i < nstreams; ++i) {
01178         if (i > 0)
01179             L(" , ");
01180         puttumbler(stderr, &widptr->dsas[i]);
01181     }
01182     L(" >\n");
01183 #endif
01184 }

char* enftypestring int  type  ) 
 

???

(to be defined)

Definition at line 1962 of file test.cxx.

References GRAN, POOM, and SPAN.

Referenced by dumpcontext().

01964 {
01965 #ifndef DISTRIBUTION
01966     static char errbuf[60];
01967 
01968     switch (type) {
01969     case GRAN:
01970         return ("GRAN");
01971     case POOM:
01972         return ("POOM");
01973     case SPAN:
01974         return ("SPAN");
01975     default:
01976         sprintf(errbuf, "bad enftype %d", type);
01977         return ((char *)errbuf);
01978     }
01979 #endif
01980 }

void foo char *  msg  ) 
 

???

(to be defined)

Definition at line 134 of file test.cxx.

References debug, and L.

Referenced by changeunterrefcount(), context2vstuff(), context2vtext(), expandcrumleftward(), intersectspansets(), ispansetandspecsets2spanpairset(), makecontextfromcbc(), makegappm(), makeroomonleftnd(), makespanpairset(), makespanpairsforispan(), permute(), and span2spanset().

00136 {
00137 #ifndef DISTRIBUTION
00138     if (debug)
00139         L(msg);
00140 #endif
00141 }

void foocontext char *  msg,
Context context
 

???

(to be defined)

Definition at line 275 of file test.cxx.

References debug, dumpcontext(), and L.

Referenced by context2vstuff(), ispan2vstuffset(), and span2spanset().

00278 {
00279 #ifndef DISTRIBUTION
00280     if (debug) {
00281         L(msg);
00282         dumpcontext(context);
00283     }
00284 #endif
00285 }

void foocontextlist char *  msg,
Context context
 

???

(to be defined)

Definition at line 295 of file test.cxx.

References debug, dumpcontextlist(), and L.

Referenced by ispan2vstuffset(), and span2spanset().

00298 {
00299 #ifndef DISTRIBUTION
00300     if (debug) {
00301         L(msg);
00302         dumpcontextlist(context);
00303     }
00304 #endif
00305 }

void foocrum char *  msg,
typecorecrum crumptr
 

???

(to be defined)

Definition at line 219 of file test.cxx.

References debug, dump(), L, and typecorecrum.

00222 {
00223 #ifndef DISTRIBUTION
00224     if (debug) {
00225         L(msg);
00226         dump(crumptr);
00227     }
00228 #endif
00229 }

void foodec char *  msg,
int  num
 

???

(to be defined)

Definition at line 257 of file test.cxx.

References debug, and L.

00260 {
00261 #ifndef DISTRIBUTION
00262     if (debug)
00263         L("%s %d\n", msg, num);
00264 #endif
00265 }

void foodsp char *  msg,
typedsp dptr,
int  enftype
 

???

(to be defined)

Definition at line 380 of file test.cxx.

References debug, dumpdsp(), L, and typedsp.

00384 {
00385 #ifndef DISTRIBUTION
00386     if (debug) {
00387         L(msg);
00388         if (dptr)
00389             dumpdsp(dptr, enftype);
00390         else
00391             L("NULL");
00392         L("\n");
00393     }
00394 #endif
00395 }

void foohex char *  msg,
int  num
 

???

(to be defined)

Definition at line 239 of file test.cxx.

References debug, and L.

Referenced by ispan2vstuffset(), and reserve().

00242 {
00243 #ifndef DISTRIBUTION
00244     if (debug)
00245         L("%s %x\n", msg, num);
00246 #endif
00247 }

void fooitem char *  msg,
typeitem iptr
 

???

(to be defined)

Definition at line 335 of file test.cxx.

References debug, dumpitem(), and L.

00338 {
00339 #ifndef DISTRIBUTION
00340     if (debug) {
00341         L(msg);
00342         dumpitem(iptr);
00343         L("\n");
00344     }
00345 #endif
00346 }

void fooitemset char *  msg,
typeitemset  iptr
 

???

(to be defined)

Definition at line 315 of file test.cxx.

References debug, dumpitemset(), L, and typeitemset.

Referenced by finddocscontainingsp(), intersectlinksets(), ispanset2vstuffset(), makespanpairset(), makespanpairsforispan(), restrictspecsetsaccordingtoispans(), restrictvspecsetovercommonispans(), and retrieveendsetsfromspanf().

00318 {
00319 #ifndef DISTRIBUTION
00320     if (debug) {
00321         L(msg);
00322         dumpitemset(iptr);
00323     }
00324 #endif
00325 }

void foospan char *  msg,
typespan span
 

???

(to be defined)

Definition at line 151 of file test.cxx.

References debug, dumpspan(), and L.

Referenced by spanintersection().

00154 {
00155 #ifndef DISTRIBUTION
00156     if (debug) {
00157         L(msg);
00158         dumpspan(span);
00159     }
00160 #endif
00161 }

void foospanset char *  msg,
typespan spanset
 

???

(to be defined)

Definition at line 171 of file test.cxx.

References debug, dumpspan(), L, and typespan::next.

Referenced by intersectspansets(), and permute().

00174 {
00175 #ifndef DISTRIBUTION
00176     if (debug) {
00177         L(msg);
00178         if (!spanset) {
00179             L("null spanset\n");
00180         } else {
00181             for (; spanset; spanset = spanset->next) {
00182                 dumpspan(spanset);
00183             }
00184         }
00185     }
00186 #endif
00187 }

void footumbler char *  msg,
Tumbler tptr
 

???

(to be defined)

Definition at line 356 of file test.cxx.

References debug, L, and puttumbler().

Referenced by context2vtext(), expandcrumleftward(), insertpm(), makelinkitem(), and makeroomonleftnd().

00359 {
00360 #ifndef DISTRIBUTION
00361     if (debug) {
00362         L(msg);
00363         if (tptr)
00364             puttumbler(stderr, tptr);
00365         else
00366             L("NULL");
00367         L("\n");
00368     }
00369 #endif
00370 }

void foowid char *  msg,
typewid wptr,
int  enftype
 

???

(to be defined)

Definition at line 405 of file test.cxx.

References debug, dumpwid(), and L.

00409 {
00410 #ifndef DISTRIBUTION
00411     if (debug) {
00412         L(msg);
00413         if (wptr)
00414             dumpwid(wptr, enftype);
00415         else
00416             L("NULL");
00417         L("\n");
00418     }
00419 #endif
00420 }

void graphcrum FILE *  fd,
typecorecrum ptr,
typedsp offsetptr,
char *  indent
 

???

(to be defined)

Definition at line 970 of file test.cxx.

References typecorecrumhedr::cdsp, typecorecrumhedr::cenftype, typecorecrumhedr::cwid, dspadd(), GRAN, GRANNULL, GRANORGL, GRANTEXT, graphdsp(), graphoffset(), graphpoom(), graphwid(), typecorecrumhedr::height, typecorecrumhedr::leftbroorfather, nodecolor(), nodefillcolor(), nodeid(), NULL, typegranorgl::orglptr, typecorecrumhedr::rightbro, safetext(), typegrantext::textlength, typegrantext::textstring, typecorecrum, and typedsp.

Referenced by graphwholesubtree().

00975 {
00976     const char *full = (ptr->isapex ? "(top)" : "");
00977     char mynodeid[10], hisnodeid[10];
00978     typecorecrum *orgl = NULL;
00979 
00980     nodeid(ptr, mynodeid);
00981 
00982     char *color     = nodecolor(ptr);
00983     char *fillcolor = nodefillcolor(ptr);
00984 
00985     // Define Attributes of This Node
00986     fprintf(fd, "%s    %s [color=%s, fillcolor=%s, style=filled, label = \"", indent, mynodeid, color, fillcolor);
00987     fprintf(fd, "{ %s\\nheight=%u %s |",
00988                 mynodeid, ptr->height, full);
00989 
00990     if (ptr->cenftype != GRAN)
00991         graphdsp(fd, &ptr->cdsp, ptr->cenftype);
00992 
00993     graphwid(fd, &ptr->cwid, ptr->cenftype);
00994     graphoffset(fd, offsetptr, ptr->cenftype);
00995 
00996     if (ptr->height == 0 && ptr->cenftype == GRAN) {
00997         int infotype = ((typecbc *) ptr)->cinfo.infotype;
00998         typegrantext *gtext;
00999         typegranorgl *gorgl;
01000         char *safe, *ellipse;
01001 
01002         switch (infotype) {
01003         case GRANTEXT:
01004             gtext = &((typecbc *) ptr)->cinfo.granstuff.textstuff;
01005             safe = safetext(gtext->textstring);
01006             if (gtext->textlength > strlen(safe)) ellipse = "...";
01007             else ellipse = "";
01008             fprintf(fd, " | TEXT[%u]\\n'%s'%s", gtext->textlength, safe, ellipse);
01009             break;
01010         case GRANORGL:
01011             gorgl = &((typecbc *) ptr)->cinfo.granstuff.orglstuff;
01012             orgl = (typecorecrum *) gorgl->orglptr; // Used Below
01013             fprintf(fd, " | ORGL");
01014             break;
01015         case GRANNULL:  fprintf(fd, " | NULL"); break;
01016         default:        fprintf(fd, " | { err=\\< ???? \\>\\l }"); break;
01017         }
01018     }
01019 
01020     if (ptr->height) {
01021         fprintf(fd, " | nsons=%u ", ((typecuc *) ptr)->numberofsons);
01022     }
01023     fprintf(fd, "}\"];\n");
01024 
01025     // Define Connections of This Node
01026     if (ptr->rightbro)
01027         fprintf(fd, "%s    %s -> %s [tailport=e, headport=w, taillabel=RBRO, labeldistance=2, labelfontname=Helvetica, labelfontsize=10, labelfontcolor=%s, color=%s];\n",
01028                     indent, mynodeid, nodeid(ptr->rightbro, hisnodeid), nodecolor(ptr->rightbro), nodecolor(ptr->rightbro));
01029 
01030     if (ptr->leftbroorfather) {
01031         if (ptr->isleftmost)
01032             fprintf(fd, "%s    %s -> %s [tailport=n, headport=s, taillabel=FATHER, labeldistance=2, labelfontname=Helvetica, labelfontsize=10, labelfontcolor=%s, color=%s];\n",
01033                         indent, mynodeid, nodeid(ptr->leftbroorfather, hisnodeid), nodecolor(ptr->leftbroorfather), nodecolor(ptr->leftbroorfather));
01034         else
01035             fprintf(fd, "%s    %s -> %s [tailport=w, headport=e, taillabel=LBRO, labeldistance=2, labelfontname=Helvetica, labelfontsize=10, labelfontcolor=%s, color=%s];\n",
01036                         indent, mynodeid, nodeid(ptr->leftbroorfather, hisnodeid), nodecolor(ptr->leftbroorfather), nodecolor(ptr->leftbroorfather));
01037     }
01038 
01039     if (orgl)
01040         fprintf(fd, "%s    %s -> %s [tailport=s, headport=n, taillabel=SON, labeldistance=2, labelfontname=Helvetica, labelfontsize=10, labelfontcolor=%s, color=%s];\n",
01041                     indent, mynodeid, nodeid(orgl, hisnodeid), nodecolor(orgl), nodecolor(orgl));
01042 
01043     if (ptr->height) {
01044         fprintf(fd, "%s    %s -> %s [tailport=s, headport=n, taillabel=SON, labeldistance=2, labelfontname=Helvetica, labelfontsize=10, labelfontcolor=%s, color=%s];\n",
01045                     indent, mynodeid, nodeid(((typecuc *) ptr)->leftson, hisnodeid), nodecolor(((typecuc *) ptr)->leftson), nodecolor(((typecuc *) ptr)->leftson));
01046     } else {
01047 //        if (ptr->cenftype == GRAN) {
01048 //            typegranbottomcruminfo *cinfo = &((typecbc *) ptr)->cinfo;
01049 //
01050 //struct structorgl {
01051 //    struct structcuc *orglptr;
01052 //    typediskloafptr diskorglptr;
01053 //};
01054 //
01055 //        } else {
01056 //        //    type2dbottomcruminfo c2dinfo;
01057 //        }
01058     }
01059 
01060 //    if (ptr->height == 0 && ptr->cenftype == GRAN) {
01061 //        int infotype = ((typecbc *) ptr)->cinfo.infotype;
01062 //        if (infotype == GRANORGL) {
01063 //            typegranorgl *gorgl = &((typecbc *) ptr)->cinfo.granstuff.orglstuff;
01064 //            graphpoom(fd, (typecorecrum *) gorgl->orglptr);
01065 //        }
01066 //    }
01067 
01068     if (orgl)
01069         graphpoom(fd, orgl);
01070 
01071 //    L("%s %scrum core location = %x\n", temp, full, (int) ptr);
01072 //    L("height = %x nextcrum = %x  modified = %x\n", ptr->height, (int) ptr->nextcrum, ptr->modified);
01073 //    L(" age = %x ", ptr->age);
01074 //    L("isleftmost = %x leftbro = %x rightbro = %x\n", ptr->isleftmost, (int) ptr->leftbroorfather, (int) ptr->rightbro);
01075 
01076 //    dumpdsp(&ptr->cdsp, ptr->cenftype);
01077 //    dumpwid(&ptr->cwid, ptr->cenftype);
01078 
01079 
01080 //    if (ptr->height) {
01081 //        L("sonorigin = %x insideloaf %x  leftson = %x  #sons = %x\n",
01082 //                ((typecuc *) ptr)->sonorigin.diskblocknumber, ((typecuc *) ptr)->sonorigin.insidediskblocknumber,
01083 //                (int) ((typecuc *) ptr)->leftson, ((typecuc *) ptr)->numberofsons);
01084 //    } else {
01085 //        dumpinfo(&((typecbc *) ptr)->cinfo, ptr->cenftype);
01086 //    }
01087 
01088     if (ptr->height == 0)
01089         dspadd(offsetptr, &ptr->cwid, offsetptr, ptr->cenftype);
01090 }

void graphdsp FILE *  fd,
typewid dspptr,
int  enftype
 

???

(to be defined)

Definition at line 1245 of file test.cxx.

References typewid::dsas, dspsize, and puttumbler().

Referenced by graphcrum().

01249 {
01250 /* if (enftype == GRAN) return; */
01251     int nstreams = dspsize(enftype);
01252     fprintf(fd, " dsp=\\<");
01253 
01254     for (int i = 0; i < nstreams; ++i) {
01255         if (i > 0)
01256             fprintf(fd, " :: ");
01257         puttumbler(fd, &dspptr->dsas[i]);
01258     }
01259     fprintf(fd, "\\> \\n");
01260 }

void graphoffset FILE *  fd,
typedsp dspptr,
int  enftype
 

???

(to be defined)

Definition at line 1270 of file test.cxx.

References typewid::dsas, dspsize, puttumbler(), and typedsp.

Referenced by graphcrum().

01274 {
01275     int nstreams = dspsize(enftype);
01276     fprintf(fd, " isa=\\<");
01277 
01278     for (int i = 0; i < nstreams; ++i) {
01279         if (i > 0)
01280             fprintf(fd, " :: ");
01281         puttumbler(fd, &dspptr->dsas[i]);
01282     }
01283     fprintf(fd, "\\> \\n");
01284 }

void graphpoom FILE *  fd,
typecorecrum ptr
 

???

(to be defined)

Definition at line 758 of file test.cxx.

References clear, findfather(), graphwholesubtree(), isfullcrum(), typecorecrum, and typedsp.

Referenced by graphcrum().

00761 {
00762     fprintf(fd, "\n    subgraph cluster_%08X {\n", (int) ptr);
00763 
00764     for (; !isfullcrum(ptr); ptr = (typecorecrum *) findfather(ptr))
00765         ;
00766 
00767     typedsp offset;
00768     clear(&offset, sizeof(offset));
00769 
00770     graphwholesubtree(fd, (typecuc *) ptr, &offset, "    ");
00771 
00772     fprintf(fd, "\n");
00773     fprintf(fd, "        label = \"POOM\";\n");
00774     fprintf(fd, "        color = royalblue;\n");
00775     fprintf(fd, "        fillcolor = lightgrey;\n");
00776     fprintf(fd, "        style = filled;\n");
00777     fprintf(fd, "    }\n\n");
00778 }

void graphwholesubtree FILE *  fd,
typecuc father,
typedsp offsetptr,
char *  indent
 

???

(to be defined)

Definition at line 487 of file test.cxx.

References findleftson(), findrightbro, graphcrum(), typecorecrumhedr::height, nodeid(), typecorecrum, and typedsp.

Referenced by graphpoom(), and graphwholetree().

00492 {
00493     typecorecrum *ptr;
00494 //jrr    if (father->cenftype == POOM) {
00495 //jrr        dumppoomwisps((typecorecrum *) father);
00496 //jrr        return;
00497 //jrr    }
00498 
00499     graphcrum(fd, (typecorecrum *) father, offsetptr, indent);
00500 
00501     if (father->height <= 0)
00502         return;
00503 
00504     if (strlen(indent) == 0) {
00505         fprintf(fd, "\n  { rank=same; ");
00506 
00507         for (ptr = findleftson(father); ptr; ptr = findrightbro(ptr)) {
00508             char temp[10];
00509             fprintf(fd, "%s; ", nodeid(ptr, temp));
00510         }
00511         fprintf(fd, "} /* height = %u */\n\n", findleftson(father)->height);
00512     }
00513 
00514     for (ptr = findleftson(father); ptr; ptr = findrightbro(ptr)) {
00515         graphwholesubtree(fd, (typecuc *) ptr, offsetptr, indent);
00516     }
00517 }

void graphwholetree char *  filename,
typecorecrum ptr,
char *  graphlabel
 

???

(to be defined)

Definition at line 710 of file test.cxx.

References clear, findfather(), graphwholesubtree(), isfullcrum(), typecorecrum, and typedsp.

Referenced by docopy().

00714 {
00715     FILE *fd = fopen(filename, "w");
00716 
00717     fprintf(fd, "digraph G {\n");
00718     fprintf(fd, "    nodesep=0.40;\n");
00719     fprintf(fd, "    ranksep=\"0.40 equally\";\n");
00720     fprintf(fd, "    center=true;\n");
00721     fprintf(fd, "    page=\"8.5, 11\"; /* unit of pagination */\n");
00722     fprintf(fd, "    size=\"8.25, 10.75\";\n");
00723     fprintf(fd, "    /* ratio=auto; */\n");
00724     fprintf(fd, "    orientation=landscape;\n");
00725     fprintf(fd, "    label=\"%s\";\n", graphlabel);
00726     fprintf(fd, "    fontsize=14;\n");
00727     fprintf(fd, "    fontcolor=blue;\n");
00728     fprintf(fd, "\n");
00729     fprintf(fd, "    node [shape = record];\n");
00730     fprintf(fd, "\n");
00731 
00732     for (; !isfullcrum(ptr); ptr = (typecorecrum *) findfather(ptr))
00733         ;
00734 
00735     typedsp offset;
00736     clear(&offset, sizeof(offset));
00737 
00738     graphwholesubtree(fd, (typecuc *) ptr, &offset, "");
00739 
00740     fprintf(fd, "    A [width=0.1, height=0.1, style=invis];\n");
00741     fprintf(fd, "    B [width=0.1, height=0.1, style=invis];\n");
00742     fprintf(fd, "    C [width=0.1, height=0.1, style=invis];\n");
00743     fprintf(fd, "    A -> B [style=invis];\n");
00744     fprintf(fd, "    B -> C [style=invis];\n");
00745 
00746     fprintf(fd, "}\n");
00747     fclose(fd);
00748 }

void graphwid FILE *  fd,
typewid widptr,
int  enftype
 

???

(to be defined)

Definition at line 1194 of file test.cxx.

References typewid::dsas, puttumbler(), and widsize.

Referenced by graphcrum().

01198 {
01199     int nstreams = widsize(enftype);
01200     fprintf(fd, " wid=\\<");
01201 
01202     for (int i = 0; i < nstreams; ++i) {
01203         if (i > 0)
01204             fprintf(fd, " :: ");
01205         puttumbler(fd, &widptr->dsas[i]);
01206     }
01207     fprintf(fd, "\\> \\n");
01208 }

bool ioinfo Session sess  ) 
 

???

(to be defined)

Parameters:
sess  Input: User's session context

Definition at line 2205 of file test.cxx.

References L, nolread, and nowread.

02206                                      : User's session context
02207 {
02208 #ifndef DISTRIBUTION
02209     L("Total reads = %ld,  total writes = %ld\n", nolread, nowread);
02210 #endif
02211 
02212     return true;
02213 }

char* itemidstring typeitem item  ) 
 

???

(to be defined)

Definition at line 2223 of file test.cxx.

References ADDRESSID, ISPANID, NODEID, NULL, SPORGLID, TEXTID, UNKNOWNID, VSPANID, and VSPECID.

02225 {
02226 #ifndef DISTRIBUTION
02227     switch (((typeitemheader *) item)->itemid) {
02228     case TEXTID:     return "TEXTID";
02229     case ISPANID:    return "ISPANID";
02230     case VSPANID:    return "VSPANID";
02231     case VSPECID:    return "VSPECID";
02232     case NODEID:     return "NODEID";
02233     case ADDRESSID:  return "ADDRESSID";
02234     case SPORGLID:   return "SPORGLID";
02235     case UNKNOWNID:  return "UNKNOWNID";
02236     }
02237 #endif
02238     return NULL; /* for lint ? */
02239 }

void nchecknumofsons typecuc ptr  ) 
 

???

(to be defined)

Definition at line 2439 of file test.cxx.

References dumpsubtree(), typecuc::height, L, typecuc::leftson, typecuc::numberofsons, and typecuc::rightbro.

02441 {
02442 #ifndef DISTRIBUTION
02443     typecuc *np;
02444 
02445     int i = 0;
02446     if (!ptr || !ptr->height)
02447         return;
02448 
02449     for (np = (typecuc *) ptr->leftson; np; np = (typecuc *) np->rightbro, i++)
02450         ;
02451 
02452     if (i != ptr->numberofsons) {
02453         dumpsubtree(ptr);
02454         L("i = %d numberofsons = %d\n", i, ptr->numberofsons);
02455 
02456         for (np = (typecuc *) ptr->leftson; np; np = (typecuc *) np->rightbro, i++) {
02457 /* dump(np) */ ;
02458         }
02459         L("numberofson mismach in nchecknumofsons\n");
02460     }
02461 #endif
02462 }

char* nodecolor typecorecrum ptr  ) 
 

???

(to be defined)

Definition at line 932 of file test.cxx.

References typecorecrumhedr::cenftype, GRAN, POOM, SPAN, and typecorecrum.

Referenced by graphcrum().

00934 {
00935     switch (ptr->cenftype) {
00936     case GRAN: return "darkgreen";  break;
00937     case POOM: return "blue";       break;
00938     case SPAN: return "red";        break;
00939     default:   return "black";      break;
00940     }
00941 }

char* nodefillcolor typecorecrum ptr  ) 
 

???

(to be defined)

Definition at line 951 of file test.cxx.

References typecorecrumhedr::cenftype, GRAN, POOM, SPAN, and typecorecrum.

Referenced by graphcrum().

00953 {
00954     switch (ptr->cenftype) {
00955     case GRAN: return "palegreen";  break;
00956     case POOM: return "powderblue"; break;
00957     case SPAN: return "pink";       break;
00958     default:   return "black";      break;
00959     }
00960 }

char * nodeid typecorecrum ptr,
char *  s
 

???

(to be defined)

Definition at line 908 of file test.cxx.

References typecorecrumhedr::cenftype, GRAN, POOM, SPAN, and typecorecrum.

Referenced by graphcrum(), and graphwholesubtree().

00911 {
00912     char c;
00913 
00914     switch (ptr->cenftype) {
00915     case GRAN:  c = 'G';  break; // GRAN
00916     case SPAN:  c = 'S';  break; // SPAN
00917     case POOM:  c = 'P';  break; // POOM
00918     default:    c = 'x';  break;
00919     }
00920     sprintf(s, "%c%08X", c, (int) ptr);
00921     return s;
00922 }

char* safetext char *  s  ) 
 

???

(to be defined)

Definition at line 885 of file test.cxx.

Referenced by graphcrum().

00887 {
00888     static char buffer[11];
00889     char *p = buffer;
00890 
00891     while (*s && p < &buffer[ sizeof(buffer)-2 ]) {
00892         if (!isalnum(*s))
00893             *p++ = '\\';
00894         *p++ = *s++;
00895     }
00896     *p = '\0';
00897     return buffer;
00898 }

void showgranwids typecorecrum crum,
int  down,
Tumbler retptr
 

???

(to be defined)

Definition at line 1607 of file test.cxx.

References clear, typecorecrumhedr::cwid, typewid::dsas, GRANORGL, typecorecrumhedr::height, L, movetumbler, puttumbler(), typecorecrumhedr::rightbro, tumbleradd, tumblereq(), typecorecrum, and WIDTH.

Referenced by dumpgranfwids().

01611 {                                      /* down is distance from top */
01612 #ifndef DISTRIBUTION
01613     typecorecrum *ptr;
01614     Tumbler subtreewid;
01615     int i;
01616 
01617     L("\n");
01618     clear(retptr, sizeof(*retptr));
01619 
01620     for (i = 0; i < down; ++i)
01621         L("        ");
01622 
01623     L("%x (%d%c) < ", (int) crum, crum->height, (crum->modified ? 'M' : '-'));
01624     puttumbler(stderr, &crum->cwid.dsas[WIDTH]);
01625     L(" >");
01626     if (crum->height != 0) {
01627         if (((typecuc *) crum)->leftson) {
01628             for (ptr = ((typecuc *) crum)->leftson; ptr; ptr = ptr->rightbro) {
01629                 tumbleradd(retptr, &ptr->cwid.dsas[WIDTH], retptr);
01630                 showgranwids(ptr, down + 1, &subtreewid);
01631                 if (!tumblereq(&subtreewid, &ptr->cwid.dsas[WIDTH])) {
01632 
01633                     L("\n%d level crum\'s wid and result from subtree don\'t match\n", crum->height);
01634                     L("father wid ");
01635                     puttumbler(stderr, &ptr->cwid.dsas[WIDTH]);
01636 
01637                     L("\nreturned wid ");
01638                     puttumbler(stderr, &subtreewid);
01639 
01640                     L("\n");
01641                 }
01642             }
01643         } else {
01644             L(" disksonloaf = %x ", ((typecuc *) crum)->sonorigin.diskblocknumber);
01645             movetumbler(&crum->cwid.dsas[WIDTH], retptr);
01646 /* so that lacking incore sons will not cause error */
01647         }
01648     } else if (((typecbc *) crum)->cinfo.infotype == GRANORGL) {
01649         if (((typecbc *) crum)->cinfo.granstuff.orglstuff.orglincore)
01650             L(" orgl %x ", (int) ((typecbc *) crum)->cinfo.granstuff.orglstuff.orglptr);
01651         else
01652             L(" diskorgl %x", ((typecbc *) crum)->cinfo.granstuff.orglstuff.diskorglptr);
01653 
01654         movetumbler(&crum->cwid.dsas[WIDTH], retptr);
01655     } else
01656         movetumbler(&crum->cwid.dsas[WIDTH], retptr);
01657 #endif
01658 }

void showistream typecuc granfptr  ) 
 

???

(to be defined)

Definition at line 1430 of file test.cxx.

References dumpistreamgr().

Referenced by examine().

01432 {
01433 #ifndef DISTRIBUTION
01434     //UNUSED int temp;
01435 
01436 /* temp = debug; debug = 5; */
01437     dumpistreamgr(granfptr);
01438 /* debug = temp; */
01439 #endif
01440 }

void showpoomwisps typecuc crum,
int  down
 

???

(to be defined)

Definition at line 1691 of file test.cxx.

References findleftson(), typecuc::height, I, L, puttumbler(), typecorecrumhedr::rightbro, typecorecrum, and V.

Referenced by dumppoomwisps().

01694 {                                      /* down is distance from top */
01695 #ifndef DISTRIBUTION
01696     typecorecrum *ptr;
01697     int i;
01698 
01699     L("\n");
01700 
01701     for (i = 0; i < down; ++i)
01702         L("   ");
01703 
01704     L("%x (%d%c) <Idsp ", (int) crum, crum->height, (crum->modified ? 'M' : '-'));
01705     puttumbler(stderr, &crum->cdsp.dsas[I]);
01706 
01707     L(",Vdsp ");
01708     puttumbler(stderr, &crum->cdsp.dsas[V]);
01709 
01710     L(" > <Iwid ");
01711     puttumbler(stderr, &crum->cwid.dsas[I]);
01712 
01713     L(",Vwid ");
01714     puttumbler(stderr, &crum->cwid.dsas[V]);
01715 
01716     L(" >");
01717     if (crum->height != 0) {
01718         if (crum->leftson) {
01719             for (ptr = findleftson(crum); ptr; ptr = ptr->rightbro) {
01720                 showpoomwisps((typecuc *) ptr, down + 1);
01721             }
01722         } else {
01723             L(" disksonloaf = %x ", crum->sonorigin.diskblocknumber);
01724         }
01725     }
01726 #endif
01727 }

void showspanf typecuc spanfptr  ) 
 

???

(to be defined)

Definition at line 1450 of file test.cxx.

References clear, doshowspanf(), typecuc::height, L, typecorecrum, and typedsp.

Referenced by examine(), and rearrangend().

01452 {
01453 #ifndef DISTRIBUTION
01454     typedsp offset;
01455     clear(&offset, sizeof(typedsp));
01456 
01457     int enfheight = spanfptr->height;
01458 
01459     L("\n");
01460     doshowspanf((typecorecrum *) spanfptr, &offset, enfheight);
01461 #endif
01462 }

void showspanfcrum typecorecrum crumptr,
typedsp offsetptr,
int  enfheight
 

???

(to be defined)

Definition at line 1499 of file test.cxx.

References typecorecrumhedr::cdsp, typecorecrumhedr::cenftype, typecorecrumhedr::cwid, typewid::dsas, dspadd(), typecorecrumhedr::height, L, ORGLRANGE, puttumbler(), SPANRANGE, typecorecrum, and typedsp.

Referenced by doshowspanf().

01503 {
01504 #ifndef DISTRIBUTION
01505     int depth;
01506     typedsp lstream;
01507 
01508     for (depth = enfheight - crumptr->height; depth--;)
01509         L("  ");
01510 
01511     L("[spandsp");
01512     dspadd(offsetptr, &crumptr->cdsp, &lstream, crumptr->cenftype);
01513     puttumbler(stderr, &lstream.dsas[SPANRANGE]);
01514 
01515     L(" ,spanwid  ");
01516     puttumbler(stderr, &crumptr->cwid.dsas[SPANRANGE]);
01517 
01518     L("]\n");
01519     for (depth = enfheight - crumptr->height; depth--;)
01520         L("  ");
01521 
01522     L("[orgldsp ");
01523     puttumbler(stderr, &lstream.dsas[ORGLRANGE]);
01524 
01525     L(" ,orglwid  ");
01526     puttumbler(stderr, &crumptr->cwid.dsas[ORGLRANGE]);
01527 
01528     L("]   ");
01529     if (crumptr->height == 0)
01530         puttumbler(stderr, &((type2dcbc *) crumptr)->c2dinfo.homedoc);
01531 
01532     L("\n\n");
01533 #endif
01534 }

void showsubtree typecorecrum father  ) 
 

???

(to be defined)

Definition at line 1410 of file test.cxx.

References dumpwholesubtree(), and typecorecrum.

Referenced by showenfilades(), and showorgl().

01412 {
01413 #ifndef DISTRIBUTION
01414     //UNUSED int temp;
01415 
01416 /* temp = debug; debug = 5; */
01417     dumpwholesubtree((typecuc *) father);
01418 /* debug = temp; */
01419 #endif
01420 }

typecorecrum* sonoriginok typecorecrum father  ) 
 

???

(to be defined)

Definition at line 1990 of file test.cxx.

References typecorecrum.

01992 {
01993     return father;                     /* 
01994                                         * if (!father) return (father); if
01995                                         * (father->height == 0) return
01996                                         * (father); if
01997                                         * (father->sonorigin.diskblocknumber
01998                                         * == -1) return (father); if
01999                                         * (goodblock
02000                                         * (father->sonorigin.diskblocknumber))
02001                                         * return (father); dumpsubtree
02002                                         * (father); L("enter y to
02003                                         * procede\n"); if(getchar() == 'y') {
02004                                         * getchar(); return(father); } assert(0);
02005                                         * "Bad Sonorigin"; return(NULL);// 
02006                                         * for lint// */
02007 }

void teststack  ) 
 

???

(to be defined)

Definition at line 1947 of file test.cxx.

01948 {
01949     //UNUSED int testloc;
01950 
01951 /* checkalloc (""); */
01952 }

void yesdump typecorecrum ptr  ) 
 

???

(to be defined)

Definition at line 1100 of file test.cxx.

References dump(), and typecorecrum.

01102 {                                      /* because dbx has a builtin dump name * * conflict */
01103 #ifndef DISTRIBUTION
01104     dump(ptr);
01105 #endif
01106 }


Variable Documentation

int debug
 

Definition at line 111 of file test.cxx.

Referenced by assertspecisstring(), checkalloc(), checkitem(), dumpcontext(), dumpistreamgr(), dumpitem(), dumptumbler(), fetchorglgr(), finddocscontainingsp(), findlinksfromtothreesp(), foo(), foocontext(), foocontextlist(), foocrum(), foodec(), foodsp(), foohex(), fooitem(), fooitemset(), foospan(), foospanset(), footumbler(), foowid(), insertpm(), intersectlinksets(), ispanset2vstuffset(), ispansetandspecsets2spanpairset(), main(), makecontextfromcbc(), makeroomonleftnd(), onitemlist(), retrieveendsetsfromspanf(), setdebug(), sourceunixcommand(), and testforreservedness().

typecorecrum* grimreaper
 

Definition at line 108 of file test.cxx.

Referenced by checkenftypes(), checkthebleedingcrum(), createcrum(), ealloc(), freecrum(), grimlyreap(), initgrimreaper(), reap(), and testforreservedness().

long nolread
 

Definition at line 116 of file test.cxx.

Referenced by actuallyreadrawloaf(), and ioinfo().

long nowread [static]
 

Definition at line 117 of file test.cxx.

Referenced by ioinfo().

int numfoo = NUMDISKBLOCKSINLOAF
 

Definition at line 110 of file test.cxx.

int reservnumber
 

Definition at line 109 of file test.cxx.


Generated on Sun Aug 21 04:18:39 2005 for Udanax-Green by doxygen1.3.4