POV-Ray : Newsgroups : povray.programming : Q: Are the 'generic' sources no longer kept generic? Server Time
29 Jul 2024 00:37:19 EDT (-0400)
  Q: Are the 'generic' sources no longer kept generic? (Message 1 to 3 of 3)  
From: Michael Andrews
Subject: Q: Are the 'generic' sources no longer kept generic?
Date: 27 Apr 1999 12:47:01
Message: <3725DC9E.26EBEB5A@remove-this.reading.ac.uk>
Hi Folks,
	I recently downloaded both the Unix and Windows source code files to
see if I could compile either or both sets using the Cygnus Win32
compiler.
	After un-gzipping and un-tarring the unix set, tweaking the various
make files and config files I compiled the command line unix version. 
	(OK, so it doesn't run right - it seems to jump back into the file
parsing, after a macro, about two hundred and sixty-something characters
too soon - but I'm not sure if that's the compiler, something I did
wrong, the phase of the moon ... so I'll say no more about that here.)

	At this (partial) success I unzipped the windows source to have a look
at how much work it would be to build a make file for the windows
specific source. Didn't like what I saw (I've done no Windows
programming at all -  resources? wozzat?) and went to get a coffee.
	Upon acquiring my caffeine fix I decided to recompile the unix source
after tweaking the compiler settings. And the compile fell over with a
parse error in tokenize.c. 
	I had a look and found that the offending line was a C++ style comment.
On the following line was a windows specific function call. 
	So, I extracted tokenize.c from the unix tar file and recompiled with
the original compiler settings. And the compile fell over with a
multitude of compile/link errors.

	And so I get back to my opening query: Are the 'generic' sources to
PoV-Ray no longer being kept generic? Is there going to be a final
parting of the ways between different sets of source code? Am I over
reacting?

	I would not be surprised to find that they can no longer be generic. It
is just that I had heard nothing in these news groups about other people
finding this discrepancy between source code sets.
	My primary concern is for people writing source code patches. The
reason I was looking into compiling the source code myself was that I
wished to tweak the Photon Patch in a couple of ways. So I looked at the
source code provided for this and saw that it appeared to be based on
the Windows 'generic' source.

	Whew. I really didn't mean to write such a long post, and after
rereading it I realize I'm starting to ramble. So I'll stop now, and
invite comments, critiques, flames, etc.

	All the best,
		Mike Andrews.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Q: Are the 'generic' sources no longer kept generic?
Date: 27 Apr 1999 14:21:39
Message: <3725f223.0@news.povray.org>
In article <3725DC9E.26EBEB5A@remove-this.reading.ac.uk> , Michael Andrews
<M.C### [at] remove-thisreadingacuk>  wrote:
>  At this (partial) success I unzipped the windows source to have a look
> at how much work it would be to build a make file for the windows
> specific source. Didn't like what I saw (I've done no Windows
> programming at all -  resources? wozzat?) and went to get a coffee.

Well, that is the Windows specific code, it is _clearly_ separated in an
extra directory. How else do you think there can be a Windows front-end?
If you look into the other archives, you will find a DOS, Mac OS, etc
front-end.

>  Upon acquiring my caffeine fix I decided to recompile the unix source
> after tweaking the compiler settings. And the compile fell over with a
> parse error in tokenize.c.
>  I had a look and found that the offending line was a C++ style comment.

Then you have an old compiler or wrong setting, the (newer) ISO C standard
allows // comments in C - deactivating ANSI strict options helps for most
compilers. Or you simply switch to C++ mode of your compiler, the source is
C++ compatible.

> On the following line was a windows specific function call.

That is why each system distribution comes with an extra source archive.
There are a _few_ (less than five or so) changes that sometimes did not make
it into the generic code in time. It will then most likely be cleaned up in
the next major release.

>  So, I extracted tokenize.c from the unix tar file and recompiled with
> the original compiler settings. And the compile fell over with a
> multitude of compile/link errors.

Just removing the line would have done. You shouldn't get that many compiler
errors, something must have gone wrong :-)

>  And so I get back to my opening query: Are the 'generic' sources to
> PoV-Ray no longer being kept generic? Is there going to be a final
> parting of the ways between different sets of source code? Am I over
> reacting?

Yes!!!!!

>  I would not be surprised to find that they can no longer be generic. It
> is just that I had heard nothing in these news groups about other people
> finding this discrepancy between source code sets.
>  My primary concern is for people writing source code patches. The
> reason I was looking into compiling the source code myself was that I
> wished to tweak the Photon Patch in a couple of ways. So I looked at the
> source code provided for this and saw that it appeared to be based on
> the Windows 'generic' source.

As said, just a few lines over the whole source code, easy to clean up:
Remove them! Don't worry :-)


    Thorsten


Post a reply to this message

From: Nathan Kopp
Subject: Re: Q: Are the 'generic' sources no longer kept generic?
Date: 28 Apr 1999 01:06:40
Message: <37268960.3616E1E4@Kopp.com>
In POV 3.1a, on which my custom complile (UVPov) is currently based, there
is one line with a C++ "//" comment and one line with a windows-specific
function call.  That function call is to allow the windows front-end to
highlight the line where a parse error occured.  In my opinion, even this
function call should become platform-independent, since the Mac version
probably uses a similar function and an X version for unix could, too.
And for systems that don't use it, they could just #define it to nothing.
I've had people compile UVPov for a unix system after changing these two
lines (well, and a line for mosaic preview... but that was a 3.0 vs 3.1
difference), so it is still quite platform-independent.

-Nathan


Post a reply to this message

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