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

Go to the source code of this file.
Functions | |
| bool | insertspanf (Session *sess, typespanf spanfptr, IStreamAddr *isaptr, typesporglset sporglset, int spantype) |
| ??? | |
| bool | findlinksfromtothreesp (Session *sess, typespanf spanfptr, typespecset fromvspecset, typespecset tovspecset, typespecset threevspecset, typeispan *orglrange, typelinkset *linksetptr) |
| ??? | |
| bool | findnumoflinksfromtothreesp (Session *sess, typespanf spanfptr, typespecset fromvspecset, typespecset tovspecset, typespecset threevspecset, typeispan *orglrange, int *numptr) |
| ??? | |
| bool | findnextnlinksfromtothreesp (Session *sess, typespecset fromvspecset, typespecset tovspecset, typespecset threevspecset, typeispan *orglrangeptr, IStreamAddr *lastlinkisaptr, typelinkset *nextlinksetptr, int *nptr) |
| ??? | |
| bool | finddocscontainingsp (Session *sess, typespanset ispanset, typelinkset *addresssetptr) |
| ??? | |
| bool | retrievesporglsetinrange (Session *sess, typesporglset sporglptr, typespan *whichspace, typesporglset *sporglsetptr) |
| ??? | |
| bool | retrieveendsetsfromspanf (Session *sess, typespecset specset, typespecset *fromsetptr, typespecset *tosetptr, typespecset *threesetptr) |
| ??? | |
(to be defined)
Definition in file spanf1.cxx.
|
||||||||||||||||
|
??? (to be defined)
Definition at line 312 of file spanf1.cxx. References typeaddress::address, beheadtumbler(), clear, contextfree(), debug, DOCISPAN, typewid::dsas, fooitemset(), isinlinklist(), typeaddress::itemid, L, LINKID, movetumbler, typespan::next, typeaddress::next, ContextBase::nextcontext, NULL, onitemlist(), ORGLRANGE, retrieverestricted(), spanf, SPANRANGE, typespan::stream, ContextBase::totaloffset, tumblerincrement(), typeitemset, typelink, typelinkset, typespanset, and typespan::width. Referenced by dofinddocscontaining().
00313 : User's session context 00314 typespanset ispanset, 00315 typelinkset *addresssetptr) 00316 { 00317 Tumbler docid; 00318 Context *context, *c; 00319 typelinkset *headptr; 00320 typelink document; 00321 typespan docspace; 00322 00323 #ifndef DISTRIBUTION 00324 if (debug) { 00325 L("\nFINDDOCSCONTAININGsp\n"); 00326 fooitemset("", (typeitem *) ispanset); 00327 } 00328 #endif 00329 00330 headptr = addresssetptr; 00331 *addresssetptr = NULL; 00332 clear(&docspace, sizeof(typespan)); 00333 tumblerincrement(&docspace.stream, 0, DOCISPAN, &docspace.stream); 00334 tumblerincrement(&docspace.width, 0, 1, &docspace.width); 00335 00336 for (; ispanset; ispanset = ispanset->next) { 00337 context = retrieverestricted((typecuc *) spanf, &docspace, ORGLRANGE, ispanset, SPANRANGE, (IStreamAddr *) NULL); 00338 00339 for (c = context; c; c = (Context *) c->nextcontext) { 00340 movetumbler(&c->totaloffset.dsas[ORGLRANGE], &docid); 00341 beheadtumbler(&docid, &document.address); 00342 if (isinlinklist(*headptr, &document.address)) 00343 continue; 00344 00345 document.itemid = LINKID; 00346 document.next = NULL; 00347 addresssetptr = (typelinkset *) onitemlist(sess, (typeitem *) & document, (typeitemset *) addresssetptr); 00348 } 00349 contextfree(context); 00350 } 00351 00352 #ifndef DISTRIBUTION 00353 if (debug) 00354 fooitemset("", (typeitem *) *headptr); 00355 #endif 00356 00357 return true; 00358 } |
|
||||||||||||||||||||||||||||||||
|
??? (to be defined)
Definition at line 153 of file spanf1.cxx. References debug, intersectlinksets(), L, LINKFROMSPAN, LINKTHREESPAN, LINKTOSPAN, NOBERTREQUIRED, NULL, specset2sporglset(), sporglset2linkset(), typeispan, typelinkset, typespecset, and typesporglset. Referenced by dofindlinksfromtothree(), findnextnlinksfromtothreesp(), and findnumoflinksfromtothreesp().
00154 : User's session context 00155 typespanf spanfptr, 00156 typespecset fromvspecset, 00157 typespecset tovspecset, 00158 typespecset threevspecset, 00159 typeispan *orglrange, 00160 typelinkset *linksetptr) 00161 { 00162 typesporglset fromsporglset; 00163 typesporglset tosporglset; 00164 typesporglset threesporglset; 00165 typelinkset fromlinkset; 00166 typelinkset tolinkset; 00167 typelinkset threelinkset; 00168 bool olddebug = debug; 00169 00170 #ifndef DISTRIBUTION 00171 if (debug) { 00172 L("findlinksfromtothreesp fromset = %x, toset = %x, threeset = %x\n", (int) fromvspecset, (int) tovspecset, 00173 (int) threevspecset); 00174 } 00175 #endif 00176 00177 fromlinkset = tolinkset = threelinkset = NULL; 00178 00179 if (fromvspecset) 00180 specset2sporglset(sess, fromvspecset, &fromsporglset, NOBERTREQUIRED); 00181 00182 if (tovspecset) 00183 specset2sporglset(sess, tovspecset, &tosporglset, NOBERTREQUIRED); 00184 00185 if (threevspecset) 00186 specset2sporglset(sess, threevspecset, &threesporglset, NOBERTREQUIRED); 00187 00188 if (fromvspecset) { 00189 sporglset2linkset(sess, (typecuc *) spanfptr, fromsporglset, &fromlinkset, orglrange, LINKFROMSPAN); 00190 if (!fromlinkset) { 00191 *linksetptr = NULL; 00192 debug = olddebug; 00193 return true; 00194 } 00195 } 00196 00197 if (tovspecset) { 00198 sporglset2linkset(sess, (typecuc *) spanfptr, tosporglset, &tolinkset, orglrange, LINKTOSPAN); 00199 if (!tolinkset) { 00200 *linksetptr = NULL; 00201 debug = olddebug; 00202 return true; 00203 } 00204 } 00205 00206 if (threevspecset) { 00207 sporglset2linkset(sess, (typecuc *) spanfptr, threesporglset, &threelinkset, orglrange, LINKTHREESPAN); 00208 if (!threelinkset) { 00209 *linksetptr = NULL; 00210 debug = olddebug; 00211 return true; 00212 } 00213 } 00214 00215 intersectlinksets(sess, fromlinkset, tolinkset, threelinkset, linksetptr); 00216 debug = olddebug; 00217 return true; 00218 } |
|
||||||||||||||||||||||||||||||||||||
|
??? (to be defined)
Definition at line 258 of file spanf1.cxx. References typeaddress::address, findlinksfromtothreesp(), iszerotumbler, typeaddress::next, NULL, spanf, tumblereq(), typeispan, typelinkset, and typespecset. Referenced by dofindnextnlinksfromtothree().
00259 : User's session context 00260 typespecset fromvspecset, 00261 typespecset tovspecset, 00262 typespecset threevspecset, 00263 typeispan *orglrangeptr, 00264 IStreamAddr *lastlinkisaptr, 00265 typelinkset *nextlinksetptr, 00266 int *nptr) 00267 { 00268 int n; 00269 typelinkset linkset; 00270 00271 n = 0; 00272 *nextlinksetptr = NULL; 00273 00274 if (!findlinksfromtothreesp(sess, spanf, fromvspecset, tovspecset, threevspecset, orglrangeptr, &linkset)) 00275 return false; 00276 00277 if (iszerotumbler(lastlinkisaptr)) { 00278 *nextlinksetptr = linkset; 00279 } else { 00280 for (; linkset; linkset = linkset->next) { 00281 if (tumblereq(&linkset->address, lastlinkisaptr)) { 00282 *nextlinksetptr = linkset->next; 00283 break; 00284 } 00285 } 00286 } 00287 00288 if (!linkset) { 00289 *nextlinksetptr = NULL; 00290 *nptr = 0; 00291 return true; 00292 } 00293 00294 for (linkset = *nextlinksetptr; linkset; linkset = linkset->next) { 00295 if (++n >= *nptr) { 00296 linkset->next = NULL; 00297 break; 00298 } 00299 } 00300 *nptr = n; 00301 return true; 00302 } |
|
||||||||||||||||||||||||||||||||
|
??? (to be defined)
Definition at line 228 of file spanf1.cxx. References findlinksfromtothreesp(), typeaddress::next, typeispan, typelinkset, and typespecset. Referenced by dofindnumoflinksfromtothree().
00229 : User's session context 00230 typespanf spanfptr, 00231 typespecset fromvspecset, 00232 typespecset tovspecset, 00233 typespecset threevspecset, 00234 typeispan *orglrange, 00235 int *numptr) 00236 { 00237 typelinkset linkset; 00238 int n; 00239 00240 if (!findlinksfromtothreesp(sess, spanfptr, fromvspecset, tovspecset, threevspecset, orglrange, &linkset)) 00241 return (false); 00242 00243 for (n = 0; linkset; linkset = linkset->next, ++n) 00244 ; 00245 00246 *numptr = n; 00247 return true; 00248 } |
|
||||||||||||||||||||||||
|
??? (to be defined)
Definition at line 102 of file spanf1.cxx. References assert, clear, typewid::dsas, type2dbottomcruminfo::homedoc, insertnd(), ISPANID, Tumbler::mantissa, movetumbler, ORGLRANGE, prefixtumbler(), SPANRANGE, SPORGLID, TEXTID, tumblerclear, tumblerjustify(), typedsp, typeispan, and typesporglset. Referenced by docopy(), docopyinternal(), and insertendsetsinspanf().
00103 : User's session context 00104 typespanf spanfptr, 00105 IStreamAddr *isaptr, 00106 typesporglset sporglset, 00107 int spantype) 00108 { 00109 typedsp crumorigin; 00110 typewid crumwidth; 00111 Tumbler lstream, lwidth; 00112 type2dbottomcruminfo linfo; /* zzz 2dinfo ? fix ? 5/27/84 ----- */ 00113 00114 prefixtumbler(isaptr, spantype, &crumorigin.dsas[ORGLRANGE]); 00115 tumblerclear(&crumwidth.dsas[ORGLRANGE]); 00116 clear(&linfo, sizeof(linfo)); 00117 for (; sporglset; sporglset = (typesporglset) ((typeitemheader *) sporglset)->next) { 00118 if (((typeitemheader *) sporglset)->itemid == ISPANID) { 00119 movetumbler(&((typeispan *) sporglset)->stream, &lstream); 00120 movetumbler(&((typeispan *) sporglset)->width, &lwidth); 00121 movetumbler(isaptr, &linfo.homedoc); 00122 } else if (((typeitemheader *) sporglset)->itemid == SPORGLID) { 00123 movetumbler(&((typesporgl *) sporglset)->sporglorigin, &lstream); 00124 movetumbler(&((typesporgl *) sporglset)->sporglwidth, &lwidth); 00125 movetumbler(&((typesporgl *) sporglset)->sporgladdress, &linfo.homedoc); 00126 } else if (((typeitemheader *) sporglset)->itemid == TEXTID) { 00127 movetumbler(isaptr, &lstream); 00128 00129 /* create lwidth out of sporglset->length */ 00130 tumblerclear(&lwidth); 00131 lwidth.mantissa[1] = ((typetext *) sporglset)->length; 00132 tumblerjustify(&lwidth); 00133 00134 movetumbler(isaptr, &linfo.homedoc); 00135 } else 00136 assert(0); // insertspanf - bad itemid 00137 00138 movetumbler(&lstream, &crumorigin.dsas[SPANRANGE]); 00139 movetumbler(&lwidth, &crumwidth.dsas[SPANRANGE]); 00140 insertnd(sess, (typecuc *) spanfptr, &crumorigin, &crumwidth, &linfo, SPANRANGE); 00141 } 00142 return true; 00143 } |
|
||||||||||||||||||||||||
|
??? (to be defined)
Definition at line 413 of file spanf1.cxx. References clear, debug, fooitemset(), L, LINKFROMSPAN, linksporglset2specset(), LINKTHREESPAN, LINKTOSPAN, Tumbler::mantissa, NOBERTREQUIRED, NULL, retrievesporglsetinrange(), specset2sporglset(), typespan::stream, typespecset, typesporglset, and typespan::width. Referenced by doretrieveendsets().
00414 : User's session context 00415 typespecset specset, 00416 typespecset *fromsetptr, 00417 typespecset *tosetptr, 00418 typespecset *threesetptr) 00419 { 00420 typespan fromspace, tospace, threespace; 00421 typesporglset sporglset; 00422 typesporglset fromsporglset; 00423 typesporglset tosporglset; 00424 typesporglset threesporglset; 00425 bool bang(), retrievesporglsetinrange(), linksporglset2specset(); 00426 bool temp; 00427 00428 #ifndef DISTRIBUTION 00429 if (debug) { 00430 L("retrieveendsetsfromspanf\n"); 00431 fooitemset("", (typeitem *) specset); 00432 } 00433 #endif 00434 00435 clear(&fromspace, sizeof(typespan)); 00436 clear(&tospace, sizeof(typespan)); 00437 clear(&threespace, sizeof(typespan)); 00438 00439 fromspace.stream.mantissa[0] = LINKFROMSPAN; 00440 fromspace.width.mantissa[0] = 1; 00441 00442 tospace.stream.mantissa[0] = LINKTOSPAN; 00443 tospace.width.mantissa[0] = 1; 00444 00445 threespace.stream.mantissa[0] = LINKTHREESPAN; 00446 threespace.width.mantissa[0] = 1; 00447 00448 fromsporglset = tosporglset = threesporglset = NULL; 00449 00450 if (!(specset2sporglset(sess, specset, &sporglset, NOBERTREQUIRED) 00451 && retrievesporglsetinrange(sess, sporglset, &fromspace, &fromsporglset) 00452 && linksporglset2specset(sess, &((typevspec *) specset)->docisa, fromsporglset, fromsetptr, NOBERTREQUIRED) 00453 && retrievesporglsetinrange(sess, sporglset, &tospace, &tosporglset) 00454 && linksporglset2specset(sess, &((typevspec *) specset)->docisa, tosporglset, tosetptr, NOBERTREQUIRED))) { 00455 return false; 00456 } 00457 if (threesetptr) { 00458 temp = (retrievesporglsetinrange(sess, sporglset, &threespace, &threesporglset) 00459 && linksporglset2specset(sess, &((typevspec *) specset)->docisa, threesporglset, threesetptr, 00460 NOBERTREQUIRED)); 00461 return temp; 00462 } 00463 return true; 00464 } |
|
||||||||||||||||||||
|
??? (to be defined)
Definition at line 368 of file spanf1.cxx. References contextfree(), contextintosporgl(), typesporgl::next, type2dcontext::nextcontext, NULL, ORGLRANGE, retrieverestricted(), spanf, SPANRANGE, typesporglset, and typesporglitem::xxxxsporgl. Referenced by retrieveendsetsfromspanf().
00369 : User's session context 00370 typesporglset sporglptr, 00371 typespan *whichspace, 00372 typesporglset *sporglsetptr) 00373 { 00374 Context *context, *c, *tmp; 00375 typesporgl *sporglset; 00376 00377 for (; sporglptr; sporglptr = (typesporglset) sporglptr->xxxxsporgl.next) { 00378 context = retrieverestricted((typecuc *) spanf, (typespan *) sporglptr, SPANRANGE, whichspace, ORGLRANGE, (IStreamAddr *) NULL 00379 /* kluge to make links show thru to version &sporglptr->sporgladdress */ ); 00380 00381 /* dumpcontextlist(context); */ 00382 for (c = context; c;) { 00383 sporglset = new(sess) typesporgl; 00384 contextintosporgl((type2dcontext *) c, (Tumbler *) NULL, sporglset, SPANRANGE); 00385 *sporglsetptr = (typesporglset) sporglset; 00386 sporglsetptr = (typesporglset *) & sporglset->next; 00387 00388 tmp = (Context *) c->nextcontext; 00389 00390 /* 00391 * if (c->contexttype == GRAN) 00392 * --contextnum; 00393 * else 00394 * --c2dontextnum; 00395 * efree((char*)c); 00396 */ 00397 00398 c = tmp; 00399 } 00400 contextfree(context); 00401 } 00402 return true; 00403 } |
1.3.4