"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/terminal/Color.h" between
monit-5.27.2.tar.gz and monit-5.28.0.tar.gz

About: Monit is a utility for managing and monitoring processes, files, directories and filesystems (with automatic error recovery).

Color.h  (monit-5.27.2):Color.h  (monit-5.28.0)
skipping to change at line 25 skipping to change at line 25
* In addition, as a special exception, the copyright holders give * In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the * permission to link the code of portions of this program with the
* OpenSSL library under certain conditions as described in each * OpenSSL library under certain conditions as described in each
* individual source file, and distribute linked combinations * individual source file, and distribute linked combinations
* including the two. * including the two.
* *
* You must obey the GNU Affero General Public License in all respects * You must obey the GNU Affero General Public License in all respects
* for all of the code used other than OpenSSL. * for all of the code used other than OpenSSL.
*/ */
#ifndef COLOR_INCLUDED #ifndef TEXTCOLOR_INCLUDED
#define COLOR_INCLUDED #define TEXTCOLOR_INCLUDED
/** /**
* Class for terminal color output. * Class for terminal color output.
* *
* @author http://www.tildeslash.com/ * @author http://www.tildeslash.com/
* @see http://www.mmonit.com/ * @see http://www.mmonit.com/
* @file * @file
*/ */
#define COLOR_RESET "\033[0m" #define COLOR_RESET "\033[0m"
skipping to change at line 67 skipping to change at line 67
#define COLOR_DARKGRAY "\033[0;90m" #define COLOR_DARKGRAY "\033[0;90m"
#define COLOR_LIGHTRED "\033[0;91m" #define COLOR_LIGHTRED "\033[0;91m"
#define COLOR_LIGHTGREEN "\033[0;92m" #define COLOR_LIGHTGREEN "\033[0;92m"
#define COLOR_LIGHTYELLOW "\033[0;93m" #define COLOR_LIGHTYELLOW "\033[0;93m"
#define COLOR_LIGHTBLUE "\033[0;94m" #define COLOR_LIGHTBLUE "\033[0;94m"
#define COLOR_LIGHTMAGENTA "\033[0;95m" #define COLOR_LIGHTMAGENTA "\033[0;95m"
#define COLOR_LIGHTCYAN "\033[0;96m" #define COLOR_LIGHTCYAN "\033[0;96m"
#define COLOR_LIGHTWHITE "\033[0;97m" #define COLOR_LIGHTWHITE "\033[0;97m"
#define Color_black(format, ...) COLOR_BLACK format COLOR_RESET, ##__VA_A #define TextColor_black(format, ...) COLOR_BLACK format COLOR_RESET, ##__
RGS__ VA_ARGS__
#define Color_red(format, ...) COLOR_RED format COLOR_RESET, ##__VA_ARG #define TextColor_red(format, ...) COLOR_RED format COLOR_RESET, ##__VA
S__ _ARGS__
#define Color_green(format, ...) COLOR_GREEN format COLOR_RESET, ##__VA_A #define TextColor_green(format, ...) COLOR_GREEN format COLOR_RESET, ##__
RGS__ VA_ARGS__
#define Color_yellow(format, ...) COLOR_YELLOW format COLOR_RESET, ##__VA_ #define TextColor_yellow(format, ...) COLOR_YELLOW format COLOR_RESET, ##_
ARGS__ _VA_ARGS__
#define Color_blue(format, ...) COLOR_BLUE format COLOR_RESET, ##__VA_AR #define TextColor_blue(format, ...) COLOR_BLUE format COLOR_RESET, ##__V
GS__ A_ARGS__
#define Color_magenta(format, ...) COLOR_MAGENTA format COLOR_RESET, ##__VA #define TextColor_magenta(format, ...) COLOR_MAGENTA format COLOR_RESET, ##
_ARGS__ __VA_ARGS__
#define Color_cyan(format, ...) COLOR_CYAN format COLOR_RESET, ##__VA_AR #define TextColor_cyan(format, ...) COLOR_CYAN format COLOR_RESET, ##__V
GS__ A_ARGS__
#define Color_white(format, ...) COLOR_WHITE format COLOR_RESET, ##__VA_A #define TextColor_white(format, ...) COLOR_WHITE format COLOR_RESET, ##__
RGS__ VA_ARGS__
#define Color_boldBlack(format, ...) COLOR_BOLDBLACK format COLOR_RESET, ##__ #define TextColor_boldBlack(format, ...) COLOR_BOLDBLACK format COLOR_RESET,
VA_ARGS__ ##__VA_ARGS__
#define Color_boldRed(format, ...) COLOR_BOLDRED format COLOR_RESET, ##__VA #define TextColor_boldRed(format, ...) COLOR_BOLDRED format COLOR_RESET, ##
_ARGS__ __VA_ARGS__
#define Color_boldGreen(format, ...) COLOR_BOLDGREEN format COLOR_RESET, ##__ #define TextColor_boldGreen(format, ...) COLOR_BOLDGREEN format COLOR_RESET,
VA_ARGS__ ##__VA_ARGS__
#define Color_boldYellow(format, ...) COLOR_BOLDYELLOW format COLOR_RESET, ##_ #define TextColor_boldYellow(format, ...) COLOR_BOLDYELLOW format COLOR_RESET,
_VA_ARGS__ ##__VA_ARGS__
#define Color_boldBlue(format, ...) COLOR_BOLDBLUE format COLOR_RESET, ##__V #define TextColor_boldBlue(format, ...) COLOR_BOLDBLUE format COLOR_RESET, #
A_ARGS__ #__VA_ARGS__
#define Color_boldMagenta(format, ...) COLOR_BOLDMAGENTA format COLOR_RESET, ## #define TextColor_boldMagenta(format, ...) COLOR_BOLDMAGENTA format COLOR_RESET
__VA_ARGS__ , ##__VA_ARGS__
#define Color_boldCyan(format, ...) COLOR_BOLDCYAN format COLOR_RESET, ##__V #define TextColor_boldCyan(format, ...) COLOR_BOLDCYAN format COLOR_RESET, #
A_ARGS__ #__VA_ARGS__
#define Color_boldWhite(format, ...) COLOR_BOLDWHITE format COLOR_RESET, ##__ #define TextColor_boldWhite(format, ...) COLOR_BOLDWHITE format COLOR_RESET,
VA_ARGS__ ##__VA_ARGS__
#define Color_darkGray(format, ...) COLOR_DARKGRAY format COLOR_RESET, ##__V #define TextColor_darkGray(format, ...) COLOR_DARKGRAY format COLOR_RESET, #
A_ARGS__ #__VA_ARGS__
#define Color_lightRed(format, ...) COLOR_LIGHTRED format COLOR_RESET, ##__V #define TextColor_lightRed(format, ...) COLOR_LIGHTRED format COLOR_RESET, #
A_ARGS__ #__VA_ARGS__
#define Color_lightGreen(format, ...) COLOR_LIGHTGREEN format COLOR_RESET, ##_ #define TextColor_lightGreen(format, ...) COLOR_LIGHTGREEN format COLOR_RESET,
_VA_ARGS__ ##__VA_ARGS__
#define Color_lightYellow(format, ...) COLOR_LIGHTYELLOW format COLOR_RESET, ## #define TextColor_lightYellow(format, ...) COLOR_LIGHTYELLOW format COLOR_RESET
__VA_ARGS__ , ##__VA_ARGS__
#define Color_lightBlue(format, ...) COLOR_LIGHTBLUE format COLOR_RESET, ##__ #define TextColor_lightBlue(format, ...) COLOR_LIGHTBLUE format COLOR_RESET,
VA_ARGS__ ##__VA_ARGS__
#define Color_lightMagenta(format, ...) COLOR_LIGHTMAGENTA format COLOR_RESET, # #define TextColor_lightMagenta(format, ...) COLOR_LIGHTMAGENTA format COLOR_RESE
#__VA_ARGS__ T, ##__VA_ARGS__
#define Color_lightCyan(format, ...) COLOR_LIGHTCYAN format COLOR_RESET, ##__ #define TextColor_lightCyan(format, ...) COLOR_LIGHTCYAN format COLOR_RESET,
VA_ARGS__ ##__VA_ARGS__
#define Color_lightWhite(format, ...) COLOR_LIGHTWHITE format COLOR_RESET, ##_ #define TextColor_lightWhite(format, ...) COLOR_LIGHTWHITE format COLOR_RESET,
_VA_ARGS__ ##__VA_ARGS__
/** /**
* Test terminal color support * Test terminal color support
* @return true if colors are supported, otherwise false * @return true if colors are supported, otherwise false
*/ */
bool Color_support(void); bool TextColor_support(void);
/** /**
* Return length of ANSI color sequences in the string. * Return length of ANSI color sequences in the string.
* @return bytes used by control sequences or 0 if the string has no colors * @return bytes used by control sequences or 0 if the string has no colors
*/ */
int Color_length(char *s); int TextColor_length(char *s);
/** /**
* Strip the ANSI color sequences in the string. * Strip the ANSI color sequences in the string.
* Example: * Example:
* <pre> * <pre>
* char s[] = "\033[31mHello\033[0m"; * char s[] = "\033[31mHello\033[0m";
* Color_strip(s) -> Hello * Color_strip(s) -> Hello
* </pre> * </pre>
* @param s The string to strip * @param s The string to strip
* @return A pointer to s * @return A pointer to s
*/ */
char *Color_strip(char *s); char *TextColor_strip(char *s);
#endif #endif
 End of changes. 5 change blocks. 
53 lines changed or deleted 53 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)