home *** CD-ROM | disk | FTP | other *** search
-
- Converting from Code Base 4.0x to Code Base 4.2
-
- There have been some minor changes to some routine definitions. In
- order to upgrade existing programs using Code Base 4.xx to Code Base 4.2,
- make the following changes:
-
- Change calls to 'd4go' to 'd4go2' and calls to 'd4write' to
- 'd4write2'. Then link in the code in file 'u4update.c'.
-
- The routines in file 'u4update.c' are 'd4write2', 'd4go2',
- 'c4dt_dbf', 'c4dt_index' and 'b4key'. Routines 'd4write2'
- and 'd4go2' act the same as routines
- 'd4write' and 'd4go' of Code Base 4.0x. In addition, routine
- 'c4dt_dbf', 'c4dt_index' and 'b4key' are mapped to the new
- Code Base 4.2 routines 'c4dt_str', 'c4dt_julian' and 'i4key' respectively.
-
- If any of your index file key expressions use "CTOD" or "DTOC", change
- them to use "STOD" and "DTOS" instead.
-
- Following is an itemized list of changes to Code Base 4.2 which
- may affect current Code Base 4.0x programs.
-
- 1. Routine 'd4go' once checked to make sure the record
- number parameter was less than or equal to the number
- of records in the database. For performance reasons,
- it no longer does.
-
- 2. The internal order in which Code Base 4.2 locks and unlocks
- data and index files has changed slightly. Code Base 4.2
- operates on the principle that data files and records are
- locked before index files are locked. Consequently,
- if routines 'd4skip' or 'd4seek' need to lock a database
- record, they will unlock any locked index files first. This
- avoids deadlock.
-
- Alternately, Code Base 4.2 lets you turn off automatic
- database locking altogether. This effectively implements
- 'dirty reads'. A 'dirty read' is reading a database record
- even though another user has it locked.
-
- It is safest to recompile and link Code Base 4.xx programs using
- Code Base 4.2 before using them with new Code Base 4.2 applications
- on a network.
-
- 3. The default parameters for expression function 'STR'
- were changed starting with Code Base 4.04. They are now
- the same as dBASE and Clipper.
-
- 4. Low level routine 'b4key' is now named 'i4key'.
-
- 5. 'd4write' does not 're-write' the record count bytes every time
- a record is appended. Consequently, it is critical to call
- 'd4close' to maintain dBASE compatibility. Note that Code Base 4.2
- determines the number of records from the length of the file.
-
- 6. Some low level Code Base 4.2 routines are now prototyped in file
- "d4all.h" rather than "d4base.h". These are uncommonly used
- routines documented in an appendix.
-
- 7. To append records, call 'd4append' or 'd4write(0L)' rather than
- 'd4write'. Do not use 'd4write' to write to records which do not exist.
-
- 8. d4skip has an extra error 'rc' of -3. This error occurs if
- the current record does not have an index file key entry.
- In general, this situation should not occur.
-
- 10. The default for 'v4unique_error' is true (non-zero). Consequently,
- the Code Base 4.2 default makes Code Base 4.2 perform as dBASE does.
-
- 11. The prototype for 'd4init_memory' has been removed. Any existing
- program will still work. However, a missing prototype warning
- may appear.
-
- Routine 'd4initialize' has been created to replace 'd4init_memory'.
- It has one extra parameter. Note that 'd4init_memory' still exists
- so that you do not have to change existing programs.
-
- 12. Routine 'c4dt_dbf' has been renamed to 'c4dt_str' and routine
- 'c4dt_index' has been renamed to 'c4dt_julian'.
-
- 13. Routine 'i4check' has a different meaning for return code '(int) -2'.
-
- 14. The meaning of return code '(int) -2' has changed for routine
- 'd4write'.
-
- 15. 'x4replace' has been removed from Code Base. This routine was
- effectively an example on how to read a record, modify the record,
- and then re-write the record. If you need this routine,
- you can get the source from file 'x4.c' of the previous release.
-
- 16. The expression evaluation functions "DTOC" and
- "CTOD" have been changed. They are now consistent with
- the default action of dBASE. This means they use the
- "MM/DD/YY" picture format. The action of function "DTOS" has not
- been changed. In addition "STOD" has been introduced. "STOD"
- does what "CTOD" used to do.
-
- 17. Routine 'f4ref' now displays an error message if it is passed
- an illegal field name. If you do not want this error message,
- remove the call to 'u4error' in file 'f4ref.c'.
-
-
- Converting from Code Base 4.1 to Code Base 4.2
-
- The main change to Code Base 4.2 is that it is more portable.
- So that Code Base 4.2, and programs using Code Base 4.2, can compile
- using C++ compilers, the following routine definitions have been changed:
-
- n4action
- n4reaction
- n4activate
-
- In addition, the following routines have been added:
-
- n4sub_menu
- n4ptr_save
- n4ptr_get
- n4int_save
- n4int_get
-
- The parameters to routines 'n4action' and 'n4reaction' have now
- been strictly defined as an integer. Consequently, it is necessary
- to use the new menuing routines to pass data to and from action
- and reaction routines. Routine 'n4activate' now takes the
- window reference number as a parameter rather than a pointer
- to a window reference number.
-