home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Database / CLIPR502.DOS / INCLUDE / RDD.API < prev    next >
Encoding:
Text File  |  1993-02-15  |  26.7 KB  |  811 lines

  1. /***
  2. *
  3. *  Rdd.api
  4. *
  5. *  C language definitions for the Clipper RDD API
  6. *
  7. *  Copyright (c) 1990-1993, Computer Associates International, Inc.
  8. *  All rights reserved.
  9. *
  10. */
  11.  
  12. #ifndef _ITEM_API
  13.    #include "item.api"
  14.  
  15. #endif
  16.  
  17.  
  18. /*
  19. *  DBFIELDINFO
  20. *  -----------
  21. *  The field structure.
  22. */
  23.  
  24. typedef struct
  25. {
  26.    BYTEP  name;            // FIELD (symbol) name
  27.    USHORT type;            // FIELD type
  28.    USHORT typeExtended;    // FIELD type extended
  29.    USHORT len;             // Overall FIELD length
  30.    USHORT dec;             // Decimal places of numeric FIELD
  31. } DBFIELDINFO;
  32.  
  33. typedef DBFIELDINFO far * DBFIELDINFOP;
  34.  
  35.  
  36.  
  37. /*
  38. *  DBOPENINFO
  39. *  ----------
  40. *  The Open Info structure.
  41. */
  42.  
  43. typedef struct
  44. {
  45.    USHORT area;      // Work Area number of the data store
  46.    BYTEP  name;      // The qualified name of the data store
  47.    BYTEP  alias;     // The logical name of the data store
  48.    BOOL   shared;    // Share mode of the data store
  49.    BOOL   readonly;  // Readonly mode of the data store
  50. } DBOPENINFO;
  51.  
  52. typedef DBOPENINFO far * DBOPENINFOP;
  53.  
  54.  
  55.  
  56. /*
  57. *  DBORDERCONDINFO
  58. *  ---------------
  59. *  The Create Order conditional Info structure.
  60. */
  61.  
  62. typedef struct _ORDERCONDINFO_
  63. {
  64.    BOOL  active;
  65.    BYTEP cFor;
  66.    ITEM  bFor;
  67.    ITEM  bWhile;
  68.    ITEM  bEval;
  69.    LONG  step;
  70.    LONG  startRecord;
  71.    LONG  nextCount;
  72.    LONG  record;
  73.    BOOL  rest;
  74.    BOOL  descending;
  75.    BOOL  scoped;
  76.    BOOL  all;
  77. } DBORDERCONDINFO;
  78.  
  79. typedef DBORDERCONDINFO far * DBORDERCONDINFOP;
  80.  
  81.  
  82.  
  83. /*
  84. *  DBORDERCREATE
  85. *  -------------
  86. *  The Create Order Info structure.
  87. */
  88.  
  89. typedef struct
  90. {
  91.    DBORDERCONDINFOP condition;  // conditional information
  92.    BYTEP            bagName;    // Name of the Order bag
  93.    BYTEP            ordName;    // Name of the Order
  94.    BOOL             unique;     // Flag to deterimine if all keys are unique
  95.  
  96.    ITEM             bExpr;      // Code block containing the KEY expression
  97.    ITEM             cExpr;      // String containing the KEY expression
  98. } DBORDERCREATEINFO;
  99.  
  100. typedef DBORDERCREATEINFO far * DBORDERCREATEINFOP;
  101.  
  102.  
  103.  
  104. /*
  105. *  DBORDERINFO
  106. *  -----------
  107. *  The Set Index Info structure.
  108. */
  109.  
  110. typedef struct
  111. {
  112.    ITEM orderBag;  // Name of the Order Bag
  113.    ITEM order;     // Name or Number of the Order
  114.  
  115.    ITEM result;    // Operation result
  116.    
  117. } DBORDERINFO;
  118.  
  119. typedef DBORDERINFO far * DBORDERINFOP;
  120.  
  121.  
  122.  
  123. /*
  124. *  DBSCOPEINFO
  125. *  -----------
  126. *  The Scope Info structure.
  127. */
  128.  
  129. typedef struct
  130. {
  131.    ITEM bFor;        // Code Block representation of a FOR clause
  132.    ITEM cFor;        // String representation of a FOR clause
  133.    ITEM bWhile;      // Code Block representation of a WHILE clause
  134.    ITEM cWhile;      // String representation of a WHILE clause
  135.    ITEM nNext;
  136.    ITEM nRecord;     // NEXT record
  137.    ITEM lRest;       // TRUE if start from the current record
  138. } DBSCOPEINFO;
  139.  
  140. typedef DBSCOPEINFO far * DBSCOPEINFOP;
  141.  
  142.  
  143.  
  144. /*
  145. *  DBFILTERINFO
  146. *  ------------
  147. *  The Filter Info structure.
  148. */
  149.  
  150. typedef struct
  151. {
  152.    ITEM bExpr;       // Block representation of the FILTER expression
  153.    ITEM cExpr;       // String representation of FILTER expression
  154. } DBFILTERINFO;
  155.  
  156. typedef DBFILTERINFO far * DBFILTERINFOP;
  157.  
  158.  
  159.  
  160. /*
  161. *  DBRELINFO
  162. *  ------------
  163. *  The Relationship Info structure.
  164. */
  165.  
  166. typedef struct _DBRELINFO_
  167. {
  168.    ITEM bExpr;       // Block representation of the relational SEEK key
  169.    ITEM cExpr;       // String representation of the relational SEEK key
  170.  
  171.    struct _WORKAREA_ far *parent; // The parent of this relation
  172.    struct _WORKAREA_ far *child;  // The parents children
  173.  
  174.    struct _DBRELINFO_ far *next;  // Next child or parent
  175.  
  176. } DBRELINFO;
  177.  
  178. typedef DBRELINFO far * DBRELINFOP;
  179.  
  180.  
  181.  
  182. /*
  183. *  DBEVALINFO
  184. *  ------------
  185. *  The Evaluation Info structure.
  186. *
  187. *  Contains information necessary for a block evaluation
  188. *  on each record of the workarea.
  189. */
  190.  
  191. typedef struct
  192. {
  193.    ITEM        bBlock;  // The bock to be evaluated
  194.    DBSCOPEINFO scope;   // Scope info that limits the evaluation
  195. } DBEVALINFO;
  196.  
  197. typedef DBEVALINFO far * DBEVALINFOP;
  198.  
  199.  
  200.  
  201. /*
  202. *  DBTRANSITEM
  203. *  ------------
  204. *  The Transfer Item structure.
  205. *
  206. *  Defines a single transfer item (usually a field) from
  207. *  one database to another. Used by DBTRANSINFO.
  208. */
  209.  
  210. typedef struct
  211. {
  212.    USHORT source;       // Field index number from the source
  213.    USHORT dest;         // Destination field index number
  214. } DBTRANSITEM;
  215.  
  216. typedef DBTRANSITEM far * DBTRANSITEMP;
  217.  
  218.  
  219.  
  220. /*
  221. *  DBTRANSINFO
  222. *  ------------
  223. *  The Transfer Info structure.
  224. *
  225. *  Defines a global transfer of data items from on workarea
  226. *  to another.
  227. */
  228.  
  229. typedef struct
  230. {
  231.    struct _WORKAREA_ far *dest;  // Pointer to dest work area
  232.    DBSCOPEINFO  scope;           // Scope to limit transfer
  233.  
  234.    USHORT       flags;           // Transfer attributes
  235.  
  236.    USHORT       itemCount;       // Number of items below
  237.    DBTRANSITEMP items;           // Array of items.
  238. } DBTRANSINFO;
  239.  
  240. typedef DBTRANSINFO far * DBTRANSINFOP;
  241.  
  242. #define DBTF_MATCH   0x0001
  243. #define DBTF_PUTREC  0x0002
  244.  
  245.  
  246.  
  247. /*
  248. *  DBSORTITEM
  249. *  ----------
  250. *  The Sort Item Structure.
  251. *
  252. *  An array of items that, together, indicate the key value to
  253. *  use while sorting data. The order of the array determines the 
  254. *  order of the sorting.
  255. */
  256.  
  257. typedef struct
  258. {
  259.    USHORT field;        // Index into the workarea->fields structure
  260.    USHORT flags;        // sort flags
  261. } DBSORTITEM;
  262.  
  263. typedef DBSORTITEM far * DBSORTITEMP;
  264.  
  265.  
  266.  
  267. /*
  268. *  DBSORTINFO
  269. *  ----------
  270. *  The Sort Info Structure
  271. *
  272. *  Information for a physical sort on the workarea.
  273. */
  274.  
  275. typedef struct
  276. {
  277.    DBTRANSINFO trans;      // Destination workarea transfer information
  278.  
  279.    DBSORTITEMP sortItems;  // Fields which compose the key values for the sort
  280.    USHORT      itemCount;  // the number of fields above
  281.  
  282. } DBSORTINFO;
  283.  
  284. typedef DBSORTINFO far * DBSORTINFOP;
  285.  
  286.  
  287.  
  288. /*
  289. *  DBLOCKINFO
  290. *  ----------
  291. *  The Lock Info Structure
  292. *
  293. *  Information for a record or file lock.
  294. */
  295.  
  296. typedef struct
  297. {
  298.    ULONG  record;
  299.    USHORT method;
  300.    BOOL   result;
  301. } DBLOCKINFO;
  302.  
  303. typedef DBLOCKINFO far * DBLOCKINFOP;
  304.  
  305.  
  306.  
  307. /*
  308. *  FIELDP
  309. *  ------
  310. *  The Field structure
  311. *
  312. *  This is the basic unit of access for a workarea.
  313. */
  314.  
  315. typedef struct _FIELD_
  316. {
  317.    USHORT  type;         // Field type
  318.    USHORT  typeExtended; // Field type - extended
  319.    USHORT  len;          // Field length
  320.    USHORT  dec;          // Decimal length
  321.    USHORT  area;         // Area this field resides in
  322.    FARP    sym;          // Symbol that represents the field
  323.  
  324.    struct _FIELD_ *next; // The next field in the list
  325.  
  326. } FIELD;
  327.  
  328. typedef FIELD far * FIELDP;
  329.  
  330.  
  331.  
  332. /*--------------------* WORKAREA structure *----------------------*/
  333.  
  334. /*
  335. *  WORKAREAP
  336. *  ---------
  337. *  The Workarea Structure
  338. *
  339. *  Information to administrate the workarea
  340. */
  341.  
  342. typedef struct _WORKAREA_
  343. {
  344.    struct _DBFUNCTABLE_ far * ftable; // Virtual method table for this workarea
  345.  
  346.    USHORT  area;           // The number assigned to this workarea
  347.    FARP    alias;          // Pointer to the alias symbol for this workarea
  348.  
  349.    USHORT fieldExtent;     // Total number of fields allocated
  350.    USHORT fieldCount;      // Total number of fields used
  351.    FIELDP fields;          // Pointer to an array of fields
  352.  
  353.    ITEM result;            // All purpose result holder
  354.  
  355.    BOOL top;               // TRUE if "top"
  356.    BOOL bottom;            // TRUE if "bottom"
  357.    BOOL bof;               // TRUE if "bof"
  358.    BOOL eof;               // TRUE if "eof"
  359.    BOOL found;             // TRUE if "found"
  360.  
  361.    DBSCOPEINFO  locate;    // Info regarding last LOCATE
  362.    DBFILTERINFO filter;    // Filter in effect
  363.  
  364.    DBRELINFOP   relations; // Parent/Child relationships used
  365.    USHORT       parents;   // Number of parents for this area
  366.  
  367.    HANDLE   heap;
  368.    USHORT   heapSize;
  369.  
  370.    USHORT   rddID;
  371.  
  372. } WORKAREA;
  373.  
  374. typedef WORKAREA far * WORKAREAP;
  375.  
  376. #ifndef AREAP
  377.  
  378.    #define AREAP   WORKAREAP
  379. #endif
  380.  
  381.  
  382.  
  383. /*--------------------* Entry Point protos *----------------------*/
  384.  
  385. typedef USHORT (far * DBENTRYP_V)(AREAP area);
  386. typedef USHORT (far * DBENTRYP_S)(AREAP area, USHORT param);
  387. typedef USHORT (far * DBENTRYP_L)(AREAP area, LONG param);
  388. typedef USHORT (far * DBENTRYP_SP)(AREAP area, USHORTP param);
  389. typedef USHORT (far * DBENTRYP_LP)(AREAP area, LONGP param);
  390. typedef USHORT (far * DBENTRYP_VP)(AREAP area, FARP param);
  391. typedef USHORT (far * DBENTRYP_SVP)(AREAP area, USHORT index, FARP param);
  392.  
  393. typedef USHORT (far * DBENTRYP_I)  (AREAP area, ITEM param);
  394. typedef USHORT (far * DBENTRYP_SI) (AREAP area, USHORT index, ITEM param);
  395.  
  396.  
  397.  
  398. /*--------------------* Vitrual Mehtod Table *----------------------*/
  399.  
  400. typedef struct _DBFUNCTABLE_
  401. {
  402.  
  403.    /* Movement and positioning methods */
  404.  
  405.    DBENTRYP_SP  bof;             /* SP  */
  406.    DBENTRYP_SP  eof;             /* SP  */
  407.    DBENTRYP_SP  found;           /* SP  */
  408.    DBENTRYP_V   goBottom;        /* V   */
  409.    DBENTRYP_L   go;              /* L   */
  410.    DBENTRYP_I   goToId;          /* I   */
  411.    DBENTRYP_V   goTop;           /* V   */
  412.    DBENTRYP_SI  seek;            /* SI  */
  413.    DBENTRYP_L   skip;            /* L   */
  414.    DBENTRYP_L   skipFilter;      /* L   */
  415.    DBENTRYP_L   skipRaw;         /* L   */
  416.  
  417.  
  418.    /* Data management */
  419.  
  420.    DBENTRYP_VP  addField;        /* VP  */
  421.    DBENTRYP_S   append;          /* S   */
  422.    DBENTRYP_V   delete;          /* V   */
  423.    DBENTRYP_SP  deleted;         /* SP  */
  424.    DBENTRYP_SP  fieldCount;      /* SP  */
  425.    DBENTRYP_SVP fieldName;       /* SVP */
  426.    DBENTRYP_V   flush;           /* V   */
  427.    DBENTRYP_SI  getValue;        /* SI  */
  428.    DBENTRYP_SVP getVarLen;       /* SVP */
  429.    DBENTRYP_V   goCold;          /* V   */
  430.    DBENTRYP_V   goHot;           /* V   */
  431.    DBENTRYP_VP  putRec;          /* VP  */
  432.    DBENTRYP_SI  putValue;        /* SI  */
  433.    DBENTRYP_V   recall;          /* V   */
  434.    DBENTRYP_LP  reccount;        /* LP  */
  435.    DBENTRYP_I   recno;           /* I   */
  436.    DBENTRYP_S   setFieldExtent;  /* S   */
  437.  
  438.    /* WorkArea/Database management */
  439.  
  440.    DBENTRYP_VP  alias;           /* VP  */
  441.    DBENTRYP_V   close;           /* V   */
  442.    DBENTRYP_VP  create;          /* VP  */
  443.    DBENTRYP_SI  info;            /* SI  */
  444.    DBENTRYP_V   new;             /* V   */
  445.    DBENTRYP_VP  open;            /* VP  */
  446.    DBENTRYP_V   release;         /* V   */
  447.    DBENTRYP_SP  structSize;      /* SP  */
  448.    DBENTRYP_VP  sysName;         /* VP  */
  449.    DBENTRYP_VP  dbEval;          /* VP  */
  450.    DBENTRYP_V   pack;            /* V   */
  451.    DBENTRYP_VP  sort;            /* VP  */
  452.    DBENTRYP_VP  trans;           /* VP  */
  453.    DBENTRYP_VP  transRec;        /* VP  */
  454.    DBENTRYP_V   zap;             /* V   */
  455.  
  456.  
  457.    /* Relational Methods */
  458.  
  459.    DBENTRYP_VP  childEnd;        /* VP  */
  460.    DBENTRYP_VP  childStart;      /* VP  */
  461.    DBENTRYP_VP  childSync;       /* VP  */
  462.    DBENTRYP_V   syncChildren;    /* V   */
  463.    DBENTRYP_V   clearRel;        /* V   */
  464.    DBENTRYP_V   forceRel;        /* V   */
  465.    DBENTRYP_SVP relArea;         /* SVP */
  466.    DBENTRYP_VP  relEval;         /* VP  */
  467.    DBENTRYP_SVP relText;         /* SVP */
  468.    DBENTRYP_VP  setRel;          /* VP  */
  469.  
  470.  
  471.    /* Order Management */
  472.  
  473.    DBENTRYP_VP  orderListAdd;     /* VP  */
  474.    DBENTRYP_V   orderListClear;   /* V   */
  475.    DBENTRYP_VP  orderListDelete;  /* VP  */
  476.    DBENTRYP_VP  orderListFocus;   /* VP */
  477.    DBENTRYP_V   orderListRebuild; /* V   */
  478.  
  479.    DBENTRYP_VP  orderCondition;   /* VP  */
  480.    DBENTRYP_VP  orderCreate;      /* VP  */
  481.    DBENTRYP_VP  orderDestroy;     /* VP  */
  482.    DBENTRYP_SVP orderInfo;        /* SVP */
  483.  
  484.    /* Filters and Scope Settings */
  485.  
  486.    DBENTRYP_V   clearFilter;     /* V   */
  487.    DBENTRYP_V   clearLocate;     /* V   */
  488.    DBENTRYP_V   clearScope;      /* V   */
  489.    DBENTRYP_VP  filterText;      /* VP  */
  490.    DBENTRYP_VP  setFilter;       /* VP  */
  491.    DBENTRYP_VP  setLocate;       /* VP  */
  492.    DBENTRYP_VP  setScope;        /* VP  */
  493.  
  494.    /* Miscellaneous */
  495.  
  496.    DBENTRYP_VP  compile;         /* VP */
  497.    DBENTRYP_VP  error;           /* VP */
  498.    DBENTRYP_I   evalBlock;       /* I  */
  499.  
  500.  
  501.    /* Network operations */
  502.  
  503.    DBENTRYP_VP  lock;            /* VP  */
  504.    DBENTRYP_L   unlock;          /* L   */
  505.  
  506. } DBFUNCTABLE;
  507.  
  508. typedef DBFUNCTABLE  far * DBFUNCTABLEP;
  509. typedef DBFUNCTABLEP far * DBFUNCTABLEPP;
  510.  
  511. #define DBFUNCCOUNT   ( sizeof(DBFUNCTABLE) / sizeof(DBENTRYP_V) )
  512.  
  513.  
  514.  
  515. /*--------------------* Defines *---------------------*/
  516.  
  517. /* codes for Locking methods */
  518.  
  519. #define DBLM_EXCLUSIVE     1
  520. #define DBLM_MULTIPLE      2
  521. #define DBLM_FILE          3
  522.  
  523. /* codes for Order management info */
  524.  
  525. #define DBOI_CONDITION     1  /* Get the order condition     */
  526. #define DBOI_EXPRESSION    2  /* Get the order expression    */
  527. #define DBOI_POSITION      3  /* Get the order position      */
  528. #define DBOI_RECNO         4  /* Get the order record number */
  529. #define DBOI_NAME          5  /* Get the order list name     */
  530. #define DBOI_NUMBER        6  /* Get the order list position */
  531. #define DBOI_BAGNAME       7  /* Get the order Bag name      */
  532. #define DBOI_BAGEXT        8  /* Get the order Bag Extension */
  533.  
  534. /* codes for SELFINFO() */
  535.  
  536. #define DBI_ISDBF          1  /* Logical: RDD support DBF file format? */
  537. #define DBI_CANPUTREC      2  /* Logical: RDD support Putting Records? */
  538. #define DBI_GETHEADERSIZE  3  /* Numeric: Get header size of the file  */
  539. #define DBI_LASTUPDATED    4  /* Date:    Last date RDD file updated   */
  540. #define DBI_GETDELIMITER    5  /* String:  Get default delimiter        */
  541. #define DBI_SETDELIMITER    6  /* String:  Set default delimiter        */
  542. #define DBI_GETRECSIZE     7  /* Numeric: Get record size of the file  */
  543. #define DBI_GETLOCKARRAY   8  /* Numeric: Get record size of the file  */
  544. #define DBI_TABLEEXT       9  /* String:  Get table file extension     */
  545.  
  546. #define DBI_USER        1000  /* User DBI_ base */
  547.  
  548.  
  549.  
  550. /*--------------------* SELF Methods *------------------------*/
  551.  
  552. /* Movement and positioning methods */
  553.  
  554. #define SELFBOF(w, sp)            ((*(w)->ftable->bof)(w, sp))
  555. #define SELFEOF(w, sp)            ((*(w)->ftable->eof)(w, sp))
  556. #define SELFFOUND(w, sp)          ((*(w)->ftable->found)(w, sp))
  557. #define SELFGOTO(w, l)            ((*(w)->ftable->go)(w, l))
  558. #define SELFGOTOID(w, sp)         ((*(w)->ftable->goToId)(w, sp))
  559. #define SELFGOBOTTOM(w)           ((*(w)->ftable->goBottom)(w))
  560. #define SELFGOTOP(w)              ((*(w)->ftable->goTop)(w))
  561. #define SELFSEEK(w, i, v)         ((*(w)->ftable->seek)(w, i, v))
  562. #define SELFSKIP(w, l)            ((*(w)->ftable->skip)(w, l))
  563. #define SELFSKIPFILTER(w, l)      ((*(w)->ftable->skipFilter)(w, l))
  564. #define SELFSKIPRAW(w, l)         ((*(w)->ftable->skipRaw)(w, l))
  565.  
  566.  
  567. /* Data management */
  568.  
  569. #define SELFADDFIELD(w, ip)       ((*(w)->ftable->addField)(w, ip))
  570. #define SELFAPPEND(w,l)           ((*(w)->ftable->append)(w,l))
  571. #define SELFDELETE(w)             ((*(w)->ftable->delete)(w))
  572. #define SELFDELETED(w, sp)        ((*(w)->ftable->deleted)(w, sp))
  573. #define SELFFIELDCOUNT(w, sp)     ((*(w)->ftable->fieldCount)(w, sp))
  574. #define SELFFIELDNAME(w, i, bp)   ((*(w)->ftable->fieldName)(w, i, bp))
  575. #define SELFFLUSH(w)              ((*(w)->ftable->flush)(w))
  576. #define SELFGETVALUE(w, i, v)     ((*(w)->ftable->getValue)(w, i, v))
  577. #define SELFGETVARLEN(w, i, lp)   ((*(w)->ftable->getVarLen)(w, i, lp))
  578. #define SELFGOCOLD(w)             ((*(w)->ftable->goCold)(w))
  579. #define SELFGOHOT(w)              ((*(w)->ftable->goHot)(w))
  580. #define SELFPUTVALUE(w, i, v)     ((*(w)->ftable->putValue)(w, i, v))
  581. #define SELFPUTREC(w, bp)         ((*(w)->ftable->putRec)(w, bp))
  582. #define SELFRECALL(w)             ((*(w)->ftable->recall)(w))
  583. #define SELFRECCOUNT(w, sp)       ((*(w)->ftable->reccount)(w, sp))
  584. #define SELFRECNO(w, sp)          ((*(w)->ftable->recno)(w, sp))
  585. #define SELFSETFIELDEXTENT(w, s)  ((*(w)->ftable->setFieldExtent)(w, s))
  586.  
  587.  
  588. /* WorkArea/Database management */
  589.  
  590. #define SELFALIAS(w, bp)          ((*(w)->ftable->alias)(w, bp))
  591. #define SELFCLOSE(w)              ((*(w)->ftable->close)(w))
  592. #define SELFCREATE(w, ip)         ((*(w)->ftable->create)(w, ip))
  593. #define SELFINFO(w, i, g)         ((*(w)->ftable->info)(w, i, g))
  594. #define SELFNEW(w)                ((*(w)->ftable->new)(w))
  595. #define SELFOPEN(w, ip)           ((*(w)->ftable->open)(w, ip))
  596. #define SELFRELEASE(w)            ((*(w)->ftable->release)(w))
  597. #define SELFSTRUCTSIZE(w)         ((*(w)->ftable->structSize)(w))
  598. #define SELFSYSNAME(w, bp)        ((*(w)->ftable->sysName)(w, bp))
  599. #define SELFDBEVAL(w, ip)         ((*(w)->ftable->dbEval)(w, ip))
  600. #define SELFPACK(w)               ((*(w)->ftable->pack)(w))
  601. #define SELFSORT(w, ip)           ((*(w)->ftable->sort)(w, ip))
  602. #define SELFTRANS(w, ip)          ((*(w)->ftable->trans)(w, ip))
  603. #define SELFTRANSREC(w, ip)       ((*(w)->ftable->transRec)(w, ip))
  604. #define SELFZAP(w)                ((*(w)->ftable->zap)(w))
  605.  
  606.  
  607. /* Relational Methods */
  608.  
  609. #define SELFCHILDEND(w, ip)       ((*(w)->ftable->childEnd)(w, ip))
  610. #define SELFCHILDSTART(w, ip)     ((*(w)->ftable->childStart)(w, ip))
  611. #define SELFCHILDSYNC(w, ip)      ((*(w)->ftable->childSync)(w, ip))
  612. #define SELFSYNCCHILDREN(w)       ((*(w)->ftable->syncChildren)(w))
  613. #define SELFCLEARREL(w)           ((*(w)->ftable->clearRel)(w))
  614. #define SELFFORCEREL(w)           ((*(w)->ftable->forceRel)(w))
  615. #define SELFRELAREA(w, s, sp)     ((*(w)->ftable->relArea)(w, s, sp))
  616. #define SELFRELEVAL(w, ip)        ((*(w)->ftable->relEval)(w, ip))
  617. #define SELFRELTEXT(w, s, bp)     ((*(w)->ftable->relText)(w, s, bp))
  618. #define SELFSETREL(w, ip)         ((*(w)->ftable->setRel)(w, ip))
  619.  
  620.  
  621. /* Order Management */
  622.  
  623. #define SELFORDLSTADD(w, lp)     ((*(w)->ftable->orderListAdd)(w, lp))
  624. #define SELFORDLSTDELETE(w, lp)  ((*(w)->ftable->orderListDelete)(w, lp))
  625. #define SELFORDLSTFOCUS(w, lp)   ((*(w)->ftable->orderListFocus)(w,lp))
  626. #define SELFORDLSTREBUILD(w)     ((*(w)->ftable->orderListRebuild)(w))
  627. #define SELFORDLSTCLEAR(w)       ((*(w)->ftable->orderListClear)(w))
  628.  
  629. #define SELFORDSETCOND(w, ip) ((*(w)->ftable->orderCondition)(w, ip))
  630. #define SELFORDCREATE(w, ip)  ((*(w)->ftable->orderCreate)(w, ip))
  631. #define SELFORDDESTROY(w, p)  ((*(w)->ftable->orderDestroy)(w, p))
  632. #define SELFORDINFO(w, i, p)  ((*(w)->ftable->orderInfo)(w, i, p))
  633. #define SELFORDEXPR(w, p)     ((*(w)->ftable->orderInfo)(w, DBOI_EXPRESSION, p))
  634. #define SELFORDCOND(w, p)     ((*(w)->ftable->orderInfo)(w, DBOI_CONDITION,  p))
  635. #define SELFORDRECNO(w, p)    ((*(w)->ftable->orderInfo)(w, DBOI_RECNO,      p))
  636. #define SELFORDPOS(w, p)      ((*(w)->ftable->orderInfo)(w, DBOI_POSITION,   p))
  637. #define SELFORDNUMBER(w, p)   ((*(w)->ftable->orderInfo)(w, DBOI_NUMBER,     p))
  638. #define SELFORDNAME(w, p)     ((*(w)->ftable->orderInfo)(w, DBOI_NAME,       p))
  639. #define SELFORDBAGNAME(w, p)  ((*(w)->ftable->orderInfo)(w, DBOI_BAGNAME,    p))
  640. #define SELFORDBAGEXT(w,  p)  ((*(w)->ftable->orderInfo)(w, DBOI_BAGEXT,     p))
  641.  
  642.  
  643. /* Filters and Scope Settings */
  644.  
  645. #define SELFCLEARFILTER(w)        ((*(w)->ftable->clearFilter)(w))
  646. #define SELFCLEARLOCATE(w)        ((*(w)->ftable->clearLocate)(w))
  647. #define SELFFILTERTEXT(w, bp)     ((*(w)->ftable->filterText)(w, bp))
  648. #define SELFSETFILTER(w, ip)      ((*(w)->ftable->setFilter)(w, ip))
  649. #define SELFSETLOCATE(w, ip)      ((*(w)->ftable->setLocate)(w, ip))
  650.  
  651.  
  652. /* Miscellaneous */
  653.  
  654. #define SELFCOMPILE(w, bp)        ((*(w)->ftable->compile)(w, bp))
  655. #define SELFERROR(w, ip)          ((*(w)->ftable->error)(w, ip))
  656. #define SELFEVALBLOCK(w, v)       ((*(w)->ftable->evalBlock)(w, v))
  657.  
  658.  
  659. /* Network operations */
  660.  
  661. #define SELFGETLOCKS(w, g)        ((*(w)->ftable->info)(w, DBI_GETLOCKARRAY, g))
  662. #define SELFLOCK(w, sp)           ((*(w)->ftable->lock)(w, sp))
  663. #define SELFUNLOCK(w, l)          ((*(w)->ftable->unlock)(w, l))
  664.  
  665.  
  666. /* Info operations */
  667.  
  668. #define SELFRECSIZE(w, lp)        ((*(w)->ftable->info)(w, DBI_GETRECSIZE, lp))
  669. #define SELFHEADERSIZE(w, fp)     ((*(w)->ftable->info)(w, DBI_GETHEADERSIZE, fp))
  670. #define SELFLUPDATE(w, fp)        ((*(w)->ftable->info)(w, DBI_LASTUPDATED, fp ))
  671. #define SELFSETDELIM(w, fp)       ((*(w)->ftable->info)(w, DBI_SETDELIMITER, fp))
  672. #define SELFGETDELIM(w, fp)       ((*(w)->ftable->info)(w, DBI_GETDELIMITER, fp))
  673. #define SELFTABLEEXT(w, fp)       ((*(w)->ftable->info)(w, DBI_TABLEEXT, fp))
  674.  
  675.  
  676.  
  677. /*--------------------* SUPER Methods *------------------------*/
  678.  
  679. /* Movement and positioning methods */
  680.  
  681. #define SUPERBOF(w, sp)            ((*(SUPERTABLE)->bof)(w, sp))
  682. #define SUPEREOF(w, sp)            ((*(SUPERTABLE)->eof)(w, sp))
  683. #define SUPERFOUND(w, sp)          ((*(SUPERTABLE)->found)(w, sp))
  684. #define SUPERGOTO(w, l)            ((*(SUPERTABLE)->go)(w, l))
  685. #define SUPERGOTOID(w, sp)         ((*(SUPERTABLE)->goToId)(w, sp))
  686. #define SUPERGOBOTTOM(w)           ((*(SUPERTABLE)->goBottom)(w))
  687. #define SUPERGOTOP(w)              ((*(SUPERTABLE)->goTop)(w))
  688. #define SUPERSEEK(w, i, v)         ((*(SUPERTABLE)->seek)(w, i, v))
  689. #define SUPERSKIP(w, l)            ((*(SUPERTABLE)->skip)(w, l))
  690. #define SUPERSKIPFILTER(w, l)      ((*(SUPERTABLE)->skipFilter)(w, l))
  691. #define SUPERSKIPRAW(w, l)         ((*(SUPERTABLE)->skipRaw)(w, l))
  692.  
  693.  
  694. /* Data management */
  695.  
  696. #define SUPERADDFIELD(w, ip)       ((*(SUPERTABLE)->addField)(w, ip))
  697. #define SUPERAPPEND(w,l)           ((*(SUPERTABLE)->append)(w,l))
  698. #define SUPERDELETE(w)             ((*(SUPERTABLE)->delete)(w))
  699. #define SUPERDELETED(w, sp)        ((*(SUPERTABLE)->deleted)(w, sp))
  700. #define SUPERFIELDCOUNT(w, sp)     ((*(SUPERTABLE)->fieldCount)(w, sp))
  701. #define SUPERFIELDNAME(w, i, bp)   ((*(SUPERTABLE)->fieldName)(w, i, bp))
  702. #define SUPERFLUSH(w)              ((*(SUPERTABLE)->flush)(w))
  703. #define SUPERGETVALUE(w, i, v)     ((*(SUPERTABLE)->getValue)(w, i, v))
  704. #define SUPERGETVARLEN(w, i, lp)   ((*(SUPERTABLE)->getVarLen)(w, i, lp))
  705. #define SUPERGOCOLD(w)             ((*(SUPERTABLE)->goCold)(w))
  706. #define SUPERGOHOT(w)              ((*(SUPERTABLE)->goHot)(w))
  707. #define SUPERPUTVALUE(w, i, v)     ((*(SUPERTABLE)->putValue)(w, i, v))
  708. #define SUPERPUTREC(w, bp)         ((*(SUPERTABLE)->putRec)(w, bp))
  709. #define SUPERRECALL(w)             ((*(SUPERTABLE)->recall)(w))
  710. #define SUPERRECCOUNT(w, sp)       ((*(SUPERTABLE)->reccount)(w, sp))
  711. #define SUPERRECNO(w, sp)          ((*(SUPERTABLE)->recno)(w, sp))
  712. #define SUPERSETFIELDEXTENT(w, s)  ((*(SUPERTABLE)->setFieldExtent)(w, s))
  713.  
  714.  
  715. /* WorkArea/Database management */
  716.  
  717. #define SUPERALIAS(w, bp)        ((*(SUPERTABLE)->alias)(w, bp))
  718. #define SUPERCLOSE(w)            ((*(SUPERTABLE)->close)(w))
  719. #define SUPERCREATE(w, ip)       ((*(SUPERTABLE)->create)(w, ip))
  720. #define SUPERINFO(w, i, g)       ((*(SUPERTABLE)->info)(w, i, g))
  721. #define SUPERNEW(w)              ((*(SUPERTABLE)->new)(w))
  722. #define SUPEROPEN(w, ip)         ((*(SUPERTABLE)->open)(w, ip))
  723. #define SUPERRELEASE(w)          ((*(SUPERTABLE)->release)(w))
  724. #define SUPERSTRUCTSIZE(w)       ((*(SUPERTABLE)->structSize)(w))
  725. #define SUPERSYSNAME(w, bp)      ((*(SUPERTABLE)->sysName)(w, bp))
  726. #define SUPERDBEVAL(w, ip)       ((*(SUPERTABLE)->dbEval)(w, ip))
  727. #define SUPERPACK(w)             ((*(SUPERTABLE)->pack)(w))
  728. #define SUPERSORT(w, ip)         ((*(SUPERTABLE)->sort)(w, ip))
  729. #define SUPERTRANS(w, ip)        ((*(SUPERTABLE)->trans)(w, ip))
  730. #define SUPERTRANSREC(w, ip)     ((*(SUPERTABLE)->transRec)(w, ip))
  731. #define SUPERZAP(w)              ((*(SUPERTABLE)->zap)(w))
  732.  
  733.  
  734. /* Relational Methods */
  735.  
  736. #define SUPERCHILDEND(w, ip)     ((*(SUPERTABLE)->childEnd)(w, ip))
  737. #define SUPERCHILDSTART(w, ip)   ((*(SUPERTABLE)->childStart)(w, ip))
  738. #define SUPERCHILDSYNC(w, ip)    ((*(SUPERTABLE)->childSync)(w, ip))
  739. #define SUPERSYNCCHILDREN(w)     ((*(SUPERTABLE)->syncChildren)(w))
  740. #define SUPERCLEARREL(w)         ((*(SUPERTABLE)->clearRel)(w))
  741. #define SUPERFORCEREL(w)         ((*(SUPERTABLE)->forceRel)(w))
  742. #define SUPERRELAREA(w, s, sp)   ((*(SUPERTABLE)->relArea)(w, s, sp))
  743. #define SUPERRELEVAL(w, ip)      ((*(SUPERTABLE)->relEval)(w, ip))
  744. #define SUPERRELTEXT(w, s, bp)   ((*(SUPERTABLE)->relText)(w, s, bp))
  745. #define SUPERSETREL(w, ip)       ((*(SUPERTABLE)->setRel)(w, ip))
  746.  
  747.  
  748. /* Order Management */
  749.  
  750. #define SUPERORDLSTADD(w, lp)    ((*(SUPERTABLE)->orderListAdd)(w, lp))
  751. #define SUPERORDLSTDELETE(w, lp) ((*(SUPERTABLE)->orderListDelete)(w, lp))
  752. #define SUPERORDLSTFOCUS(w, lp)  ((*(SUPERTABLE)->orderListFocus)(w, lp))
  753. #define SUPERORDLSTREBUILD(w)    ((*(SUPERTABLE)->orderListRebuild)(w))
  754. #define SUPERORDLSTCLEAR(w)      ((*(SUPERTABLE)->orderListClear)(w))
  755.  
  756. #define SUPERORDSETCOND(w,ip) ((*(SUPERTABLE)->orderCondition)(w, ip))
  757. #define SUPERORDCREATE(w, ip) ((*(SUPERTABLE)->orderCreate)(w, ip))
  758. #define SUPERORDDELETE(w, ip) ((*(SUPERTABLE)->orderDelete)(w, ip))
  759. #define SUPERORDINFO(w, i, p) ((*(SUPERTABLE)->orderInfo)(w, i, p))
  760. #define SUPERORDEXPR(w, p)    ((*(SUPERTABLE)->orderInfo)(w, DBOI_EXPRESSION, p))
  761. #define SUPERORDCOND(w, p)    ((*(SUPERTABLE)->orderInfo)(w, DBOI_CONDITION,  p))
  762. #define SUPERORDRECNO(w, p)   ((*(SUPERTABLE)->orderInfo)(w, DBOI_RECNO,      p))
  763. #define SUPERORDPOS(w, p)     ((*(SUPERTABLE)->orderInfo)(w, DBOI_POSITION,   p))
  764. #define SUPERORDNUMBER(w, p)  ((*(SUPERTABLE)->orderInfo)(w, DBOI_NUMBER,     p))
  765. #define SUPERORDNAME(w, p)    ((*(SUPERTABLE)->orderInfo)(w, DBOI_NAME,       p))
  766. #define SUPERORDBAGNAME(w, p) ((*(SUPERTABLE)->orderInfo)(w, DBOI_BAGNAME,    p))
  767. #define SUPERORDBAGEXT(w,  p) ((*(SUPERTABLE)->orderInfo)(w, DBOI_BAGEXT,     p))
  768.  
  769.  
  770. /* Filters and Scope Settings */
  771.  
  772. #define SUPERCLEARFILTER(w)      ((*(SUPERTABLE)->clearFilter)(w))
  773. #define SUPERCLEARLOCATE(w)      ((*(SUPERTABLE)->clearLocate)(w))
  774. #define SUPERFILTERTEXT(w, bp)   ((*(SUPERTABLE)->filterText)(w, bp))
  775. #define SUPERSETFILTER(w, ip)    ((*(SUPERTABLE)->setFilter)(w, ip))
  776. #define SUPERSETLOCATE(w, ip)    ((*(SUPERTABLE)->setLocate)(w, ip))
  777.  
  778.  
  779. /* Miscellaneous */
  780.  
  781. #define SUPERCOMPILE(w, bp)      ((*(SUPERTABLE)->compile)(w, bp))
  782. #define SUPERERROR(w, ip)        ((*(SUPERTABLE)->error)(w, ip))
  783. #define SUPEREVALBLOCK(w, v)     ((*(SUPERTABLE)->evalBlock)(w, v))
  784.  
  785.  
  786. /* Network operations */
  787.  
  788. #define SUPERGETLOCKS(w, g)      ((*(SUPERTABLE)->info)(w, DBI_GETLOCKARRAY, g))
  789. #define SUPERLOCK(w, sp)         ((*(SUPERTABLE)->lock)(w, sp))
  790. #define SUPERUNLOCK(w)           ((*(SUPERTABLE)->unlock)(w))
  791.  
  792. /* Info operations */
  793.  
  794. #define SUPERRECSIZE(w, lp)      ((*(SUPERTABLE)->info)(w, DBI_GETRECSIZE, lp))
  795. #define SUPERHEADERSIZE(w, fp)   ((*(SUPERTABLE)->info)(w, DBI_GETHEADERSIZE, fp))
  796. #define SUPERLUPDATE(w, fp)      ((*(SUPERTABLE)->info)(w, DBI_LASTUPDATED, fp ))
  797. #define SUPERSETDELIM(w, fp)     ((*(SUPERTABLE)->info)(w, DBI_SETDELIMITER, fp))
  798. #define SUPERGETDELIM(w, fp)     ((*(SUPERTABLE)->info)(w, DBI_GETDELIMITER, fp))
  799. #define SUPERTABLEEXT(w, fp)     ((*(SUPERTABLE)->info)(w, DBI_TABLEEXT, fp))
  800.  
  801.  
  802.  
  803. /*
  804. *  PROTOTYPES
  805. *  ----------
  806. */
  807. extern ERRCODE _rddInherit( DBFUNCTABLEP table, DBFUNCTABLEP subTable, DBFUNCTABLEP superTable, BYTEP drvName );
  808. extern ERRCODE _rddDisinherit( BYTEP drvName );
  809.  
  810.  
  811.