|
![](/i/fill.gif) |
Thanks Nathan.
I use PFE a lot too, and saving as UNIX format seems to fix the problem.
Is this behaviour caused by some sort of inconsistent usage of fseek()
and ftell() in the tokeniser? In my Cygnus setup ... ah! mount tells me
that my drive is not binary mounted, so it is doing the linefeed
conversion at this point and the tokeniser is getting less characters
than the file increments. So the number of characters read and the file
position offset start to drift. I think I understand the problem now.
Would this problem not be fixed by reading the file into memory? I guess
this would cause new problems for very large scene files ...
I'll have a go at finishing this warp patch now.
Bye for now,
Mike Andrews.
Nathan Kopp wrote:
>
> Michael Andrews <M.C### [at] reading ac uk> wrote...
> > Actually, with some more testing, I find that it doesn't run happily. It
> > seems that #macro and possibly #if directives are causing problems. Are
> > these the constructs which use fseek() to move around the file? If so I
> > guess the Cygnus compiler is acting in a non-standard way with this.
> > Does anyone know of a fix for this behaviour? Or if the MingW32 does the
> > same?
>
> #macro and #if both use fseek() and ftell(), and some compilers (including
> MSVC++) can have problems with these. MSVC++, for example, sometimes
> assumes that your file is DOS format (using CR+LF for new line). Cygnus may
> assume the opposite. For MSVC++, the solution is to convert form UNIX
> format to DOS format. (I use my editor, PFE, for this task.) For Cygnus,
> you may need to convert the opposite direction, but be aware that POV's
> editor doesn't support UNIX format.
>
> -Nathan
Post a reply to this message
|
![](/i/fill.gif) |