-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.3.0 change print system and use color to seperate messages
- Loading branch information
1 parent
86d9066
commit 37a2f5a
Showing
3 changed files
with
139 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,33 @@ | ||
#pragma once | ||
//#pragma once | ||
|
||
#ifndef TM_PRINT_H | ||
#define TM_PRINT_H | ||
#include <string> | ||
|
||
void set_up_print_debug_function(void (*function_print)(char* fmt)); | ||
void set_up_print_info_function(void (*function_print)(char* fmt)); | ||
void set_up_print_warn_function(void (*function_print)(char* fmt)); | ||
void set_up_print_error_function(void (*function_print)(char* fmt)); | ||
void set_up_print_fatal_function(void (*function_print)(char* fmt)); | ||
|
||
const std::string PRINT_RED("\033[0;31m"); | ||
const std::string PRINT_GREEN("\033[1;32m"); | ||
const std::string PRINT_YELLOW("\033[1;33m"); | ||
const std::string PRINT_CYAN("\033[0;36m"); | ||
const std::string PRINT_RESET("\033[0m"); | ||
|
||
|
||
/*int (*print_info_function)(const char* fmt, ...); | ||
int (*print_warn_function)(const char* fmt, ...); | ||
int (*print_error_function)(const char* fmt, ...); | ||
int (*print_fatal_function)(const char* fmt, ...); | ||
*/ | ||
int print_debug(const char* fmt, ...); | ||
int print_info(const char* fmt, ...); | ||
int print_warn(const char* fmt, ...); | ||
int print_error(const char* fmt, ...); | ||
int print_fatal(const char* fmt, ...); | ||
|
||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters