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