Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 943 Bytes

print.3.ronn

File metadata and controls

39 lines (26 loc) · 943 Bytes

NAME

print(...) - generic print for C

SYNOPSIS

#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);

DESCRIPTION

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;

SEE ALSO

printf(3)