POV-Ray : Newsgroups : povray.programming : POV-Ray 3.5 for AmigaOS Server Time
5 Jul 2024 16:25:48 EDT (-0400)
  POV-Ray 3.5 for AmigaOS (Message 8 to 17 of 37)  
<<< Previous 7 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Dan P
Subject: Bah.
Date: 3 Jun 2004 01:59:31
Message: <40bebe43$1@news.povray.org>
Bah. It looks like it is trying to free an invalid memory block on my 
test file. It could be a bug in the linked ixemul library, but 
intuitively, I doubt it. Looks like I have some tracing to do. That's 
okay; things that are easy aren't worth doing. If there is anything this 
effort may yield to the team, it is at least a different perspective on 
the code that might help make it more stable.

Screenshot:
http://<broken link>/images/amipovray3.gif

Those warnings bug me, so I'm going to fix them. As a rule, I use 
floor() and cast it to an int when I'm going from a double to an 
integer. I think that is the default behavior anyway so I'm going to add 
the necessary code to make it compile cleanly (at least, on this platform).
-- 
Respectfully,          "Leave it to the coward to make a religion
Dan P            of his cowardice by preaching humility."
                                    - George Bernard Shaw
http://<broken link>


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Bah.
Date: 3 Jun 2004 09:21:18
Message: <40bf25ce$1@news.povray.org>
In article <40bebe43$1@news.povray.org> , Dan P <dan### [at] yahoocom>
wrote:

> Those warnings bug me, so I'm going to fix them. As a rule, I use
> floor() and cast it to an int when I'm going from a double to an
> integer. I think that is the default behavior anyway so I'm going to add
> the necessary code to make it compile cleanly (at least, on this platform).

Argh!  Don't do something like that, it is plain wrong!  If you compiler
issues nonsensical warnings, the right thing to do is to disable them, not
to destroy your source code!

    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: POV-Ray 3.5 for AmigaOS
Date: 3 Jun 2004 09:27:14
Message: <40bf2732$1@news.povray.org>
In article <40B### [at] yahoocom> , Dan P <dan### [at] yahoocom>
wrote:

> Aside from a lot of warnings that arose because of implicit casting from
> a double to a long or int (which I resolved using (int) floor() just
> because I'm very, very strict about treating warnings as errors)

You should really learn to know the difference between a warning and an
error.  A warning is not an error and as such, it is very likely the machine
informing you about something possibly unintentional is wrong.

> I found
> that, in the file "povmsgid.cpp", the enumerations were assigned to
> static strings surrounded by single quotes, which is something I have
> never seen before --

Get a book about C or C++ programming...

> first, I thought enums had to assign to ints, and
> second, I thought single quotes were for characters, not strings). The
> compiler agreed on both counts and gave me quite a lashing about
> what-for about it. So, I created a PERL script to grab each of those
> strings and generate a file with defines called "povtypes.h" and made
> those defines with unique IDs starting from 1000. Then, I went to
> "povmsgid.cpp" and got rid of those double-quotes and dealt with the
> strings like '****' by making it 'AAAA' and 'NULL' by making it 'NuLL'.
> When that compiled, I started tracing the include hierarchy and building
> the Makefile. Sore fingers later, and a lot of clean-compiles and
> thank-Gods later, I still waswondering what the "goal" of those defines
> was and if there is something fundamental that I'm missing about the
> whole affair that is going to bite me in the cheeks later.

Argh - lkjxfsliaejkisddjhfsuikufdfkljhfkljapsdauojsdl - my brain hurts when
I even read about somebody doing pure nonsense this!

    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: Warp
Subject: Re: Bah.
Date: 3 Jun 2004 12:13:10
Message: <40bf4e16@news.povray.org>
Dan P <dan### [at] yahoocom> wrote:
> Those warnings bug me, so I'm going to fix them. As a rule, I use 
> floor() and cast it to an int when I'm going from a double to an 
> integer.

  By doing that you will be slowing down the code.

  This: "int i = some_double;" is equivalent to this:
"int i = int(some_double);".
  However, you are adding an additional 'floor()' call which will
slow down the conversion needlessly.
  It will also probably give a different result with negative numbers.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Nicolas Calimet
Subject: Re: POV-Ray 3.5 for AmigaOS
Date: 3 Jun 2004 12:17:25
Message: <40bf4f15$1@news.povray.org>
> because I'm very, very strict about treating warnings as errors) I found 
> that, in the file "povmsgid.cpp", the enumerations were assigned to 
> static strings surrounded by single quotes, which is something I have 
> never seen before [snip]
> I still waswondering what the "goal" of those defines 
> was and if there is something fundamental that I'm missing about the 
> whole affair that is going to bite me in the cheeks later.

	Answer is much shorter than you think: yes you're running into
big trouble messing up with the code like this.
	Search google for "multicharacter constant" and look through
the gcc manpage for the -Wno-multichar warning option.

	- NC


PS: you should really-really wait for the 3.6 UNIX source code  :-)


Post a reply to this message

From: Warp
Subject: Re: POV-Ray 3.5 for AmigaOS
Date: 3 Jun 2004 12:20:07
Message: <40bf4fb7@news.povray.org>
Dan P <dan### [at] yahoocom> wrote:
> first, I thought enums had to assign to ints

  And since when 'abcd' has not been an int?

> and 
> second, I thought single quotes were for characters, not strings).

  No, 'a' is not a character, it's an integer. 'ab' is also an integer.

  Just try: std::cout << 'ab' << std::endl;

> The compiler agreed on both counts

  If enumerated types can only be assigned with integers (which is true)
and 'abcd' is not an integer (which is false), then the compiler would
give you an error. However, the compiler did not give you an error and
thus the compiler is disagreeing with you.

> So, I created a PERL script to grab each of those 
> strings and generate a file with defines called "povtypes.h" and made 
> those defines with unique IDs starting from 1000.

  What for? What is the current code doing wrong?

> Is there some program in-between that turns those 
> happy 'strings' into numbers?

  They are not strings. Learn C, will you?

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: ABX
Subject: Re: POV-Ray 3.5 for AmigaOS
Date: 3 Jun 2004 12:24:37
Message: <i2kub0tdgh8u03tonel42bks0skjtb1epi@4ax.com>
On Thu, 03 Jun 2004 18:17:24 +0200, Nicolas Calimet <pov### [at] freefr> wrote:
> Search google for "multicharacter constant"

No need for google. Searching this in povray.programming is enough.

ABX


Post a reply to this message

From: Nicolas Calimet
Subject: Re: POV-Ray 3.5 for AmigaOS
Date: 3 Jun 2004 12:25:00
Message: <40bf50dc$1@news.povray.org>
> Argh - lkjxfsliaejkisddjhfsuikufdfkljhfkljapsdauojsdl - my brain hurts when
> I even read about somebody doing pure nonsense this!

	Aouch !  Thorsten's got broken(*) !!
	It's Armaggedon right before the 3.6 release !!!
	HELP !!!!

	;-)

	- NC


(*) sounds like a top-ten hit in pop music  :-)


Post a reply to this message

From: Dan P
Subject: Re: Bah.
Date: 3 Jun 2004 19:15:19
Message: <40bfb107$1@news.povray.org>
Warp wrote:
> Dan P <dan### [at] yahoocom> wrote:
> 
>>Those warnings bug me, so I'm going to fix them. As a rule, I use 
>>floor() and cast it to an int when I'm going from a double to an 
>>integer.
> 
> 
>   By doing that you will be slowing down the code.
> 
>   This: "int i = some_double;" is equivalent to this:
> "int i = int(some_double);".
>   However, you are adding an additional 'floor()' call which will
> slow down the conversion needlessly.
>   It will also probably give a different result with negative numbers.
> 

That makes sense.

-- 
Respectfully,          "Leave it to the coward to make a religion
Dan P            of his cowardice by preaching humility."
                                    - George Bernard Shaw
http://<broken link>


Post a reply to this message

From: Dan P
Subject: Re: POV-Ray 3.5 for AmigaOS
Date: 3 Jun 2004 19:17:48
Message: <40bfb19c$1@news.povray.org>
Warp wrote:

<lots of crap that drains another's enthusiasm />

Right; this is what I expected when I posted to this group. That initial 
post threw me off. I thought maybe you and TF weren't listening. Okay, 
listen; I didn't know about the MultiCharacter constant thing. There's a 
lot I didn't know about. So, kiss my ass.

-- 
Respectfully,          "Leave it to the coward to make a religion
Dan P            of his cowardice by preaching humility."
                                    - George Bernard Shaw
http://<broken link>


Post a reply to this message

<<< Previous 7 Messages Goto Latest 10 Messages Next 10 Messages >>>

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