Bug 528 – cstream.flush() returns EOF early for din.

Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-11-16T07:25:00Z
Last change time
2015-11-03T17:37:28Z
Assigned to
nobody
Creator
godaves

Comments

Comment #0 by godaves — 2006-11-16T07:25:38Z
cstream.flush() returns EOF before an entire din stream is read for large files on Windows. The problem seems to be with the DMC library fread/fflush routines. This is not an issue on Linux. import std.cstream, std.conv, std.stream; void main() { int sum; char[] bufr = new char[128]; char[] line; BufferedStream bsi = new BufferedStream(din,4096); while(!bsi.eof) { line = bsi.readLine(bufr); if(line.length) sum += toInt(line); } dout.writefln(sum); } test data: http://shootout.alioth.debian.org/gp4sandbox/iofile.php?test=sumcol&lang=all&file=input (note: the test data is concatenated 8000 times and then redirected into stdin).
Comment #1 by andrei — 2015-11-03T17:37:28Z
It's unlikely this issue will get worked on, if anyone plans to work on it feel free to reopen.