Index: [thread] [date] [subject] [author]
  From: Andreas Beck <becka@rz.uni-duesseldorf.de>
  To  : mongoose@wpi.edu
  Date: Tue, 29 Jun 1999 13:18:43 +0200

Re: Portablility using printf

>   Right now Im using printf to print to the background console that the GGI
> program was started in. Now Ive only done this in X and was wondering if 
> there were any other targets that would not have a console running in the 
> background that the printf's would output too. 

Well we can't destroy the filedescriptor of stdout, so there will usually
always be a "somewhere" that such output is directed to.

However this can have two possible side effects:

1. The output might be "eaten up" and never made visible, if not redirected.
I don't know any such target yet, as Linux usually saves the background
console. Other systems might differ. Redirecting it should help if you need
the info.

2. The output might interfere with the graphical output. Try running a ggi
demo on fbcon/kgicon when starting it from within mc.
mc has it's shell attached through a pipe or something, so the tty cannot be
put in "graphics mode" which initiates that "backgrounded console"
behaviour. Again redirecting output helps.

>   For example when I load a TGA and its in a bad format, I just print an error
> using printf and it comes up in a console that I can read behind the GGI app.
> Now is this bad if it gets ported to another target?

Well - if you can live with the 2 possible problems shown above, I'd say
it's o.k.

CU, Andy

-- 
= Andreas Beck                    |  Email :  <andreas.beck@ggi-project.org> =

Index: [thread] [date] [subject] [author]