print(...) - generic print for C
#include "print.h"
print("number:", 25, "fractional number:", 1.2345, "expression:", (2.0 + 5) / 3);
// variables can be passed
char *s = "abc";
void *p = main;
long l = 1234567890123456789;
print("string:", s, "pointer:", p, "long:", l);
// some basic C arrays are supported
int x[] = { 1, 2, 3 };
char *args[] = { "gcc", "hello.c", "-o", "hello" };
print(x, args);
// char/byte are handled with extra love
unsigned char byte = 222;
char ch = 'A';
print(byte, ch)
fprint(stderr, "Warning:", s, "pointer:", p, "long:", l);
print(...)
prints max. 25 arguments according to its types to stdout, with color support.
fprint(fh, ...)
prints max. 25 arguments according to its types to its first FILE* argument,
with color support.
Disable coloring with __print_enable_color = 0;
printf(3)