home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / harbb30g.zip / INCLUDE / rddapi.h < prev    next >
C/C++ Source or Header  |  1999-09-15  |  40KB  |  1,079 lines

  1. /*
  2.  * $Id: rddapi.h,v 1.32 1999/09/15 14:03:38 vszel Exp $
  3.  */
  4.  
  5. /*
  6.  * Harbour Project source code:
  7.  * Header file for the RDD API
  8.  *
  9.  * Copyright 1999 {list of individual authors and e-mail addresses}
  10.  * www - http://www.harbour-project.org
  11.  *
  12.  * This program is free software; you can redistribute it and/or modify
  13.  * it under the terms of the GNU General Public License as published by
  14.  * the Free Software Foundation; either version 2 of the License, or
  15.  * (at your option) any later version, with one exception:
  16.  *
  17.  * The exception is that if you link the Harbour Runtime Library (HRL)
  18.  * and/or the Harbour Virtual Machine (HVM) with other files to produce
  19.  * an executable, this does not by itself cause the resulting executable
  20.  * to be covered by the GNU General Public License. Your use of that
  21.  * executable is in no way restricted on account of linking the HRL
  22.  * and/or HVM code into it.
  23.  *
  24.  * This program is distributed in the hope that it will be useful,
  25.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  27.  * GNU General Public License for more details.
  28.  *
  29.  * You should have received a copy of the GNU General Public License
  30.  * along with this program; if not, write to the Free Software
  31.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
  32.  * their web site at http://www.gnu.org/).
  33.  *
  34.  */
  35.  
  36. #ifndef HB_RDDAPI_H_
  37. #define HB_RDDAPI_H_
  38.  
  39. #include "filesys.h"
  40.  
  41. typedef USHORT ERRCODE;
  42.  
  43. /* RDD virtual machine integration functions */
  44.  
  45. extern int  hb_rddGetCurrentWorkAreaNumber( void );
  46. extern ERRCODE hb_rddSelectWorkAreaAlias( char * szAlias );
  47. extern ERRCODE hb_rddSelectWorkAreaNumber( int iArea );
  48. extern ERRCODE hb_rddSelectWorkAreaSymbol( PHB_SYMB pSymAlias );
  49. extern ERRCODE hb_rddGetFieldValue( HB_ITEM_PTR pItem, PHB_SYMB pFieldSymbol );
  50. extern ERRCODE hb_rddPutFieldValue( HB_ITEM_PTR pItem, PHB_SYMB pFieldSymbol );
  51. extern void hb_rddShutDown( void );
  52.  
  53.  
  54. /* RDD method return codes */
  55.  
  56. #define SUCCESS            0
  57. #define FAILURE            1
  58.  
  59.  
  60. /* Flags for DBTRANSINFO */
  61.  
  62. #define DBTF_MATCH         0x0001
  63. #define DBTF_PUTREC        0x0002
  64.  
  65.  
  66. /* Codes for Locking methods */
  67.  
  68. #define DBLM_EXCLUSIVE     1
  69. #define DBLM_MULTIPLE      2
  70. #define DBLM_FILE          3
  71.  
  72.  
  73. /* Codes for SELF_ORDINFO() */
  74.  
  75. #define DBOI_CONDITION     1    /* Get the order condition */
  76. #define DBOI_EXPRESSION    2    /* Get the order expression */
  77. #define DBOI_POSITION      3    /* Get the order position */
  78. #define DBOI_RECNO         4    /* Get the order record number */
  79. #define DBOI_NAME          5    /* Get the order list name */
  80. #define DBOI_NUMBER        6    /* Get the order list position */
  81. #define DBOI_BAGNAME       7    /* Get the order Bag name */
  82. #define DBOI_BAGEXT        8    /* Get the order Bag Extension */
  83. #define DBOI_INDEXEXT      DBOI_BAGEXT
  84. #define DBOI_INDEXNAME     DBOI_BAGNAME
  85. #define DBOI_ORDERCOUNT    9    /* Get the number of orders in the index file */
  86. #define DBOI_FILEHANDLE    10   /* Get the handle of the index file */
  87. #define DBOI_ISCOND        11   /* Get the flag if the order has a for condition */
  88. #define DBOI_ISDESC        12   /* Get the flag if the order is descending */
  89. #define DBOI_UNIQUE        13   /* Get the flag if the order has the unique attribute set */
  90.  
  91.  
  92. /* Codes for SELF_INFO() */
  93.  
  94. #define DBI_ISDBF          1    /* Logical: RDD support DBF file format? */
  95. #define DBI_CANPUTREC      2    /* Logical: RDD support Putting Records? */
  96. #define DBI_GETHEADERSIZE  3    /* Numeric: Get header size of the file */
  97. #define DBI_LASTUPDATE     4    /* Date:    Last date RDD file updated */
  98. #define DBI_GETDELIMITER   5    /* String:  Get default delimiter */
  99. #define DBI_SETDELIMITER   6    /* String:  Set default delimiter */
  100. #define DBI_GETRECSIZE     7    /* Numeric: Get record size of the file */
  101. #define DBI_GETLOCKARRAY   8    /* Array: Get an array of locked records */
  102. #define DBI_TABLEEXT       9    /* String:  Get table file extension */
  103.  
  104. #define DBI_ISFLOCK        20   /* Get file lock status */
  105.  
  106. #define DBI_CHILDCOUNT     22   /* Number of opened relations */
  107. #define DBI_FILEHANDLE     23   /* Handle of opened file */
  108.  
  109. #define DBI_BOF            26   /* BOF flag - alternate to bof() */
  110. #define DBI_EOF            27   /* EOF flag - alternate to eof() */
  111. #define DBI_DBFILTER       28   /* Filter expression */
  112. #define DBI_FOUND          29   /* FOUND flag - alternate to found */
  113. #define DBI_FCOUNT         30   /* Number of fields */
  114. #define DBI_LOCKCOUNT      31   /* Get record size of the file */
  115. #define DBI_VALIDBUFFER    32   /* Is the current buffer valid */
  116. #define DBI_ALIAS          33   /* Alias name of workarea */
  117. #define DBI_GETSCOPE       34   /* Locate codeblock */
  118. #define DBI_LOCKOFFSET     35   /* New locking offset */
  119. #define DBI_SHARED         36   /* Gets/Sets the shared flag */
  120.  
  121. #define DBI_MEMOEXT        37   /* String:  Get memo file extension */
  122. #define DBI_MEMOHANDLE     38   /* Dos handle for memo file */
  123. #define DBI_MEMOBLOCKSIZE  39   /* Blocksize in memo files */
  124.  
  125. #define DBI_DB_VERSION     101  /* HOST driver Version */
  126. #define DBI_RDD_VERSION    102  /* RDD version (current RDD) */
  127.  
  128. #define DBI_USER           1000 /* Start of user definable DBI_ values */
  129.  
  130.  
  131. /* Codes for SELF_RECINFO() */
  132.  
  133. #define DBRI_DELETED       1
  134. #define DBRI_LOCKED        2
  135. #define DBRI_RECSIZE       3
  136. #define DBRI_RECNO         4
  137. #define DBRI_UPDATED       5
  138.  
  139.  
  140. /* Codes for SELF_FIELDINFO() */
  141.  
  142. #define DBS_NAME           1
  143. #define DBS_TYPE           2
  144. #define DBS_LEN            3
  145. #define DBS_DEC            4
  146.  
  147.  
  148. /* Codes for RawLock types */
  149.  
  150. #define FILE_LOCK          1
  151. #define FILE_UNLOCK        2
  152. #define REC_LOCK           3
  153. #define REC_UNLOCK         4
  154. #define HEADER_LOCK        5
  155. #define HEADER_UNLOCK      6
  156. #define APPEND_LOCK        7
  157. #define APPEND_UNLOCK      8
  158.  
  159. /* forward declarations
  160.  */
  161. struct _RDDFUNCS;
  162. struct _AREA;
  163.  
  164.  
  165. typedef struct _FILEINFO
  166. {
  167.    FHANDLE hFile;
  168.    ULONG * pLocksPos;          /* List of records locked */
  169.    ULONG   lNumLocksPos;       /* Number of records locked */
  170.    BOOL    fFileLocked;        /* TRUE if entire file is locked */
  171.    BOOL    fAppend;            /* TRUE if new record is added */
  172.    struct _FILEINFO * pNext;   /* The next file in the list */
  173. } FILEINFO;
  174.  
  175. typedef FILEINFO * LPFILEINFO;
  176.  
  177.  
  178.  
  179. /*
  180. *  DBFIELDINFO
  181. *  -----------
  182. *  The field structure
  183. */
  184.  
  185. typedef struct
  186. {
  187.    BYTE * atomName;        /* FIELD (symbol) name */
  188.    USHORT uiType;          /* FIELD type */
  189.    USHORT typeExtended;    /* FIELD type extended */
  190.    USHORT uiLen;           /* Overall FIELD length */
  191.    USHORT uiDec;           /* Decimal places of numeric FIELD */
  192. } DBFIELDINFO;
  193.  
  194. typedef DBFIELDINFO * LPDBFIELDINFO;
  195.  
  196.  
  197.  
  198. /*
  199. *  DBOPENINFO
  200. *  ----------
  201. *  The Open Info structure
  202. */
  203.  
  204. typedef struct
  205. {
  206.    USHORT uiArea;          /* Work Area number of the data store */
  207.    BYTE * abName;          /* The qualified name of the data store */
  208.    BYTE * atomAlias;       /* The logical name of the data store */
  209.    BOOL   fShared;         /* Share mode of the data store */
  210.    BOOL   fReadonly;       /* Readonly mode of the data store */
  211.    void * lpdbHeader;      /* Pointer to a header of the data store */
  212. } DBOPENINFO;
  213.  
  214. typedef DBOPENINFO * LPDBOPENINFO;
  215.  
  216.  
  217.  
  218. /*
  219. *  DBEXTENDINFO
  220. *  ------------
  221. *  Additional properties
  222. */
  223.  
  224. typedef struct
  225. {
  226.    USHORT   uiHeaderLen;     /* Size of header */
  227.    USHORT   uiRecordLen;     /* Size of record */
  228.    BYTE *   bRecord;         /* Buffer of the data */
  229.    BOOL     fHasMemo;        /* Work Area with Memo fields */
  230.    ULONG    lRecNo;          /* Current record */
  231.    ULONG    lNextBlock;      /* Next block for memos */
  232.    BOOL     fExclusive;      /* Share the file */
  233.    BOOL     fReadOnly;       /* Read only file */
  234.    BYTE     bYear;           /* Last update */
  235.    BYTE     bMonth;
  236.    BYTE     bDay;
  237.    BOOL     fRecordChanged;  /* Record changed */
  238. } DBEXTENDINFO;
  239.  
  240. typedef DBEXTENDINFO * LPDBEXTENDINFO;
  241.  
  242.  
  243.  
  244. /*
  245. *  DBORDERCONDINFO
  246. *  ---------------
  247. *  The Create Order conditional Info structure
  248. */
  249.  
  250. typedef struct _DBORDERCONDINFO
  251. {
  252.    BOOL     fActive;
  253.    BYTE *   abFor;
  254.    PHB_ITEM itmCobFor;
  255.    PHB_ITEM itmCobWhile;
  256.    PHB_ITEM itmCobEval;
  257.    LONG     lStep;
  258.    LONG     lStartRecno;
  259.    LONG     lNextCount;
  260.    LONG     lRecno;
  261.    BOOL     fRest;
  262.    BOOL     fDescending;
  263.    BOOL     fScoped;
  264.    BOOL     fAll;
  265.    BOOL     fAdditive;
  266.    BOOL     fUseCurrent;
  267.    BOOL     fCustom;
  268.    BOOL     fNoOptimize;
  269.    void *   lpvCargo;
  270. } DBORDERCONDINFO;
  271.  
  272. typedef DBORDERCONDINFO * LPDBORDERCONDINFO;
  273.  
  274.  
  275.  
  276. /*
  277. *  DBORDERCREATE
  278. *  -------------
  279. *  The Create Order Info structure
  280. */
  281.  
  282. typedef struct
  283. {
  284.    LPDBORDERCONDINFO lpdbOrdCondInfo; /* Conditional information */
  285.    BYTE *            abBagName;       /* Name of the Order bag */
  286.    BYTE *            atomBagName;     /* Name of the Order */
  287.    PHB_ITEM          itmOrder;
  288.    BOOL              fUnique;         /* Flag to determine if all keys are unique */
  289.    PHB_ITEM          itmCobExpr;      /* Code block containing the KEY expression */
  290.    PHB_ITEM          abExpr;          /* String containing the KEY expression */
  291. } DBORDERCREATEINFO;
  292.  
  293. typedef DBORDERCREATEINFO * LPDBORDERCREATEINFO;
  294.  
  295.  
  296.  
  297. /*
  298. *  DBORDERINFO
  299. *  -----------
  300. *  The Set Index Info structure
  301. */
  302.  
  303. typedef struct
  304. {
  305.    PHB_ITEM atomBagName;  /* Name of the Order Bag */
  306.    PHB_ITEM itmOrder;     /* Name or Number of the Order */
  307.    PHB_ITEM itmCobExpr;   /* Code block containing the KEY expression */
  308.    PHB_ITEM itmResult;    /* Operation result */
  309.    BOOL     fAllTags;     /* Open all tags */
  310. } DBORDERINFO;
  311.  
  312. typedef DBORDERINFO * LPDBORDERINFO;
  313.  
  314.  
  315.  
  316. /*
  317. *  DBSCOPEINFO
  318. *  -----------
  319. *  The Scope Info structure
  320. */
  321.  
  322. typedef struct
  323. {
  324.    PHB_ITEM itmCobFor;   /* Code Block representation of a FOR clause */
  325.    PHB_ITEM lpstrFor;    /* String representation of a FOR clause */
  326.    PHB_ITEM itmCobWhile; /* Code Block representation of a WHILE clause */
  327.    PHB_ITEM lpstrWhile;  /* String representation of a WHILE clause */
  328.    PHB_ITEM lNext;       /* NEXT record */
  329.    PHB_ITEM itmRecID;
  330.    PHB_ITEM fRest;       /* TRUE if start from the current record */
  331.    BOOL     fIgnoreFilter;
  332.    BOOL     fIncludeDeleted;
  333.    BOOL     fLast;
  334.    BOOL     fIgnoreDuplicates;
  335. } DBSCOPEINFO;
  336.  
  337. typedef DBSCOPEINFO * LPDBSCOPEINFO;
  338.  
  339.  
  340.  
  341. /*
  342. *  DBFILTERINFO
  343. *  ------------
  344. *  The Filter Info structure
  345. */
  346.  
  347. typedef struct
  348. {
  349.    PHB_ITEM itmCobExpr;       /* Block representation of the FILTER expression */
  350.    PHB_ITEM abFilterText;     /* String representation of FILTER expression */
  351.    BOOL     fFilter;
  352. } DBFILTERINFO;
  353.  
  354. typedef DBFILTERINFO * LPDBFILTERINFO;
  355.  
  356.  
  357.  
  358. /*
  359. *  DBRELINFO
  360. *  ------------
  361. *  The Relationship Info structure
  362. */
  363.  
  364. typedef struct _DBRELINFO
  365. {
  366.    PHB_ITEM           itmCobExpr;   /* Block representation of the relational SEEK key */
  367.    PHB_ITEM           abKey;        /* String representation of the relational SEEK key */
  368.    struct _AREA      *lpaParent;    /* The parent of this relation */
  369.    struct _AREA      *lpaChild;     /* The parents children */
  370.    struct _DBRELINFO *lpdbriNext;   /* Next child or parent */
  371. } DBRELINFO;
  372.  
  373. typedef DBRELINFO * LPDBRELINFO;
  374.  
  375.  
  376.  
  377. /*
  378. *  DBEVALINFO
  379. *  ------------
  380. *  The Evaluation Info structure
  381. *
  382. *  Contains information necessary for a block evaluation
  383. *  on each record of the workarea
  384. */
  385.  
  386. typedef struct
  387. {
  388.    PHB_ITEM    itmBlock;  /* The block to be evaluated */
  389.    DBSCOPEINFO dbsci;     /* Scope info that limits the evaluation */
  390. } DBEVALINFO;
  391.  
  392. typedef DBEVALINFO * LPDBEVALINFO;
  393.  
  394.  
  395.  
  396. /*
  397. *  DBTRANSITEM
  398. *  ------------
  399. *  The Transfer Item structure
  400. *
  401. *  Defines a single transfer item (usually a field) from
  402. *  one database to another; used by DBTRANSINFO
  403. */
  404.  
  405. typedef struct
  406. {
  407.    USHORT uiSource;       /* Field index number from the source */
  408.    USHORT uiDest;         /* Destination field index number */
  409. } DBTRANSITEM;
  410.  
  411. typedef DBTRANSITEM * LPDBTRANSITEM;
  412.  
  413.  
  414.  
  415. /*
  416. *  DBTRANSINFO
  417. *  ------------
  418. *  The Transfer Info structure
  419. *
  420. *  Defines a global transfer of data items from on workarea
  421. *  to another
  422. */
  423.  
  424. typedef struct
  425. {
  426.    struct _AREA *lpaSource;     /* Pointer to source work area */
  427.    struct _AREA *lpaDest;       /* Pointer to dest work area */
  428.    DBSCOPEINFO   dbsci;         /* Scope to limit transfer */
  429.    USHORT        uiFlags;       /* Transfer attributes */
  430.    USHORT        uiItemCount;   /* Number of items below */
  431.    LPDBTRANSITEM lpTransItems;  /* Array of items */
  432. } DBTRANSINFO;
  433.  
  434. typedef DBTRANSINFO * LPDBTRANSINFO;
  435.  
  436.  
  437.  
  438. /*
  439. *  DBSORTITEM
  440. *  ----------
  441. *  The Sort Item Structure
  442. *
  443. *  An array of items that, together, indicate the key value to
  444. *  use while sorting data. The order of the array determines the
  445. *  order of the sorting.
  446. */
  447.  
  448. typedef struct
  449. {
  450.    USHORT uiField;        /* Index into the workarea->fields structure */
  451.    USHORT uiFlags;        /* Sort flags */
  452. } DBSORTITEM;
  453.  
  454. typedef DBSORTITEM * LPDBSORTITEM;
  455.  
  456.  
  457. /* Flags for DBSORTITEM */
  458. #define SF_ASCEND       1
  459. #define SF_CASE         2
  460. #define SF_DESCEND      4
  461. #define SF_NUM         32
  462. #define SF_DOUBLE      64
  463. #define SF_LONG       128
  464.  
  465.  
  466.  
  467. /*
  468. *  DBSORTINFO
  469. *  ----------
  470. *  The Sort Info Structure
  471. *
  472. *  Information for a physical sort on the workarea
  473. */
  474.  
  475. typedef struct
  476. {
  477.    DBTRANSINFO   dbtri;        /* Destination workarea transfer information */
  478.    LPDBSORTITEM  lpdbsItem;    /* Fields which compose the key values for the sort */
  479.    USHORT        uiItemCount;  /* The number of fields above */
  480. } DBSORTINFO;
  481.  
  482. typedef DBSORTINFO * LPDBSORTINFO;
  483.  
  484.  
  485.  
  486. /*
  487. *  DBLOCKINFO
  488. *  ----------
  489. *  The Lock Info Structure
  490. *
  491. *  Information for a record or file lock
  492. */
  493.  
  494. typedef struct
  495. {
  496.    ULONG  itmRecID;
  497.    USHORT uiMethod;
  498.    BOOL   fResult;
  499. } DBLOCKINFO;
  500.  
  501. typedef DBLOCKINFO * LPDBLOCKINFO;
  502.  
  503.  
  504.  
  505. /*
  506. *  FIELD
  507. *  -----
  508. *  The Field structure
  509. *
  510. *  This is the basic unit of access for a workarea
  511. */
  512.  
  513. typedef struct _FIELD
  514. {
  515.    USHORT  uiType;           /* Field type */
  516.    USHORT  uiTypeExtended;   /* Field type - extended */
  517.    USHORT  uiLen;            /* Field length */
  518.    USHORT  uiDec;            /* Decimal length */
  519.    USHORT  uiArea;           /* Area this field resides in */
  520.    void *  sym;              /* Symbol that represents the field */
  521.    void *  memo;             /* Pointer to memo data */
  522.    struct _FIELD *lpfNext;   /* The next field in the list */
  523. } FIELD;
  524.  
  525. typedef FIELD * LPFIELD;
  526.  
  527.  
  528.  
  529. /*--------------------* WORKAREA structure *----------------------*/
  530.  
  531. /*
  532. *  WORKAREA
  533. *  --------
  534. *  The Workarea Structure
  535. *
  536. *  Information to administrate the workarea
  537. */
  538.  
  539.  
  540. typedef struct _AREA
  541. {
  542.    struct _RDDFUNCS * lprfsHost; /* Virtual method table for this workarea */
  543.    USHORT   uiArea;              /* The number assigned to this workarea */
  544.    void *   atomAlias;           /* Pointer to the alias symbol for this workarea */
  545.    USHORT   uiFieldExtent;       /* Total number of fields allocated */
  546.    USHORT   uiFieldCount;        /* Total number of fields used */
  547.    LPFIELD  lpFields;            /* Pointer to an array of fields */
  548.    void *   lpFieldExtents;      /* Void ptr for additional field properties */
  549.    PHB_ITEM valResult;           /* All purpose result holder */
  550.    BOOL fTop;                    /* TRUE if "top" */
  551.    BOOL fBottom;                 /* TRUE if "bottom" */
  552.    BOOL fBof;                    /* TRUE if "bof" */
  553.    BOOL fEof;                    /* TRUE if "eof" */
  554.    BOOL fFound;                  /* TRUE if "found" */
  555.    DBSCOPEINFO  dbsi;            /* Info regarding last LOCATE */
  556.    DBFILTERINFO dbfi;            /* Filter in effect */
  557.    LPDBORDERCONDINFO lpdbOrdCondInfo;
  558.    LPDBRELINFO  lpdbRelations;   /* Parent/Child relationships used */
  559.    USHORT       uiParents;       /* Number of parents for this area */
  560.    USHORT   heap;
  561.    USHORT   heapSize;
  562.    USHORT   rddID;
  563.    LPFILEINFO lpFileInfo;        /* Files used by this workarea */
  564.    LPDBEXTENDINFO lpExtendInfo;  /* Additional properties */
  565. } AREA;
  566.  
  567. typedef AREA * LPAREA;
  568.  
  569. #ifndef AREAP
  570. #define AREAP LPAREA
  571. #endif
  572.  
  573. /*--------------------* Virtual Method Table *----------------------*/
  574.  
  575. typedef USHORT ( * DBENTRYP_V    )( AREAP area );
  576. typedef USHORT ( * DBENTRYP_BP   )( AREAP area, BOOL * param );
  577. typedef USHORT ( * DBENTRYP_B    )( AREAP area, BOOL param );
  578. typedef USHORT ( * DBENTRYP_L    )( AREAP area, LONG param );
  579. typedef USHORT ( * DBENTRYP_UL   )( AREAP area, ULONG param );
  580. typedef USHORT ( * DBENTRYP_I    )( AREAP area, PHB_ITEM param );
  581. typedef USHORT ( * DBENTRYP_SI   )( AREAP area, USHORT index, PHB_ITEM param );
  582. typedef USHORT ( * DBENTRYP_VP   )( AREAP area, LPDBOPENINFO param );
  583. typedef USHORT ( * DBENTRYP_VF   )( AREAP area, LPDBFIELDINFO param );
  584. typedef USHORT ( * DBENTRYP_VL   )( AREAP area, LPDBLOCKINFO param );
  585. typedef USHORT ( * DBENTRYP_SP   )( AREAP area, USHORT * param );
  586. typedef USHORT ( * DBENTRYP_P    )( AREAP area, BYTE * param );
  587. typedef USHORT ( * DBENTRYP_PP   )( AREAP area, BYTE ** param );
  588. typedef USHORT ( * DBENTRYP_S    )( AREAP area, USHORT param );
  589. typedef USHORT ( * DBENTRYP_LP   )( AREAP area, LONG * param );
  590. typedef USHORT ( * DBENTRYP_ULP  )( AREAP area, ULONG * param );
  591. typedef USHORT ( * DBENTRYP_SVP  )( AREAP area, USHORT index, void * param );
  592. typedef USHORT ( * DBENTRYP_VSP  )( AREAP area, USHORT action, ULONG lRecord );
  593. typedef USHORT ( * DBENTRYP_SVL  )( AREAP area, USHORT index, ULONG * param );
  594. typedef USHORT ( * DBENTRYP_SSI  )( AREAP area, USHORT p1, USHORT p2, PHB_ITEM p3 );
  595. typedef USHORT ( * DBENTRYP_ISI  )( AREAP area, PHB_ITEM p1, USHORT p2, PHB_ITEM p3 );
  596.  
  597. #if 0
  598. typedef USHORT ( * DBENTRYP_SVPB )( AREAP area, USHORT index, void * param, USHORT mode);
  599. typedef USHORT ( * DBENTRYP_VPL  )( AREAP area, void * p1, LONG p2);
  600. typedef USHORT ( * DBENTRYP_VPLP )( AREAP area, void * p1, LONGP p2);
  601. typedef USHORT ( * DBENTRYP_LSP  )( AREAP area, LONG p1, USHORTP p2);
  602. #endif
  603.  
  604.  
  605. /*--------------------* Virtual Method Table *----------------------*/
  606.  
  607. typedef struct _RDDFUNCS
  608. {
  609.  
  610.    /* Movement and positioning methods */
  611.  
  612.    DBENTRYP_BP   bof;
  613.    DBENTRYP_BP   eof;
  614.    DBENTRYP_BP   found;
  615.    DBENTRYP_V    goBottom;
  616.    DBENTRYP_UL   go;
  617.    DBENTRYP_I    goToId;
  618.    DBENTRYP_V    goTop;
  619. #if 0
  620.    DBENTRYP_SI   seek;
  621. #endif
  622.    DBENTRYP_L    skip;
  623.    DBENTRYP_L    skipFilter;
  624.    DBENTRYP_L    skipRaw;
  625.  
  626.  
  627.    /* Data management */
  628.  
  629.    DBENTRYP_VF   addField;
  630.    DBENTRYP_B    append;
  631.    DBENTRYP_I    createFields;
  632.    DBENTRYP_V    deleterec;
  633.    DBENTRYP_BP   deleted;
  634.    DBENTRYP_SP   fieldCount;
  635.    DBENTRYP_VF   fieldDisplay;
  636.    DBENTRYP_SSI  fieldInfo;
  637.    DBENTRYP_SVP  fieldName;
  638.    DBENTRYP_V    flush;
  639.    DBENTRYP_PP   getRec;
  640.    DBENTRYP_SI   getValue;
  641.    DBENTRYP_SVL  getVarLen;
  642.    DBENTRYP_V    goCold;
  643.    DBENTRYP_V    goHot;
  644.    DBENTRYP_P    putRec;
  645.    DBENTRYP_SI   putValue;
  646.    DBENTRYP_V    recall;
  647.    DBENTRYP_ULP  reccount;
  648.    DBENTRYP_ISI  recInfo;
  649.    DBENTRYP_I    recno;
  650.    DBENTRYP_S    setFieldExtent;
  651.  
  652.  
  653.    /* WorkArea/Database management */
  654.  
  655.    DBENTRYP_P    alias;
  656.    DBENTRYP_V    close;
  657.    DBENTRYP_VP   create;
  658.    DBENTRYP_SI   info;
  659.    DBENTRYP_V    newarea;
  660.    DBENTRYP_VP   open;
  661.    DBENTRYP_V    release;
  662.    DBENTRYP_SP   structSize;
  663.    DBENTRYP_P    sysName;
  664. #if 0
  665.    DBENTRYP_VP   dbEval;
  666.    DBENTRYP_V    pack;
  667.    DBENTRYP_LSP  packRec;
  668.    DBENTRYP_VP   sort;
  669.    DBENTRYP_VP   trans;
  670.    DBENTRYP_VP   transRec;
  671.    DBENTRYP_V    zap;
  672.  
  673.  
  674.    /* Relational Methods */
  675.  
  676.    DBENTRYP_VP   childEnd;
  677.    DBENTRYP_VP   childStart;
  678.    DBENTRYP_VP   childSync;
  679.    DBENTRYP_V    syncChildren;
  680.    DBENTRYP_V    clearRel;
  681.    DBENTRYP_V    forceRel;
  682.    DBENTRYP_SVP  relArea;
  683.    DBENTRYP_VP   relEval;
  684.    DBENTRYP_SVP  relText;
  685.    DBENTRYP_VP   setRel;
  686.  
  687.  
  688.    /* Order Management */
  689.  
  690.    DBENTRYP_VP   orderListAdd;
  691.    DBENTRYP_V    orderListClear;
  692.    DBENTRYP_VP   orderListDelete;
  693.    DBENTRYP_VP   orderListFocus;
  694.    DBENTRYP_V    orderListRebuild;
  695.  
  696.    DBENTRYP_VP   orderCondition;
  697.    DBENTRYP_VP   orderCreate;
  698.    DBENTRYP_VP   orderDestroy;
  699.    DBENTRYP_SVP  orderInfo;
  700.  
  701.  
  702.    /* Filters and Scope Settings */
  703.  
  704.    DBENTRYP_V    clearFilter;
  705.    DBENTRYP_V    clearLocate;
  706.    DBENTRYP_V    clearScope;
  707.    DBENTRYP_VPLP countScope;
  708.    DBENTRYP_VP   filterText;
  709.    DBENTRYP_SI   scopeInfo;
  710.    DBENTRYP_VP   setFilter;
  711.    DBENTRYP_VP   setLocate;
  712.    DBENTRYP_VP   setScope;
  713.    DBENTRYP_VPL  skipScope;
  714.  
  715.  
  716.    /* Miscellaneous */
  717.  
  718.    DBENTRYP_VP   compile;
  719. #endif
  720.    DBENTRYP_I    error;
  721. #if 0
  722.    DBENTRYP_I    evalBlock;
  723. #endif
  724.  
  725.  
  726.    /* Network operations */
  727.  
  728.    DBENTRYP_VSP  rawlock;
  729.    DBENTRYP_VL   lock;
  730.    DBENTRYP_UL   unlock;
  731.  
  732.  
  733.    /* Memofile functions */
  734.  
  735.    DBENTRYP_V    closeMemFile;
  736.    DBENTRYP_VP   createMemFile;
  737. #if 0
  738.    DBENTRYP_SVPB getValueFile;
  739. #endif
  740.    DBENTRYP_VP   openMemFile;
  741. #if 0
  742.    DBENTRYP_SVP  putValueFile;
  743. #endif
  744.  
  745.  
  746.    /* Database file header handling */
  747.  
  748.    DBENTRYP_V    readDBHeader;
  749.    DBENTRYP_V    writeDBHeader;
  750.  
  751.  
  752.    /* Special and reserved methods */
  753.  
  754.    DBENTRYP_SVP  whoCares;
  755.  
  756. } RDDFUNCS;
  757.  
  758. typedef RDDFUNCS * PRDDFUNCS;
  759.  
  760. #define RDDFUNCSCOUNT   ( sizeof( RDDFUNCS ) / sizeof( DBENTRYP_V ) )
  761.  
  762. /*--------------------* SELF Methods *------------------------*/
  763.  
  764. /* Movement and positioning methods */
  765.  
  766. #define SELF_BOF(w, sp)                 ((*(w)->lprfsHost->bof)(w, sp))
  767. #define SELF_EOF(w, sp)                 ((*(w)->lprfsHost->eof)(w, sp))
  768. #define SELF_FOUND(w, sp)               ((*(w)->lprfsHost->found)(w, sp))
  769. #define SELF_GOTO(w, l)                 ((*(w)->lprfsHost->go)(w, l))
  770. #define SELF_GOTOID(w, sp)              ((*(w)->lprfsHost->goToId)(w, sp))
  771. #define SELF_GOBOTTOM(w)                ((*(w)->lprfsHost->goBottom)(w))
  772. #define SELF_GOTOP(w)                   ((*(w)->lprfsHost->goTop)(w))
  773. #define SELF_SEEK(w, i, v)              ((*(w)->lprfsHost->seek)(w, i, v))
  774. #define SELF_SKIP(w, l)                 ((*(w)->lprfsHost->skip)(w, l))
  775. #define SELF_SKIPFILTER(w, l)           ((*(w)->lprfsHost->skipFilter)(w, l))
  776. #define SELF_SKIPRAW(w, l)              ((*(w)->lprfsHost->skipRaw)(w, l))
  777.  
  778.  
  779. /* Data management */
  780.  
  781. #define SELF_ADDFIELD(w, ip)            ((*(w)->lprfsHost->addField)(w, ip))
  782. #define SELF_APPEND(w,l)                ((*(w)->lprfsHost->append)(w,l))
  783. #define SELF_CREATEFIELDS(w, v)         ((*(w)->lprfsHost->createFields)(w, v))
  784. #define SELF_DELETE(w)                  ((*(w)->lprfsHost->deleterec)(w))
  785. #define SELF_DELETED(w, sp)             ((*(w)->lprfsHost->deleted)(w, sp))
  786. #define SELF_FIELDCOUNT(w, sp)          ((*(w)->lprfsHost->fieldCount)(w, sp))
  787. #define SELF_FIELDDISPLAY(w, sp)        ((*(w)->lprfsHost->fieldDisplay)(w, sp))
  788. #define SELF_FIELDINFO(w,s1,s2,v)       ((*(w)->lprfsHost->fieldInfo)(w,s1,s2,v))
  789. #define SELF_FIELDNAME(w, i, bp)        ((*(w)->lprfsHost->fieldName)(w, i, bp))
  790. #define SELF_FLUSH(w)                   ((*(w)->lprfsHost->flush)(w))
  791. #define SELF_GETREC(w, bpp)             ((*(w)->lprfsHost->getRec)(w, bpp))
  792. #define SELF_GETVALUE(w, i, v)          ((*(w)->lprfsHost->getValue)(w, i, v))
  793. #define SELF_GETVARLEN(w, i, lp)        ((*(w)->lprfsHost->getVarLen)(w, i, lp))
  794. #define SELF_GOCOLD(w)                  ((*(w)->lprfsHost->goCold)(w))
  795. #define SELF_GOHOT(w)                   ((*(w)->lprfsHost->goHot)(w))
  796. #define SELF_PUTVALUE(w, i, v)          ((*(w)->lprfsHost->putValue)(w, i, v))
  797. #define SELF_PUTREC(w, bp)              ((*(w)->lprfsHost->putRec)(w, bp))
  798. #define SELF_RECALL(w)                  ((*(w)->lprfsHost->recall)(w))
  799. #define SELF_RECCOUNT(w, sp)            ((*(w)->lprfsHost->reccount)(w, sp))
  800. #define SELF_RECINFO(w,v1,i,v2)         ((*(w)->lprfsHost->recInfo)(w,v1,i,v2))
  801. #define SELF_RECNO(w, i)                ((*(w)->lprfsHost->recno)(w, i))
  802. #define SELF_SETFIELDEXTENT(w, s)       ((*(w)->lprfsHost->setFieldExtent)(w, s))
  803.  
  804.  
  805. /* WorkArea/Database management */
  806.  
  807. #define SELF_ALIAS(w, bp)               ((*(w)->lprfsHost->alias)(w, bp))
  808. #define SELF_CLOSE(w)                   ((*(w)->lprfsHost->close)(w))
  809. #define SELF_CREATE(w, ip)              ((*(w)->lprfsHost->create)(w, ip))
  810. #define SELF_INFO(w, i, g)              ((*(w)->lprfsHost->info)(w, i, g))
  811. #define SELF_NEW(w)                     ((*(w)->lprfsHost->newarea)(w))
  812. #define SELF_OPEN(w, ip)                ((*(w)->lprfsHost->open)(w, ip))
  813. #define SELF_RELEASE(w)                 ((*(w)->lprfsHost->release)(w))
  814. #define SELF_STRUCTSIZE(w, sp)          ((*(w)->lprfsHost->structSize)(w,sp))
  815. #define SELF_SYSNAME(w, bp)             ((*(w)->lprfsHost->sysName)(w, bp))
  816. #define SELF_DBEVAL(w, ip)              ((*(w)->lprfsHost->dbEval)(w, ip))
  817. #define SELF_PACK(w)                    ((*(w)->lprfsHost->pack)(w))
  818. #define SELF_PACKREC(w, l, sp)          ((*(w)->lprfsHost->packRec)(w, l, sp))
  819. #define SELF_SORT(w, ip)                ((*(w)->lprfsHost->sort)(w, ip))
  820. #define SELF_TRANS(w, ip)               ((*(w)->lprfsHost->trans)(w, ip))
  821. #define SELF_TRANSREC(w, ip)            ((*(w)->lprfsHost->transRec)(w, ip))
  822. #define SELF_ZAP(w)                     ((*(w)->lprfsHost->zap)(w))
  823.  
  824.  
  825. /* Relational Methods */
  826.  
  827. #define SELF_CHILDEND(w, ip)            ((*(w)->lprfsHost->childEnd)(w, ip))
  828. #define SELF_CHILDSTART(w, ip)          ((*(w)->lprfsHost->childStart)(w, ip))
  829. #define SELF_CHILDSYNC(w, ip)           ((*(w)->lprfsHost->childSync)(w, ip))
  830. #define SELF_SYNCCHILDREN(w)            ((*(w)->lprfsHost->syncChildren)(w))
  831. #define SELF_CLEARREL(w)                ((*(w)->lprfsHost->clearRel)(w))
  832. #define SELF_FORCEREL(w)                ((*(w)->lprfsHost->forceRel)(w))
  833. #define SELF_RELAREA(w, s, sp)          ((*(w)->lprfsHost->relArea)(w, s, sp))
  834. #define SELF_RELEVAL(w, ip)             ((*(w)->lprfsHost->relEval)(w, ip))
  835. #define SELF_RELTEXT(w, s, bp)          ((*(w)->lprfsHost->relText)(w, s, bp))
  836. #define SELF_SETREL(w, ip)              ((*(w)->lprfsHost->setRel)(w, ip))
  837.  
  838.  
  839. /* Order Management */
  840.  
  841. #define SELF_ORDLSTADD(w, lp)           ((*(w)->lprfsHost->orderListAdd)(w, lp))
  842. #define SELF_ORDLSTDELETE(w, lp)        ((*(w)->lprfsHost->orderListDelete)(w, lp))
  843. #define SELF_ORDLSTFOCUS(w, lp)         ((*(w)->lprfsHost->orderListFocus)(w,lp))
  844. #define SELF_ORDLSTREBUILD(w)           ((*(w)->lprfsHost->orderListRebuild)(w))
  845. #define SELF_ORDLSTCLEAR(w)             ((*(w)->lprfsHost->orderListClear)(w))
  846.  
  847. #define SELF_ORDSETCOND(w, ip)          ((*(w)->lprfsHost->orderCondition)(w, ip))
  848. #define SELF_ORDCREATE(w, ip)           ((*(w)->lprfsHost->orderCreate)(w, ip))
  849. #define SELF_ORDDESTROY(w, p)           ((*(w)->lprfsHost->orderDestroy)(w, p))
  850. #define SELF_ORDINFO(w, i, p)           ((*(w)->lprfsHost->orderInfo)(w, i, p))
  851. #define SELF_ORDEXPR(w, p)              ((*(w)->lprfsHost->orderInfo)(w, DBOI_EXPRESSION, p))
  852. #define SELF_ORDCOND(w, p)              ((*(w)->lprfsHost->orderInfo)(w, DBOI_CONDITION,  p))
  853. #define SELF_ORDRECNO(w, p)             ((*(w)->lprfsHost->orderInfo)(w, DBOI_RECNO,      p))
  854. #define SELF_ORDPOS(w, p)               ((*(w)->lprfsHost->orderInfo)(w, DBOI_POSITION,   p))
  855. #define SELF_ORDNUMBER(w, p)            ((*(w)->lprfsHost->orderInfo)(w, DBOI_NUMBER,     p))
  856. #define SELF_ORDNAME(w, p)              ((*(w)->lprfsHost->orderInfo)(w, DBOI_NAME,       p))
  857. #define SELF_ORDBAGNAME(w, p)           ((*(w)->lprfsHost->orderInfo)(w, DBOI_BAGNAME,    p))
  858. #define SELF_ORDBAGEXT(w,  p)           ((*(w)->lprfsHost->orderInfo)(w, DBOI_BAGEXT,     p))
  859.  
  860.  
  861. /* Filters and Scope Settings */
  862.  
  863. #define SELF_CLEARFILTER(w)             ((*(w)->lprfsHost->clearFilter)(w))
  864. #define SELF_CLEARLOCATE(w)             ((*(w)->lprfsHost->clearLocate)(w))
  865. #define SELF_CLEARSCOPE(w)              ((*(w)->lprfsHost->clearScope)(w))
  866. #define SELF_COUNTSCOPE(w,ip,lp)        ((*(w)->lprfsHost->countScope)(w,ip,lp))
  867. #define SELF_FILTERTEXT(w, bp)          ((*(w)->lprfsHost->filterText)(w, bp))
  868. #define SELF_SCOPEINFO(w,i,v)           ((*(w)->lprfsHost->scopeInfo)(w,i,v))
  869. #define SELF_SETFILTER(w, ip)           ((*(w)->lprfsHost->setFilter)(w, ip))
  870. #define SELF_SETLOCATE(w, ip)           ((*(w)->lprfsHost->setLocate)(w, ip))
  871. #define SELF_SETSCOPE(w, ip)            ((*(w)->lprfsHost->setScope)(w, ip))
  872. #define SELF_SKIPSCOPE(w, bp, l)        ((*(w)->lprfsHost->skipScope)(w, bp, l))
  873.  
  874.  
  875. /* Miscellaneous */
  876.  
  877. #define SELF_COMPILE(w, bp)             ((*(w)->lprfsHost->compile)(w, bp))
  878. #define SELF_ERROR(w, ip)               ((*(w)->lprfsHost->error)(w, ip))
  879. #define SELF_EVALBLOCK(w, v)            ((*(w)->lprfsHost->evalBlock)(w, v))
  880.  
  881.  
  882. /* Network operations */
  883.  
  884. #define SELF_GETLOCKS(w, g)             ((*(w)->lprfsHost->info)(w, DBI_GETLOCKARRAY, g))
  885. #define SELF_RAWLOCK(w, i, l)           ((*(w)->lprfsHost->rawlock)(w, i, l))
  886. #define SELF_LOCK(w, sp)                ((*(w)->lprfsHost->lock)(w, sp))
  887. #define SELF_UNLOCK(w, l)               ((*(w)->lprfsHost->unlock)(w, l))
  888.  
  889.  
  890. /* Memofile functions */
  891.  
  892. #define SELF_CLOSEMEMFILE(w)            ((*(w)->lprfsHost->closeMemFile)(w))
  893. #define SELF_CREATEMEMFILE(w,bp)        ((*(w)->lprfsHost->createMemFile)(w,bp))
  894. #define SELF_GETVALUEFILE(w,i,bp,b)     ((*(w)->lprfsHost->getValueFile)(w,i,bp,b))
  895. #define SELF_OPENMEMFILE(w,bp)          ((*(w)->lprfsHost->openMemFile)(w,bp))
  896. #define SELF_PUTVALUEFILE(w,i,bp)       ((*(w)->lprfsHost->putValueFile)(w,i,bp))
  897.  
  898.  
  899. /* Database file header handling */
  900.  
  901. #define SELF_READDBHEADER(w)            ((*(w)->lprfsHost->readDBHeader)(w))
  902. #define SELF_WRITEDBHEADER(w)           ((*(w)->lprfsHost->writeDBHeader)(w))
  903.  
  904.  
  905. /* Info operations */
  906.  
  907. #define SELF_RECSIZE(w, lp)             ((*(w)->lprfsHost->info)(w, DBI_GETRECSIZE, lp))
  908. #define SELF_HEADERSIZE(w, fp)          ((*(w)->lprfsHost->info)(w, DBI_GETHEADERSIZE, fp))
  909. #define SELF_LUPDATE(w, fp)             ((*(w)->lprfsHost->info)(w, DBI_LASTUPDATE, fp ))
  910. #define SELF_SETDELIM(w, fp)            ((*(w)->lprfsHost->info)(w, DBI_SETDELIMITER, fp))
  911. #define SELF_GETDELIM(w, fp)            ((*(w)->lprfsHost->info)(w, DBI_GETDELIMITER, fp))
  912. #define SELF_TABLEEXT(w, fp)            ((*(w)->lprfsHost->info)(w, DBI_TABLEEXT, fp))
  913.  
  914.  
  915. /*--------------------* SUPER Methods *------------------------*/
  916.  
  917.  
  918. /* Movement and positioning methods */
  919.  
  920. #define SUPER_BOF(w, sp)                ((*(SUPERTABLE)->bof)(w, sp))
  921. #define SUPER_EOF(w, sp)                ((*(SUPERTABLE)->eof)(w, sp))
  922. #define SUPER_FOUND(w, sp)              ((*(SUPERTABLE)->found)(w, sp))
  923. #define SUPER_GOTO(w, l)                ((*(SUPERTABLE)->go)(w, l))
  924. #define SUPER_GOTOID(w, sp)             ((*(SUPERTABLE)->goToId)(w, sp))
  925. #define SUPER_GOBOTTOM(w)               ((*(SUPERTABLE)->goBottom)(w))
  926. #define SUPER_GOTOP(w)                  ((*(SUPERTABLE)->goTop)(w))
  927. #define SUPER_SEEK(w, i, v)             ((*(SUPERTABLE)->seek)(w, i, v))
  928. #define SUPER_SKIP(w, l)                ((*(SUPERTABLE)->skip)(w, l))
  929. #define SUPER_SKIPFILTER(w, l)          ((*(SUPERTABLE)->skipFilter)(w, l))
  930. #define SUPER_SKIPRAW(w, l)             ((*(SUPERTABLE)->skipRaw)(w, l))
  931.  
  932.  
  933. /* Data management */
  934.  
  935. #define SUPER_ADDFIELD(w, ip)           ((*(SUPERTABLE)->addField)(w, ip))
  936. #define SUPER_APPEND(w,l)               ((*(SUPERTABLE)->append)(w,l))
  937. #define SUPER_CREATEFIELDS(w, v)        ((*(SUPERTABLE)->createFields)(w, v))
  938. #define SUPER_DELETE(w)                 ((*(SUPERTABLE)->deleterec)(w))
  939. #define SUPER_DELETED(w, sp)            ((*(SUPERTABLE)->deleted)(w, sp))
  940. #define SUPER_FIELDCOUNT(w, sp)         ((*(SUPERTABLE)->fieldCount)(w, sp))
  941. #define SUPER_FIELDDISPLAY(w, sp)       ((*(SUPERTABLE)->fieldDisplay)(w, sp))
  942. #define SUPER_FIELDINFO(w,s1,s2,v)      ((*(SUPERTABLE)->fieldInfo)(w,s1,s2,v))
  943. #define SUPER_FIELDNAME(w, i, bp)       ((*(SUPERTABLE)->fieldName)(w, i, bp))
  944. #define SUPER_FLUSH(w)                  ((*(SUPERTABLE)->flush)(w))
  945. #define SUPER_GETREC(w, bpp)            ((*(SUPERTABLE)->getRec)(w, bpp))
  946. #define SUPER_GETVALUE(w, i, v)         ((*(SUPERTABLE)->getValue)(w, i, v))
  947. #define SUPER_GETVARLEN(w, i, lp)       ((*(SUPERTABLE)->getVarLen)(w, i, lp))
  948. #define SUPER_GOCOLD(w)                 ((*(SUPERTABLE)->goCold)(w))
  949. #define SUPER_GOHOT(w)                  ((*(SUPERTABLE)->goHot)(w))
  950. #define SUPER_PUTVALUE(w, i, v)         ((*(SUPERTABLE)->putValue)(w, i, v))
  951. #define SUPER_PUTREC(w, bp)             ((*(SUPERTABLE)->putRec)(w, bp))
  952. #define SUPER_RECALL(w)                 ((*(SUPERTABLE)->recall)(w))
  953. #define SUPER_RECCOUNT(w, sp)           ((*(SUPERTABLE)->reccount)(w, sp))
  954. #define SUPER_RECINFO(w,v1,i,v2)        ((*(SUPERTABLE)->recInfo)(w,v1,i,v2))
  955. #define SUPER_RECNO(w, sp)              ((*(SUPERTABLE)->recno)(w, sp))
  956. #define SUPER_SETFIELDEXTENT(w, s)      ((*(SUPERTABLE)->setFieldExtent)(w, s))
  957.  
  958.  
  959. /* WorkArea/Database management */
  960.  
  961. #define SUPER_ALIAS(w, bp)              ((*(SUPERTABLE)->alias)(w, bp))
  962. #define SUPER_CLOSE(w)                  ((*(SUPERTABLE)->close)(w))
  963. #define SUPER_CREATE(w, ip)             ((*(SUPERTABLE)->create)(w, ip))
  964. #define SUPER_INFO(w, i, g)             ((*(SUPERTABLE)->info)(w, i, g))
  965. #define SUPER_NEW(w)                    ((*(SUPERTABLE)->newarea)(w))
  966. #define SUPER_OPEN(w, ip)               ((*(SUPERTABLE)->open)(w, ip))
  967. #define SUPER_RELEASE(w)                ((*(SUPERTABLE)->release)(w))
  968. #define SUPER_STRUCTSIZE(w, sp)         ((*(SUPERTABLE)->structSize)(w, sp))
  969. #define SUPER_SYSNAME(w, bp)            ((*(SUPERTABLE)->sysName)(w, bp))
  970. #define SUPER_DBEVAL(w, ip)             ((*(SUPERTABLE)->dbEval)(w, ip))
  971. #define SUPER_PACK(w)                   ((*(SUPERTABLE)->pack)(w))
  972. #define SUPER_PACKREC(w, l, sp)         ((*(SUPERTABLE)->packRec)(w, l, sp))
  973. #define SUPER_SORT(w, ip)               ((*(SUPERTABLE)->sort)(w, ip))
  974. #define SUPER_TRANS(w, ip)              ((*(SUPERTABLE)->trans)(w, ip))
  975. #define SUPER_TRANSREC(w, ip)           ((*(SUPERTABLE)->transRec)(w, ip))
  976. #define SUPER_ZAP(w)                    ((*(SUPERTABLE)->zap)(w))
  977.  
  978.  
  979. /* Relational Methods */
  980.  
  981. #define SUPER_CHILDEND(w, ip)           ((*(SUPERTABLE)->childEnd)(w, ip))
  982. #define SUPER_CHILDSTART(w, ip)         ((*(SUPERTABLE)->childStart)(w, ip))
  983. #define SUPER_CHILDSYNC(w, ip)          ((*(SUPERTABLE)->childSync)(w, ip))
  984. #define SUPER_SYNCCHILDREN(w)           ((*(SUPERTABLE)->syncChildren)(w))
  985. #define SUPER_CLEARREL(w)               ((*(SUPERTABLE)->clearRel)(w))
  986. #define SUPER_FORCEREL(w)               ((*(SUPERTABLE)->forceRel)(w))
  987. #define SUPER_RELAREA(w, s, sp)         ((*(SUPERTABLE)->relArea)(w, s, sp))
  988. #define SUPER_RELEVAL(w, ip)            ((*(SUPERTABLE)->relEval)(w, ip))
  989. #define SUPER_RELTEXT(w, s, bp)         ((*(SUPERTABLE)->relText)(w, s, bp))
  990. #define SUPER_SETREL(w, ip)             ((*(SUPERTABLE)->setRel)(w, ip))
  991.  
  992.  
  993. /* Order Management */
  994.  
  995. #define SUPER_ORDLSTADD(w, lp)          ((*(SUPERTABLE)->orderListAdd)(w, lp))
  996. #define SUPER_ORDLSTDELETE(w, lp)       ((*(SUPERTABLE)->orderListDelete)(w, lp))
  997. #define SUPER_ORDLSTFOCUS(w, lp)        ((*(SUPERTABLE)->orderListFocus)(w, lp))
  998. #define SUPER_ORDLSTREBUILD(w)          ((*(SUPERTABLE)->orderListRebuild)(w))
  999. #define SUPER_ORDLSTCLEAR(w)            ((*(SUPERTABLE)->orderListClear)(w))
  1000.  
  1001. #define SUPER_ORDSETCOND(w,ip)          ((*(SUPERTABLE)->orderCondition)(w, ip))
  1002. #define SUPER_ORDCREATE(w, ip)          ((*(SUPERTABLE)->orderCreate)(w, ip))
  1003. #define SUPER_ORDDELETE(w, ip)          ((*(SUPERTABLE)->orderDelete)(w, ip))
  1004. #define SUPER_ORDINFO(w, i, p)          ((*(SUPERTABLE)->orderInfo)(w, i, p))
  1005. #define SUPER_ORDEXPR(w, p)             ((*(SUPERTABLE)->orderInfo)(w, DBOI_EXPRESSION, p))
  1006. #define SUPER_ORDCOND(w, p)             ((*(SUPERTABLE)->orderInfo)(w, DBOI_CONDITION,  p))
  1007. #define SUPER_ORDRECNO(w, p)            ((*(SUPERTABLE)->orderInfo)(w, DBOI_RECNO,      p))
  1008. #define SUPER_ORDPOS(w, p)              ((*(SUPERTABLE)->orderInfo)(w, DBOI_POSITION,   p))
  1009. #define SUPER_ORDNUMBER(w, p)           ((*(SUPERTABLE)->orderInfo)(w, DBOI_NUMBER,     p))
  1010. #define SUPER_ORDNAME(w, p)             ((*(SUPERTABLE)->orderInfo)(w, DBOI_NAME,       p))
  1011. #define SUPER_ORDBAGNAME(w, p)          ((*(SUPERTABLE)->orderInfo)(w, DBOI_BAGNAME,    p))
  1012. #define SUPER_ORDBAGEXT(w,  p)          ((*(SUPERTABLE)->orderInfo)(w, DBOI_BAGEXT,     p))
  1013.  
  1014.  
  1015. /* Filters and Scope Settings */
  1016.  
  1017. #define SUPER_CLEARFILTER(w)            ((*(SUPERTABLE)->clearFilter)(w))
  1018. #define SUPER_CLEARLOCATE(w)            ((*(SUPERTABLE)->clearLocate)(w))
  1019. #define SUPER_CLEARSCOPE(w)             ((*(SUPERTABLE)->clearScope)(w))
  1020. #define SUPER_COUNTSCOPE(w,ip,lp)       ((*(SUPERTABLE)->countScope)(w,ip,lp))
  1021. #define SUPER_FILTERTEXT(w, bp)         ((*(SUPERTABLE)->filterText)(w, bp))
  1022. #define SUPER_SCOPEINFO(w,i,v)          ((*(SUPERTABLE)->scopeInfo)(w,i,v))
  1023. #define SUPER_SETFILTER(w, ip)          ((*(SUPERTABLE)->setFilter)(w, ip))
  1024. #define SUPER_SETLOCATE(w, ip)          ((*(SUPERTABLE)->setLocate)(w, ip))
  1025. #define SUPER_SETSCOPE(w, ip)           ((*(SUPERTABLE)->setScope)(w, ip))
  1026. #define SUPER_SKIPSCOPE(w, bp, l)       ((*(SUPERTABLE)->skipScope)(w, bp, l))
  1027.  
  1028.  
  1029. /* Miscellaneous */
  1030.  
  1031. #define SUPER_COMPILE(w, bp)            ((*(SUPERTABLE)->compile)(w, bp))
  1032. #define SUPER_ERROR(w, ip)              ((*(SUPERTABLE)->error)(w, ip))
  1033. #define SUPER_EVALBLOCK(w, v)           ((*(SUPERTABLE)->evalBlock)(w, v))
  1034.  
  1035.  
  1036. /* Network operations */
  1037.  
  1038. #define SUPER_GETLOCKS(w, g)            ((*(SUPERTABLE)->info)(w, DBI_GETLOCKARRAY, g))
  1039. #define SUPER_RAWLOCK(w, i, l)          ((*(SUPERTABLE)->rawlock)(w, i, l))
  1040. #define SUPER_LOCK(w, sp)               ((*(SUPERTABLE)->lock)(w, sp))
  1041. #define SUPER_UNLOCK(w)                 ((*(SUPERTABLE)->unlock)(w))
  1042.  
  1043.  
  1044. /* Memofile functions */
  1045.  
  1046. #define SUPER_CLOSEMEMFILE(w)           ((*(SUPERTABLE)->closeMemFile)(w))
  1047. #define SUPER_CREATEMEMFILE(w,bp)       ((*(SUPERTABLE)->createMemFile)(w,bp))
  1048. #define SUPER_GETVALUEFILE(w,i,bp,b)    ((*(SUPERTABLE)->getValueFile)(w,i,bp,b))
  1049. #define SUPER_OPENMEMFILE(w,bp)         ((*(SUPERTABLE)->openMemFile)(w,bp))
  1050. #define SUPER_PUTVALUEFILE(w,i,bp)      ((*(SUPERTABLE)->putValueFile)(w,i,bp))
  1051.  
  1052.  
  1053. /* Database file header handling */
  1054.  
  1055. #define SUPER_READDBHEADER(w)           ((*(SUPERTABLE)->readDBHeader)(w))
  1056. #define SUPER_WRITEDBHEADER(w)          ((*(SUPERTABLE)->writeDBHeader)(w))
  1057.  
  1058.  
  1059. /* Info operations */
  1060.  
  1061. #define SUPER_RECSIZE(w, lp)          ((*(SUPERTABLE)->info)(w, DBI_GETRECSIZE, lp))
  1062. #define SUPER_HEADERSIZE(w, fp)       ((*(SUPERTABLE)->info)(w, DBI_GETHEADERSIZE, fp))
  1063. #define SUPER_LUPDATE(w, fp)          ((*(SUPERTABLE)->info)(w, DBI_LASTUPDATE, fp ))
  1064. #define SUPER_SETDELIM(w, fp)         ((*(SUPERTABLE)->info)(w, DBI_SETDELIMITER, fp))
  1065. #define SUPER_GETDELIM(w, fp)         ((*(SUPERTABLE)->info)(w, DBI_GETDELIMITER, fp))
  1066. #define SUPER_TABLEEXT(w, fp)         ((*(SUPERTABLE)->info)(w, DBI_TABLEEXT, fp))
  1067.  
  1068.  
  1069. /*
  1070. *  PROTOTYPES
  1071. *  ----------
  1072. */
  1073. extern ERRCODE hb_rddInherit( PRDDFUNCS pTable, PRDDFUNCS pSubTable, PRDDFUNCS pSuperTable, BYTE * szDrvName );
  1074. extern ERRCODE hb_rddDisinherit( BYTE * drvName );
  1075. extern USHORT  hb_rddExtendType( USHORT fieldType );
  1076. extern USHORT  hb_rddFieldType( USHORT extendType );
  1077.  
  1078. #endif /* HB_RDDAPI_H_ */
  1079.