home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c162_1 / 1.ddi / $READ.ME < prev    next >
Encoding:
Text File  |  1992-08-29  |  42.3 KB  |  1,025 lines

  1.  
  2.  
  3.  
  4.       $read.me (c)Copyright Sequiter Software Inc., 1990-1992.
  5.       All rights reserved.
  6.       ----------------------------------------------------------
  7.       
  8.           README -  Table of Contents
  9.       
  10.          I.    Introduction
  11.       
  12.          II.   CodeBase Electronic Documentation Files.
  13.       
  14.          III.  CodeBase Manual and Code Revisions.
  15.       
  16.          IV.   Windows 3.0 and the CodeBase 4.5 DLL.
  17.       
  18.          V.    Interactive CodeBase 4.5.
  19.       
  20.          VI.   CodeBase Index and Memo File Compatibility.
  21.       
  22.          VII.  Examples.
  23.       
  24.          VIII. Using CodeScreens with CodeBase 4.5.
  25.       
  26.          IX.   CodeBase Public-Access Bulletin Board System.
  27.  
  28.          X.    Accessing More Than 20 Files in DOS or Windows.
  29.       
  30.       ----------------------------------------------------------
  31.       
  32.       I.    Introduction
  33.       
  34.          CodeBase is a C library for database management.  Its compat-
  35.       ibility allows you to directly create, access, or change dBASE 
  36.       IV, dBASE III, FoxPro or Clipper data, index, or memo files.
  37.       
  38.          CodeBase has full multi-user capabilities.  When programs are 
  39.       run on a network, the network is automatically detected and 
  40.       used.  CodeBase allows both explicit and automatic record 
  41.       locking and file locking.  It is also possible to bypass the 
  42.       locking mechanism and read data locked by another user.
  43.       
  44.          All of the CodeBase functions work together to allow C 
  45.       programmers to program at a very high level.  Programs will 
  46.       execute very quickly, they will be readable and there will be no 
  47.       unnecessary lines of code.
  48.       
  49.          In order to use CodeBase, it is necessary to have a C 
  50.       compiler and it is necessary to have some knowledge of the C 
  51.       programming language.
  52.       
  53.          In addition, for C++ programmers, there is a C++ interface 
  54.       and functionality extension.  There are new string classes which
  55.       let you manipulate text easily.  Fields become strings so that 
  56.  
  57.       you can manipulate data easily.  Finally, there is an object-
  58.       oriented interface to data and index files.
  59.       
  60.          Foreign support, currently for German and French, is 
  61.       available by contacting Sequiter Software.  Foreign support is
  62.       enabled by the use of a simple define.  Foreign versions are 
  63.       supported under Windows through the use of either the ANSI 
  64.       character set or the ASCII character set.
  65.          For platforms other than DOS/Windows or OS2, a portability
  66.       version is available.  This version is intended for use on UNIX/
  67.       XENIX and similar platforms.  Both ANSI and Kernigan & Ritchie
  68.       source code is provided for maximum portability. 
  69.       
  70.          To accomodate users requiring DOS or UNIX screen management 
  71.       capabilities, a software library called 'CodeScreens' is 
  72.       available.  CodeScreens features pop-up and pull-down window 
  73.       support, color screen design capabilities, and print functions, 
  74.       plus much more.
  75.       
  76.          For information on either the CodeBase 4.5 portability 
  77.       version, or CodeScreens, contact Sequiter Software Ltd.
  78.       
  79.       ----------------------------------------------------------
  80.       
  81.       II.   CodeBase Electronic Documentation Files.
  82.       
  83.          It is highly recommended that any installed documentation
  84.       files be read in addition to the CodeBase manuals.  These
  85.       documentation files serve as the primary information source
  86.       for Visual Basic and Turbo Pascal for Windows support. 
  87.       
  88.          The various documentation files provide additional specific
  89.       information not found in the CodeBase manual.  Please note
  90.       that only documentation files relevant to the options
  91.       installed will be present on your drive after installation.
  92.       
  93.          All electronic documentation files have been suitably 
  94.       formatted for hard-copy printing.  To print any document, 
  95.       simply direct that file to your printer, using the 'print' 
  96.       command.
  97.       
  98.          The complete list of documentation files that are present 
  99.       on the CodeBase disk are:
  100.       
  101.       GENERAL DOCUMENTATION:
  102.       
  103.       $READ.ME        General user information, manual changes/updates,
  104.                       and installation information. Always installed.
  105.       
  106.       INSTALL.DOC     Information on CodeBase installation.  Includes
  107.                       manual unfolding documentation.
  108.       
  109.       CLIP_NDX.DOC    Information on using CLIPPER and dBASE III
  110.                       compatible index and memo files.
  111.       
  112.  
  113.       PORT.DOC        Important information when using the CodeBase 4.5
  114.                       portability version.  Not included with the
  115.                       CodeBase 4.5 DOS/WINDOWS version.  Located on
  116.                       ANSI and K&R diskettes.
  117.       
  118.       
  119.       COMPILER DOCUMENTATION:
  120.       
  121.       BORLAND.DOC     Borland C++ compiler specific information.
  122.       
  123.       TURBOCPP.DOC    Borland Turbo C++ 1.01 specific information.
  124.       MSC.DOC         Microsoft C 6.00a compiler specific information.
  125.       
  126.       METAWARE.DOC    MetaWare High C 386 compiler specific 
  127.                       information.
  128.       
  129.       WATCOM.DOC      Watcom 386 8.5 and 9.0 compiler specific 
  130.                       information.
  131.       
  132.       ZORTECH.DOC     Zortech C++ 3.0 compiler specific information.
  133.       
  134.       EXAMPLES.DOC    Information on usage of the provided source code
  135.                       examples.
  136.       
  137.       TEST.DOC        Information on usage of the CodeBase test
  138.                       programs
  139.       
  140.       WINDOWS.DOC     Windows 3.0 and CodeBase DLL information.  Other
  141.                       Windows information can be found in selected
  142.                       compiler document files.
  143.       
  144.       CODEWIN.DOC     CodeWindows information.
  145.       
  146.       CPP.DOC         Information for users of the CodeBase C++
  147.                       extension.
  148.       
  149.       42UPGRAD.DOC    CodeBase 4.2 to 4.5 translation information.
  150.       
  151.       
  152.       VISUAL BASIC DOCUMENTATION:
  153.       
  154.       VBASIC.DOC      Introduction to Visual Basic.  Also contains 
  155.                       an explanation of the supplied Visual Basic
  156.                       functions.
  157.       
  158.       A4QUICK.DOC     Visual Basic / CodeBase quick reference.
  159.       
  160.       
  161.       TURBO PASCAL FOR WINDOWS DOCUMENTATION:
  162.       
  163.       CBPASCAL.DOC    Introduction to using CodeBase with Turbo Pascal
  164.                       for Windows.
  165.       
  166.       FUNCTION.DOC    CodeBase 4.5 Turbo Pascal for Windows function
  167.                       reference.
  168.  
  169.       
  170.       CBDEMO1.DOC     Documentation for provided examples.
  171.       CBDEMO2.DOC     
  172.       CBDEMO3.DOC     
  173.       CBDEMO4.DOC     
  174.       CBDEMO5.DOC     
  175.       CBDEMO6.DOC     
  176.       CBDEMO7.DOC     
  177.       CBDEMO8.DOC     
  178.       CBDEMO9.DOC     
  179.       
  180.       ----------------------------------------------------------
  181.       
  182.       III.  CodeBase Manual and Code Revisions
  183.       CODEBASE 4.5 MANUAL:
  184.       
  185.       1. Page 17
  186.            Switch 'S4MEMO_OFF' is not yet implemented.
  187.       
  188.       2. Page 19
  189.            Additional switches for Clipper and dBASE III support
  190.            have been added.
  191.          Insert:
  192.       
  193.          S4CLIPPER -  This switch adds support for Nantucket
  194.                       CLIPPER file formats.  This includes '.NTX'
  195.                       index files and '.DBT' memo files.
  196.       
  197.          S4NDX     -  This switch adds support for dBASE III and
  198.                       dBASE II plus file formats.  This includes
  199.                       '.NDX' indexes and '.DBT' memo files.
  200.       
  201.          S4USE_COUNT- This switch is for use with dBASE III files.
  202.                       When performing deletions and zaps in dBASE
  203.                       III, the actual file is not properly shrunk
  204.                       when completed.  With the switch set, any
  205.                       improper files will be detected and corrected.
  206.                       Set this switch when building a CodeBase .NDX
  207.                       library if you also use dBASE III with the
  208.                       database files.  
  209.       
  210.       3. Page 62, 'd4check'
  211.            The line 'See Also t4check() and i4check()' should be
  212.            deleted.  Although these functions do exist, they are
  213.            not documented.
  214.       
  215.       
  216.       4. Page 64, 'd4close_all()'
  217.            From:
  218.               Usage  void d4close_all( C4CODE *code_base )
  219.            To:
  220.               Usage  int  d4close_all( C4CODE *code_base )
  221.       
  222.       
  223.       5. Page 102, 'd4skip()'
  224.  
  225.            The return 'r4entry' is no longer returned for
  226.            for compatibility reasons.
  227.       
  228.            Delete:
  229.            r4entry    'C4CODE.skip_error' is false and there was 
  230.                       entry in the selected tag for the current
  231.                       record.
  232.       
  233.       
  234.       6. Page 107, 'd4top()'
  235.            Add to 'Returns':
  236.       
  237.            r4locked     Index Tag or Record locked.
  238.       
  239.       7. Page 135, 'f4long()'
  240.            From:
  241.               Usage  int  f4long( F4FIELD *field )
  242.            To:
  243.               Usage  long f4long( F4FIELD *field )
  244.       
  245.       8. Page 137, 'f4ncpy()'
  246.            From:  
  247.               In addition, f4ncpy() guarantees that 'mempt' will be
  248.               null termination, provided that 'mem_len' is greater
  249.               than zero.
  250.            To:
  251.               In addition, f4ncpy() guarantees that 'mempt' will be
  252.               null terminated, provided that 'mem_len' is greater
  253.               than the length of the field.
  254.       
  255.       9. Page 157, 'i4create()'
  256.            Add to 'DESCRIPTION' (second paragraph)
  257.       
  258.            A production index can be created for an existing database
  259.            file by setting the parameter 'file_name' in 'i4create()' 
  260.            to '0'.  Conversely, passing a non-NULL file_name will 
  261.            result in the creation of a non-production index.  This is
  262.            true even if the file_name has the same prefix as the 
  263.            database file name.
  264.       
  265.       
  266.       10. Pages 183 and 184 are in the wrong order.
  267.       
  268.       
  269.       11. Page 251, 's4Str::ncpy'
  270.            From:
  271.               Usage void     s4Str::ncpy(char *to, unsigned to_len)
  272.            To:
  273.               Usage unsigned s4Str::ncpy(char *to, unsigned to_len)
  274.       
  275.       
  276.       CODEWINDOWS MANUAL:
  277.       
  278.       1. Page 8
  279.            Delete the reference to the 'CodeWindows DLL'. The
  280.  
  281.          CodeWindows functions are contained within the CodeBase DLL.
  282.       
  283.       2  Page 42.
  284.            The buffer supplied to g4display_buffer() must be null 
  285.            terminated.
  286.       
  287.       CODEBASE SOURCE CODE CHANGES:
  288.       
  289.       Note: Notices of changes and enhancements to CodeBase 4.5 are 
  290.             updated on files contained on Sequiter's BBS system.  For
  291.             more information, see 'section IX'.  
  292.       
  293.       ----------------------------------------------------------
  294.       
  295.       IV.   Windows 3.0 And The CodeBase 4.5 DLL
  296.       
  297.           The DLL provided, 'M4DLL.DLL', is a DLL designed to be
  298.       used with many different compilers and Windows programming
  299.       tools.  It has been tested with Microsoft C 6.00a, Borland
  300.       C++ 2.0 and 3.0, Visual Basic, and Turbo Pascal for Windows,
  301.       and should work with other Windows products that will accept
  302.       a DLL.  See the file 'WINDOWS.DOC', on the \CB sub-directory
  303.       for more extensive information.
  304.       
  305.       ----------------------------------------------------------
  306.  
  307.       V.    Interactive CodeBase 4.5.
  308.       
  309.          Interactive CodeBase 4.5 for DOS or Windows is a CodeBase
  310.       application that allows the interactive manipulation of databases 
  311.       under Windows.  Interactive CodeBase may be used to test the
  312.       operation and consequence of CodeBase functions, or as a tutorial
  313.       aid to familiarize users with CodeBase functions, or may be
  314.       used as a quick and easy way to manipulate databases without
  315.       coding and compiling.  For Windows, the Interactive CodeBase
  316.       provided is intended for use with dBASE IV index and memo
  317.       file formats.  Also, two DOS Interactive CodeBase executables
  318.       are currently provided.  They are intended for either dBASE
  319.       IV or FoxPro file formats.  For both Interactive CodeBases,
  320.       use of other file formats are supported, but must be recompiled.  
  321.  
  322.  
  323.       A)  Interactive CodeBase for DOS
  324.           ----------------------------
  325.  
  326.          Interactive CodeBase for DOS, known as 'CID', contains all of
  327.       the functionality mentioned above, as well as interactive browse
  328.       and edit facilities.  
  329.  
  330.          To install Interactive CodeBase, select 'Interactive CodeBase
  331.       for DOS' during the CodeBase INSTALL.  Alternatively, you
  332.       may manually UNFOLD the Interactive files, contained in 'INTERACT.FLD'.
  333.  
  334.  
  335.       Using CID:
  336.  
  337.  
  338.         Each provided CID executable program can handle only one of the
  339.       CodeBase-supported index formats.  The file format can be determined
  340.       by examining the last three letters of the executables provided:
  341.  
  342.       eg.  CID_MDX.EXE  is the MDX file format of dBASE IV
  343.            CID_CDX.EXE  is the CDX file format of FoxPro
  344.  
  345.          Also, during CID execution, the file format will be displayed on
  346.       the bottom row of CID's main screen.  Please ensure that the CID
  347.       being used is the proper CID for your file format.  If not, recompile
  348.       as directed, or contact the Sequiter BBS for the correct CID.
  349.  
  350.         You can run Interactive CodeBase for DOS in either color or
  351.       monochrome modes.  Pass the command line argument of MONO to select
  352.       monochrome mode or enter no arguments for color mode:
  353.  
  354.         Eg.         c:\CID_MDX  MONO          ** for  monochrome mode
  355.  
  356.         or          c:\CID_MDX                ** for color mode
  357.  
  358.  
  359.          Upon startup, Interactive CodeBase for DOS will display a
  360.       startup message.  Press any key to clear this message.  The main
  361.       menu bar will then be activated.  You can use the cursor keys
  362.       to move the highlighting over the item that you desire and press
  363.       [ENTER] to select.      
  364.  
  365.          In addition you can use the highlighted hot keys to select a menu
  366.       item.  Holding down the ALT key and pressing a letter will move to
  367.       appropriate menu.  For example, pressing [ALT D] will move you to
  368.       D4DATA menu.  Pressing the letter that is highlighted in an entry of
  369.       the current menu, will select that item.  For example, pressing
  370.       the [O] key while in the I4INDEX menu will select the i4open
  371.       function.
  372.  
  373.            After selecting a function from a menu, you will be presented
  374.       with a variety of menus, and input boxes, prompting you to enter in the
  375.       parameters of the function.  Most functions will present you with a
  376.       list of the databases that are currently open.  You can press the
  377.       [ESC] key to abort most operations.
  378.  
  379.            When all of the parameters have been entered, the function will
  380.       be executed.  If CodeBase encounters any errors, they will be
  381.       displayed in popup boxes.  After execution of a function, the return
  382.       value (if any) will be displayed.
  383.  
  384.       Examples:
  385.  
  386.       To open a database:
  387.  
  388.            -select d4open from the D4DATA menu.  A file requester will then
  389.             appear.
  390.            -enter the directory containing the database you want to open.
  391.            -a list of the databases in that directory will appear.
  392.  
  393.            -select the database moving the highlighting with the cursor
  394.             keys and press [ENTER]
  395.  
  396.       To set the C4CODE.safety to FALSE
  397.  
  398.            -select the C4CODE menu.
  399.            -use the cursor keys to move the highlighting over C4CODE.safety
  400.            -press the [ENTER] key to togle between true and false.
  401.  
  402.  
  403.       Using the Browser:
  404.  
  405.          InterActive CodeBase for DOS has a built in Browser.  To browse a
  406.       database, either open it with d4data, or create it with d4create.  Then
  407.       select BROWSER from the main menu.  You will then be presented with a
  408.       list of open databases.  Select the database that you want to browse.
  409.  
  410.       NOTE: Memo field browsing and editing is not yet supported.
  411.  
  412.       Browse Mode:
  413.  
  414.            The following keys have special functions when in browse mode:
  415.  
  416.  
  417.               [UP ARROW]    : Selects the previous record
  418.               [DOWN ARROW]  : Selects the next record
  419.               [LEFT ARROW]  : Selects the previous field
  420.               [RIGHT ARROW] : Selects the next field
  421.               [ESC]         : Leaves Browse mode and activates the menu
  422.               [ENTER]       : Allows you to edit the field
  423.               [PAGE UP]     : Skips back one page of records
  424.               [PAGE DOWN]   : Skips forward one page of records
  425.               [HOME]        : Selects the first field
  426.               [END]         : Selects the last field
  427.               [CNTL HOME]   : Selects the first record
  428.               [CNTL END]    : Selects the last record
  429.               [INS]         : Inserts a new record
  430.               [DEL]         : Toggles the deletion flag
  431.  
  432.           Menu Items:
  433.  
  434.            BROWSE           : Reenters Browse mode
  435.               d4tag_select  : Select one of the database's tags
  436.               d4go          : go to the entered record number
  437.               d4seek        : seek using the currently selected tag
  438.               d4top         : goto the top of the database
  439.               d4bottom      : goto the bottom of the database
  440.               QUIT BROWSER  : quit browser and return the main menu
  441.  
  442.  
  443.       Compiling the Source Code:
  444.  
  445.          Source code for InterActive CodeBase for DOS has been provided
  446.       along with a project file for the Borland C++ (CID.PRJ) and a batch
  447.       file (CID.BAT) for the MSC compilers.  InterActive CodeBase for DOS
  448.  
  449.       uses the CodeScreens screen library.  You will need this library if
  450.       you plan on recompiling this program.  If you do not have
  451.       CodeScreens, but would like CodeBase Interactive for DOS compiled
  452.       for another file format (such as NTX or NDX), you can download these
  453.       versions from our BBS.
  454.  
  455.          If you are using Microsoft C ,you will also have to rebuild the
  456.       CodeBase 4.5 library with the e4error and e4severe functions
  457.       commented out.  InterActive CodeBase for DOS has replacements
  458.       for those routines and the Microsoft C linker will not allow functions
  459.       in a library with the same names as those in the source code.
  460.  
  461.  
  462.       B)  Interactive CodeBase for Windows
  463.           --------------------------------
  464.  
  465.          To install Interactive CodeBase, select 'Interactive CodeBase
  466.       for Windows' during the CodeBase INSTALL.  Alternatively, you
  467.       may manually UNFOLD the Interactive files, contained in 'INTERWIN.FLD'
  468.       and 'INTERACT.FLD'. Start up Windows, and create a new program
  469.       item.  Name the item INTERACT 4.5, and set the path to run
  470.       the executable  'INTERACT.EXE'.  Interactive CodeBase should
  471.       now be ready for use. 
  472.  
  473.          To use, simply press the newly created icon, or 'run 
  474.       INTERACT'.  When the program has loaded, you will see the 
  475.       Interactive CodeBase main window, and several menu selection
  476.       headings.  These menu selections correspond to the main sections
  477.       in the CodeBase manual.  For example, 'DATA' corresponds to the
  478.       'Data File Functions' in the manual.  To use, click on any of
  479.       these menus to get a new window with a sub-menu of CodeBase 
  480.       functions.  These functions will correspond to the functions
  481.       contained in the manual.  To activate a function, simply press
  482.       that function, and follow any given instructions.  For example, 
  483.       you will likely start an Interactive session by selecting 
  484.       'DATA', and then 'd4open()' or 'd4create()'.
  485.       
  486.          Interactive CodeBase contains error checking to stop users
  487.       from performing invalid code sequences.  For example, if you try
  488.       to append a record to a file before opening or creating that 
  489.       file, an error message will appear.  If this happens, simply 
  490.       continue on by performing the required function. 
  491.       
  492.          Included with the executable Interactive program are some
  493.       additional files that can be used.  The source code is included,
  494.       as well as some batch and project files that can be used to 
  495.       rebuild Interactive CodeBase.  Microsoft 6.00a users may use the
  496.       batch file to rebuild Interactive CodeBase, while Borland users
  497.       may use the project files.  Users of other compilers may edit
  498.       one of the batch files for use with their compiler. Interactive
  499.       CodeBase may also be compiled for use with a DLL.  In this case,
  500.       you may alter and use 'M4DLLRUN.MAK' or 'B4DLLRUN.PRJ' files, 
  501.       located in 'WINDOWS.FLD', to build an executable.
  502.       
  503.          As noted, the provided Interactive CodeBase is compiled for
  504.  
  505.       use with dBASE IV index and memo file formats.  If you want to
  506.       use Interactive CodeBase with another file format, you must 
  507.       recompile a new Interactive CodeBase.  This is done by using
  508.       the relevant batch or project file, with the appropriate define
  509.       for the index format specified.  See 'section VI' for a 
  510.       description of the file formats and the associated use of 
  511.       defines.
  512.       
  513.       ----------------------------------------------------------
  514.       
  515.       VI.   CodeBase Index and Memo File Compatibility
  516.       
  517.          CodeBase currently supports four types of index and 
  518.       memo file formats:
  519.       
  520.           1. dBASE III compatible index files and memo files.
  521.           2. Clipper compatible index files and memo files.
  522.           3. dBASE IV compatible multiple index files and memo files.
  523.           4. FoxPro compatible compound and compact index files,
  524.              and memo files.
  525.       
  526.          All of the above products use the same database ('.DBF') file
  527.       format.
  528.       
  529.          CodeBase uses special defines to determine which file format
  530.       should be used.  These defines are set as conditional
  531.       compilation switches when building a library.  The defines are:
  532.       
  533.           S4MDX      - dBASE IV compatible ('S4MDX' does not have to 
  534.                                            be explicitly defined since
  535.                                            this is the default format)
  536.          
  537.           S4FOX      - FoxPro compatible  (See manual, page 19)
  538.       
  539.           S4CLIPPER  - Clipper compatible (See $read.me, line 140.
  540.                                            Also see CLIP_NDX.DOC )
  541.       
  542.           S4NDX      - dBASE III compatible (See $read.me, line 140.
  543.                                              Also see CLIP_NDX.DOC )
  544.       
  545.          To enable a non-default file format, define the appropriate
  546.       switch during the compilation of a library and/or application.
  547.       This is usually done by preceding one of the above switches with
  548.       a '-D' prefix.  This usually requires editing of the supplied
  549.       batch/make files used to build new libraries or applications.
  550.       
  551.          e.g.   bcc -c -DS4CLIPPER   b4*.c
  552.       
  553.          Once a new library has been built, usage of the dBASE IV and 
  554.       FoxPro formats is as described in the CodeBase manual.  Usage of
  555.       the Clipper and dBASE III formats is slightly different from the
  556.       manual.  The usage of these formats are outlined in the document
  557.       CLIP_NDX.DOC.  Please read this document carefully.
  558.       
  559.       ----------------------------------------------------------
  560.  
  561.       
  562.       VII.  Examples
  563.       
  564.           There are four sources of CodeBase 4.5 examples:
  565.       
  566.           1.  The manual, for short examples of function (and class)
  567.               usage.
  568.       
  569.           2.  The examples present on the CodeBase 4.5 diskette.
  570.               All examples installed are placed on the CodeBase
  571.               \EXAMPLES subdirectory.
  572.       
  573.           3.  The testing and diagnostic code.  These programs test
  574.               the important CodeBase functions, and can also be
  575.               used to ensure that CodeBase 4.5 was installed
  576.               correctly.
  577.       
  578.           4.  Our BBS, which contains new examples produced by our
  579.               developers and examples which users have uploaded.
  580.               Please see 'Section IX: The CodeBase Public-Access
  581.               Bulletin Board System (BBS)' for more information.
  582.       
  583.       ----------------------------------------------------------
  584.       
  585.       VIII. Using CodeScreens with CodeBase 4.5
  586.       
  587.          Sequiter's 'CodeScreens 1.0' is an add-on package that
  588.       contains screen management functions for DOS applications.
  589.       Owners of CodeBase 4.2 can also have access to these 
  590.       functions through CodeBase 4.2.  Select the '4.2 UPGRADE'
  591.       install option for further information.  If you are
  592.       interested in obtaining this screen management library, 
  593.       please contact Sequiter Software for more information.
  594.       
  595.          If you have purchased either CodeScreens 1.0 or 
  596.       CodeBase 4.2, you may use the DOS screen utilities 
  597.       available through those products with CodeBase 4.5.
  598.          
  599.          There are currently two versions of CodeScreens:
  600.       CodeScreens 1.0 and CodeScreens 1.01.  Both have equivalent
  601.       functionality, but CodeScreens 1.01 has been customized for
  602.       compatibility with CodeBase 4.5.  The supplied 1.01 libraries
  603.       and header files may be used with CodeBase 4.5 without modifi-
  604.       cations.  Users of CodeScreens 1.0 can still use their version 
  605.       with CodeBase 4.5, but the modifications discussed below must 
  606.       be carefully made before use.
  607.       
  608.          CodeScreens 1.0 functions are used by creating a separate
  609.       library, 'W4.LIB', which contains the screen functions.  
  610.       However, there are certain source files that must replace the
  611.       original source files.  These are supplied with CodeBase 4.5
  612.       and are located with the 4.2 upgrade files.  If you did not 
  613.       install the upgrade files, please see 'INSTALL.DOC' for manual 
  614.       install instructions.
  615.       
  616.  
  617.          Note that CodeScreens functions are also found contained 
  618.       within CodeBase 4.2.  If you have CodeBase 4.2, the following
  619.       directions may also be succesfully used.  More information
  620.       can also be found in the document file, '42UPGRAD.DOC'.
  621.       
  622.          As noted, you must replace certain CodeScreens (or
  623.       CodeBase 4.2) files.  The files are:   
  624.       
  625.                 P4MISC.H
  626.                 C4.C (with C4_F.C)
  627.                 G4.C
  628.                 H4.C
  629.                 N4.C
  630.                 P4MISC.C
  631.                 U4NAME.C (with U4NAME_F.C)
  632.                 W4.C
  633.       
  634.          The files replace all occurrences of the function 
  635.       'H4CREATE' with 'H45CREATE'.  This is necessary because
  636.       CodeBase 4.5 also has a function with this name, and
  637.       there cannot be two functions with the same name used
  638.       with an application.  Also, some functions are duplicated
  639.       within CodeBase 4.5.  If these duplicate functions are
  640.       left in the CodeScreens library, linking errors will
  641.       occur when using Microsoft compilers to link your application
  642.       with the CodeBase 4.5 library and the CodeScreens library.
  643.       These functions have been removed from the above source code.
  644.       
  645.          You must also change the prototype declaration for
  646.       'H4CREATE' in the 'D4ALL.H' (4.2 or CodeScreens) header file:
  647.       
  648.           Edit line 169 (or 165) of 'D4ALL.H'
  649.       
  650.                From:
  651.                   int    h4create( char **, int, int, int) ;
  652.                   
  653.                To:
  654.                   int    h45create( char **, int, int, int) ;
  655.       
  656.          Also, some older versions of CodeBase 4.2 or CodeScreens 
  657.       have a different prototype for functions 'h4alloc' and
  658.       'h4alloc_try' in file h4.c.  Please check file 'd4all.h',
  659.       around lines 163 and 164, and correct if necessary:
  660.       
  661.                From:
  662.                   char * h4alloc( int ) ;
  663.                   char * h4alloc_try( int ) ;
  664.          
  665.                To:
  666.                   char * h4alloc( unsigned ) ;
  667.                   char * h4alloc_try( unsigned ) ;
  668.          
  669.       
  670.          After replacement, compile the 'W4.LIB' using one of the
  671.       batch files provided with CodeBase 4.5.  The batch files are
  672.  
  673.       named "?4SCRN.BAT", where '?' is replaced by a specific letter
  674.       denoting the compiler used.  These batch files are included with
  675.       the '42 UPGRADE' files.
  676.       
  677.          When using any screen function, remember to include 'W4.H'
  678.       at the top of your program.  'W4.H' can be found with
  679.       CodeScreens or CodeBase 4.2.
  680.       
  681.          There are also provided batch files that can be used to 
  682.       compile and link a CodeBase 4.5. application using screen
  683.       functions.  These are named "C4?C.BAT", where '?' is replaced
  684.       by a specific letter denoting the compiler used.
  685.       
  686.       The screen functions available are the following:
  687.       
  688.                 C4...
  689.                 G4...
  690.                 N4...
  691.                 W4...
  692.       
  693.          Please consult your CodeBase 4.2 or CodeScreens manual for
  694.       the descriptions and use of these functions.
  695.       
  696.       ----------------------------------------------------------
  697.       
  698.       IX.   The CodeBase Public-Access Bulletin Board System (BBS)
  699.       
  700.          Any user with a modem may connect with the Sequiter
  701.       Bulletin Board System.  Connection to the BBS is free, 
  702.       although all users are responsible for their own long-
  703.       distance toll charges.  The BBS operates twenty-four hours
  704.       a day, seven days-a-week, excluding maintenance periods.  
  705.       The BBS operates under the DOS environment, running
  706.       WildCat(c) communications software.
  707.       
  708.          The BBS contains several CodeBase-related files and
  709.       documents that may be downloaded.  There is also a message
  710.       system so that electronic correspondence may be left for
  711.       Sequiter staff, or other BBS users.  The files include example
  712.       programs, utilities, add-ons and enhancements, written by
  713.       both Sequiter developers and CodeBase users.  Users are
  714.       invited to upload interesting CodeBase-related files for the
  715.       use of all BBS users.  A list of the latest enhancements, fixes 
  716.       and additions for all Sequiter products is also maintained on
  717.       the Sequiter BBS.  Users are encouraged to periodically
  718.       download these files, and make the appropriate changes.
  719.       
  720.          The phone number for the BBS is found on the back outside
  721.       cover of the CodeBase manual.  The phone number is currently
  722.       (403)-437-2229.
  723.       
  724.          Settings for the connection are:
  725.       
  726.               1200, 2400 or 9600 baud
  727.               ANSI terminal type.
  728.  
  729.               No parity.
  730.               8 bits.
  731.               1 stop bit.
  732.       
  733.          Upon connection to the Sequiter BBS, a new user will be
  734.       prompted for some information and the selection of a private
  735.       password.  After selection of your password, please memorize
  736.       it since you will be asked for that password on future
  737.       connections to the BBS.
  738.  
  739.       ----------------------------------------------------------
  740.  
  741.       X.    Accessing More Than 20 Files in DOS or Windows.
  742.  
  743.          Due to a default imposed by most compilers and DOS, no more
  744.       than  twenty files can be opened during the execution of any
  745.       one single process by default.  And since the file streams 'stdout',
  746.       'stprn', 'stdin', 'stderr' and 'stdaux' count as files, and
  747.       your executing application counts as well, this leaves only
  748.       fourteen database, index  and memo files that are allowed to
  749.       be opened by any one application.  CodeBase has no inherent
  750.       limit to the number of files opened, but will display an error
  751.       because of the failure of the system function call 'sopen()'.      
  752.  
  753.          Several compilers have patches available for increasing the
  754.       file limit.  However, because of the nature of these patches,
  755.       Sequiter does not provide technical support regarding this issue.
  756.        Please consult  your compiler's manufacturer for information.
  757.        Again, CodeBase has no inherent file limit, but will produce
  758.       an error message when it receives an 'error' return from any
  759.       C library function that is called.     
  760.  
  761.          Don't forget to increase the number of file handles in your 
  762.       CONFIG.SYS file.  To open more than 20 files (eg. 100), you
  763.       need to also modify your CONFIG.SYS file :
  764.  
  765.                  eg.  set  'FILES=100'
  766.  
  767.       
  768.          Please note the above config.sys setting will only affect
  769.       files opened on your local drives.  If you are operating on
  770.       a network drive, note that there is a default setting to the
  771.       number of files specified by your network software.  For example,
  772.       Novell's default setting is 40 files. If you want to increase
  773.       this limit in Novell, create or edit the file 'SHELL.CFG',
  774.       which should be located together with 'IPX.COM' and 'NETX.COM'.
  775.        Add  'FILEHANDLES = n', where  'n' is the maximum number of
  776.       file handles required, into  SHELL.CFG.  Other LAN software
  777.       users should consult their LAN documentation.
  778.  
  779.          Under MicroSoft Windows 3.x, you need to also make a call
  780.       to the function SetHandleCount (eg. SetHandleCount( 100 )).
  781.       If you are using CodeBase 4.5 as a DLL, then you need to add
  782.       this function call to the beginning of the d4init function in
  783.       c4code.c.  This requires you to alter the source code, then 
  784.  
  785.       to rebuild the DLL and its import library.  If you are using
  786.       CodeBase statically, then all you need to do is add the 
  787.       'SetHandleCount()' function call to your application program.         
  788.  
  789.          General outines of the patches provided by the more popular
  790.       compilers is provided below.  This includes MicroSoft C 6.00a
  791.       and 7.0, Borland C++ 2.0 and 3.0, Turbo C++ 1.01 and Turbo C 2.0.
  792.  
  793.       Microsoft C patch:
  794.       ------------------
  795.  
  796.          By default, MicroSoft is hardcoded to only allow 20 file handles.  
  797.       This limit can be increased by altering the 'startup' code in 
  798.       MicroSoft C and is outlined in the 'readme.doc' file supplied with
  799.       MicroSoft C.
  800.  
  801.          You will need to alter the following files:
  802.  
  803.            _FILE.C      (source\startup)
  804.            crt0dat.asm  (source\startup\dos)
  805.       
  806.            1.   _FILE.C :
  807.                            line 18  :  from :  #define _NFILE_ 20
  808.                                        to   :  #define _NFILE_ 100
  809.       
  810.                 crt0dat.asm :
  811.                            line 17  :  from :  _NFILE_ = 20
  812.                                        to   :  _NFILE_ = 100
  813.       
  814.                            line 259 :  (comment this line out)
  815.                            line 731 :  (comment this line out)
  816.                                        - these were commented out because of
  817.                                          an unresolved external. This didn't 
  818.                                          seem to affect the example.
  819.       
  820.                            line 319 - 321 :  (uncomment these lines)
  821.       
  822.            2.   Compile _FILE.C and crt0dat.asm :
  823.       
  824.                  cl -c -AL -W2 -Gsw -Owd _FILE.C
  825.                  masm -Mx -Dmem_L crt0dat.asm
  826.  
  827.            3.   The compiled .OBJs need to be put in the appropriate library.
  828.  
  829.                  DLL :     lib ldllcew-+_FILE;     
  830.                            lib ldllcew-+crt0dat;
  831.             
  832.                  NONDLL :  lib llibcew-+_FILE;
  833.                            lib llibcew-+crt0dat;
  834.       
  835.  
  836.       Borland C++ 2.0, Turbo C++ 1.01 and Turbo C 2.0 patch:
  837.       ------------------------------------------------------
  838.  
  839.          Borland provides patches for both Borland C++ 2.0 and 3.0.  This
  840.  
  841.       patch is not for Borland C++ 3.0.  See the next section for the 
  842.       Borland C++ 3.0 patch. 
  843.  
  844.          To increase the number of file handles to 50 under Borland
  845.       compilers simply include the file "filehand.c" in your project
  846.       file (Turbo C 2.0 users must call the function setup() from
  847.       main).  If you wish the number of file handles to be different
  848.       then 50 than simply modify the define value at the beginning
  849.       of "filehand.c".    
  850.          
  851.          Note that in order for this method to work you must use
  852.       _close() instead of close().  Therefore in all versions of
  853.       CodeBase so far it is necessary to modify the CodeBase source
  854.       code so that close()'s are changed to _close()'s.    
  855.          
  856.          So far this fix has been tested using Borland C++ 2.0
  857.       on a simple program that opens 50 files locally without CodeBase
  858.       and on the CodeBase 4.2 test programs.  It has not been tested
  859.       over the network yet.  
  860.       
  861.       #include <fcntl.h>
  862.       #include <dos.h>
  863.       
  864.       #define MAX_HANDLES 50
  865.       
  866.       void set_up(void)
  867.       {
  868.          unsigned int _openfd[MAX_HANDLES];
  869.          int j;
  870.       
  871.          /* initialize table of handles and the first five reserved ones */
  872.          /* STDIN, STDOUT, STDPRN, STDAUX, STDERR */
  873.       
  874.          _openfd[0]  =  O_RDONLY |  O_DEVICE;
  875.          _openfd[1]  =  O_WRONLY |  O_DEVICE;
  876.          _openfd[2]  =  O_WRONLY |  O_DEVICE;
  877.          _openfd[3]  =  O_RDWR   |  O_DEVICE |  O_BINARY;
  878.          _openfd[4]  =  O_WRONLY |  O_DEVICE |  O_BINARY;
  879.       
  880.          /* fill remaining slots with -1 (0xFF) so DOS knows they're 
  881.                                                               available */
  882.          for (j=5; j < MAX_HANDLES; j++)
  883.             _openfd[j] = 0xFF;
  884.       
  885.          /* DOS function 58h to set allocation strategy to LAST_FIT.
  886.             FIRST_FIT   -  00h
  887.             BEST_FIT    -  01h
  888.             LAST_FIT    -  02h
  889.          */
  890.          _AH = 0x58;
  891.          _AL = 1;
  892.          _BX = 2;
  893.          geninterrupt(0x21);     /* call DOS */
  894.       
  895.          /* set DOS handle count with function 67h only 
  896.  
  897.                                                  available in DOS >= 3.3 */
  898.          _AH = 0x67;
  899.          _BX = MAX_HANDLES;
  900.          geninterrupt(0x21);     /* call DOS */
  901.       
  902.          /* DOS function 58h to set allocation strategy to FIRST_FIT */
  903.          _AH = 0x58;
  904.          _AL = 1;
  905.          _BX = 0;
  906.          geninterrupt(0x21);     /* call DOS */
  907.       }
  908.       
  909.       #ifdef __TURBOC__ == 0x18D
  910.           In order to fix Turbo C 2.0 you must make an explicit function call
  911.           to setup() at the beginning of main() (comment out these lines)
  912.       #else
  913.           #ifdef __TURBOC__ == 0x400
  914.               This fix does not work with Borland C++ 3.0.  It only works on
  915.               Turbo C 2.0, Turbo C++ 1.01, and Borland C++ 2.0
  916.           #else
  917.               #pragma startup set_up 64  /* automatically invokes set_up() at
  918.                                             program startup for Turbo C++ 1.01
  919.                                             and Borland C++ 2.0 */
  920.           #endif
  921.       #endif
  922.  
  923.  
  924.       Borland C++ 3.0 patch:
  925.       ----------------------
  926.  
  927.          This patch was obtained directly from Borland International Inc.
  928.       This patch involves changes to three files from the RTL ( Run-Time
  929.       Library ): _NFILE.H, FILES.C and FILES2.C .    
  930.  
  931.          Please note that this fix has not been extensively tested
  932.       by Sequiter.       
  933.  
  934.  
  935.            1.   _NFILE.H:
  936.  
  937.                 // _NFILE.H
  938.                 // Copyright (C) 1992 Borland International, Inc.
  939.                 // All Rights Reserved
  940.  
  941.                 // Maximum number of open FILES
  942.                 #define _NFILE_ 20
  943.  
  944.                 //........................................................
  945.  
  946.  
  947.            2.   FILES.C:
  948.  
  949.                 // FILES.C
  950.                 // Copyright (C) 1992 Borland International, Inc.
  951.                 // All Rights Reserved
  952.  
  953.  
  954.  
  955.                 #include <stdio.h>
  956.                 #include <_nfile.h>
  957.  
  958.                 #define _F_STDIN     (_F_READ | _F_TERM | _F_LBUF)
  959.                 #define _F_STDOUT    (_F_WRIT | _F_TERM | _F_LBUF)
  960.                 #define _F_STDERR    (_F_WRIT | _F_TERM)
  961.                 #define _F_STDAUX    (_F_RDWR | _F_TERM | _F_BIN)
  962.                 #define _F_STDPRN    (_F_WRIT | _F_TERM | _F_BIN)
  963.  
  964.                 #if !defined( _RTLDLL )
  965.  
  966.                 file _streams [_NFILE_] =
  967.                 {
  968.                    {0, _F_STDIN,   0, 0, 0, NULL, NULL, O, (short) stdin},
  969.                    {0, _F_STDOUT,  1, 0, 0, NULL, NULL, O, (short) stdout},
  970.                    {0, _F_STDERR,  2, 0, 0, NULL, NULL, O, (short) stderr},
  971.                    {0, _F_STDAUX,  3, 0, 0, NULL, NULL, O, (short) stdaux},
  972.                    {0, _F_STDPRN,  4, 0, 0, NULL, NULL, O, (short) stdprn}
  973.                 } ;
  974.  
  975.                 #endif   // _RTLDLL
  976.  
  977.                 //........................................................
  978.  
  979.  
  980.            3.   FILES2.C:
  981.  
  982.                 // FILES2.C
  983.                 // Copyright (C) 1992 Borland International, Inc.
  984.                 // All Rights Reserved
  985.  
  986.  
  987.                 #include <io.h>
  988.                 #include <fcntl.h>
  989.                 #include <_nfile.h>
  990.  
  991.                 unsigned _nfile = _NFILE_ ;
  992.  
  993.                 unsigned int _openfd[_NFILE_] =
  994.                 {
  995.                    O_RDONLY | O_DEVICE | O_TEXT,
  996.                    O_WRONLY | O_DEVICE | O_TEXT,
  997.                    O_WRONLY | O_DEVICE | O_TEXT,
  998.                    O_RDWR   | O_DEVICE | O_BINARY,
  999.                    O_WRONLY | O_DEVICE | O_BINARY
  1000.                 } ;
  1001.  
  1002.                 //........................................................
  1003.  
  1004.          You will now have to replace the files FILES.C and FILES2.C in
  1005.       the standard library with the patched files.  You must first compile
  1006.       FILES.C and FILES2.C.  You can do this as follows:
  1007.  
  1008.  
  1009.             bcc -c -mX FILES.C FILES2.C
  1010.  
  1011.      where the X in -mX is the memory model being used.  Each memory
  1012.      model used must have these changes made to each repective memory model
  1013.      library.
  1014.  
  1015.         Now link the new modules into the library.  For example, the large
  1016.      model link would be:
  1017.  
  1018.             tlib m4.lib +-FILES.OBJ +-FILES2.OBJ
  1019.  
  1020.  
  1021.         Once completed, you should now be able to open more than twenty
  1022.      files.  
  1023.  
  1024.                   ------   END   ------
  1025.