fix dnscore based resolving failure on windows
[lcore.git] / readtxt2.pas
index 84c57652c4e90fe86d85cb4dc263b4261a4a8dd1..ee657367ea6ae7e43804b16033cc173943888fd4 100644 (file)
@@ -34,7 +34,7 @@ type
     constructor create(asourcestream: tstream; adestroysourcestream:boolean);\r
     constructor createf(filename : string);\r
 \r
     constructor create(asourcestream: tstream; adestroysourcestream:boolean);\r
     constructor createf(filename : string);\r
 \r
-    function readline:string;\r
+    function readline:ansistring;\r
     function eof:boolean;\r
     destructor destroy; override;\r
   private\r
     function eof:boolean;\r
     destructor destroy; override;\r
   private\r
@@ -56,10 +56,9 @@ begin
 \r
   if sourcestream.Position >= sourcestream.size then fileeof := true;\r
   bufpointer := bufsize;\r
 \r
   if sourcestream.Position >= sourcestream.size then fileeof := true;\r
   bufpointer := bufsize;\r
-  destroysourcestream := false;\r
 end;\r
 \r
 end;\r
 \r
-constructor treadtxt.createf(filename : string);\r
+constructor treadtxt.createf(filename: string);\r
 begin\r
   create(tfilestream.create(filename,fmOpenRead),true);\r
 end;\r
 begin\r
   create(tfilestream.create(filename,fmOpenRead),true);\r
 end;\r