home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c004 / 2.ddi / CTOPTN.D < prev    next >
Encoding:
Text File  |  1989-04-18  |  9.0 KB  |  308 lines

  1. /*
  2.  *    compile time options:    The CTOPTN.H header determines the fundamental
  3.  *                characteristics of the c-tree data structures 
  4.  *                and disk I/O model. Each implementation
  5.  *                enviornment has its own version.
  6.  *
  7.  *    This program is the CONFIDENTIAL and PROPRIETARY property 
  8.  *    of FairCom(R) Corporation. Any unauthorized use, reproduction or
  9.  *    transfer of this program is strictly prohibited.
  10.  *
  11.  *    Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989 FairCom Corporation
  12.  *    (Subject to limited distribution and
  13.  *     restricted disclosure only.)
  14.  *    *** ALL RIGHTS RESERVED ***
  15.  *
  16.  *    4006 West Broadway
  17.  *    Columbia, MO 65203
  18.  *
  19.  *
  20.  *    c-tree(R)    Version 4.3
  21.  *            Release C
  22.  *            February 7, 1989 17:30
  23.  *
  24.  */
  25.  
  26.         /* Configuration Option Definitions */
  27.  
  28. /* ***  SELECT ONE OPTION FROM EACH OF THE FOLLOWING 10 CATEGORIES  *** */
  29.  
  30. /* CATGEORY I:     disk I/O model                        */
  31. /*        If FPUTONLY or FPUTFGET are selected, be sure to use    */
  32. /*        non-zero file size extensions to ensure directory     */
  33. /*        updates are forced to disk.                */
  34.  
  35. /*    FPUTFGET      MULTIUSER:   disable c-tree buffering        */
  36. /*    FPUTONLY      SINGLE USER: c-tree buffering is write-through    */
  37. /*    NOTFORCE      SINGLE USER: buffering is not write-through    */
  38.  
  39.  
  40. /* CATEGORY II: automatic dos buffer flush after ISAM updates        */
  41. /*        On systems where the dos buffers (not the internal     */
  42. /*        c-tree buffers) are not write-through, you may want to    */
  43. /*        enable dos buffer flushes after updates. DOSFLUSH causes */
  44. /*        such flushing after ISAM updates. DOSFLUSH only applies    */
  45. /*        when FPUTONLY or FPUTFGET are selected.            */
  46.  
  47. /*    DOSFLUSH    enable automatic dos buffer flush        */
  48. /*    NO_FLUSH    no automatic dos buffer flush after ISAM update */
  49. /*                                    */
  50. /*    NOTE:    if DOSFLUSH is selected, you must implement flushdos    */
  51. /*        function in CTCLIB.C (or CTLOCK.xyz). See CTCLIB.C    */
  52. /*        for examples.                        */
  53.  
  54.  
  55. /* CATEGORY III: internal integer format                */
  56.  
  57. /*    LOW_HIGH      internal integer format LSB to MSB        */
  58. /*    HIGH_LOW        "       "       "    MSB to LSB        */
  59.  
  60.  
  61.  
  62. /* CATEGORY IV: variable length data record support            */
  63.  
  64. /*    VARLDATA      support variable length data records        */
  65. /*    NO_VARLD      no variable length support            */
  66.  
  67.  
  68. /* CATEGORY V: conversion character for input to short integer        */
  69.  
  70. /*    PERC_H        use %h:  (K & R standard)            */
  71. /*    PERC_D        use %d:  works for all 8 and 16 bit compilers    */
  72. /*    PERC_HD        use %hd: used most commonly in 32 bit compilers    */
  73.  
  74.  
  75. /* CATEGORY VI: key compression / variable length key support        */
  76.  
  77. /*    VARLKEYS    support key compression                */
  78. /*    NO_VARLK    no key compression                */
  79.  
  80.  
  81. /* CATEGORY VII: floating point key support                */
  82.  
  83. /*    FLOATKEY    support double floating point keys        */
  84. /*    NO_FLOAT    no floating point support            */
  85.  
  86.  
  87. /* CATEGORY VIII: uniform format for c-tree binary data            */
  88.  
  89. /*    UNIFRMAT    permits HIGH_LOW machines to produce c-tree    */
  90. /*            files compatible with LOW_HIGH machines        */
  91. /*    NO_UNIFM    no special binary conversions performed        */
  92.  
  93.  
  94. /* CATEGORY IX: parameter file routines                    */
  95.  
  96. /*    PARMFILE    allow use of parameter files            */
  97. /*    NO_PARMF    disable parameter file input routines        */
  98.  
  99.  
  100. /* CATEGORY X: r-tree required special features in c-tree        */
  101.  
  102. /*    RTREE        enable r-tree features                */
  103. /*    NO_RTREE    disbale r-tree features                */
  104.  
  105.  
  106. /* CATEGORY XI: server configuration                    */
  107.  
  108. /*    CTSERVER    enable c-tree server capabilities        */
  109. /*    NO_SERVE    no server                    */
  110.  
  111.  
  112. /* CATEGORY XII: decoupled receive / send capability            */
  113.  
  114. /*    CTS_INDP    server can receive & send messages independently*/
  115. /*    CTS_CPLD    server must respond w/o 'delay' to request    */
  116.  
  117.  
  118. /* CATEGORY XIII: support ISAM routines in server            */
  119.  
  120. /*    CTS_ISAM    server can support ISAM routines        */
  121. /*    CTS_NOSM    server will not support ISAM routines        */
  122.  
  123.  
  124. /* CATEGORY XIV: support for natural, long integer sequence numbers    */
  125.  
  126. /*    NATURAL_SERIAL    automatic sequence numbers stored as long integers */
  127. /*    NO_NATURAL    sequence stored in MSB to LSB order on all mchines */
  128. /*            NATURAL_SERIAL not available before V4.3 Release C */
  129.  
  130.  
  131. /* ******************************************************************** */
  132. /* ******************************************************************** */
  133.  
  134.  
  135. /* ***      Place Your Configuration Option Selections Here        *** */
  136.  
  137. #define NOTFORCE
  138. #define NO_FLUSH
  139. #define LOW_HIGH
  140. #define VARLDATA
  141. #define PERC_D
  142. #define VARLKEYS
  143. #define FLOATKEY
  144. #define UNIFRMAT
  145. #define PARMFILE
  146. #define NO_RTREE
  147. #define NO_SERVE
  148. #define CTS_CPLD
  149. #define CTS_ISAM
  150. #define NATURAL_SERIAL
  151.  
  152. /* ***                Capacity Constants                *** */
  153.  
  154. #define MAXLEN        64    /* maximum key length            */
  155. #define    MAXVFIL        255    /* maximum virtual files open at same time */
  156. #define MAX_NAME    64    /* maximum file name length        */
  157.  
  158. /* ***            Variable Length Key & Field Constants        *** */
  159.  
  160. #define PADDING        ' '    /* trailing key padding            */
  161. #define FIELD_DELIM    '\0'    /* var length field delimiter        */
  162.  
  163. /*
  164.  * The following capacity constants are used only by the ISAM routines and
  165.  * the REBUILD routines.
  166.  */
  167.  
  168. #define MAXFIL        40    /* maximum number of files        */
  169. #define MAX_DAT_KEY    10    /* maximum number of indices per data   */
  170.                 /* file                    */
  171. #define MAX_KEY_SEG    4    /* maximum number of segments per key    */
  172. #define MAX_LOCKS    32    /* maximum number of locks        */
  173.  
  174.  
  175. /*
  176.  * Special external buffer space support.
  177.  *
  178.  * If EXTRABFR is defined as below AND IF YOU PROVIDE THE FOLLOWING
  179.  * FUNCTIONS: wrtxnod(),redxnod(),clsxbuf()  to write, read and
  180.  * close the extra buffer space, then c-tree will manipulate
  181.  * index buffers beyond the allocated region (into your external
  182.  * buffer space).  There are special code segments in CTKRNL.C
  183.  * and CTINIT.C
  184.  *
  185. #define EXTRABFR
  186.  *
  187.  * This is not a standard feature suppported by FairCom.
  188.  */
  189.  
  190.  
  191.  
  192. /* ******************************************************************** */
  193. /* ************************     S T O P    **************************** */
  194. /* ***     D O   N O T   C H A N G E   T H E    F O L L O W I N G   *** */
  195. /* ***   W I T H O U T   C H E C K I N G   W I T H   F A I R C O M  *** */
  196. /* ******************************************************************** */
  197.  
  198. /* ***********     FPUTFGET CANNOT BE USED WITH THE SERVER    ********* */
  199. #ifdef CTSERVER
  200. #ifdef FPUTFGET
  201. #undef FPUTFGET
  202. #define FPUTONLY
  203. #endif
  204. #endif
  205.  
  206. /* ***********   MUSTFRCE indicates multi-user requirements  ********* */
  207. #ifdef MUSTFRCE
  208. #undef MUSTFRCE
  209. #endif
  210. #ifdef FPUTFGET
  211. #define MUSTFRCE
  212. #endif
  213. #ifdef CTSERVER
  214. #define MUSTFRCE
  215. #endif
  216.  
  217. /* ***********  DOSFLUSH APPLIES ONLY TO FPUTONLY & FPUTFGET  ********* */
  218. #ifdef NOTFORCE
  219. #ifdef DOSFLUSH
  220. #undef  DOSFLUSH
  221. #define NO_FLUSH
  222. #endif
  223. #endif
  224. /* ************* ************* ************* ************ ************* */
  225.  
  226. /* *************     UNIFRMAT APPLIES ONLY TO HIGH_LOW    ************* */
  227. #ifdef LOW_HIGH
  228. #ifdef UNIFRMAT
  229. #undef  UNIFRMAT
  230. #define NO_UNIFM
  231. #endif
  232. #endif
  233. /* ************* ************* ************* ************ ************* */
  234.  
  235.  
  236. #define MAXLEV        10    /* maximum height of B-Tree + 1        */
  237. #define    VARI_LEN    (sizeof(VRLEN) + sizeof(LONG))
  238. #define STATUS    (2 * sizeof(COUNT) + 2 * sizeof(LONG   ) + 2 * sizeof(TEXT))
  239. /* node info:     nkv & nkb         sucesr & predsr       leaf & bmem    */
  240.  
  241. #define HDRSIZ   64
  242. /* permanent header information */
  243. #define DHDRSIZ  HDRSIZ
  244.  
  245.  
  246. #ifdef  FPUTFGET
  247. #define PRDRPEAT    10    /* # of times to retry predsr node    */
  248. #else
  249. #define PRDRPEAT    0
  250. #endif
  251.  
  252. #define    MAXMEMB        31    /* maximum additional index members    */
  253.  
  254.  
  255.  
  256. /* ******************************************************************** */
  257. /* ***            SYMBOLIC CONSTANTS               ***  */
  258. /* ******************************************************************** */
  259.  
  260. #define    DRNZERO         (POINTER) 0
  261. #define    NODEZERO    (LONG   ) 0
  262.  
  263. #define CTREAD     0
  264. #define CTWRITE     1
  265. #define CTNONE     3
  266. #define CTXTND     4
  267.  
  268. #define LEAF     '\1'
  269. #define NOLEAF   '\0'
  270.  
  271. #define ALPHAKEY    '\0'
  272. #define INTKEY        '\1'
  273. #define SFLOATKEY    '\2'
  274. #define DFLOATKEY    '\3'
  275. #define COL_PREFIX    '\4'    /* leading character compression    */
  276. #define COL_SUFFIX    '\10'    /*  8 decimal: padding compression    */
  277. #define COL_BOTH    '\14'    /* 12 decimal: both of the above    */
  278. #define ALT_SEQ        '\20'    /* 16 decimal: alternative col sequence    */
  279. #define MSK_ALT        ~ALT_SEQ
  280.  
  281. #define DUPKEY   '\1'
  282. #define NODUPKEY '\0'
  283.  
  284. #define REGULAR  '\1'
  285. #define DUPLEAF  '\0'
  286. #define DUPNONL     '\3'
  287.  
  288. #define DAT_CLOSE '\0'
  289. #define IDX_CLOSE '\1'
  290. #define VAT_CLOSE '\2'
  291.  
  292. #define SECSIZ   128        /* logical sector size. DO NOT CHANGE.    */
  293. #define CTBUFSIZ (4 * SECSIZ)    /* ct_buf[] size */
  294. #define UPDATED  C255        /* C255 defined in ctcmpl.h */
  295. #define DELFLG     C255
  296. #define COMPACT  '\143'        /* file compaction flag: must rebuild indices */
  297. #define CMPMSK     0x00ff
  298.  
  299. #define MAXAGE    0xffff    /* max age of lru counter before roll-over */
  300. #define MAXSRLPOS 0xffff    /* no serial segment flag           */
  301.  
  302. #define    LH_VER     0x0001            /* LOW_HIGH option         */
  303. #define    HL_VER     0x0002            /* HIGH_LOW   "            */
  304. #define CT_V4     0x0050            /* c-tree version 4.1(A,B,C,D)    */
  305. #define CT_V4E     0x0060            /* c-tree version 4.1E/E2/F 4.3A*/
  306.  
  307. /*    end of ctoptn.h        */
  308.