Home | History | Annotate | Download | only in lib

Lines Matching refs:dt

54   - dt consists of optional attribute mapping tables and a non-empty
64 - dt-kb = header inputmaptables outputmaptables tree
235 /* object : Dt*KnowledgeBase
263 kdt_subobj_t dt;
269 kdt_subobj_t dt;
275 kdt_subobj_t dt;
281 kdt_subobj_t dt;
287 kdt_subobj_t dt;
293 kdt_subobj_t dt;
434 kdt_subobj_t *dt;
442 dt = &(dtposp->dt);
443 dt->type = PICOKDT_KDTTYPE_POSP;
444 if ((status = kdtDtInitialize(this, common, dt)) != PICO_OK) {
447 if ((status = kdtDtCheck(this, common, dt, PICOKDT_NRATT_POSP,
467 kdt_subobj_t *dt;
475 dt = &(dtposd->dt);
476 dt->type = PICOKDT_KDTTYPE_POSD;
477 if ((status = kdtDtInitialize(this, common, dt)) != PICO_OK) {
480 if ((status = kdtDtCheck(this, common, dt, PICOKDT_NRATT_POSD,
500 kdt_subobj_t *dt;
508 dt = &(dtg2p->dt);
509 dt->type = PICOKDT_KDTTYPE_G2P;
510 if ((status = kdtDtInitialize(this, common, dt)) != PICO_OK) {
514 if ((status = kdtDtCheck(this, common, dt, PICOKDT_NRATT_G2P,
534 kdt_subobj_t *dt;
542 dt = &(dtphr->dt);
543 dt->type = PICOKDT_KDTTYPE_PHR;
544 if ((status = kdtDtInitialize(this, common,dt)) != PICO_OK) {
548 if ((status = kdtDtCheck(this, common, dt, PICOKDT_NRATT_PHR,
568 kdt_subobj_t *dt;
576 dt = &(dtacc->dt);
577 dt->type = PICOKDT_KDTTYPE_ACC;
578 if ((status = kdtDtInitialize(this, common, dt)) != PICO_OK) {
582 if ((status = kdtDtCheck(this, common, dt, PICOKDT_NRATT_ACC,
602 kdt_subobj_t *dt;
610 dt = &(dtpam->dt);
611 dt->type = PICOKDT_KDTTYPE_PAM;
612 if ((status = kdtDtInitialize(this, common, dt)) != PICO_OK) {
616 if ((status = kdtDtCheck(this, common, dt, PICOKDT_NRATT_PAM,
827 Input : this handle to a dt subobj
1213 static picoos_uint8 kdtMapInFixed(const kdt_subobj_t *dt,
1231 if (imtnr >= dt->inpmaptable[pos++]) { /* outside tablenr range? */
1233 dt->inpmaptable[pos-1], imtnr));
1239 pos = dt->beg_offset[imtnr];
1243 lentable = ((picoos_uint16)(dt->inpmaptable[pos+1])) << 8 |
1244 dt->inpmaptable[pos];
1249 if (dt->inpmaptable[pos] == PICOKDT_MTTYPE_EMPTY) {
1254 } else if (dt->inpmaptable[pos] == PICOKDT_MTTYPE_BYTE) {
1256 } else if (dt->inpmaptable[pos] == PICOKDT_MTTYPE_WORD) {
1260 PICODBG_ERROR(("wrong table type %d", dt->inpmaptable[pos]));
1266 *outfallbackval = ((picoos_uint16)(dt->inpmaptable[pos+1])) << 8 |
1267 dt->inpmaptable[pos];
1273 if (inval == dt->inpmaptable[pos]) {
1283 if (inval == (((picoos_uint16)(dt->inpmaptable[pos+1])) << 8 |
1284 dt->inpmaptable[pos])) {
1302 static picoos_uint8 kdtMapInGraph(const kdt_subobj_t *dt,
1321 if ((imtnr >= dt->inpmaptable[pos++]) || /* outside tablenr range? */
1327 dt->inpmaptable[pos-1], imtnr, invalmaxlen, ilen));
1333 lentable = ((picoos_uint16)(dt->inpmaptable[pos+1])) << 8 |
1334 dt->inpmaptable[pos];
1339 lentable = ((picoos_uint16)(dt->inpmaptable[pos+1])) << 8 |
1340 dt->inpmaptable[pos];
1350 dt->inpmaptable[id], dt->inpmaptable[id]));
1356 if (dt
1365 *outfallbackval = ((picoos_uint16)(dt->inpmaptable[pos+1])) << 8 |
1366 dt->inpmaptable[pos];
1371 tlen = picobase_det_utf8_length(dt->inpmaptable[pos]);
1380 if (dt->inpmaptable[pos + j] != inval[j]) {
1400 static picoos_uint8 kdtMapOutFixed(const kdt_subobj_t *dt,
1411 nr = dt->outmaptable[PICOKDT_MTPOS_START + PICOKDT_MTPOS_TABLETYPE];
1430 nr = ((picoos_uint16)(dt->outmaptable[PICOKDT_MTPOS_START +
1432 | dt->outmaptable[PICOKDT_MTPOS_START + PICOKDT_MTPOS_NUMBER];
1436 *outval = dt->outmaptable[PICOKDT_MTPOS_START +
1439 *outval = ((picoos_uint16)(dt->outmaptable[PICOKDT_MTPOS_START +
1441 | dt->outmaptable[PICOKDT_MTPOS_START +
1455 static picoos_uint8 kdtReverseMapOutFixed(const kdt_subobj_t *dt,
1472 if (dt->outmaptable == NULL) {
1480 if (dt->outmaptable[pos++] != 1) { /* only one omt possible */
1481 PICODBG_ERROR(("check failed: nrtab: %d", dt->outmaptable[pos-1]));
1486 lentable = ((picoos_uint16)(dt->outmaptable[pos+1])) << 8 |
1487 dt->outmaptable[pos];
1492 /* if (dt->outmaptable[pos] == PICOKDT_MTTYPE_EMPTY), in
1496 if (dt->outmaptable[pos] == PICOKDT_MTTYPE_BYTE) {
1498 } else if (dt->outmaptable[pos] == PICOKDT_MTTYPE_WORD) {
1502 PICODBG_ERROR(("wrong table type %d", dt->outmaptable[pos]));
1508 *outfallbackval = ((picoos_uint16)(dt->outmaptable[pos+1])) << 8 |
1509 dt->outmaptable[pos];
1515 if (inval == dt->outmaptable[pos]) {
1525 if (inval == (((picoos_uint16)(dt->outmaptable[pos+1])) << 8 |
1526 dt->outmaptable[pos])) {
1550 kdt_subobj_t * dt = &(dtposd->dt);
1551 return kdtReverseMapOutFixed(dt,inval, outval, outfallbackval);
1556 static picoos_uint8 kdtMapOutVar(const kdt_subobj_t *dt,
1569 if (dt->outmaptable == NULL) {
1580 lentable = (((picoos_uint16)(dt->outmaptable[pos + 1])) << 8 |
1581 dt->outmaptable[pos]);
1585 if (dt->outmaptable[pos] != PICOKDT_MTTYPE_BYTETOVAR) {
1587 PICODBG_ERROR(("wrong table type %d", dt->outmaptable[pos]));
1594 nrinbytes = (((picoos_uint16)(dt->outmaptable[pos+1])) << 8 |
1595 dt->outmaptable[pos]);
1618 offset1 = (((picoos_uint16)(dt->outmaptable[off2ind - 1])) << 8 |
1619 dt->outmaptable[off2ind - 2]);
1621 *nr = (((picoos_uint16)(dt->outmaptable[off2ind + 1])) << 8 |
1622 dt->outmaptable[off2ind]) - offset1;
1643 outval[i] = dt->outmaptable[pos++];
1744 if (!kdtMapInGraph(&(dtposp->dt), invecpos,
1780 if (!kdtMapInGraph(&(dtposp->dt), invecpos,
1801 if (!kdtMapInGraph(&(dtposp->dt), i, chbuf[chbrear],
1812 if (!kdtMapInGraph(&(dtposp->dt), i,
1827 if (!kdtMapInFixed(&(dtposp->dt), KDT_POSP_SPECGRAPHATTPOS, i,
1838 dt), KDT_POSP_NRGRAPHSATTPOS, nrutfg,
1866 kdt_subobj_t *dt;
1869 dt = &(dtposp->dt);
1872 while ((rv = kdtAskTree(dt, dtposp->invec, PICOKDT_NRATT_POSP,
1876 PICODBG_DEBUG(("done: %d", dt->dclass));
1877 return ((rv == 0) && dt->dset);
1888 if (dtposp->dt.dset &&
1889 kdtMapOutFixed(&(dtposp->dt), dtposp->dt.dclass, &val)) {
1922 if (!kdtMapInFixed(&(dtposd->dt), i, input[i],
1949 kdt_subobj_t *dt;
1952 dt = &(dtposd->dt);
1955 while ((rv = kdtAskTree(dt, dtposd->invec, PICOKDT_NRATT_POSD,
1959 PICODBG_DEBUG(("done: %d", dt->dclass));
1960 if ((rv == 0) && dt->dset) {
1961 *treeout = dt->dclass;
1980 if (dtposd->dt.dset &&
1981 kdtMapOutFixed(&(dtposd->dt), dtposd->dt.dclass, &val)) {
2112 if (!kdtMapInGraph(&(dtg2p->dt), iAttr,
2149 if (!kdtMapInGraph(&(dtg2p->dt), iAttr,
2198 if (!kdtMapInFixed(&(dtg2p->dt), iAttr, inval,
2231 kdt_subobj_t *dt;
2234 dt = &(dtg2p->dt);
2237 while ((rv = kdtAskTree(dt, dtg2p->invec, PICOKDT_NRATT_G2P,
2241 PICODBG_TRACE(("done: %d", dt->dclass));
2242 if ((rv == 0) && dt->dset) {
2243 *treeout = dt->dclass;
2258 if (dtg2p->dt.dset &&
2259 kdtMapOutVar(&(dtg2p->dt), dtg2p->dt.dclass, &(dtvres->nr),
2312 if (!kdtMapInFixed(&(dtphr->dt), i, inval,
2337 kdt_subobj_t *dt;
2340 dt = &(dtphr->dt);
2343 while ((rv = kdtAskTree(dt, dtphr->invec, PICOKDT_NRATT_PHR,
2347 PICODBG_DEBUG(("done: %d", dt->dclass));
2348 return ((rv == 0) && dt->dset);
2359 if (dtphr->dt.dset &&
2360 kdtMapOutFixed(&(dtphr->dt), dtphr->dt.dclass, &val)) {
2415 if (!kdtMapInFixed(&(dtpam->dt), i, vec[i],
2467 kdt_subobj_t *dt;
2470 dt = &(dtpam->dt);
2473 while ((rv = kdtAskTree(dt, dtpam->invec, PICOKDT_NRATT_PAM,
2477 PICODBG_DEBUG(("done: %d", dt->dclass));
2478 return ((rv == 0) && dt->dset);
2489 if (dtpam->dt.dset &&
2490 kdtMapOutFixed(&(dtpam->dt), dtpam->dt.dclass, &val)) {
2559 if (!kdtReverseMapOutFixed(&(dtacc->dt), PICODATA_ACC0,
2571 if (!kdtMapInFixed(&(dtacc->dt), i, inval,
2599 kdt_subobj_t *dt;
2602 dt = &(dtacc->dt);
2605 while ((rv = kdtAskTree(dt, dtacc->invec, PICOKDT_NRATT_ACC,
2609 PICODBG_TRACE(("done: %d", dt->dclass));
2610 if ((rv == 0) && dt->dset) {
2611 *treeout = dt->dclass;
2626 if (dtacc->dt.dset &&
2627 kdtMapOutFixed(&(dtacc->dt), dtacc->dt.dclass, &val)) {