[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Sun, 12 Jun 2005 21:16:12 GMT 
Subject:Re: Porting problems [Poplog on BeOS] 
From:Jonathan L Cunningham 
Volume-ID: 

On 12 Jun 2005 13:42:21 -0700, pete@jwgibbs.cchem.berkeley.edu (Pete
Goodeve) wrote:

>  void dbgnpr(long val) {
>	printf("dbgnpr called with %d\n", val);
>  }
(snip)

>Unless I can get this cleared up, I think I'm done.  (:-()

I should wait before replying, since someone else is likely to
offer a better suggestion, but then I'd forget to followup
at all, so here goes ...

Have you considered using fprintf instead? There's really no
way, in principle, to know what a complex system is doing or
has done with standard output. If you open a new file, write
to it, flush buffers (although that shouldn't be necessary)
and then close it, all in C, it's much harder for the calling
system to screw up what you are doing, and *you* won't
interfere with whatever it may be doing either.

Jonathan

-- 
 Mail to spam auto-deleted, use jlc1 instead.
(That's jay ell cee one, if your font makes l and 1 look the same)