POV-Ray : Newsgroups : povray.unofficial.patches : WinMegaPOV Server Time
1 Nov 2024 19:13:49 EDT (-0400)
  WinMegaPOV (Message 1 to 6 of 6)  
From: Pabs
Subject: WinMegaPOV
Date: 13 Jun 2000 02:25:10
Message: <3945D3F5.179B33A2@hotmail.com>
I posted this in p.w with no replies & was instructed that it was
inappropriate for that group so I cancelled it and reposted here...

I don't know if anyone else has noticed this but in WinMegaPOV (several
versions) the "Auto-Load Error file" option does not work at all
The difference between wmp & pov-official seems to be in the function
Where_Error in tokenize.c
The official version of this function (in the windows src archive
anyway) calls WIN_WhereError as follows (the comment is present too)
just before exiting

  // CJC
  WIN_WhereError (Token.Filename, Token.Token_Line_No+1, Echo_Ptr,
Echo_Indx, Token.Token_String) ;

The call is after the following line (in the function Where_Error)

  Error_Line("\n%s:%d: error: ", Token.Filename, Token.Token_Line_No+1);

I am not sure if other platform specific versions of WIN_WhereError
exist (none in the dos src - maybe there is one in the mac/other gui
src) and if they do perhaps a define of WHERE_ERROR could be used in
config.h to determine the correct one for the specific platform (just
like other platform specific functions) and in tokenize.c do
#ifndef WHERE_ERROR
#define WHERE_ERROR(a,b,c,d,e) WIN_WhereError(a,b,c,d,e)
#endif
so that compile errors do not occur when the specific platform does not
have its own version of this function
--
Bye
Pabs


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: WinMegaPOV
Date: 13 Jun 2000 10:27:26
Message: <394644ce@news.povray.org>
In article <3945D3F5.179B33A2@hotmail.com> , Pabs <pab### [at] hotmailcom>  
wrote:

> I am not sure if other platform specific versions of WIN_WhereError
> exist (none in the dos src - maybe there is one in the mac/other gui
> src) and if they do perhaps a define of WHERE_ERROR could be used in
> config.h to determine the correct one for the specific platform (just
> like other platform specific functions) and in tokenize.c do
> #ifndef WHERE_ERROR
> #define WHERE_ERROR(a,b,c,d,e) WIN_WhereError(a,b,c,d,e)
> #endif
> so that compile errors do not occur when the specific platform does not
> have its own version of this function

Just use the UICB_xx family of macros, no need to define a new one. See
frame.h to find out more about the macros, and use a multi-file search to
find out where they are used in the source.


     Thorsten


Post a reply to this message

From: Pabs
Subject: Re: WinMegaPOV
Date: 18 Jun 2000 23:02:27
Message: <394D8D71.42B5626F@nospam.hotmail.com>
Thorsten Froehlich wrote:

> Just use the UICB_xx family of macros, no need to define a new one. See
> frame.h to find out more about the macros, and use a multi-file search to
> find out where they are used in the source.

These UICB_xxs are all very well but
2 probs
1.
Of the src I have looked at (win, dos, unix, linux) none of the config.h
files
define these and so they all resolve to nothing in frame.h like so
#ifndef UICB_PARSE_ERROR  /* Alert UI that a parse error occurred */
#define UICB_PARSE_ERROR
#endif
Does the mac config.h define these (I can't read hqx files) & if so why don't
other platforms use them

2.
Even if they were defined there is no define corresponding to the
WIN_WhereError function - just the following 4 defines
UICB_PARSE_ERROR  /* Alert UI that a parse error occurred */
UICB_USER_ABORT  /* alert UI that user aborted the render */
UICB_OPEN_INCLUDE_FILE  /* alert UI that an include file was opened during
parse */
UICB_CLOSE_INCLUDE_FILE  /* alert UI that an include file was closed during
parse */
so maybe a define of UICB_WhereError could be added in config.h & frame.h to
alert the UI of where in the file the parsing error occured
& in Where_Error this funcion could be called
Only WinPOV calls this kind of function

I can't find these UICB macros in the unix src (frame.h et al.)

Anyway just for the hell of it could Nathan PLEASE add the call I mentioned
in my previous post to the next version of WinMegaPOV - even if it is just
for the compiled binary.

Pabs


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: WinMegaPOV
Date: 21 Jun 2000 03:56:15
Message: <3950751f@news.povray.org>
In article <394D8D71.42B5626F@nospam.hotmail.com> , Pabs 
<pab### [at] nospamhotmailcom>  wrote:

> These UICB_xxs are all very well but
> 2 probs
> 1.
> Of the src I have looked at (win, dos, unix, linux) none of the config.h
> files
> define these and so they all resolve to nothing in frame.h like so
> #ifndef UICB_PARSE_ERROR  /* Alert UI that a parse error occurred */
> #define UICB_PARSE_ERROR
> #endif

This is exactly how all POV-Ray config.h macros work!  If you don't use them
POV-Ray defines a useful default.  Without this you would have to fix every
config.h of every platform whenever you add a new platform configuration
macro.

> Does the mac config.h define these (I can't read hqx files) & if so why don't
> other platforms use them

Why? Simple: POV-Ray is a complex software and these macros were added late
in the 3.1 development and other platform source code was just not adapted
in time before the 3.1 release.  This happens :-)

> 2.
> Even if they were defined there is no define corresponding to the
> WIN_WhereError function - just the following 4 defines
> UICB_PARSE_ERROR  /* Alert UI that a parse error occurred */
> UICB_USER_ABORT  /* alert UI that user aborted the render */
> UICB_OPEN_INCLUDE_FILE  /* alert UI that an include file was opened during
> parse */
> UICB_CLOSE_INCLUDE_FILE  /* alert UI that an include file was closed during
> parse */
> so maybe a define of UICB_WhereError could be added in config.h & frame.h to
> alert the UI of where in the file the parsing error occured
> & in Where_Error this funcion could be called
> Only WinPOV calls this kind of function

UICB_PARSE_ERROR provides the same functionality WIN_WhereError does, it has
just a different name (Where_Error only gets called on parse errors).  It
does not need to be in Where_Error. The place it is in is fine to provide
the same functionality (in function Error in userio.c), but if you don't
like UICB_PARSE_ERROR in userio.c just move (not copy!) it to tokenize.c.

> I can't find these UICB macros in the unix src (frame.h et al.)

I do not know why this is the case. Are you sure you are loking at the 3.1g
Unix source code? It should be in any 3.1.

> Anyway just for the hell of it could Nathan PLEASE add the call I mentioned
> in my previous post to the next version of WinMegaPOV - even if it is just
> for the compiled binary.

Adding it would serve no purpose as it is already there, I fail to
understand the logic behind it then - sorry :-(


    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: Mark Gordon
Subject: Re: WinMegaPOV
Date: 21 Jun 2000 08:32:29
Message: <3950B79F.E2903A63@mailbag.com>
Thorsten Froehlich wrote:

> > Does the mac config.h define these (I can't read hqx files) & if so why don't
> > other platforms use them
> 
> Why? Simple: POV-Ray is a complex software and these macros were added late
> in the 3.1 development and other platform source code was just not adapted
> in time before the 3.1 release.  This happens :-)

(snip)

> > I can't find these UICB macros in the unix src (frame.h et al.)
> 
> I do not know why this is the case. Are you sure you are loking at the 3.1g
> Unix source code? It should be in any 3.1.

I was, shall we say, a little out of the loop on 3.1 development ;-). 
The 3.1 Unix-specific files (e.g. config.h) neglect to redefine these. 
Thus, the Unix version of 3.1 reverts to the defaults defined in
frame.h.  I'm not sure that's a problem, since the Unix version has no
need for UI callbacks at this stage.  Note, however, that the defaults
_are_ in frame.h in the Unix source.

-Mark Gordon


Post a reply to this message

From: Pabs
Subject: Re: WinMegaPOV
Date: 21 Jun 2000 23:07:41
Message: <3951832C.61A7EC7D@nospamthanks.hotmail.com>
Thorsten Froehlich wrote:

> In article <394D8D71.42B5626F@nospam.hotmail.com> , Pabs
> <pab### [at] nospamhotmailcom>  wrote:
>
> > These UICB_xxs are all very well but
> > 2 probs
> > 1.
> > Of the src I have looked at (win, dos, unix, linux) none of the config.h
> > files
> > define these and so they all resolve to nothing in frame.h like so
> > #ifndef UICB_PARSE_ERROR  /* Alert UI that a parse error occurred */
> > #define UICB_PARSE_ERROR
> > #endif
>
> This is exactly how all POV-Ray config.h macros work!  If you don't use them
> POV-Ray defines a useful default.  Without this you would have to fix every
> config.h of every platform whenever you add a new platform configuration
> macro.

I know & understand this

> > Does the mac config.h define these (I can't read hqx files) & if so why don't
> > other platforms use them
>
> Why? Simple: POV-Ray is a complex software and these macros were added late
> in the 3.1 development and other platform source code was just not adapted
> in time before the 3.1 release.  This happens :-)

Oh well

> > 2.
> > Even if they were defined there is no define corresponding to the
> > WIN_WhereError function - just the following 4 defines
> > UICB_PARSE_ERROR  /* Alert UI that a parse error occurred */
> > UICB_USER_ABORT  /* alert UI that user aborted the render */
> > UICB_OPEN_INCLUDE_FILE  /* alert UI that an include file was opened during
> > parse */
> > UICB_CLOSE_INCLUDE_FILE  /* alert UI that an include file was closed during
> > parse */
> > so maybe a define of UICB_WhereError could be added in config.h & frame.h to
> > alert the UI of where in the file the parsing error occured
> > & in Where_Error this funcion could be called
> > Only WinPOV calls this kind of function
>
> UICB_PARSE_ERROR provides the same functionality WIN_WhereError does, it has
> just a different name (Where_Error only gets called on parse errors).  It
> does not need to be in Where_Error. The place it is in is fine to provide
> the same functionality (in function Error in userio.c), but if you don't
> like UICB_PARSE_ERROR in userio.c just move (not copy!) it to tokenize.c.

There is no way (for me) to know what the functionality of this macro is supposed
to be but I hope it will be used in 3.5 properly

> > Anyway just for the hell of it could Nathan PLEASE add the call I mentioned
> > in my previous post to the next version of WinMegaPOV - even if it is just
> > for the compiled binary.
>
> Adding it would serve no purpose as it is already there, I fail to
> understand the logic behind it then - sorry :-(

What I want is for the Auto-load error file option in WMP to work as it does in the
official version (that is it actually works - the editor transfers to the file,
line and column of a parsing error) - no more no less
The only difference between wmp & official src that fixed this (in my msvc compiled
version) was calling WIN_WhereError in Where_Error as I mentioned in my original
post

I don't want a flame war - just the above request
Pabs


Post a reply to this message

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