[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [computer-go] Need for more robust SGF Readers



Anders Kierulf wrote:

> The reason SmartGo doesn't read to the end of the file? SmartGo opens the
> file using fopen(..., "r"), not fopen(..., "rb"). Open it as a binary file
> and it reads your examples without problems. But SGF files are not binary
> files.

You should still open as "rb".  SGF explicitly requires to handle all
possible combinations of CR and LF (dumb Micro$oft...)  You cannot expect
the C library do this for you.  So open it as binary and handle linefeeds
and carriage returns yourself.

Paul
_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://www.computer-go.org/mailman/listinfo/computer-go/