POV-Ray : Newsgroups : povray.programming : empty string output Server Time
28 Jul 2024 10:17:58 EDT (-0400)
  empty string output (Message 1 to 5 of 5)  
From: ABX
Subject: empty string output
Date: 27 Sep 2002 05:34:20
Message: <7a98pugv3f2tnu1jhvnl2fa35l3grnstkq@4ax.com>
Can anybody explain me what is purpose of three occurences of 
fprintf(stderr, "") in userdisp.cpp ? Is this flushing of buffer or something
similiar?

ABX


Post a reply to this message

From: Warp
Subject: Re: empty string output
Date: 27 Sep 2002 06:29:20
Message: <3d9432ff@news.povray.org>
ABX <abx### [at] abxartpl> wrote:
> Can anybody explain me what is purpose of three occurences of 
> fprintf(stderr, "") in userdisp.cpp ? Is this flushing of buffer or something
> similiar?

  AFAIK printing to stderr always flushes the stream immediately. This means
that whatever has already been printed there, has already been flushed
as well, so that can't be the explanation.
  Besides, the right way of flusing a stream is to use the fflush() function.

-- 
#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: ABX
Subject: Re: empty string output
Date: 27 Sep 2002 06:58:20
Message: <03e8pussqs0djghnpbvkkavin3jv1c5kna@4ax.com>
On 27 Sep 2002 06:29:20 -0400, Warp <war### [at] tagpovrayorg> wrote:
> > Can anybody explain me what is purpose of three occurences of 
> > fprintf(stderr, "") in userdisp.cpp ? Is this flushing of buffer or something
> > similiar?
>
> AFAIK printing to stderr always flushes the stream immediately. This means
> that whatever has already been printed there, has already been flushed
> as well, so that can't be the explanation.

I can think that occurance in POV_Std_Display_Init function is becouse if can
error appear during output to stderr then it is better to cause it at
beginning. But then why occurance in POV_Std_Display_Close function.

ABX


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: empty string output
Date: 27 Sep 2002 13:55:37
Message: <3d949b99$1@news.povray.org>
In article <03e8pussqs0djghnpbvkkavin3jv1c5kna@4ax.com> , ABX 
<abx### [at] abxartpl>  wrote:

> I can think that occurance in POV_Std_Display_Init function is becouse if can
> error appear during output to stderr then it is better to cause it at
> beginning. But then why occurance in POV_Std_Display_Close function.

One thing this probably does/did on some platforms is to actually open the
stream (i.e. if it goes to a file).  If it is still necessary these days, I
don't know.

    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: ABX
Subject: Re: empty string output
Date: 27 Sep 2002 14:29:21
Message: <bm89pu4t1v2m30ahp5r34b0vqtjplq72te@4ax.com>
On Fri, 27 Sep 2002 19:55:34 +0200, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> > I can think that occurance in POV_Std_Display_Init function is becouse if can
> > error appear during output to stderr then it is better to cause it at
> > beginning. But then why occurance in POV_Std_Display_Close function.
>
> One thing this probably does/did on some platforms is to actually open the
> stream (i.e. if it goes to a file).  If it is still necessary these days, I
> don't know.

But this still explains only first occurence.

ABX


Post a reply to this message

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