Skip to content

All the funtionality of printf but with colors and markings.

License

Notifications You must be signed in to change notification settings

turtles4all/cprintf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cprintf

All the funtionality of printf but with colors and markings.

cprintf.h will add the color definitions to the program and they can also be used with %s operator in printf but the last variable must call COLOR_RESET or the following terminal output will result in the same markup until COLOR_RESET is called.

cprinf will automaticly reset color markings for the terminal after output has been displayed to stdout.

Usage:

#include "cprintf.h"

int main(void){
	
	int number = 42;
	
	cprintf("%s%sRED INT:%d %sNORMAL AGAIN%sGREEN%s%sYELLOW INVERTED\n", 
	FM_INVERT, RED, number, COLOR_RESET, GREEN, FM_INVERT, LIGHT_YELLOW);
	
	printf("Normal Print");
	
	return 0;
}

Example

About

All the funtionality of printf but with colors and markings.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages