home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / OOFILE / Buildable, limited OOFILE / c-tree headers / ctparm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-12  |  13.8 KB  |  394 lines  |  [TEXT/CWIE]

  1. /*
  2.  *    This program is the CONFIDENTIAL and PROPRIETARY property 
  3.  *    of FairCom(R) Corporation. Any unauthorized use, reproduction or
  4.  *    transfer of this computer program is strictly prohibited.
  5.  *
  6.  *      Copyright (c) 1984 - 1994 FairCom Corporation.
  7.  *    This is an unpublished work, and is subject to limited distribution and
  8.  *    restricted disclosure only. ALL RIGHTS RESERVED.
  9.  *
  10.  *            RESTRICTED RIGHTS LEGEND
  11.  *    Use, duplication, or disclosure by the Government is subject to
  12.  *    restrictions set forth in subparagraph (c)(1)(ii) of the Rights in
  13.  *     Technical Data and Computer Software clause at DFARS 252.227-7013.
  14.  *    FairCom Corporation, 4006 West Broadway, Columbia, MO 65203.
  15.  *
  16.  *    c-tree PLUS(tm)    Version 6.4
  17.  *            Release B
  18.  *            October 19, 1994
  19.  */
  20.  
  21. #ifndef ctPARMH
  22. #define ctPARMH
  23.  
  24. #ifndef ctIFILH
  25. #include "ctifil.h"
  26. #endif
  27. #ifdef ctSQL
  28. #include "ctpsql.h"
  29. #endif
  30.  
  31. /*
  32. ** Logon Block:
  33. */
  34.  
  35. typedef struct logblk {
  36.     COUNT     files;        /* number of files & indices */
  37.     COUNT     userprof;    /* user profile mask */
  38.     COUNT     ibuffers;    /* # index buffers */
  39.     COUNT     dbuffers;    /* # of data buffers */
  40.     COUNT     nsectors;    /* # of sectors per buffer */
  41.     COUNT     reservd1;    /* reserved */
  42.     VRLEN     reservd2;    /* reserved */
  43.     TEXT     userid[IDZ];    /* user id */
  44.     TEXT     userword[PWZ];    /* user password */
  45.     TEXT     servname[FNZ];    /* optional server name */
  46.     TEXT     lbpad[PDZ];
  47.     } LOGBLK;
  48. typedef LOGBLK ctMEM *    pLOGBLK;
  49.  
  50. /*
  51. The ibuffers, dbuffers and nsectors members are ignored when connecting to a
  52. FairCom Server. The userid and userword members are ignored in non-server
  53. operation. The userprof member controls whether or not to perform automatic
  54. TFRMKEY's on targets sent to ISAM level search routines. Set userprof to
  55. USERPRF_NTKEY if you wish to disable the automatic TFRMKEY. The servname
  56. member supports multiple server environments.
  57. */
  58.  
  59. /*
  60. ** ISAM Block:
  61. */
  62.  
  63. typedef struct isamblk {
  64.     LOGBLK     isamlog;    /* login block */
  65.     LONG     permmask;    /* CREISAM permission mask */
  66.     TEXT     groupid[IDZ];    /* CREISAM Group id */
  67.     TEXT     fileword[PWZ];    /* file password */
  68.     TEXT     parmname[FNZ];    /* parameter file name */
  69.     TEXT     ispad[PDZ];
  70.     } ISAMBLK;
  71. typedef ISAMBLK ctMEM *    pISAMBLK;
  72.  
  73. /*
  74. The isamlog member is simply a logon block interpreted as above. The optional
  75. permmask and groupid members are only used by CREISAM to set the files'
  76. permission masks and passwords. The fileword member is used by CREISAM to set
  77. the password and by OPNISAM to access the file. The parmname member holds
  78. the parameter file name.
  79. */
  80.  
  81.  
  82. /*
  83. ** IFIL Block:
  84. */
  85.  
  86. typedef struct ifilblk {
  87.     LONG     permmask;    /* CREIFIL permission mask */
  88.     TEXT     groupid[IDZ];    /* CREIFIL Group id */
  89.     TEXT     fileword[PWZ];    /* file password */
  90.     TEXT     dataextn[EXZ];    /* data extension */
  91.     TEXT     indxextn[EXZ];    /* indx extension */
  92.     TEXT     ifpad[PDZ];
  93.     pIFIL     ptr_ifil;    /* IFIL pointer */
  94.     } IFILBLK;
  95. typedef IFILBLK ctMEM *    pIFILBLK;
  96.  
  97. /*
  98. The permmask and groupid members hold the optional security information
  99. assigned at file creation. The fileword holds the optional password assigned
  100. at creation or the password passed at a subsequent file open. The dataextn
  101. and indxextn members hold optional file name extensions for the data and
  102. index files, respectively. If a file name extension member begins with a
  103. null byte, then the default extension is used, ".dat" for data files and
  104. ".idx" for index files. To signify that no extension should be added,
  105. pass the member containing only blanks (and a null terminator). (Both
  106. fiel name extension members cannot be blank since the data file and index
  107. must have unique names.) The ptr_ifil member points to a traditional IFIL
  108. structure.
  109. */
  110.  
  111.  
  112. /*
  113. ** Create File Block:
  114. */
  115.  
  116. typedef struct creblk {
  117.     UCOUNT     length;    /* record / key length */
  118.     UCOUNT     extdsize;    /* file extent size */
  119.     COUNT     filemode;    /* file mode */
  120.     COUNT     keytyp;    /* index key type */
  121.     COUNT     keydup;    /* index duplicate flag */
  122.     COUNT     member;    /* index member # */
  123.     LONG     permmask;    /* permission mask */
  124.     TEXT     groupid[IDZ];    /* group id */
  125.     TEXT     fileword[PWZ];    /* file password */
  126.     TEXT     filename[FNZ];    /* file name */
  127.     TEXT     crpad[PDZ];
  128.     } CREBLK;
  129. typedef CREBLK ctMEM *    pCREBLK;
  130.  
  131. /*
  132. The length member specifies the record length for data files or the key length
  133. for index files. The extdsize member contains the file szie extension parameter,
  134. and the filemode member contains the file mode to use at creation. The keytyp,
  135. keydup and member members of the parameter block are ignored for data files and
  136. represent the key type, key duplicate and index member number, respectively, for
  137. index files. The permmask, groupid and fileword members hold the optional
  138. file security information. Finally, filename contains the file name to be used
  139. at create.
  140. */
  141.  
  142.  
  143. /*
  144. ** Open File Block:
  145. */
  146.  
  147. typedef struct openblk {
  148.     COUNT     filemode;    /* file mode */
  149.     TEXT     fileword[PWZ];    /* file password */
  150.     TEXT     filename[FNZ];    /* file name */
  151.     } OPENBLK;
  152. typedef OPENBLK ctMEM *    pOPENBLK;
  153.  
  154. /*
  155. The filemode member holds the file mode to be used at open time. The fileword
  156. member contains the optional password, and the filename member contains the
  157. file name to be used at open.
  158. */
  159.  
  160.  
  161. /*
  162. ** Key Estimate Block:
  163. */
  164.  
  165. typedef struct estmblk {
  166.     TEXT    key1[MAXLEN];    /* 1st key */
  167.     TEXT    key2[MAXLEN];    /* 2nd key */
  168.     } ESTMBLK;
  169. typedef ESTMBLK ctMEM *    pESTMBLK;
  170.  
  171. /*
  172. The Key Estimate Block is used with the ESTKEY function which estimates
  173. the number of key values ocurring between key1 and key2.
  174. */
  175.  
  176. typedef struct cresec {
  177.         LONG     permmask;    /* permission mask */
  178.         TEXT     groupid[IDZ];    /* opt group id */
  179.         TEXT     fileword[PWZ];    /* opt file password */
  180.         TEXT     scpad[PDZ];
  181.     } CRESEC;
  182. typedef CRESEC ctMEM *    pCRESEC;
  183.  
  184. #define LOGBLKLEN    SIZEOF(LOGBLK)
  185. #define ISAMBLKLEN    SIZEOF(ISAMBLK)
  186. #define OPENBLKLEN    SIZEOF(OPENBLK)
  187. #define IFILBLKLEN    (4 + IDZ + PWZ + EXZ + EXZ)
  188. #define CREBLKLEN    SIZEOF(CREBLK)
  189. #define ESTMBLKLEN    (2 * MAXLEN)
  190.  
  191. #define p1LOGBLK    ((pLOGBLK)ptr1)
  192. #define p1CREBLK    ((pCREBLK)ptr1)
  193. #define p1OPENBLK    ((pOPENBLK)ptr1)
  194. #define p1ISAMBLK    ((pISAMBLK)ptr1)
  195. #define p1IFILBLK    ((pIFILBLK)ptr1)
  196. #define p1ESTMBLK    ((pESTMBLK)ptr1)
  197. #define p1PKEYBLK    ((pPKEYREQ)ptr1)
  198. #define p1DEFDEF    ((pDEFDEF)ptr1)
  199.  
  200. /******************************************************************************/
  201.  
  202. #define FN_PUTFIL    1
  203. #define FN_UPDCURI    (2 | FN_MASK_ISAM)
  204.  
  205. #define FN_DELFIL    3
  206. #define FN_LKISAM    (4 | FN_MASK_ISAM | FN_MASK_NFCHK)
  207. #define FN_DELREC    (5 | FN_MASK_ISAM)
  208. #define FN_ALCSET    (6 | FN_MASK_ISAM | FN_MASK_NFCHK)
  209. #define FN_CHGSET    (7 | FN_MASK_ISAM | FN_MASK_NFCHK)
  210. #define FN_DELVREC    (8 | FN_MASK_ISAM)
  211.  
  212. #define FN_CLISAM    (9 | FN_MASK_ISAM | FN_MASK_NFCHK)
  213. #define FN_STPUSR    (10 | FN_MASK_NFCHK)
  214. #define FN_FRESET    (11 | FN_MASK_ISAM | FN_MASK_NFCHK)
  215. #define FN_CLSFIL    12
  216.  
  217. #define FN_TRANEND    (13 | FN_MASK_NFCHK)
  218. #define FN_TRANRST    (14 | FN_MASK_NFCHK)
  219. #define FN_TRANABT    (15 | FN_MASK_NFCHK)
  220. #define FN_TRANCLR    (16 | FN_MASK_NFCHK)
  221. #define FN_CLRFIL    (17 | FN_MASK_ISAM)
  222. #define FN_DELRFIL    (18 | FN_MASK_ISAM)
  223. #define FN_ALCBAT    (19 | FN_MASK_ISAM | FN_MASK_NFCHK)
  224. #define FN_CHGBAT    (20 | FN_MASK_ISAM | FN_MASK_NFCHK)
  225. #define FN_FREBAT    (21 | FN_MASK_ISAM | FN_MASK_NFCHK)
  226. #define FN_PERFORM    (22 | FN_MASK_NFCHK)
  227. #define FN_USERLIST    (23 | FN_MASK_NFCHK | FN_MASK_OUTPUT)
  228. #define FN_USERINFO    (24 | FN_MASK_NFCHK | FN_MASK_OUTPUT)
  229. #define FN_CTKLUSR    (25 | FN_MASK_NFCHK)
  230. #define FN_CTTESTFUNC    (26 | FN_MASK_NFCHK)
  231. #define FN_CHGICON    (27 | FN_MASK_ISAM | FN_MASK_NFCHK)
  232. #define FN_CLSICON    (28 | FN_MASK_ISAM | FN_MASK_NFCHK)
  233.  
  234. #define FN_SETFLTR    38
  235. #define FN_ADDUSR    (39 | FN_MASK_ISAM) /* FN_MASK_KEYSET */
  236. #define FN_ADDREC    (40 | FN_MASK_ISAM) /* FN_MASK_KEYSET */
  237. #define FN_RWTREC    (41 | FN_MASK_ISAM) /* FN_MASK_KEYSET */
  238.  
  239. #define mfnNXTREC    42
  240. #define FN_NXTREC    (42 | FN_MASK_ISAM | FN_MASK_OUTPUT)
  241. #define FN_PRVREC    (43 | FN_MASK_ISAM | FN_MASK_OUTPUT)
  242. #define FN_FRSREC    (44 | FN_MASK_ISAM | FN_MASK_OUTPUT)
  243. #define FN_LSTREC    (45 | FN_MASK_ISAM | FN_MASK_OUTPUT)
  244. #define FN_RRDREC    (46 | FN_MASK_ISAM | FN_MASK_OUTPUT)
  245. #define FN_NXTSET    (47 | FN_MASK_ISAM | FN_MASK_OUTPUT)
  246. #define FN_PRVSET    (48 | FN_MASK_ISAM | FN_MASK_OUTPUT)
  247. #define mfnPRVSET    48
  248.  
  249. #define FN_SETALTSEQ    49
  250. #define FN_GETALTSEQ    (50 | FN_MASK_OUTPUT)
  251. #define FN_SETDEFBLK    51
  252. #define FN_MIDSET    (52 | FN_MASK_ISAM | FN_MASK_OUTPUT)
  253. #define FN_PUTDODA    53
  254. #define FN_SETVARBYTS    54
  255.  
  256. #define FN_SYSMON    (59 | FN_MASK_LONG | FN_MASK_VRLEN | FN_MASK_OUTPUT | FN_MASK_NFCHK)
  257. #define FN_WRTVREC    (60 | FN_MASK_LONG | FN_MASK_VRLEN)
  258. #define FN_RDVREC    (61 | FN_MASK_LONG | FN_MASK_VRLEN | FN_MASK_OUTPUT)
  259.  
  260. #define FN_REDREC    (62 | FN_MASK_LONG | FN_MASK_OUTPUT)
  261. #define FN_WRTREC    (63 | FN_MASK_LONG)
  262. #define FN_SETCURI    (64 | FN_MASK_LONG | FN_MASK_VRLEN | FN_MASK_ISAM)
  263.  
  264. #define FN_RETREC    (65 | FN_MASK_LONG)
  265. #define FN_RETVREC    (66 | FN_MASK_LONG)
  266. #define FN_RESETCUR    (67 | FN_MASK_LONG | FN_MASK_OUTPUT | FN_MASK_ISAM)
  267. #define FN_SETCURI2    (68 | FN_MASK_LONG | FN_MASK_VRLEN | FN_MASK_ISAM)
  268.  
  269. #define FN_GETMNAME    (74 | FN_MASK_VRLEN | FN_MASK_OUTPUT)
  270. #define FN_GETNAM    (75 | FN_MASK_VRLEN | FN_MASK_OUTPUT)
  271. #define FN_GETSEG    (76 | FN_MASK_VRLEN | FN_MASK_OUTPUT | FN_MASK_ISAM)
  272. #define FN_GETMAP    (77 | FN_MASK_VRLEN | FN_MASK_OUTPUT | FN_MASK_ISAM)
  273. #define FN_SECURITY    (78 | FN_MASK_VRLEN)
  274.  
  275. #define mfnFRSSET    80
  276. #define FN_FRSSET    (80 | FN_MASK_ISAM)
  277. #define FN_LSTSET    (81 | FN_MASK_ISAM)
  278.  
  279. #define FN_EQLREC    (82 | FN_MASK_ISAM)
  280. #define FN_GTEREC    (83 | FN_MASK_ISAM)
  281. #define FN_LTEREC    (84 | FN_MASK_ISAM)
  282. #define FN_GTREC    (85 | FN_MASK_ISAM)
  283. #define FN_LTREC    (86 | FN_MASK_ISAM)
  284. #define FN_REDIREC    (87 | FN_MASK_ISAM | FN_MASK_LONG | FN_MASK_OUTPUT)
  285. #define mfnLTREC    87
  286.  
  287. #define FN_CHGUSR    (89 | FN_MASK_NFCHK)
  288. #define FN_CREISAM    (90 | FN_MASK_ISAM | FN_MASK_LOGON | FN_MASK_NFCHK)
  289. #define FN_OPNISAM    (91 | FN_MASK_ISAM | FN_MASK_LOGON | FN_MASK_NFCHK)
  290.  
  291. #define FN_DELIFIL    (93 | FN_MASK_ISAM)
  292. #define FN_RBLIFIL    (94 | FN_MASK_ISAM | FN_MASK_NFCHK)
  293. #define FN_CREIFIL    (95 | FN_MASK_ISAM | FN_MASK_NFCHK)
  294. #define FN_CLIFIL    (96 | FN_MASK_ISAM)
  295. #define FN_OPNIFIL    (97 | FN_MASK_ISAM | FN_MASK_NFCHK)
  296. #define FN_PRMIIDX    (98 | FN_MASK_ISAM)
  297. #define FN_TMPIIDX    (99 | FN_MASK_ISAM)
  298. #define FN_PUTIFIL    (100| FN_MASK_ISAM | FN_MASK_NFCHK)
  299. #define FN_CMPIFIL    (101| FN_MASK_ISAM | FN_MASK_NFCHK)
  300. #define FN_EXPIFIL    (102| FN_MASK_ISAM | FN_MASK_NFCHK)
  301.  
  302. #define FN_INTREE    (110 | FN_MASK_LOGON | FN_MASK_NFCHK)
  303. #define FN_INTISAM    (111 | FN_MASK_ISAM | FN_MASK_LOGON | FN_MASK_NFCHK)
  304.  
  305. #define FN_SETNODE    (115 | FN_MASK_NFCHK)
  306.  
  307. #define FN_ADDVREC    (120 | FN_MASK_VRLEN | FN_MASK_ISAM) /* FN_MASK_KEYSET*/
  308. #define FN_RWTVREC    (121 | FN_MASK_VRLEN | FN_MASK_ISAM) /* FN_MASK_KEYSET*/
  309. #define FN_REDVREC    (122 | FN_MASK_VRLEN | FN_MASK_ISAM | FN_MASK_OUTPUT)
  310. #define FN_DELRES    123
  311. #define FN_ENARES    124
  312. #define FN_UPDRES    (125 | FN_MASK_VRLEN)
  313. #define FN_ADDRES    (126 | FN_MASK_VRLEN)
  314. #ifdef ctCONDIDX
  315. #define FN_PUTCIDX    (127 | FN_MASK_VRLEN | FN_MASK_ISAM)
  316. #endif
  317.  
  318. #define FN_ADDKEY    (130 | FN_MASK_LONG)
  319. #define FN_LOADKEY    (131 | FN_MASK_LONG)
  320. #define FN_DELCHK    (132 | FN_MASK_LONG)
  321.  
  322. #define FN_SETOPS    (136 | FN_MASK_NFCHK | FN_MASK_LONG | FN_MASK_VRLEN)
  323.  
  324. #define FN_CREDAT    (140 | FN_MASK_NFCHK)
  325. #define FN_CREIDX    (141 | FN_MASK_NFCHK)
  326. #define FN_CREMEM    142
  327.  
  328. #define FN_GTEKEY    (150 | FN_MASK_LONG | FN_MASK_OUTRET)
  329. #define FN_GTKEY    (151 | FN_MASK_LONG | FN_MASK_OUTRET)
  330. #define FN_LTKEY    (152 | FN_MASK_LONG | FN_MASK_OUTRET)
  331. #define FN_LTEKEY    (153 | FN_MASK_LONG | FN_MASK_OUTRET)
  332.  
  333. #define FN_DELBLD    (154 | FN_MASK_LONG)
  334. #define FN_EQLKEY    (155 | FN_MASK_LONG)
  335.  
  336. #define FN_FRSKEY    (156 | FN_MASK_LONG | FN_MASK_OUTPUT | FN_MASK_OUTRET)
  337. #define FN_LSTKEY    (157 | FN_MASK_LONG | FN_MASK_OUTPUT | FN_MASK_OUTRET)
  338.  
  339. #define FN_GETCURP    (158 | FN_MASK_LONG | FN_MASK_ISAM)
  340. #define FN_NEWREC    (159 | FN_MASK_LONG)
  341. #define FN_DATENT    (160 | FN_MASK_LONG)
  342. #define FN_IDXENT    (161 | FN_MASK_LONG)
  343. #define FN_SERIALNUM    (162 | FN_MASK_LONG)
  344. #define FN_TRANBEG    (163 | FN_MASK_LONG | FN_MASK_NFCHK)
  345.  
  346. #define FN_NXTKEY    (164 | FN_MASK_LONG | FN_MASK_OUTPUT | FN_MASK_OUTRET)
  347. #define FN_PRVKEY    (165 | FN_MASK_LONG | FN_MASK_OUTPUT | FN_MASK_OUTRET)
  348. #define FN_GETRES    (166 | FN_MASK_LONG | FN_MASK_VRLEN)
  349. #define FN_CTDIDX    (167 | FN_MASK_LONG | FN_MASK_NFCHK)
  350. #define FN_SQLLOCK    (168 | FN_MASK_LONG | FN_MASK_NFCHK)
  351. #define FN_CTUSER    (169 | FN_MASK_LONG | FN_MASK_NFCHK)
  352. #define FN_GETFIL    (170 | FN_MASK_LONG)
  353.  
  354. #define FN_GTVLEN    (180 | FN_MASK_LONG | FN_MASK_VRLEN)
  355. #define FN_GETVLEN    (181 | FN_MASK_VRLEN | FN_MASK_ISAM)
  356. #define FN_GETIFIL    (182 | FN_MASK_VRLEN | FN_MASK_LONG | FN_MASK_ISAM | FN_MASK_OUTPUT)
  357. #define FN_GETDODA    (183 | FN_MASK_VRLEN | FN_MASK_LONG | FN_MASK_OUTPUT)
  358. #ifdef ctCONDIDX
  359. #define FN_GETCIDX    (184 | FN_MASK_VRLEN | FN_MASK_LONG | FN_MASK_ISAM | FN_MASK_OUTPUT)
  360. #endif
  361.  
  362. #define FN_TFRMKEY    (188 | FN_MASK_OUTPUT)
  363. #define FN_GETCURK    (189 | FN_MASK_VRLEN | FN_MASK_ISAM | FN_MASK_OUTPUT)
  364. #define FN_GETCURKL    (190 | FN_MASK_OUTPUT)
  365.  
  366. #define FN_CTSBLD    (192 | FN_MASK_NFCHK)
  367. #define FN_TSTVREC    (193 | FN_MASK_LONG | FN_MASK_VRLEN)
  368. #define FN_COMMBUF    (194 | FN_MASK_VRLEN | FN_MASK_NFCHK | FN_MASK_LONG)
  369. #define FN_SQR        (195 | FN_MASK_VRLEN | FN_MASK_NFCHK | FN_MASK_ISAM | FN_MASK_LONG)
  370. #define FN_OPNRFIL    (196 | FN_MASK_NFCHK | FN_MASK_LONG | FN_MASK_ISAM)
  371. #define FN_TMPNAME    (197 | FN_MASK_VRLEN | FN_MASK_NFCHK | FN_MASK_OUTPUT)
  372. #define FN_SQL        (198 | FN_MASK_VRLEN | FN_MASK_NFCHK | FN_MASK_ISAM | FN_MASK_LONG)
  373. #define FN_DYNDMP    (199 | FN_MASK_VRLEN | FN_MASK_NFCHK)
  374. #define FN_FRCKEY    (200 | FN_MASK_LONG | FN_MASK_OUTPUT | FN_MASK_OUTRET)
  375. #define FN_AVLFILNUM    (201 | FN_MASK_NFCHK)
  376. #define FN_OPNFIL    (202 | FN_MASK_NFCHK)
  377. #define FN_BATSET    (203 | FN_MASK_VRLEN | FN_MASK_ISAM)
  378. #define FN_LOKREC    (204 | FN_MASK_LONG)
  379. #define FN_ESTKEY    (205 | FN_MASK_LONG)
  380. #define FN_NEWVREC    (206 | FN_MASK_LONG | FN_MASK_VRLEN)
  381. #define FN_TRANSAV    (207 | FN_MASK_NFCHK)
  382. #define FN_TRANBAK    (208 | FN_MASK_LONG | FN_MASK_NFCHK)
  383. #define FN_SETFNDVAL    (209 | FN_MASK_VRLEN | FN_MASK_NFCHK)
  384. #define FN_IOPERFORMANCE (210 | FN_MASK_NFCHK | FN_MASK_OUTPUT)
  385. #define FN_CLNIDX    (211 | FN_MASK_NFCHK)
  386. #define FN_RNGENT    (212 | FN_MASK_LONG)
  387. #define FN_ORDKEY    (213 | FN_MASK_LONG | FN_MASK_VRLEN)
  388. #define FN_OPNICON    (214 | FN_MASK_LONG | FN_MASK_ISAM)
  389. #define CTI_MXFN    214
  390.  
  391. #endif /* ctPARMH */
  392.  
  393. /* end of ctparm.h */
  394.