home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / bp7os2 / os2f01.txt < prev    next >
Text File  |  1993-11-29  |  4KB  |  126 lines

  1.  
  2.     These files  contain  all known fixes as of 11/29/93.
  3. As prepared by CHUCK TODD 70531.1475
  4.  
  5. This zip contains the following files:
  6.  
  7.     FCTL.ASM    ; runtime FILE access Routines.
  8.     TCTL.ASM    ; runtime TEXT access routines.
  9.     Os2F01.txt  ; this file.
  10.     OS216.pas   ; Sample Unit to access OS2 16bit dll calls.
  11.  
  12. You will need then "c'T" patch available from CIS:GERNET LIB 7 L11_1.zip.
  13. You will also need then BP 7.0 system (with TASM).
  14.  
  15. Optionally you can download from CIS:OS2DF1 LIB1 PRCP.ZIP (411k) this is an
  16.  .INF file that contains a reference for the OS2 1.3 compatible 16bit calls.
  17. Also you will want download CIS:OS2DF1 LIB 7 IMPLIS.zip (44k) this is a
  18. program to generate a listing of the INDEXes for the DOSCALLS.LIB file.
  19.  
  20. Using the DOSCALLS.LIB, you cannot import the functions By NAME, only by
  21. INDEX.
  22.  
  23.    These are a patch to the BORLAND PASCAL 7.0 Runtime,  These patches
  24. are to be installed ontop of the patches created by 'c'T' magazine.
  25.  
  26. 1: Replace these FCTL,TCTL files with the ones in the 'c'T' patch.
  27. 2: Then install the fixes to the System.Pas, Dos.pas.
  28. 3: run cd os2rtl, run MAKE -B -fmakefile { this will recreate the OS2.TPL
  29. 4: copy the OS2.TPL file to you \bp\bin directory.
  30. 5: Recompile the DOS.pas and all Pascal files.
  31.  
  32.  
  33.     Both of these ASM files have been modifed to allow FILEREC,TEXTREC
  34. variables to be on the HEAP.
  35.     Also, I have change the DEFAULT value of FILEMODE to
  36.            OPEN_ACCESS_DENYREADWRITE | READWRITE.     {$0012}
  37.     it was  OPEN_ACCESS_DENYNONE | READONLY.          {$0040}
  38.  
  39.    The problem with opening a read only file resulted because the FILE open
  40. procedures always specified READWRITE access during the attempt to open
  41. the file.  This resulted in either a 12 invalid mode or a TRAP 'D' error.
  42.  
  43. THIS is a list of the changes to SYSTEM.PAS.
  44. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  45.   FileMode       : Word    = $0012;{  OPEN_SHARE_DENYREADWRITE,
  46.                                       OPEN_ACCESS_READWRITE}
  47.  
  48. These Changes are to DOS.PAS
  49. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  50.   After Implementation directive.
  51.  
  52.   OS2DateTime = Record
  53.                   Hours,
  54.                   Minutes,
  55.                   Seconds,
  56.                   Hundredths,
  57.                   Day,
  58.                   Month        : Byte;
  59.                   Year         : Word;
  60. >>>>>>            TimeZone     : Integer;         { Was Short Int}
  61.                   WeekDay      : Byte;
  62.                 End;
  63.  
  64. ****************************************
  65.  
  66.   Procedure FindFirst(Path : PathStr;Attr : Word;Var S : SearchRec);
  67.   Var
  68.     FF    : OS2FileFindBuf;
  69.     N     : String;
  70.     Count : Word;
  71.   Type
  72.     PWord = ^Word;
  73.   Begin
  74.     N := Path + #0;
  75.     Count := 1;
  76.     PWord(@S)^ := $FFFF; { HDIR_CREATE }
  77.     DosError := DosFindFirst(@N[1],PWord(@S)^,Attr,FF,SizeOf(FF),Count,0);
  78.     If DosError = 0 then
  79.       Begin
  80.         S.Attr := FF.AttrFile;
  81.         S.Time := (LongInt(FF.fDateLastWrite) Shl 16) + FF.fTimeLastWrite;
  82. >>>>    S.Size := FF.cbFile;
  83.         Move(FF.cchName,S.Name,SizeOf(S.Name))
  84.       End;
  85.   End;
  86.  
  87.   Procedure FindNext(Var S : SearchRec);
  88.   Var
  89.     FF    : OS2FileFindBuf;
  90.     Count : Word;
  91.   Type
  92.     PWord = ^Word;
  93.   Begin
  94.     Count := 1;
  95.     DosError := DosFindNext(PWord(@S)^,FF,SizeOf(FF),Count);
  96.     If DosError = 0 then
  97.       Begin
  98.         S.Attr := FF.AttrFile;
  99.         S.Time := (LongInt(FF.fDateLastWrite) Shl 16) + FF.fTimeLastWrite;
  100. >>>>    S.Size := FF.cbFile;
  101.         Move(FF.cchName,S.Name,SizeOf(S.Name))
  102.       End
  103.     else
  104.       DosFindClose(PWord(@S)^);
  105.   End;
  106.  
  107. *******************
  108.  
  109.   Procedure Exec(Path : PathStr;ComLine : ComStr);
  110.   Var
  111.     b : Array[0..255] of Char;
  112. >>    c : string;
  113.   Begin
  114. >>    if (length(comline)>0)and(comline[1] <> ' ') then
  115. >>       c := path + #0 +' '+comline+#0+#0
  116. >>    else c := path + #0+comline +#0+#0;
  117. {
  118.     Path := Path + #0;
  119.     ComLine := ComLine + #0#0;
  120.     DosError := DosExecPgm(b,256,ExecFlags,@ComLine[1],Ptr(EnvironmentSeg,0),ExecResult,@Path[1]);
  121.   }
  122. >>  DosError := DosExecPgm(b,256,ExecFlags,@c[1],Ptr(EnvironmentSeg,0),ExecResult,@c[1]);
  123.   End;
  124.  
  125.  
  126.