POV-Ray : Newsgroups : povray.advanced-users : movie within : Re: movie within Server Time
29 Jul 2024 02:23:01 EDT (-0400)
  Re: movie within  
From: Dan P
Date: 30 Jan 2004 21:56:55
Message: <401b1977$1@news.povray.org>
"Darren" <dne### [at] sanrrcom> wrote in message
news:401a7b78$1@news.povray.org...
> Warp wrote:
> >   If it's enough for the output to be written when the program ends then
> > there's no need to flush explicitly because the compiler will generate
> > the flushing call at the end of the program anyways (the C standard
> > actually requires this, AFAIK).

Ah yes, but remember: we might take this code and wrap it in a class later,
so having that fflush there might help us avoid future bugs. Also, even
though the C standard requires this, experience has shown me that not
everybody keeps to the standard when they write their C compilers (see
Visual Studio). To me, flushing the buffer is kindof like closing a file. I
don't have to at the end, but it's good practice and it really doesn't hurt
anything if the stream isn't buffered.

Also, the reason I output using STDOUT is because the netpbm library works
that way. Remember, I chained this program together in a pipe to create PNG
files from PPM files. I don't think there is even a way to use netpbm
without using STDOUT, although I might be wrong (happens a lot).


Post a reply to this message

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