I am actually not sure if this qualifies as a bug: Pelles C does not translate \n etc in wsprintf to CrLf etc.
Both MS VC and GCC do translate them.
#include <stdio.h>
#include <Windows.h>
#pragma warn(disable:2118 2215 2216)
#pragma nodefaultlib
#pragma comment(linker, "/entry:main")
#pragma comment(lib, "crt.lib")
#define fprint(...) { \
int bWritten; \
char buffer[1024]; \
wsprintf(buffer, __VA_ARGS__); \
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), buffer, lstrlen(buffer), &bWritten, NULL); \
}
int xy(double i, double j) { return i*j; }
int main(int argc, char* argv[]) {
fprint("x*y=%d \n\n\n", 12345);
fprint("x*y=%d \n\n\n", xy(100.0, 12.3));
fprint("... %s", "did you see a newline?");
}