POV-Ray : Newsgroups : povray.binaries.programming : Mac Superpatch Adaption Kit Server Time
21 Dec 2024 22:02:02 EST (-0500)
  Mac Superpatch Adaption Kit (Message 1 to 7 of 7)  
From: Thorsten Froehlich
Subject: Mac Superpatch Adaption Kit
Date: 10 Nov 1999 20:08:28
Message: <382a170c@news.povray.org>
Source file changes required to compile the superpatch with the official Mac
3.1g.r1 source code.  To compile on Mac CodeWarrior Pro 5.2 is required,
Apple Universal Interfaces 3.3 (from
http://developer.apple.com/sdk/index.html) are recommended as well!

MAKE SURE YOU ADD *YOUR* CONTACT INFORMATION IF YOU PROVIDE A COMPILED
VERSION!  The recommended place to output you notice is in function
PrintMacCredits in PovMacUtils.h.

NOTE: This code is not supported at all, it is just for those struggling to
compile the superpatch for the Mac. Isosurface DLLs are not supported. The
source code has not been tested much and all problems are your business.
This code is not endorsed by the POV-Team!


    Thorsten


Post a reply to this message


Attachments:
Download 'macspkit.zip' (60 KB) Download 'us-ascii' (0 KB)

From: Chris Huff
Subject: Re: Mac Superpatch Adaption Kit
Date: 23 Nov 1999 11:43:55
Message: <231119991147022594%chrishuff_99@yahoo.com>
The PovMac.rsrc file didn't survive(at least, not for me), when I open
it with ResEdit it says there isn't a resource fork. Perhaps you should
try compressing it into a Stuffit archive.
The program links fine with the resource file from the official
version, and seems to run fine, what was modified for use with the
Superpatch? Something with syntax coloring?
Oh, and I am using the 3.1e Superpatch source, I will try to get the
3.1g preliminary version working.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Chris Huff
Subject: Re: Mac Superpatch Adaption Kit
Date: 23 Nov 1999 12:24:22
Message: <231119991227298575%chrishuff_99@yahoo.com>
I got the 3.1g preliminary version working, although very untested, all
I did was add your files to the ones from the 3.1g Superpatch source.
I had to add the files photons.c and isoblob.c to the project.
Here are the errors I got and the fixes I did for them, probably a
better way of fixing most of them.

Errors and warnings compiling Superpatch 3.1g preliminary version:

Error   : function call 'Warn(double, char *, char *)' does not match
'Warn(double, char *)'
photons.c line 990   Warn(1.0,"Could not save photon map
(%s)\n",photonOptions.fileName);

The fix(temporary):
Warn(1.0,"Could not save photon map \n");


Error   : ';' expected
isofunc.h line 48   HANDLE   hLib;

The fix(temporary, probably should add case for Mac version in addition
to UNIX):
replace the lines just above that line:
#ifdef UNIX
    typedef void * HANDLE;
#endif
with this:
    typedef void * HANDLE;


Error   : struct/union/enum/class tag 'Function_Struct' redefined
isofunc.h line 52   struct Function_Struct {

The fix: Remove the definition in isofunc.h


POV crashes on completion of render using isosurface
The fix(temporary, probably causes memory leak): In the file f_func.c,
in the function Destroy_Function(), comment out this line(line 1050):
      if (Func->pnum >0) POV_FREE (Func->parm);

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Mac Superpatch Adaption Kit
Date: 24 Nov 1999 01:19:12
Message: <383b8360@news.povray.org>
In article <231119991147022594%chr### [at] yahoocom> , Chris Huff 
<chr### [at] yahoocom>  wrote:

> The program links fine with the resource file from the official
> version, and seems to run fine, what was modified for use with the
> Superpatch? Something with syntax coloring?

I would need to double check, but there is nothing serious in the resource
file as far as I remember.


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Mac Superpatch Adaption Kit
Date: 24 Nov 1999 01:23:40
Message: <383b846c@news.povray.org>
In article <231119991227298575%chr### [at] yahoocom> , Chris Huff 
<chr### [at] yahoocom>  wrote:

> POV crashes on completion of render using isosurface
> The fix(temporary, probably causes memory leak): In the file f_func.c,
> in the function Destroy_Function(), comment out this line(line 1050):
>       if (Func->pnum >0) POV_FREE (Func->parm);

You may also want to check for Func->parm != NULL and of course make sure
Func->parm is inited to NULL somewhere. Also, after calling
POV_FREE(Func->parm), you should set Func->parm = NULL so if for some reason
POV_FREE(Func->parm) is called again (anywhere) it will cause POV_FREE to
report that problem.


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Mac Superpatch Adaption Kit
Date: 24 Nov 1999 01:26:59
Message: <383b8533@news.povray.org>
In article <231119991147022594%chr### [at] yahoocom> , Chris Huff 
<chr### [at] yahoocom>  wrote:

> Perhaps you should
> try compressing it into a Stuffit archive.

The goal was to make the file readable for Ron and others to add the core
changes to their source ... and I was sure ZipIt stores resource forks
correctly :-(

> Something with syntax coloring?

Syntax coloring only needs keywords.r.


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Chris Huff
Subject: Re: Mac Superpatch Adaption Kit
Date: 24 Nov 1999 11:31:18
Message: <241119991134272302%chrishuff_99@yahoo.com>
I found the source of the problem(Er, that pun was completely
unintentional, I assure you).
There are 2 places Func->pnum needs to be initialized, in f_expr.c. I
also added initializers for parm, needed in 3 places, although this is
only a problem when pnum is uninitialized.


Around line 181(the line numbers will be slightly off, because of
modifications I made):
       Func = (FUNCTION *) POV_MALLOC (sizeof(FUNCTION), "function");

    Func->parm = NULL;/*Chris Huff to prevent crash on cleanup*/


Around line 225:
       Func = (FUNCTION *) POV_MALLOC (sizeof(FUNCTION), "function");

    Func->parm = NULL;/*Chris Huff to prevent crash on cleanup*/
    Func->pnum = 0;/*Chris Huff to prevent crash on cleanup*/


And around line 468:
  Func = (FUNCTION *) POV_MALLOC (sizeof(FUNCTION), "function");

    Func->parm = NULL;/*Chris Huff to prevent crash on cleanup*/
    Func->pnum = 0;/*Chris Huff to prevent crash on cleanup*/

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

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