[En-Nut-Discussion] Getting the free space for the fprintf buffer

Ernst Stippl ernst at stippl.org
Mon Apr 21 21:30:27 CEST 2008


Hi Uwe!

Maybe a workaround could be:
If you use vsprintf, the formatted output is written to a buffer given to
the function. This way, you could provide a buffer large enough (if you can
predict the output). Then, with a separate call, you could output the
formatted buffer in one go.

Regards
Ernst

-----Ursprüngliche Nachricht-----
Von: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von Uwe Bonnes
Gesendet: Montag, 21. April 2008 12:38
An: en-nut-discussion at egnite.de
Betreff: [En-Nut-Discussion] Getting the free space for the fprintf buffer

Hello,

is there a way to get the free space in the buffer used for fprintf().I have
some programm with debug output going to DEV_UART1 opened as stdout. To my
knowledge fprinf() gets blocking if there is no space any more in the
buffer. For debug output I would like to skip the printing in that case as
otherwise my timing behaviour is disturbed.

Thanks

-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion



-- 
No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.23.2/1389 - Release Date: 21.04.2008
08:34





More information about the En-Nut-Discussion mailing list