This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
printf() woes
- From: Rick Mann <rmann at latencyzero dot com>
- To: newlib at sourceware dot org
- Date: Tue, 29 Jan 2008 18:38:09 -0800
- Subject: printf() woes
Hi. I'm using newlib 1.14 on an Atmel ARM processor, and printf() is
behaving strangely.
The following code
printf("1. Hello worldCRLF1\r\n");
printf("2. Hello worldCRLF\r\n");
printf("3. Hello worldCRLF\r\nHello worldCRLF\r\n");
printf("4. Hello worldLF\nHello worldLF\n");
printf("5. Hello worldNULL");
printf("6. Hello worldLF\n");
prints:
3. Hello worldCRLF1
4. Hello worldLF
Hello worldLF6. Hello worldLF
Using snprintf() works just fine.
Newlib's printf() is doing something with newlines, and printf() calls
without newline, and not handling it the way I really want. Perhaps
it's a configuration things somewhere, but I don't really know where
to look.
Any suggestions?
TIA,
Rick