This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Fwd: printf does not work
- From: Freddie Chopin <freddie_chopin at op dot pl>
- To: newlib at sourceware dot org
- Date: Wed, 24 Oct 2012 11:33:25 +0200
- Subject: Re: Fwd: printf does not work
- References: <797BE927-EE2A-422A-8197-2EE15B054CBE@mailbox.tu-berlin.de> <DE69FA62-9D60-4370-A32F-DA03AB166472@mailbox.tu-berlin.de>
Didn't you forgot about buffering? Default stdout is linebuffered, so if
the string you're generating does not end with '\n' it won't be pushed
to write(). Disable buffering (with setbbuf() or something similar) or
terminate your string with newline or just call fflush(stdout).
4\/3!!