#include ONCE "window9.bi"

function Read_String(fp as handle) as string export
	
  Dim buf As Byte
  
  Dim iEndOfFile As Long
  
  Dim rez As String
  
  Do
  
    buf  = cast(byte,fgetc(fp))
	
	iEndOfFile = feof(fp)
	
	if iEndOfFile orelse buf=10 then exit do
	
    If buf<>13  Then
      
      rez=rez & Chr(buf)
      
    EndIf
    
  Loop
  
  Return rez	

End Function