home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / ACCESS.ZIP / ACCESS.NEW < prev   
Encoding:
Text File  |  1985-03-02  |  2.9 KB  |  69 lines

  1.    This file is only useful to people who have already made the ACCESS.BIG
  2. modifications to their Turbo Toolbox.  If you have not made those
  3. modifications, you ONLY need the file ACCESS.BIG, as that file has also been
  4. updated with these changes.
  5.  
  6.   This second revision fixes a nasty bug pointed out to me by David J. Lewis
  7. 70105,1242.  One effect of the bug was that if an index file was opened with a
  8. key length other than the constant MaxKeyLen, everything would go up in
  9. smoke...
  10.  
  11. ...  The second effect should have caused the modifications to fail entirely,
  12. and since this was not the case, I remain somewhat puzzled.  Let me repeat
  13. that this modification is STILL LIKELY TO CONTAIN BUGS!!  If you are looking
  14. for adventure, or you like beta-testing things, or if you're absolutely
  15. desperate for more that 65535 records in your files, this is for you.
  16.  
  17.   -  Bela Lubkin
  18.      Borland International Technical Support
  19.  
  20. In ACCESS.BOX:
  21.  
  22. Right after
  23. Const
  24.   X65536 = 65536.0;  { For integer version, change to 1 (NOT 1.0) }
  25. add
  26.   RefTypeSize = 6;   { MUST be 2 for integer version, 6 for real version, or
  27.                        8 for 8087 real version (or 1 for byte version!) }
  28.  
  29. In procedure TaPack, change
  30.       Move(Page.ItemArray[I],P[(I - 1) * (KeyL + 5) + 3],KeyL + 5);
  31. to
  32.       Move(Page.ItemArray[I],P[(I - 1) * (KeyL + 2*RefTypeSize + 1) +
  33.            RefTypeSize + 1],KeyL + 2*RefTypeSize + 1);
  34.  
  35. In procedure TaUnPack, change
  36.       Move(Page.ItemArray[I],P[(I - 1) * (KeyL + 5) + 3],KeyL + 5);
  37. to
  38.       Move(P[(I - 1) * (KeyL + 2*RefTypeSize + 1) + RefTypeSize + 1],
  39.            Page.ItemArray[I],KeyL + 2*RefTypeSize + 1);
  40.  
  41. In procedure MakeIndex, change
  42.   K := (KeyLen + 5)*PageSize + 3;
  43. to
  44.   K := (KeyLen + 2*RefTypeSize + 1)*PageSize + RefTypeSize + 1);
  45.  
  46. In procedure OpenIndex, change
  47.   K := (KeyLen + 5)*PageSize + 3;
  48. to
  49.   K := (KeyLen + 2*RefTypeSize + 1)*PageSize + RefTypeSize + 1);
  50.  
  51. NOTES:
  52.   Your source files are now functionally equivalent to what you could have
  53. generated from an original set of *.BOX combined with the new version of
  54. ACCESS.BIG in DL1.  They are not exactly the same, however.  To make them
  55. exactly the same (and also squeeze a few bytes and a few microseconds out of
  56. the code), change every occurrence of  SizeOf(RefType)  to  RefTypeSize  (all
  57. in ACCESS.BOX).
  58.  
  59.   There are now 2 things to change if you want to switch between integers,
  60. reals, 8087 reals, or ? bytes ? for your data reference type.  Not only do you
  61. have to change RefType (automatic change between normal and 8087 reals is done
  62. by the compiler, actually).  You also have to change the constant RefTypeSize
  63. to the value of SizeOf(RefType).  (Unfortunately you can't just say Const
  64. RefTypeSize=SizeOf(RefType)).
  65.  
  66.   Please report any bugs or interesting facts to me or Sysop Larry Kraft of
  67. the Borland SIG on CompuServe.
  68.   -  Bela Lubkin
  69.