The styled colored printf() functions:¶
Styled Print Format:¶
Color Foreground Print Format:¶
-
int
cfg_printf(fg_color_t color, const char *fmt, ...)¶ Parameters: - fg_color – The foreground color to apply.
- fmt – The format string for the output.
Returns: The number of characters from the output string or -1 in case of error.
Return type: int.
Color Background Print Format:¶
-
int
cbg_printf(bg_color_t bgcolor, const char *fmt, ...)¶ Parameters: - bg_color – The foreground color to apply.
- fmt – The format string for the output.
Returns: The number of characters from the output string or -1 in case of error.
Return type: int.
Styled Foreground Color Print Format:¶
-
int
scfg_printf(style_t style, fg_color_t fg_color, const char *fmt, ...)¶ Parameters: - style – the style to apply to the text.
- fg_color – The foreground color to apply.
- fmt – The format string for the output.
Returns: The number of characters from the output string or -1 in case of error.
Return type: int.
Styled Background Color Print Format:¶
-
int
scbg_printf(style_t style, bg_color_t bg_color, const char *fmt, ...)¶ Parameters: - style – the style to apply to the text.
- bg_color – The background color to apply.
- fmt – The format string for the output.
Returns: The number of characters from the output string or -1 in case of error.
Return type: int.
Color Foreground Background Print Format:¶
-
int
cfgbg_printf(fg_color_t fg_color, bg_color_t bg_color, const char *fmt, ...)¶ Parameters: - fg_color – The foreground color to apply.
- bg_color – The foreground color to apply.
- fmt – The format string for the output.
Returns: The number of characters from the output string or -1 in case of error.
Return type: int.
Styled Color Foreground Background Print Format:¶
-
int
scfgbg_printf(style_t style, fg_color_t fg_color, bg_color_t bg_color, const char *fmt, ...)¶ Parameters: - style – the style to apply to the text.
- fg_color – The foreground color to apply.
- bg_color – The foreground color to apply.
- fmt – The format string for the output.
Returns: The number of characters from the output string or -1 in case of error.
Return type: int.
The styled colored fprintf() functions¶
File Styled Print Format:¶
File Color Foreground Print Format:¶
-
int
cfg_fprintf(FILE *fp, fg_color_t color, const char *fmt, ...)¶ Parameters: - fp – A
FILEpointer. - fg_color – The foreground color to apply.
- fmt – The format string for the output.
Returns: The number of characters from the output string or -1 in case of error.
Return type: int.- fp – A
File Color Background Print Format:¶
-
int
cbg_fprintf(FILE *fp, bg_color_t bgcolor, const char *fmt, ...)¶ Parameters: - fp – A
FILEpointer. - bg_color – The foreground color to apply.
- fmt – The format string for the output.
Returns: The number of characters from the output string or -1 in case of error.
Return type: int.- fp – A
File Styled Foreground Color Print Format:¶
-
int
scfg_fprintf(FILE *fp, style_t style, fg_color_t fg_color, const char *fmt, ...)¶ Parameters: - fp – A
FILEpointer. - style – the style to apply to the text.
- fg_color – The foreground color to apply.
- fmt – The format string for the output.
Returns: The number of characters from the output string or -1 in case of error.
Return type: int.- fp – A
Styled Background Color Print Format:¶
-
int
scbg_printf(FILE *fp, style_t style, bg_color_t bg_color, const char *fmt, ...) Parameters: - fp – A
FILEpointer. - style – the style to apply to the text.
- bg_color – The background color to apply.
- fmt – The format string for the output.
Returns: The number of characters from the output string or -1 in case of error.
Return type: int.- fp – A
File Color Foreground Background Print Format:¶
-
int
cfgbg_fprintf(FILE *fp, fg_color_t fg_color, bg_color_t bg_color, const char *fmt, ...)¶ Parameters: - fp – A
FILEpointer. - fg_color – The foreground color to apply.
- bg_color – The foreground color to apply.
- fmt – The format string for the output.
Returns: The number of characters from the output string or -1 in case of error.
Return type: int.- fp – A
File Styled Color Foreground Background Print Format:¶
-
int
scfgbg_fprintf(FILE *fp, style_t style, fg_color_t fg_color, bg_color_t bg_color, const char *fmt, ...)¶ Parameters: - fp – A
FILEpointer. - style – the style to apply to the text.
- fg_color – The foreground color to apply.
- bg_color – The foreground color to apply.
- fmt – The format string for the output.
Returns: The number of characters from the output string or -1 in case of error.
Return type: int.- fp – A