#include <memory.h>
#include "udanax.h"
Include dependency graph for corediskin.cxx:

Go to the source code of this file.
Functions | |
| void | hgetwiddsp (typecuc *ptr, char **loafptrptr) |
| ??? | |
| void | varunpackloaf (int insidediskblocknumber, typediskloaf *uloafptr, typecuc *father) |
| ??? | |
| void | initkluge (typecuc **granfptr, typecuc **spanfptr) |
| ??? | |
| typediskloaf * | lookinsideloaffor (int insidenumber, typediskloaf *uloafptr) |
| ??? | |
| void | unpackloaf (int insidediskblocknumber, typediskloaf *uloafptr, typecuc *father) |
| ??? | |
| void | hgetinfo (typecbc *ptr, char **loafptrptr) |
| ??? | |
| void | inloaf (typecuc *father) |
| ??? | |
| void | inorglinternal (typecbc *granorglptr, typeuberrawdiskloaf *crumptr) |
| ??? | |
| void | inorgl (typecbc *granorglptr) |
| ??? | |
(to be defined)
Definition in file corediskin.cxx.
|
||||||||||||
|
??? (to be defined) Definition at line 162 of file corediskin.cxx. References typecbc::cinfo, typediskloafptr::diskblocknumber, typegranorgl::diskorglptr, GRANORGL, typegranbottomcruminfo::granstuff, GRANTEXT, typecbc::height, hgetfromloaf(), humber, typegranbottomcruminfo::infotype, typediskloafptr::insidediskblocknumber, intof, is2dcrum(), lengthof, movmem, typegranstuff::orglstuff, typegrantext::textlength, typegrantext::textstring, typegranstuff::textstuff, tumblerptrtofixed(), and typecorecrum. Referenced by varunpackloaf().
00165 { /* this assumes ptr crum is ok except * for info */
00166 unsigned int temp;
00167
00168 if (!is2dcrum((typecorecrum *) ptr)) {
00169 hgetfromloaf(&ptr->cinfo.infotype, *loafptrptr);
00170 /* dump(ptr); */
00171 if (ptr->cinfo.infotype == GRANTEXT) {
00172 ptr->cinfo.granstuff.textstuff.textlength = intof((humber) * loafptrptr);
00173 (*loafptrptr) += lengthof((humber) * loafptrptr);
00174 movmem((*loafptrptr), ptr->cinfo.granstuff.textstuff.textstring, ptr->cinfo.granstuff.textstuff.textlength);
00175 (*loafptrptr) += ptr->cinfo.granstuff.textstuff.textlength;
00176 return;
00177 } else if (ptr->cinfo.infotype == GRANORGL) {
00178 ptr->cinfo.granstuff.orglstuff.diskorglptr.diskblocknumber = intof((humber) * loafptrptr);
00179
00180 /* if (temp == 0 || temp == -1) {
00181 * L("bad diskblocknumber = %d \n", temp);
00182 * assert(0); // boo in hgetinfo
00183 * }
00184 */
00185
00186 (*loafptrptr) += lengthof((humber) * loafptrptr);
00187 ptr->cinfo.granstuff.orglstuff.diskorglptr.insidediskblocknumber = intof((humber) * loafptrptr);
00188 (*loafptrptr) += lengthof((humber) * loafptrptr);
00189 return;
00190 } else {
00191 return;
00192 }
00193 } else {
00194 if (ptr->height) {
00195 /* looks like we got this all */
00196 } else {
00197
00198 temp = tumblerptrtofixed((humber) * loafptrptr, &((type2dcbc *) ptr)->c2dinfo.homedoc);
00199 (*loafptrptr) += temp;
00200 }
00201 }
00202 }
|
|
||||||||||||
|
??? (to be defined) Definition at line 425 of file corediskin.cxx. References typecuc::cdsp, typecuc::cenftype, typecuc::cwid, typewid::dsas, humber, tumblerptrtofixed(), and widsize. Referenced by inorglinternal(), and varunpackloaf().
00428 {
00429 unsigned int temp;
00430
00431 int nstreams = widsize(ptr->cenftype);
00432 typewid *wptr = &ptr->cdsp;
00433
00434 int i;
00435 for (i = 0; i < nstreams; ++i) {
00436 temp = tumblerptrtofixed((humber) * loafptrptr, &wptr->dsas[i]);
00437 *loafptrptr += temp;
00438 }
00439
00440 wptr = &ptr->cwid;
00441 for (i = 0; i < nstreams; ++i) {
00442 temp = tumblerptrtofixed((humber) * loafptrptr, &wptr->dsas[i]);
00443 *loafptrptr += temp;
00444 }
00445 }
|
|
||||||||||||
|
|
??? (to be defined) Definition at line 311 of file corediskin.cxx. References assert, typecuc::height, typediskloafptr::insidediskblocknumber, typecuc::leftson, readloaf(), typecuc::sonorigin, and unpackloaf(). Referenced by findleftson().
00313 {
00314 if (father->height == 0)
00315 assert(0); // inloaf on bottom crum
00316
00317 if (father->leftson)
00318 assert(0); // Its already got sons, and we aren't going to use pseudo-crums!
00319
00320 typediskloaf loaf;
00321 readloaf(&loaf, father->sonorigin);
00322 unpackloaf(father->sonorigin.insidediskblocknumber, &loaf, father);
00323 /* nchecknumofsons(father); */
00324 }
|
|
|
??? (to be defined) Definition at line 411 of file corediskin.cxx. References inorglinternal(), and NULL. Referenced by fetchorglgr(), and initkluge().
00413 {
00414 inorglinternal(granorglptr, (typeuberrawdiskloaf *) NULL);
00415 }
|
|
||||||||||||
|
??? (to be defined) Definition at line 334 of file corediskin.cxx. References assert, typecuc::cenftype, typecbc::cinfo, createcrum(), typediskloafptr::diskblocknumber, typegranorgl::diskorglptr, DISKPTRNULL, dump(), typegranbottomcruminfo::granstuff, hgetfromloaf(), hgetwiddsp(), typediskloafptr::insidediskblocknumber, typecuc::leftbroorfather, typecuc::numberofsons, typegranorgl::orglincore, typegranorgl::orglptr, typegranstuff::orglstuff, readloaf(), rejuvinate, typecuc::sonorigin, and typecorecrum. Referenced by deletefullcrumandgarbageddescendents(), and inorgl().
00337 {
00338 unsigned int temp, temp2;
00339
00340 typediskloaf loaf;
00341 readloaf(&loaf, granorglptr->cinfo.granstuff.orglstuff.diskorglptr);
00342
00343 char *loafp = (char *)&loaf;
00344
00345 int size;
00346 hgetfromloaf(&size, loafp);
00347 hgetfromloaf((int *) &temp, loafp); /* isapex */
00348 hgetfromloaf((int *) &temp, loafp);
00349 hgetfromloaf((int *) &temp2, loafp);
00350
00351 typecuc *ptr;
00352 if ( /* false&& */ crumptr) {
00353 ptr = (typecuc *) crumptr; /* ECH I DON'T LIKE THIS!!! */
00354 } else {
00355 ptr = (typecuc *) createcrum((int) temp, (int) temp2);
00356 }
00357
00358 ptr->cenftype = temp2;
00359 ptr->isapex = true;
00360 ptr->isleftmost = true;
00361 hgetfromloaf((int *) &temp, loafp);
00362
00363 ptr->numberofsons = temp;
00364 hgetfromloaf((int *) &temp, loafp);
00365 /* ptr->refcount = temp; */
00366
00367 hgetwiddsp(ptr, &loafp);
00368 hgetfromloaf((int *) &temp, loafp);
00369 ptr->sonorigin.diskblocknumber = temp;
00370
00371 if (ptr->sonorigin.diskblocknumber == 0) {
00372 #ifndef DISTRIBUTION
00373 dump((typecorecrum *) ptr);
00374 assert(0); // trying to write 0 block
00375 #else
00376 assert(0);
00377 #endif
00378 }
00379
00380 if (ptr->sonorigin.diskblocknumber == DISKPTRNULL) {
00381 #ifndef DISTRIBUTION
00382 dump((typecorecrum *) ptr);
00383 assert(0); // trying to write DSKPTRNULL block
00384 #else
00385 assert(0);
00386 #endif
00387 }
00388
00389 hgetfromloaf((int *) &temp, loafp);
00390
00391 ptr->sonorigin.insidediskblocknumber = temp;
00392 ptr->modified = false;
00393 ptr->leftbroorfather = (typecorecrum *) granorglptr;
00394
00395 granorglptr->cinfo.granstuff.orglstuff.orglptr = (typecuc *) ptr;
00396 granorglptr->cinfo.granstuff.orglstuff.orglincore = true;
00397 rejuvinate((typecorecrum *) ptr);
00398
00399 /* checknumofsons(ptr); */
00400 /* dump(ptr); */
00401 }
|
|
||||||||||||
|
??? (to be defined) Definition at line 129 of file corediskin.cxx. Referenced by varunpackloaf().
00132 {
00133 return uloafptr;
00134 }
|
|
||||||||||||||||
|
??? (to be defined) Definition at line 144 of file corediskin.cxx. References varunpackloaf(). Referenced by inloaf().
00148 {
00149 varunpackloaf(insidediskblocknumber, uloafptr, father);
00150 }
|
|
||||||||||||||||
|
??? (to be defined) Definition at line 212 of file corediskin.cxx. References adopt(), assert, typecuc::cenftype, createcrum(), DISKPTRNULL, dump(), dumphexstuff(), typecuc::height, hgetfromloaf(), hgetinfo(), hgetwiddsp(), humber, intof, L, lookinsideloaffor(), typecuc::numberofsons, RIGHTMOSTSON, and typecorecrum. Referenced by unpackloaf().
00216 {
00217 typediskloaf *xloafptr;
00218 typecuc *ptr;
00219 char *loafp;
00220 int numberofsonstoread;
00221 int height, enftype;
00222 int isapex, refcount;
00223 int size;
00224
00225 if (!uloafptr || !father || father->height <= 0)
00226 assert(0); // bad varunpackloaf call
00227
00228 xloafptr = lookinsideloaffor(insidediskblocknumber, uloafptr);
00229 loafp = (char *)xloafptr;
00230 /* loafp += 3; */
00231 hgetfromloaf(&size, loafp);
00232 hgetfromloaf(&isapex, loafp);
00233 /* L("isapex = %d\n",isapex); */
00234 if (isapex /*ISAPEX*/) {
00235 #ifndef DISTRIBUTION
00236 dumphexstuff((char *) uloafptr);
00237 dumphexstuff((char *) xloafptr);
00238 assert(0); // attempt to read apex in varumpackloaf
00239 #else
00240 assert(0);
00241 #endif
00242 }
00243 hgetfromloaf(&height, loafp);
00244
00245 if (height != father->height - 1) {
00246 #ifndef DISTRIBUTION
00247 dump((typecorecrum *) father);
00248 dumphexstuff((char *) uloafptr);
00249 L("next thing = %d\n", intof((humber) loafp));
00250 L("father height = %d %d\n", father->height, height);
00251 assert(0); // height mismatch in varunpackloaf
00252 #else
00253 assert(0);
00254 #endif
00255 }
00256 #ifdef glurg
00257 father->modified = false;
00258 #endif /* glurg */
00259 hgetfromloaf(&enftype, loafp);
00260
00261 if (enftype != father->cenftype)
00262 assert(0); // enftype mismatch in varunpackloaf
00263
00264 hgetfromloaf(&numberofsonstoread, loafp);
00265 hgetfromloaf(&refcount, loafp);
00266 father->numberofsons = 0;
00267 while (numberofsonstoread--) {
00268 ptr = (typecuc *) createcrum(height, enftype);
00269 adopt((typecorecrum *) ptr, RIGHTMOSTSON, (typecorecrum *) father);
00270 hgetwiddsp(ptr, &loafp);
00271 if (height != 0) {
00272 ptr->isapex = isapex;
00273 hgetfromloaf(&ptr->sonorigin.diskblocknumber, loafp);
00274 hgetfromloaf(&ptr->sonorigin.insidediskblocknumber, loafp);
00275
00276 if (ptr->sonorigin.diskblocknumber == 0) {
00277 #ifndef DISTRIBUTION
00278 dumphexstuff(loafp);
00279 dump((typecorecrum *) ptr);
00280 dumphexstuff((char *) uloafptr);
00281 assert(0); // trying to read 0 block
00282 #else
00283 assert(0);
00284 #endif
00285 }
00286 if (ptr->sonorigin.diskblocknumber == DISKPTRNULL) {
00287 #ifndef DISTRIBUTION
00288 dump((typecorecrum *) ptr);
00289 assert(0); // trying to read DISKPTRNULL block
00290 #else
00291 assert(0);
00292 #endif
00293 }
00294
00295 } else {
00296 ptr->isapex = false;
00297 hgetinfo((typecbc *) ptr, &loafp);
00298 }
00299 ptr->modified = false;
00300 }
00301 }
|
1.3.4