TBXFIX Turbo Toolbox Bug Fixes, Version B By Larry Kraft and Bela Lubkin Updated by Randy Forgaard March 24, 1985 If you discover any errors or omissions in this file, or if future versions of Turbo Toolbox incorporate changes not mentioned here, please send mail to Randy Forgaard [70307,521], or feel free to make the changes yourself and upload the new version of this file. This file describes all known changes and bug fixes to Borland's Turbo Toolbox since it was originally introduced. The Toolbox is provided in source code form (except for GINST), so you can make these changes directly to the source code to update your copy of the Toolbox. It has been discovered that the serial numbers on the Toolbox copies are not completely reliable indicators of whether these bug fixes have already been incorporated. Thus, to be safe, it would be best to take a few minutes to review these bug fixes and make any necessary changes to your copy of the Toolbox. Since these are all the known changes, and there aren't very many of them, it should not be necessary for you to return your copy of the Toolbox for an updated copy. You can perform the "upgrade" yourself. The Toolbox has been variously released as Version 1.00, Version 1.01, and Version 3.00. Generally, the changes described below will "upgrade" Version 1.00 to Version 1.01. (But, again, look this file over even if you have Version 1.01.) If you have Version 3.00 of the Toolbox, the changes to ACCESS.BOX (or ACCESS3.BOX) have already been incorporated (along with many other changes related to Turbo 3.0), but you should look at the changes below that pertain to other files in the Toolbox. A. GENERAL CHANGES 1. If you make the changes below, and you currently have Version 1.01 of the Toolbox, change the headers of ACCESS.BOX, GETKEY.BOX, ADDKEY.BOX, and DELKEY.BOX to say "TURBO-access version 1.01" and "Copyright (C) 1984, 85." B. CHANGES TO ACCESS.BOX 1. Add the following two lines in two different places -- immediately after the "Assign(...)" in procedure MakeFile; and also immediately after the "Assign(...)" in procedure OpenFile: IOstatus:=IOresult; TaIOcheck(DatF, 0); 2. Add the following line immediately after "PutRec(...)" in procedure CloseIndex: Updated := false; (Without the above change, an index file can become corrupted if you close an index file and then open another one in the middle of your program.) C. CHANGES TO ADDKEY.BOX 1. In the very last three lines of the file, change: end; end; end; to: end; PP := 0; end; end; D. CHANGES TO DELKEY.BOX 1. In the very last four lines of the file, change: end; end; end; end; to: end; end; PP := 0; end; end; E. CHANGES TO SORT.BOX 1. About 17 lines after the main BEGIN of procedure QuickSort, change: M:=(I+J) Div 2; to: M:=(I+J) Shr 1; (Note: This is not just for efficiency. The old "Div 2" version can cause an arithmetic run-time error when sorting large files.) F. CHANGES TO SORT1.PAS AND SORT2.PAS The TurboSort function should not be used as a parameter to a WRITE or WRITELN statement, as this may result in an illegal recursive call to READ or WRITE. Make the following changes to the sample programs SORT1.PAS and SORT2.PAS on the Toolbox disk. You might also want to pencil in these changes in Sections 9 and 10 of the Toolbox manual (the page numbers are indicated below). 1. Add the following variable declaration to the VAR section of both main programs (pages 71, 75, 78, and 82 of the Toolbox manual). x : integer; 2. Throughout SORT1.PAS and SORT2.Pas, replace each occurrence of the following line: WriteLn(TurboSort(SizeOf(CustRec))); with the following TWO lines: x:=TurboSort(SizeOf(CustRec)); WriteLn(x); If this bug has not been fixed in your copy of the Toolbox, there will be one occurrence of this in SORT1.PAS, and two occurrences in SORT2.PAS. See also pages 74, 76, 78 (two occurrences), and 84 (two occurrences) of the Toolbox manual.