[Gridflow-cvs] [svn] commit: r6153 - in /trunk/src: classes2.cxx classes_gui.cxx hack.hxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Mon Aug 16 14:18:25 EDT 2010


Author: matju
Date: Mon Aug 16 14:18:24 2010
New Revision: 6153

Log:
fix warnings for printf-style calls, some of which are real fixes for 64-bit mode.

Modified:
    trunk/src/classes2.cxx
    trunk/src/classes_gui.cxx
    trunk/src/hack.hxx

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Mon Aug 16 14:18:24 2010
@@ -752,11 +752,11 @@
 	t_canvas *last;
 	\constructor (int n) {this->n=n; last=0;}
 	~GFCanvasHoHoHo () {_0_hide();}
-	\decl 0 hide () {if (last) sys_vgui(".x%lx.c delete %lxRECT\n",long(last),bself);}
+	\decl 0 hide () {if (last) sys_vgui(".x%lx.c delete %lxRECT\n",long(last),long(bself));}
 	\decl 0 list (int x1, int y1, int x2, int y2) {MOM;
 		_0_hide();
 		last = m;
-		sys_vgui(".x%lx.c create rectangle %d %d %d %d "DASHRECT" -tags %lxRECT\n",long(m),x1,y1,x2,y2,bself);
+		sys_vgui(".x%lx.c create rectangle %d %d %d %d "DASHRECT" -tags %lxRECT\n",long(m),x1,y1,x2,y2,long(bself));
 	}
 };
 \end class {install("gf/canvas_hohoho",1,0);}

Modified: trunk/src/classes_gui.cxx
==============================================================================
--- trunk/src/classes_gui.cxx (original)
+++ trunk/src/classes_gui.cxx Mon Aug 16 14:18:24 2010
@@ -88,16 +88,16 @@
 	}
 	static void displacefn(BLAH, int dx, int dy) {INIT L
 		bself->te_xpix+=dx; bself->te_ypix+=dy;
-		sys_vgui(".x%x.c move %s %d %d\n",glist_getcanvas(glist),self->rsym->s_name,dx,dy);
+		sys_vgui(".x%lx.c move %s %d %d\n",long(glist_getcanvas(glist)),self->rsym->s_name,dx,dy);
 		canvas_fixlinesfor(glist, (t_text *)x);
 	}
 	static void selectfn(BLAH, int state) {INIT L
 		self->selected=!!state;
-		sys_vgui(".x%x.c itemconfigure {%sR || %sTEXT} -outline %s\n",c,
+		sys_vgui(".x%lx.c itemconfigure {%sR || %sTEXT} -outline %s\n",long(c),
 			self->rsym->s_name,self->rsym->s_name,self->selected?"#0000ff":self->outline.data());
 	}
 	static void deletefn(BLAH) {INIT L
-		/* if (self->vis) */ sys_vgui(".x%x.c delete %s\n",c,self->rsym->s_name,self->rsym->s_name);
+		/* if (self->vis) */ sys_vgui(".x%lx.c delete %s\n",long(c),self->rsym->s_name);
 		canvas_deletelinesfor(glist, (t_text *)x);
 		sys_unqueuegui(x);
 	}
@@ -163,20 +163,20 @@
 			else quoted << (char)s[i];
 		}
 		// used to have {Courier -12} but this changed to use pdtk_canvas_new
-		if (vis) sys_vgui("display_update %s .x%x.c %d %d #000000 #ffffc8 %s %d \"%s\"\n",
-			rsym->s_name,glist_getcanvas(mom),text_xpix(bself,mom),text_ypix(bself,mom),
+		if (vis) sys_vgui("display_update %s .x%lx.c %d %d #000000 #ffffc8 %s %d \"%s\"\n",
+			rsym->s_name,long(glist_getcanvas(mom)),text_xpix(bself,mom),text_ypix(bself,mom),
 			selected?"#0000ff":"#aaaaaa", sys_hostfontsize(glist_getfont(mom)),quoted.str().data());
 		else {
 			t_canvas *c = glist_getcanvas(mom);
-			sys_vgui(".x%x.c delete %s\n",c,rsym->s_name,rsym->s_name);
+			sys_vgui(".x%lx.c delete %s\n",long(c),rsym->s_name);
 		}
 	}
 	NEWWB
 	static void redraw(BLAH) {INIT1 self->show();}
 	static void selectfn(BLAH, int state) {INIT L
 		self->selected=!!state;
-		sys_vgui(".x%x.c itemconfigure %sR -outline %s\n",c,self->rsym->s_name,self->selected?"#0000ff":"#aaaaaa");
-		sys_vgui(".x%x.c itemconfigure %sTEXT -fill %s\n",c,self->rsym->s_name,self->selected?"#0000ff":"#000000");
+		sys_vgui(".x%lx.c itemconfigure %sR -outline %s\n",long(c),self->rsym->s_name,self->selected?"#0000ff":"#aaaaaa");
+		sys_vgui(".x%lx.c itemconfigure %sTEXT -fill %s\n",long(c),self->rsym->s_name,self->selected?"#0000ff":"#000000");
 	}
 	\decl void anything (...) {
 		t_symbol *sel = argv[1];
@@ -405,7 +405,7 @@
 		if (buf) sendbuf();
 		t_glist *c = glist_getcanvas(mom);
 		if (osx!=sx || osy!=sy) canvas_fixlinesfor(c,(t_object *)bself);
-		sys_vgui("gridsee_update %s .x%x.c %d %d %d %d %d %d %d %d #cccccc %s\n",rsym->s_name,c,
+		sys_vgui("gridsee_update %s .x%lx.c %d %d %d %d %d %d %d %d #cccccc %s\n",rsym->s_name,long(c),
 			text_xpix(bself,mom),text_ypix(bself,mom),sx,sy,mx1,my1,mx2,my2,selected?"#0000ff":"#aaaaaa");
 		out[0](gensym("shown"),0,0);
 	}
@@ -476,13 +476,13 @@
 	void show () {
 		//if (osx!=sx || osy!=sy) canvas_fixlinesfor(c,(t_object *)bself);
 		t_glist *c = glist_getcanvas(mom);
-		sys_vgui("gf/tk_button.update %s .x%x.c %d %d %d %d #ffffff %s\n",rsym->s_name,c,
+		sys_vgui("gf/tk_button.update %s .x%lx.c %d %d %d %d #ffffff %s\n",rsym->s_name,long(c),
 			text_xpix(bself,mom),text_ypix(bself,mom),sx,sy,selected?"#0000ff":outline.data());
 	}
 	static void visfn(BLAH, int flag) {INIT
-		if (flag && !self->vis) sys_vgui("gf/tk_button.create %s .x%x.c %d %d {%s}\n",self->rsym->s_name,c,
+		if (flag && !self->vis) sys_vgui("gf/tk_button.create %s .x%lx.c %d %d {%s}\n",self->rsym->s_name,long(c),
 			text_xpix(bself,self->mom),text_ypix(bself,self->mom),self->text->s_name);
-		if (!flag && self->vis) sys_vgui("gf/tk_button.destroy %s .x%x.c\n",self->rsym->s_name,c);
+		if (!flag && self->vis) sys_vgui("gf/tk_button.destroy %s .x%lx.c\n",self->rsym->s_name,long(c));
 		GUI_FObject::visfn(x,glist,flag);//super
 	}
 	NEWWB

Modified: trunk/src/hack.hxx
==============================================================================
--- trunk/src/hack.hxx (original)
+++ trunk/src/hack.hxx Mon Aug 16 14:18:24 2010
@@ -20,7 +20,7 @@
     }
     else namebuf[0] = 0;
     sys_vgui("wm title .x%lx {%s%c%s - %s}\n",
-        x, x->gl_name->s_name, (x->gl_dirty? '*' : ' '), namebuf,
+        long(x), x->gl_name->s_name, (x->gl_dirty? '*' : ' '), namebuf,
             canvas_getdir(x)->s_name);
 }
 #else



More information about the Gridflow-cvs mailing list