[lwatch-cvs] files/src acolors.c,1.8,1.9 acolors.h,1.4,1.5 lwatch.conf,1.18,1.19 settings.c,1.19,1.2
Brought to you by:
arturcz
|
From: <ar...@us...> - 2003-04-07 13:33:15
|
Update of /cvsroot/lwatch/files/src
In directory sc8-pr-cvs1:/tmp/cvs-serv17582/src
Modified Files:
acolors.c acolors.h lwatch.conf settings.c yparse.l
Log Message:
- colors with BOLD atribute are available for now
Index: acolors.c
===================================================================
RCS file: /cvsroot/lwatch/files/src/acolors.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** acolors.c 8 Aug 2002 14:35:24 -0000 1.8
--- acolors.c 7 Apr 2003 13:33:07 -0000 1.9
***************
*** 36,62 ****
const char *colmode[] = {
"",
! _S_CLEAR,
! _S_BOLD,
! _S_DARK,
! _S_UNDERLINE,
! _S_BLINK,
! _S_REVERSE,
! _S_CONCEALED,
! _S_FGBLACK,
! _S_FGRED,
! _S_FGGREEN,
! _S_FGYELLOW,
! _S_FGBLUE,
! _S_FGMAGENTA,
! _S_FGCYAN,
! _S_FGWHITE,
! _S_BGBLACK,
! _S_BGRED,
! _S_BGGREEN,
! _S_BGYELLOW,
! _S_BGBLUE,
! _S_BGMAGENTA,
! _S_BGCYAN,
! _S_BGWHITE
};
--- 36,59 ----
const char *colmode[] = {
"",
! CLEAR,
! BOLD,
! REVERSE,
! CONCEALED,
! BLACK,
! RED,
! GREEN,
! BROWN,
! BLUE,
! MAGENTA,
! CYAN,
! LIGHTGRAY,
! DARKGRAY,
! BRIGHTRED,
! BRIGHTGREEN,
! YELLOW,
! BRIGHTBLUE,
! PURPLE,
! BRIGHTCYAN,
! WHITE
};
***************
*** 65,98 ****
"reset",_N_RESET,
"bold",_N_BOLD,
- "dark",_N_DARK,
- "underline",_N_UNDERLINE,
- "underscore",_N_UNDERSCORE,
- "blink",_N_BLINK,
"reverse",_N_REVERSE,
"concealed",_N_CONCEALED,
! "black",_N_FGBLACK,
! "red",_N_FGRED,
! "green",_N_FGGREEN,
! "yellow",_N_FGYELLOW,
! "blue",_N_FGBLUE,
! "magenta",_N_FGMAGENTA,
! "cyan",_N_FGCYAN,
! "white",_N_FGWHITE,
! "fgblack",_N_FGBLACK,
! "fgred",_N_FGRED,
! "fggreen",_N_FGGREEN,
! "fgyellow",_N_FGYELLOW,
! "fgblue",_N_FGBLUE,
! "fgmagenta",_N_FGMAGENTA,
! "fgcyan",_N_FGCYAN,
! "fgwhite",_N_FGWHITE,
! "bgblack",_N_BGBLACK,
! "bgred",_N_BGRED,
! "bggreen",_N_BGGREEN,
! "bgyellow",_N_BGYELLOW,
! "bgblue",_N_BGBLUE,
! "bgmagenta",_N_BGMAGENTA,
! "bgcyan",_N_BGCYAN,
! "bgwhite",_N_BGWHITE,
NULL,-1
};
--- 62,84 ----
"reset",_N_RESET,
"bold",_N_BOLD,
"reverse",_N_REVERSE,
"concealed",_N_CONCEALED,
! "black",_N_BLACK,
! "red",_N_RED,
! "green",_N_GREEN,
! "brown",_N_BROWN,
! "blue",_N_BLUE,
! "magenta",_N_MAGENTA,
! "cyan",_N_CYAN,
! "lightgray",_N_LIGHTGRAY,
!
! "darkgray",_N_DARKGRAY,
! "brightred",_N_BRIGHTRED,
! "brightgreen",_N_BRIGHTGREEN,
! "yellow",_N_YELLOW,
! "brightblue",_N_BRIGHTBLUE,
! "purple",_N_PURPLE,
! "brightcyan",_N_BRIGHTCYAN,
! "white",_N_WHITE,
NULL,-1
};
Index: acolors.h
===================================================================
RCS file: /cvsroot/lwatch/files/src/acolors.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** acolors.h 14 Jul 2002 22:47:13 -0000 1.4
--- acolors.h 7 Apr 2003 13:33:07 -0000 1.5
***************
*** 31,61 ****
/* ANSI colors */
! #define _S_CLEAR "\e[0m"
! #define _S_RESET "\e[0m"
! #define _S_BOLD "\e[1m"
! #define _S_DARK "\e[2m"
! #define _S_UNDERLINE "\e[4m"
! #define _S_UNDERSCORE "\e[4m"
! #define _S_BLINK "\e[5m"
! #define _S_REVERSE "\e[7m"
! #define _S_CONCEALED "\e[8m"
! #define _S_FGBLACK "\e[30m"
! #define _S_FGRED "\e[31m"
! #define _S_FGGREEN "\e[32m"
! #define _S_FGYELLOW "\e[33m"
! #define _S_FGBLUE "\e[34m"
! #define _S_FGMAGENTA "\e[35m"
! #define _S_FGCYAN "\e[36m"
! #define _S_FGWHITE "\e[37m"
! #define _S_BGBLACK "\e[40m"
! #define _S_BGRED "\e[41m"
! #define _S_BGGREEN "\e[42m"
! #define _S_BGYELLOW "\e[43m"
! #define _S_BGBLUE "\e[44m"
! #define _S_BGMAGENTA "\e[45m"
! #define _S_BGCYAN "\e[46m"
! #define _S_BGWHITE "\e[47m"
#define _N_NATURAL 0
--- 31,57 ----
/* ANSI colors */
! #define CLEAR "[0m"
! #define RESET "[0m"
! #define BOLD "[1m"
! #define REVERSE "[7m"
! #define CONCEALED "[8m"
! #define BLACK "[30m"
! #define RED "[31m"
! #define GREEN "[32m"
! #define BROWN "[33m"
! #define BLUE "[34m"
! #define MAGENTA "[35m"
! #define CYAN "[36m"
! #define LIGHTGRAY "[37m"
! #define DARKGRAY "[1;30m"
! #define BRIGHTRED "[1;31m"
! #define BRIGHTGREEN "[1;32m"
! #define YELLOW "[1;33m"
! #define BRIGHTBLUE "[1;34m"
! #define PURPLE "[1;35m"
! #define BRIGHTCYAN "[1;36m"
! #define WHITE "[1;37m"
#define _N_NATURAL 0
***************
*** 63,118 ****
#define _N_RESET _N_CLEAR
#define _N_BOLD 2
! #define _N_DARK 3
! #define _N_UNDERLINE 4
! #define _N_UNDERSCORE _N_UNDERLINE
! #define _N_BLINK 5
! #define _N_REVERSE 6
! #define _N_CONCEALED 7
!
! #define _N_FGBLACK 8
! #define _N_FGRED 9
! #define _N_FGGREEN 10
! #define _N_FGYELLOW 11
! #define _N_FGBLUE 12
! #define _N_FGMAGENTA 13
! #define _N_FGCYAN 14
! #define _N_FGWHITE 15
!
! #define _N_BGBLACK 16
! #define _N_BGRED 17
! #define _N_BGGREEN 18
! #define _N_BGYELLOW 19
! #define _N_BGBLUE 20
! #define _N_BGMAGENTA 21
! #define _N_BGCYAN 22
! #define _N_BGWHITE 23
!
! #define CLEAR _N_CLEAR
! #define RESET _N_RESET
! #define BOLD _N_BOLD
! #define DARK _N_DARK
! #define UNDERLINE _N_UNDERLINE
! #define UNDERSCORE _N_UNDERSCORE
! #define BLINK _N_BLINK
! #define REVERSE _N_REVERSE
! #define CONCEALED _N_CONCEALED
! #define FGBLACK _N_FGBLACK
! #define FGRED _N_FGRED
! #define FGGREEN _N_FGGREEN
! #define FGYELLOW _N_FGYELLOW
! #define FGBLUE _N_FGBLUE
! #define FGMAGENTA _N_FGMAGENTA
! #define FGCYAN _N_FGCYAN
! #define FGWHITE _N_FGWHITE
! #define BGBLACK _N_BGBLACK
! #define BGRED _N_BGRED
! #define BGGREEN _N_BGGREEN
! #define BGYELLOW _N_BGYELLOW
! #define BGBLUE _N_BGBLUE
! #define BGMAGENTA _N_BGMAGENTA
! #define BGCYAN _N_BGCYAN
! #define BGWHITE _N_BGWHITE
#define getcolbystr(color,string) color=0;\
--- 59,82 ----
#define _N_RESET _N_CLEAR
#define _N_BOLD 2
! #define _N_REVERSE 3
! #define _N_CONCEALED 4
! #define _N_BLACK 5
! #define _N_RED 6
! #define _N_GREEN 7
! #define _N_BROWN 8
! #define _N_BLUE 9
! #define _N_MAGENTA 10
! #define _N_CYAN 11
! #define _N_LIGHTGRAY 12
! #define _N_DARKGRAY 13
! #define _N_BRIGHTRED 14
! #define _N_BRIGHTGREEN 15
! #define _N_YELLOW 16
! #define _N_BRIGHTBLUE 17
! #define _N_PURPLE 18
! #define _N_BRIGHTCYAN 19
! #define _N_WHITE 20
#define getcolbystr(color,string) color=0;\
Index: lwatch.conf
===================================================================
RCS file: /cvsroot/lwatch/files/src/lwatch.conf,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** lwatch.conf 5 Apr 2003 17:22:08 -0000 1.18
--- lwatch.conf 7 Apr 2003 13:33:08 -0000 1.19
***************
*** 12,16 ****
# serv_color=blue
# Default color for displaing message body
! # mesg_color=white
# Where is source for reading data?
--- 12,16 ----
# serv_color=blue
# Default color for displaing message body
! # mesg_color=lightgray
# Where is source for reading data?
***************
*** 52,56 ****
# Below is configuration which works for me
! /root/ highlight=yellow # all messages with root string are yellow
/failed/ color=red # attention, operation failed
--- 52,56 ----
# Below is configuration which works for me
! /root/ highlight=brown # all messages with root string are brown
/failed/ color=red # attention, operation failed
***************
*** 60,64 ****
/^fw-reject:/ { # all rejectd from fw are red
color=red
! serv_color=yellow
}
--- 60,64 ----
/^fw-reject:/ { # all rejectd from fw are red
color=red
! serv_color=brown
}
***************
*** 70,74 ****
/kernel/ { # if string kernel ...
match_service # appears in service ...
! serv_color=yellow # write it on yellow
}
--- 70,74 ----
/kernel/ { # if string kernel ...
match_service # appears in service ...
! serv_color=brown # write it on brown
}
***************
*** 82,86 ****
/lost/ highlight=red
! /deferred/ highlight=yellow
//USR/SBIN/CRON/ { # cron's messages are not important
--- 82,86 ----
/lost/ highlight=red
! /deferred/ highlight=brown
//USR/SBIN/CRON/ { # cron's messages are not important
***************
*** 92,100 ****
/mailman/ color=red #pick a color you like
! /([0-9A-Z]{2}:){5}[0-9A-Z]{2}/ highlight=yellow # highlight MAC in yellow
/^pam/ { # PAM
match_service # service
! serv_color=yellow # highlight in yellow
}
--- 92,100 ----
/mailman/ color=red #pick a color you like
! /([0-9A-Z]{2}:){5}[0-9A-Z]{2}/ highlight=brown # highlight MAC in brown
/^pam/ { # PAM
match_service # service
! serv_color=brown # highlight in brown
}
Index: settings.c
===================================================================
RCS file: /cvsroot/lwatch/files/src/settings.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** settings.c 4 Apr 2003 15:11:43 -0000 1.19
--- settings.c 7 Apr 2003 13:33:08 -0000 1.20
***************
*** 211,218 ****
void parse_config(void) {
! lw_conf.def_date_color=FGCYAN;
! lw_conf.def_host_color=FGMAGENTA;
! lw_conf.def_serv_color=FGBLUE;
! lw_conf.def_mesg_color=FGWHITE;
if(omit_config)
return;
--- 211,218 ----
void parse_config(void) {
! lw_conf.def_date_color=_N_CYAN;
! lw_conf.def_host_color=_N_MAGENTA;
! lw_conf.def_serv_color=_N_BLUE;
! lw_conf.def_mesg_color=_N_LIGHTGRAY;
if(omit_config)
return;
Index: yparse.l
===================================================================
RCS file: /cvsroot/lwatch/files/src/yparse.l,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** yparse.l 4 Apr 2003 16:46:25 -0000 1.17
--- yparse.l 7 Apr 2003 13:33:08 -0000 1.18
***************
*** 72,76 ****
R_KEYCOLOR date_color|host_color|serv_color|mesg_color|color|highlight
R_KEYWORD match_service|match_host|ignore|exit
! COLOR black|red|green|yellow|blue|magenta|cyan|white
STRING ".*"
VALUE [0-9]*
--- 72,76 ----
R_KEYCOLOR date_color|host_color|serv_color|mesg_color|color|highlight
R_KEYWORD match_service|match_host|ignore|exit
! COLOR black|red|green|brown|blue|magenta|cyan|lightgray|darkgray|brightred|brightgreen|yellow|brightblue|purple|brightcyan|white
STRING ".*"
VALUE [0-9]*
|