[tuhopuu-devel] text commit

Gabriel Beloin gbeloin at caramail.com
Wed Jan 5 07:32:35 CET 2005


 ok i start to feel weird about that. but anyway. I came across an other error of this type. in interface_draw.c. I'm fixing it the way i think is better. But scons(or cl) never complained about wrong placed declaration in the past. Here is the patch anyway, better having clean code. :-/

Index: source/blender/src/interface_draw.c
===================================================================
RCS file: /cvsroot/tuhopuu/tuhopuu3/source/blender/src/interface_draw.c,v
retrieving revision 1.2
diff -u -r1.2 interface_draw.c
--- source/blender/src/interface_draw.c	4 Jan 2005 06:01:29 -0000	1.2
+++ source/blender/src/interface_draw.c	5 Jan 2005 06:23:36 -0000
@@ -776,12 +776,11 @@
 static void ui_roundshaded_button(int type, int colorid, float asp, float x1, float y1, float x2, float y2, int flag)
 {
 	float rad, maxrad, shadefac;
-	
-	if ((type == MENU) || (type == ICONROW) || (type == ICONTEXTROW)) maxrad = 4.0;
-	else maxrad= 0;
-	
 	int align= (flag & UI_BUT_ALIGN);
 	int round_align_fix= 0;
+
+	if ((type == MENU) || (type == ICONROW) || (type == ICONTEXTROW)) maxrad = 4.0;
+	else maxrad= 0;
 	
 	/* paper */
 	if(flag & UI_SELECT) {

Now it compile of and pack all.
	


> De: "Gabriel Beloin" <gbeloin at caramail.com>
> A: tuhopuu-devel at projects.blender.org
> Objet: [tuhopuu-devel] text commit
> Date: Wed, 05 Jan 2005 06:18:06 GMT 

> Hi,
> btw, declaration should be done on top, not after the ifs in text.c at
> line 2043 and 2131. Here is a patch for quick fix. Now it compile ok:
> 
> Index: source/blender/blenkernel/intern/text.c
> ===================================================================
> RCS file: /cvsroot/tuhopuu/tuhopuu3/source/blender/blenkernel/intern/text.c,v
> retrieving revision 1.2
> diff -u -r1.2 text.c
> --- source/blender/blenkernel/intern/text.c 5 Jan 2005 04:10:35 -0000 1.2
> +++ source/blender/blenkernel/intern/text.c 5 Jan 2005 06:02:12 -0000
> @@ -2037,10 +2037,11 @@
>  
>  void unindent(Text *text)
>  {
> + int num = 0;
> +
>   if (!text) return 0;
>   if (!text->curl) return 0;
>   if (!text->sell) return 0;
> - int num = 0;
>   
>   while(TRUE)
>   {
> @@ -2125,10 +2126,11 @@
>  
>  void uncomment(Text *text)
>  {
> + int num = 0;
> +
>   if (!text) return 0;
>   if (!text->curl) return 0;
>   if (!text->sell) return 0;
> - int num = 0;
>   
>   while(TRUE)
>   {
> 
> 
> C est le moment de dynamiser votre boîte mail en découvrant les offres
> CaraMail Max et Pro - <A HREF="http://www.caramail.com" TARGET="_blank">http://www.caramail.com</A>
> 
> 
> </PRE>
> </P>
> <P>
> <PRE>
> _______________________________________________
> tuhopuu-devel mailing list
> tuhopuu-devel at projects.blender.org
> <A HREF="http://projects.blender.org/mailman/listinfo/tuhopuu-devel" TARGET="_blank">http://projects.blender.org/mailman/listinfo/tuhopuu-devel</A>

C est le moment de dynamiser votre boîte mail en découvrant les offres CaraMail Max et Pro - http://www.caramail.com



More information about the tuhopuu-devel mailing list