DosFile.pas workaround for the CrLF-bug under old DOS_(re)

Mon, 23 Sep 1996 15:21:51 +0200


At 03:40 PM 9/20/96 +0200, you wrote:
>
>{   BP-like file operations for binary files    }
>{ simple workaround for the CRLF-bug in GCC/GPC }
>{     Sven Hilscher - sven@rufus.central.de     }
>
>

I can see the use of functions with a borland-compatible syntax, like assign(),
but fail to see the link with CRLF problems. I think I fixed those.

var
  f: text

is now opened in text mode. A line is terminated with CRLF in DOS, while

type
  byte = __byte__ integer;
  bytefile = file of byte;

var
  g: bytefile;

is opened in binary mode and $0A is not silently converted to $0A$0D.

I think this solves the problems. If you think otherwise, let me know.

JanJaap
--
     The latest & greates in software, hardware and manswear
                       -- Bono Vox (U2)


JanJaap van der Heijden (J.J.vanderHeijden@driene.student.utwente.nl)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es