POV-Ray : Newsgroups : povray.programming : mixing POV code with C++ : Re: POV source errors Server Time
29 Jul 2024 06:26:20 EDT (-0400)
  Re: POV source errors  
From: Jon A  Cruz
Date: 13 Feb 1999 13:42:22
Message: <36C5C83B.C45A46D@geocities.com>
Thorsten Froehlich wrote:

> Oh, and please be very careful when changing/using types. I saw in your
> Unicode patch (at least in the first version) that you used wchar_t. This
> might work with most compilers, but USHORT is the type to use in truetype.c.
> This helps a lot when integrating a patch.
>

Yes, that's probably the area that I need to watch the most. I won't consider my
code done 'till that kind of stuff is all resolved.

With wchar_t itself you get the same issue as with the float/double conversions
and int size. It's designated to contain Unicode characters, but may or may not be
16-bits. Some systems are reported to be using 32-bits for processor efficiency,
so just imagine if I pass an array of 16-bit values to a C call expecting 32-bit
values.

So, that's why I start with wchar_t. If, however, no wide-char API calls are made,
then USHORT should be no problem.

Oh, and I'll wait on the cleanup. I can always run my compiler output through
grep. See, it's good to ask these things, so as not to duplicate effort.

BTW, anyone compiling POV-Ray for 64-bit processors?


Post a reply to this message

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