kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #05443
Re: Text file open modes
On 09/15/2010 10:37 AM, Dick Hollenbeck wrote:
>
>> The first problem, hanging on '\r' within macro definitions can
>> be worked around by saving the gerber in UNIX format (\n only)
>> instead of DOS format (\r\n). Then gerbview will not hang on
>> '\r': because there will be none in the file.
>>
>>
> Long term
>
> gerbview, like any other kicad program, should probably be using
>
> "rt" as the fopen() mode. Won't that make the fgets() code read in
> lines of text without the \r in a platform independent way ?
>
http://www.gnu.org/software/libc/manual/html_mono/libc.html#Binary-Streams
Seems to say I was wrong. "r" means open in text mode. So I don't know
why fgets() is even showing us a \r
unless wxwidgets is somehow changing the open mode between its API and
glibc's.
Still unknown for me.
References