fpc/rtl/inc/typefile.inc
peter e64becf81c * moved getopts to inc/, all supported OS's need argc,argv exported
+ strpas, strlen are now exported in the systemunit
  * removed logs
  * removed $ifdef ver_above
1998-05-12 10:42:41 +00:00

64 lines
1.8 KiB
PHP

{
$Id$
This file is part of the Free Pascal Run time library.
Copyright (c) 1993,97 by the Free Pascal development team
See the File COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{****************************************************************************
subroutines for typed file handling
****************************************************************************}
Procedure assign(var f:TypedFile;const Name:string);
Begin
FillChar(f,SizeOF(FileRec),0);
FileRec(f).Handle:=UnusedHandle;
FileRec(f).mode:=fmClosed;
Move(Name[1],FileRec(f).Name,Length(Name));
End;
Procedure Int_Typed_Reset(var f : TypedFile;Size : Longint);[Public,IOCheck, Alias: 'RESET_TYPED'];
Begin
Reset(UnTypedFile(f),Size);
End;
Procedure Int_Typed_Rewrite(var f : TypedFile;Size : Longint);[Public,IOCheck, Alias: 'REWRITE_TYPED'];
Begin
Rewrite(UnTypedFile(f),Size);
End;
Procedure Int_Typed_Write(TypeSize : Longint;var f : TypedFile;var Buf);[IOCheck, Public, Alias : 'TYPED_WRITE'];
Begin
Do_Write(FileRec(f).Handle,Longint(@Buf),TypeSize);
End;
Procedure Int_Typed_Read(TypeSize : Longint;var f : TypedFile;var Buf);[IOCheck, Public, Alias : 'TYPED_READ'];
var
Result : Longint;
Begin
Result:=Do_Read(FileRec(f).Handle,Longint(@Buf),TypeSize);
If Result<TypeSize Then
InOutRes:=100;
End;
{
$Log$
Revision 1.2 1998-05-12 10:42:45 peter
* moved getopts to inc/, all supported OS's need argc,argv exported
+ strpas, strlen are now exported in the systemunit
* removed logs
* removed $ifdef ver_above
}