[pacman-dev] [PATCH 08/14] colourize warnings and errors

Allan McRae allan at archlinux.org
Wed Mar 6 10:50:29 EST 2013


On 07/03/13 01:48, Allan McRae wrote:
> From: Simon Gomizelj <simongmzlj at gmail.com>
> 
> Signed-off-by: Simon Gomizelj <simongmzlj at gmail.com>
> ---
> 
> Resending for review...
> 
>  src/pacman/conf.c | 12 +++++++-----
>  src/pacman/conf.h |  2 ++
>  src/pacman/util.c |  6 ++++--
>  3 files changed, 13 insertions(+), 7 deletions(-)
> 
> diff --git a/src/pacman/conf.c b/src/pacman/conf.c
> index baaf6a1..f488234 100644
> --- a/src/pacman/conf.c
> +++ b/src/pacman/conf.c
> @@ -61,12 +61,12 @@ config_t *config = NULL;
>  
>  void enable_colors(int colors)
>  {
> -	colstr_t *colstr = &config->colstr;
> -
>  	if(colors == PM_COLOR_ON) {
> -		colstr->colon = BOLDBLUE "::" BOLDWHITE " ";
> -		colstr->title = BOLDWHITE;
> -		colstr->nc    = NC;
> +		config->colstr.colon = BOLDBLUE "::" BOLDWHITE " ";
> +		config->colstr.title = BOLDWHITE;
> +		config->colstr.warn  = BOLDYELLOW;
> +		config->colstr.err   = BOLDRED;
> +		config->colstr.nc    = NC;

Pick the format in the previous patch when you introduce this and stick
to it.



More information about the pacman-dev mailing list