#include "crprintf.h" #include #include #include int main(void) { // basic colors crprintf("Red text and back to normal\n"); crprintf("Green, Blue, Yellow\n"); // bright colors crprintf("Bright Red vs Normal Red\n"); // background colors crprintf("Red background with text\n"); crprintf("Blue bg with white text\n"); // styles crprintf("Bold text and dim text\n"); crprintf("
    Underlined
text\n"); crprintf("Italic or italic, strikethrough, inverted\n"); // combined styles crprintf("Bold red or bold blue\n"); crprintf("Dim cyan and italic green\n"); // hex colors crprintf("<#ff8800>Orange hex color\n"); crprintf("<#0f0>Bright green shorthand\n"); crprintf("Magenta background\n"); // variables crprintf_var("error_style", "bold+red"); crprintf_var("info_style", "cyan"); // padding crprintf("Left aligned: <$info_style>command description\n"); crprintf("Right aligned: <$error_style>error message\n"); crprintf( "<$status>Success!\n" "{status} is the variable value\n" ); // format specifiers crprintf("Number: %d, String: %s\n", 42, "hello"); crprintf("Hex: 0x%x, Float: %.2f\n", 255, 3.14159); crprintf("Precision: %.*s, Width: '%*s', Dynamic float: %*.*f\n", 4, "abcdef", 6, "hi", 7, 2, 3.14159 ); // reset crprintf("red back to normal immediately\n"); // escapes crprintf("Literal <<: less than, >>: greater than\n"); crprintf("Literal %%: percent sign\n"); // spaces and breaks crprintf("Some textspaced out
New lineTwo new lines\n"); return 0; }