POV-Ray : Newsgroups : povray.unofficial.patches : MegaPov 0.4, macros trouble : Re: MegaPov 0.4, macros trouble Server Time
2 Sep 2024 18:17:50 EDT (-0400)
  Re: MegaPov 0.4, macros trouble  
From: Nathan Kopp
Date: 1 Feb 2000 20:35:37
Message: <389789e9@news.povray.org>
david sharp <dsh### [at] interportnet> wrote...
>
> Thanks much. Converting scene file cr-lf's  to lf's 'fixes' the
> FastMacroPatch.
> (that is, lets the troublesome macros run).
>
> What is it that the FastMacroPatch does that other fseek/ftell dependent
> stuff in POV doesn't?

Not much different.  Part of it is to use ftell twice to determine the
length of the macro.  But the problem is that fread() reads a single byte
for CR+LF (converts two to '\n'), but ftell()-ftell() will give two bytes
for CR+LF.  Unfortunately, this does not always happen and is not at all
consistent across operating systems or even compilers on the same OS.

-Nathan


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.