home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / bpos2_v3.zip / bpos2_v3.txt next >
Text File  |  1995-07-12  |  1KB  |  40 lines

  1. These are fixes for Borland Pascal 7 patched for OS/2, unit CRT.PAS,
  2. which allow for proper running in OS/2 windows with different sizes
  3. then 80x25 characters. 
  4.  
  5. 1. Append var section of unit CRT.PAS with:
  6. var 
  7.  ....
  8.  VioActMode:VioModeInfo;
  9.  usRow,usColumn,usBufLen:USHORT;
  10.  CellStr:array[0..1] of byte;
  11.  
  12. 2. Change initialization section of unit CRT.PAS to:
  13. Begin
  14.   {Try to get color attributes of current screen cell}
  15.   VioGetCurPos(@usRow,@usColumn,0);
  16.   usBufLen:=2;
  17.   VioReadCellStr(@CellStr,@usBufLen,usRow,usColumn,0);
  18.   {Set attributes to actual rather then
  19.   TextAttr:= LightGray;}
  20.   TextAttr:=ord(CellStr[1])+ord(CellStr[0])*256;
  21.   {Get current screen window dimensions}
  22.   VioActMode.cb:=$000E;{sizeof(VIOMODEINFO)}
  23.   VioGetMode(@VioActMode,0);
  24.   {Set Max to actual size rather then
  25.   WindMax := 79+24*256;}
  26.   WindMax := VioActMode.col-1+(VioActMode.row-1)*256;
  27.   WindMin := 0;
  28.   AssignCrt(Input);
  29.   Reset(Input);
  30.   AssignCrt(Output);
  31.   Rewrite(Output);
  32. End.
  33.  
  34. Fixes were prepared by Stanislaw Kozlowski on 12 July 95.
  35.  Address:
  36.  Poland, 01-673 Warsaw, ul.Podlesna 61, IMGW.
  37.  
  38.  e-mail: ml@igf.edu.pl
  39.  
  40.