This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]