[elinks-dev] Re: elinks - zas: Tidy up.

Petr Baudis pasky at ucw.cz
Fri Jun 18 17:09:54 PDT 2004


Dear diary, on Wed, May 26, 2004 at 07:25:08PM CEST, I got a letter,
where cvs at pasky.or.cz told me, that...
> This is an automated notification of a change to the ELinks CVS tree.
> 
> Author: zas
> Module: elinks
>    Tag: <TRUNK>
>   Date: Wed May 26 17:25:08 2004 GMT
> 
> ---- Log message:
> 
> Tidy up.
> 
> 
> ---- Files affected:
> 
> elinks/src/bfu:
>    checkbox.c (1.71 -> 1.72) 
>     http://cvsweb.elinks.or.cz/cvsweb.cgi/elinks/src/bfu/checkbox.c.diff?r1=1.71&r2=1.72&f=u
> 
> 
> ---- Diffs:
> 
>  elinks/src/bfu/checkbox.c |   55 ++++++++++++++++++++++++++------------
>  1 files changed, 38 insertions(+), 17 deletions(-)
> 
> 
> Index: elinks/src/bfu/checkbox.c
> diff -u elinks/src/bfu/checkbox.c:1.71 elinks/src/bfu/checkbox.c:1.72
> --- elinks/src/bfu/checkbox.c:1.71	Fri May 14 02:18:40 2004
> +++ elinks/src/bfu/checkbox.c	Wed May 26 19:25:03 2004
> @@ -52,15 +53,14 @@
>  	color = get_bfu_color(term, "dialog.checkbox");
>  	if (!color) return;
>  
> -	if (widget_data->info.checkbox.checked) {
> -		text = (!widget_data->widget->info.checkbox.gid) ? "[X]" : "(X)";
> -	} else {
> -		text = (!widget_data->widget->info.checkbox.gid) ? "[ ]" : "( )";
> -	}
> +	if (widget_data->info.checkbox.checked)
> +		text = widget_data->widget->info.checkbox.gid ? "(X)" : "[X]";
> +	else
> +		text = widget_data->widget->info.checkbox.gid ? "( )" : "[ ]";
>  
>  	draw_text(term, pos->x, pos->y, text, CHECKBOX_LEN, 0, color);
>  

Please don't do this. Unless it's a screen space sensitive place, it
gives the code more visual structure and also makes it much easier to
add more commands inside the branches fast (especially debugging
prints).

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A, B, C, D, E, F, G... I will eat your family.  -- Dane Cook



More information about the elinks-dev mailing list