|
![](/i/fill.gif) |
On Fri, 03 Sep 2004 16:15:05 +0200, Christoph Hormann
<chr### [at] gmx de> wrote:
> I am not talking about OpenEXR support (to me being required to download
> 9MB to add support for a new file format is quite out of question).
How is this any different from having to download libjpeg, or libpng?
> I am talking about plain binary floating point data.
> I stopped studying your code snippet when i read:
>
> typedef unsigned long uint32;
If you had read further, you would have seen that the code actually checks
to see if uint32 really does have the required range. That typedef was not
supposed to be valid across all platforms; it was meant to be replaced
with something else on platforms where the assumption does not hold.
The code I posted was not meant as production quality code; it was meant
as a proof-of-concept. I didn't want to expend time and effort on writing
the machinery required to select an appropriate type for all reasonable
and unreasonable platforms when all I wanted was to show the feasibility
of the implementation.
By the way: Is it possible to compile and run POV-Ray on a platform where
'long' is less than 32 bits?
> POV-Ray should compile on any platform where a C++ compiler is available
> that supports the current standards. So for writing portable extensions
> for POV-Ray you should comply with the standard first of all (and if you
> do it will most likely also compile and run on most platforms.
Again: Is POV-Ray portable to platforms where 'long' is less than 32 bits?
For that matter, is POV-Ray portable to platforms where 'int' is less than
32 bits?
Having seen the POV-Ray source code, I am confident that the answer is
'no' to both questions.
> And the typedef cited above is a serious affront to the standard...
No, it has implementation-defined behaviour. Even that is irrelevant if
the range is checked/enforced.
--
FE
Post a reply to this message
|
![](/i/fill.gif) |