home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / CODE4-4.ZIP / HDR_EXMP.ZIP / README < prev    next >
Encoding:
Text File  |  1989-12-29  |  8.8 KB  |  242 lines

  1.  
  2. (c)Copyright Sequiter Software Inc., 1987, 1988, 1989. All rights reserved.
  3.  
  4.  
  5.         README -  Table of Contents
  6.  
  7.    I.    The Code Base 4 Libraries
  8.  
  9.    II.   Installing Code Base 4
  10.  
  11.    III.  Example Programs ('d4more.c' contains some new field routines.)
  12.  
  13.    IV.   Converting from Code Base to Code Base 4
  14.  
  15.    V.    Converting from Code Base 4.xx to Code Base 4.04
  16.  
  17.    VI.   Turbo C 2.0 Problem
  18.  
  19.    VII.  Code Base 4.03 Corrections
  20.  
  21.    VIII. Code Base 4.04 Bug Fix
  22.  
  23.    IX.   dBEditor
  24.  
  25.    X.    Using Code Base with Microsoft Windows
  26.  
  27.    XI.   Quick Reference Help
  28.  
  29.  
  30. The Code Base 4 Libraries
  31.  
  32.    Library files 'T4.LIB', 'M4.LIB', and 'M4CLIP.LIB'  were created 
  33. with Turbo C 2.0 and Microsoft C 5.1 respectively.  The library
  34. files 'M4.LIB' and 'M4CLIP.LIB' have also been tested with Quick C 2.0.
  35.  
  36.    The files used to create the pre-built libraries are present on
  37. the Code Base 4 library diskette.
  38.  
  39.    If you have a different compiler or compiler version, or if you 
  40. with to use Code Base 4 with OS/2, you will not be able to use the 
  41. pre-compiled libraries.  Refer to the Appendix on Library building.
  42.  
  43.  
  44. Installing Code Base 4   
  45.  
  46.    With Code Base 4.04 there is one more diskette.  Consequently,
  47. the header files and examples are on the 'Examples, Header Files 
  48. and Source Diskette'.  As the source no longer fits on one diskette,
  49. there are some source files in the "SOURCE" subdirectory of this
  50. diskette.
  51.  
  52.    As described in the Code Base 4 users guide, you need to copy
  53. the appropriate Code Base 4 files to the appropriate directory of
  54. your hard disk.
  55.  
  56.  
  57. Example Programs
  58.  
  59.    There are several example programs located on the library diskettes:
  60.  
  61.    Program         Use
  62.  
  63.    c4convert.c    A program which, for a number of files, changes
  64.                   character sequences to other character sequences.
  65.           This program extensively uses Code Base 4 routines.
  66.           See below.
  67.  
  68.    d4example.c    The program on page 14 of the Code Base 4 users guide.
  69.  
  70.    d4more.c       VERY IMPORTANT.  This file contains some new, easy
  71.                   to use, field routines.  It also contains an example
  72.                   showing how to use them.  Finally, the example program
  73.                   shows how to use multiple database files, multiple 
  74.                   index files, and 'd4seek'.
  75.  
  76.    d4simple.c     A very short program which implements data entry,
  77.           database manipulation, and a menu.
  78.  
  79.    d4small.c      A program which accesses a database and produces a 
  80.                   13.5K executable file under MSC 5.1.
  81.  
  82.    d4learn.c      An program for interactively executing the Code Base 4
  83.                   database management routines.
  84.  
  85.    n4pull.c       The program on page 122 of the Code Base 4 users guide.
  86.  
  87.    w4example.c     Windowing, Menuing, Data Entry
  88.  
  89.    x4multi.c      A multi-user program for displaying a database.
  90.  
  91.  
  92. Converting from Code Base to Code Base 4
  93.  
  94.    Program 'c4convert' has been provided to convert Code Base 4 programs
  95. into Code Base 4 programs.  Essentially, the convert program searches
  96. for character sequences located in the 'from' field of database
  97. 'convert.dbf'.  It transforms these character sequences into the 
  98. sequences specified by the corresponding 'to' field.  The data
  99. in 'convert.dbf' is set up to transform the character sequences 
  100. 'c3', 'd3', 'e3', 'f3', 'g3', 'h3', 'i3', 'm3', 's3', 'u3', 'v3', and 'x3'
  101. to 'c4', 'd4', 'e4', 'f4', 'g4', 'h4', 'i4', 'm4', 'w4', 'u4', 'v4' and
  102. 'x4' respectively.  The files it operates on are interactively set
  103. within program 'convert'.  By default, it converts and file which
  104. matches the '*.c' wildcard file specification.  All of the identically 
  105. named output files are placed in an output directory.  This output 
  106. directory is '\c4' by default.  Create the output directory before
  107. running program convert.
  108.  
  109.    Make sure that the conversions made do not change parts of your
  110. program which should not be changed.  For example, the hexidecimal
  111. constant '0x37' would be changed to '0x47'.  After the above conversion
  112. is completed, make the following changes:
  113.  
  114.    1.  'd3main.h' no longer is needed.  Remove all references to it
  115.        from your program.  The external variables it defined are now
  116.        defined in source file 'd4init.c'.
  117.  
  118.    2.  's3io' no longer exists.  Instead, you will use routine
  119.        'w4define'.  Note that routine 'd4init' automatically creates
  120.        a default window.
  121.  
  122.    3.  The definition of the integer values returned by 'd3select', and 
  123.        'i3select' have been changed slightly.
  124.  
  125.    4.  Routine 'i3go' has one additional return value.
  126.  
  127.  
  128. Converting from Code Base 4.xx to Code Base 4.04
  129.  
  130.    1.  Routine 'd4go' used to check to make sure the record
  131.        number parameter was less than or equal to the number
  132.        of records in the database.  For performance reasons,
  133.        it no longer does.
  134.  
  135.    2.  Rebuild previous Code Base 4.xx programs which must
  136.        coordinate with Code Base 4.04 programs on a network.
  137.        A minor change was made to ensure Code Base 4.04
  138.        'NDX' file compatibility with dBASE IV.
  139.  
  140.    3.  The default parameters for expression function 'STR'
  141.        have been changed.  They are now the same as dBASE and
  142.        Clipper.
  143.  
  144.  
  145. Turbo C 2.0 Problem
  146.  
  147. When using the medium, small or tiny memory models, the 'malloc' routine
  148. does not work correctly when allocating more than '0xF000' bytes of 
  149. memory.  Consequently, when using Code Base 4 under Turbo C with these
  150. memory models, make the following change to source file 'i4reindex.c':
  151.  
  152.    Change line 835 of 'i4reindex.c' from
  153.  
  154.       large  = h4alloc_try( allocated = 0xFFDE ) ;
  155.  
  156.    to
  157.  
  158.       large  = h4alloc_try( allocated = 0x8000 ) ;
  159.  
  160.  
  161. Code Base 4.03 Corrections
  162.  
  163.    1.  Clipper Users Only
  164.  
  165.        Code Base 4 now works with Clipper Unique Key NTX index files.  
  166.        Ignore the documentation under routine 'i4index' which says that it 
  167.        does not.
  168.  
  169.    2.  Avoid using the 'DTOC' function in index file key expressions.  Use
  170.        function 'DTOS' instead.  dBASE and Clipper format the result
  171.        differently depending on how 'SET DATE' is set.  Consequently, 
  172.        using function 'DTOC' results in an incompatibility with dBASE
  173.        and Clipper index files.
  174.  
  175.    3.  Note that not all of the Code Base source code fit onto the
  176.        'source' disk.  There is additional source code is sub-directory
  177.        'source' of the 'Header', 'Example' and 'Source' disk.  Make sure
  178.        you copy those extra source files before rebuilding your library.
  179.  
  180.  
  181. Code Base 4.04 Bug Fix
  182.  
  183. There is a bug is Code Base 4.04 which only surfaces when using index
  184. files using the key expression 'VAL(STR_VALUE)'.  Note that this function
  185. is seldom used in index files key expressions.   The fix is to change line
  186. 495 of file 'e4exec.c'.
  187.  
  188.    Current Code
  189.  
  190.         *((double *)r_ptr) =   strtod( a.ch, (char **) 0) ;
  191.  
  192.    Line After Fix
  193.  
  194.         *((double *)r_ptr) =   c4atod( a.ch, a_len ) ;
  195.  
  196.  
  197. dBEditor
  198.  
  199. dBEditor, a handy utility program for quickly accessing dBASE
  200. data and index files, is present on the Turbo C library diskette.
  201. The program name is 'EDI.EXE'.       
  202.  
  203. dBEditor also supports interactive window design, calculated fields, 
  204. database relations and single key stroke commands.
  205.  
  206. You probably can figure out how to use 'dBEditor' by experimentation.
  207. However, a users guide is available for US$45.00.  The user's 
  208. guide is 79 pages long and explains 'dBEditor' completely.
  209. For the full retail price of US$99.00 there is also a royalty free
  210. runtime version of dBEditor.                             
  211.  
  212.  
  213. Using Code Base 4.04 with Microsoft Windows 
  214.  
  215.    1.  Refer to the 'WINDOWS_L' conditional compilation switch in the
  216.        appendix on library building.
  217.  
  218.    2.  To limit the amount of memory Code Base 4 uses, consider calling
  219.        'd4init_memory' instead of 'd4init'.  Call 'd4init_memory' 
  220.        once before other Code Base 4 routines are called.  Refer to the
  221.        users guide.
  222.  
  223.        Remember to check the return code which the initialization routine
  224.        returns.  Under Microsoft Windows, the Code Base 4 'u4error' routine
  225.        returns an error if Code Base 4 runs out of memory.  Under DOS,
  226.        lack of memory is treated as a fatal error, and 'u4error' exits
  227.        directly.
  228.  
  229.    3.  Modify 'u4error.c' to display some kind of notification if 
  230.        Code Base 4 detects an error.  Otherwise, make sure you check
  231.        all return codes.  By default, Code Base 4 automatically 
  232.        displays error information under the DOS, OS/2 and Xenix versions
  233.        only.  
  234.  
  235.  
  236. Quick Reference Help
  237.  
  238. The Turbo C library disk contains a file 'quick.ref' on
  239. the root directory which contains a prototype and very short description
  240. of each commonly used routine.  This information can be printed or refered 
  241. to from your text editor.
  242.