aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2011-08-01 17:35:10 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2011-08-01 17:35:10 +0000
commit095e10a6a17420dd31d1f5f592b639f100275057 (patch)
tree7b1c278604a4a5feeb896f9fe2ab4ab2d23393d5
parent47c48c71f7b95aee1347fa4e02c0de09eef1234d (diff)
replace .x%x 32-bit only canvas id with .x%lx canvas id which supports 32-bit and 64-bit
svn path=/trunk/externals/miXed/; revision=15186
-rw-r--r--cyclone/hammer/active.c2
-rw-r--r--cyclone/hammer/comment.c44
-rw-r--r--cyclone/sickle/Scope.c44
-rw-r--r--shared/toxy/scriptlet.c12
-rw-r--r--toxy/tot.c10
-rw-r--r--toxy/widget.c6
6 files changed, 59 insertions, 59 deletions
diff --git a/cyclone/hammer/active.c b/cyclone/hammer/active.c
index 9d10f80..adce3c1 100644
--- a/cyclone/hammer/active.c
+++ b/cyclone/hammer/active.c
@@ -36,7 +36,7 @@ static void *active_new(void)
{
t_active *x = (t_active *)pd_new(active_class);
char buf[32];
- sprintf(buf, ".x%x.c", (int)canvas_getcurrent());
+ sprintf(buf, ".x%lx.c", (int)canvas_getcurrent());
x->x_cvname = gensym(buf);
x->x_on = 0;
outlet_new((t_object *)x, &s_float);
diff --git a/cyclone/hammer/comment.c b/cyclone/hammer/comment.c
index b10728d..09123e2 100644
--- a/cyclone/hammer/comment.c
+++ b/cyclone/hammer/comment.c
@@ -88,7 +88,7 @@ static void comment_draw(t_comment *x)
}
else outbuf = buf;
outp = outbuf;
- sprintf(outp, "comment_draw %s .x%x.c %s %s %f %f %s %d %s %s {%.*s} %d\n",
+ sprintf(outp, "comment_draw %s .x%lx.c %s %s %f %f %s %d %s %s {%.*s} %d\n",
x->x_bindsym->s_name, cvid, x->x_texttag, x->x_tag,
(float)(text_xpix((t_text *)x, x->x_glist) + COMMENT_LMARGIN),
(float)(text_ypix((t_text *)x, x->x_glist) + COMMENT_TMARGIN),
@@ -117,7 +117,7 @@ static void comment_update(t_comment *x)
}
else outbuf = buf;
outp = outbuf;
- sprintf(outp, "comment_update .x%x.c %s %s {%.*s} %d\n", cvid,
+ sprintf(outp, "comment_update .x%lx.c %s %s {%.*s} %d\n", cvid,
x->x_texttag, (x->x_encoding ? x->x_encoding->s_name : "\"\""),
x->x_textbufsize, x->x_textbuf, x->x_pixwidth);
outp += strlen(outp);
@@ -125,26 +125,26 @@ static void comment_update(t_comment *x)
{
if (x->x_selend > x->x_selstart)
{
- sprintf(outp, ".x%x.c select from %s %d\n",
+ sprintf(outp, ".x%lx.c select from %s %d\n",
cvid, x->x_texttag, x->x_selstart);
outp += strlen(outp);
- sprintf(outp, ".x%x.c select to %s %d\n",
+ sprintf(outp, ".x%lx.c select to %s %d\n",
cvid, x->x_texttag, x->x_selend);
outp += strlen(outp);
- sprintf(outp, ".x%x.c focus {}\n", cvid);
+ sprintf(outp, ".x%lx.c focus {}\n", cvid);
}
else
{
- sprintf(outp, ".x%x.c select clear\n", cvid);
+ sprintf(outp, ".x%lx.c select clear\n", cvid);
outp += strlen(outp);
- sprintf(outp, ".x%x.c icursor %s %d\n",
+ sprintf(outp, ".x%lx.c icursor %s %d\n",
cvid, x->x_texttag, x->x_selstart);
outp += strlen(outp);
- sprintf(outp, ".x%x.c focus %s\n", cvid, x->x_texttag);
+ sprintf(outp, ".x%lx.c focus %s\n", cvid, x->x_texttag);
}
outp += strlen(outp);
}
- sprintf(outp, "comment_bbox %s .x%x.c %s\n",
+ sprintf(outp, "comment_bbox %s .x%lx.c %s\n",
x->x_bindsym->s_name, cvid, x->x_texttag);
x->x_bbpending = 1;
sys_gui(outbuf);
@@ -246,15 +246,15 @@ static void comment__clickhook(t_comment *x, t_symbol *s, int ac, t_atom *av)
/* start resizing */
char buf[COMMENT_OUTBUFSIZE], *outp = buf;
int cvid = (int)x->x_canvas;
- sprintf(outp, ".x%x.c bind %s <ButtonRelease> \
+ sprintf(outp, ".x%lx.c bind %s <ButtonRelease> \
{pdsend {%s _release %s}}\n", cvid, x->x_texttag,
x->x_bindsym->s_name, x->x_bindsym->s_name);
outp += strlen(outp);
- sprintf(outp, ".x%x.c bind %s <Motion> \
+ sprintf(outp, ".x%lx.c bind %s <Motion> \
{pdsend {%s _motion %s %%x %%y}}\n", cvid, x->x_texttag,
x->x_bindsym->s_name, x->x_bindsym->s_name);
outp += strlen(outp);
- sprintf(outp, ".x%x.c create rectangle %d %d %d %d -outline blue \
+ sprintf(outp, ".x%lx.c create rectangle %d %d %d %d -outline blue \
-tags {%s %s}\n",
cvid, x->x_x1, x->x_y1, x->x_x2, x->x_y2,
x->x_outlinetag, x->x_tag);
@@ -268,9 +268,9 @@ static void comment__clickhook(t_comment *x, t_symbol *s, int ac, t_atom *av)
static void comment__releasehook(t_comment *x, t_symbol *bindsym)
{
int cvid = (int)x->x_canvas;
- sys_vgui(".x%x.c bind %s <ButtonRelease> {}\n", cvid, x->x_texttag);
- sys_vgui(".x%x.c bind %s <Motion> {}\n", cvid, x->x_texttag);
- sys_vgui(".x%x.c delete %s\n", cvid, x->x_outlinetag);
+ sys_vgui(".x%lx.c bind %s <ButtonRelease> {}\n", cvid, x->x_texttag);
+ sys_vgui(".x%lx.c bind %s <Motion> {}\n", cvid, x->x_texttag);
+ sys_vgui(".x%lx.c delete %s\n", cvid, x->x_outlinetag);
x->x_dragon = 0;
if (x->x_newx2 != x->x_x2)
{
@@ -285,7 +285,7 @@ static void comment__motionhook(t_comment *x, t_symbol *bindsym,
{
int cvid = (int)x->x_canvas;
if (xx > x->x_x1 + COMMENT_MINWIDTH)
- sys_vgui(".x%x.c coords %s %d %d %d %d\n",
+ sys_vgui(".x%lx.c coords %s %d %d %d %d\n",
cvid, x->x_outlinetag,
x->x_x1, x->x_y1, x->x_newx2 = xx, x->x_y2);
}
@@ -371,7 +371,7 @@ static void comment_displace(t_gobj *z, t_glist *glist, int dx, int dy)
x->x_y2 += dy;
}
if (glist_isvisible(glist))
- sys_vgui(".x%x.c move %s %d %d\n", x->x_canvas, x->x_tag, dx, dy);
+ sys_vgui(".x%lx.c move %s %d %d\n", x->x_canvas, x->x_tag, dx, dy);
}
}
@@ -384,7 +384,7 @@ static void comment_activate(t_gobj *z, t_glist *glist, int state)
comment_dograb(x);
if (x->x_active)
return;
- sys_vgui(".x%x.c focus %s\n", x->x_canvas, x->x_texttag);
+ sys_vgui(".x%lx.c focus %s\n", x->x_canvas, x->x_texttag);
x->x_selstart = 0;
x->x_selend = x->x_textbufsize;
x->x_active = 1;
@@ -397,8 +397,8 @@ static void comment_activate(t_gobj *z, t_glist *glist, int state)
return;
pd_unbind((t_pd *)x, gensym("#key"));
pd_unbind((t_pd *)x, gensym("#keyname"));
- sys_vgui("selection clear .x%x.c\n", x->x_canvas);
- sys_vgui(".x%x.c focus {}\n", x->x_canvas);
+ sys_vgui("selection clear .x%lx.c\n", x->x_canvas);
+ sys_vgui(".x%lx.c focus {}\n", x->x_canvas);
x->x_active = 0;
}
comment_update(x);
@@ -409,7 +409,7 @@ static void comment_select(t_gobj *z, t_glist *glist, int state)
t_comment *x = (t_comment *)z;
comment_validate(x, glist);
if (!state && x->x_active) comment_activate(z, glist, 0);
- sys_vgui(".x%x.c itemconfigure %s -fill %s\n", x->x_canvas,
+ sys_vgui(".x%lx.c itemconfigure %s -fill %s\n", x->x_canvas,
x->x_texttag, (state ? "blue" : x->x_color));
/* A regular rtext should now set 'canvas_editing' variable to its canvas,
but we do not do that, because we get the keys through a global binding
@@ -444,7 +444,7 @@ static void comment_vis(t_gobj *z, t_glist *glist, int vis)
#ifdef COMMENT_DEBUG
loudbug_post("deleting...");
#endif
- sys_vgui(".x%x.c delete %s\n", x->x_canvas, x->x_tag);
+ sys_vgui(".x%lx.c delete %s\n", x->x_canvas, x->x_tag);
}
}
diff --git a/cyclone/sickle/Scope.c b/cyclone/sickle/Scope.c
index 9436e3f..1982092 100644
--- a/cyclone/sickle/Scope.c
+++ b/cyclone/sickle/Scope.c
@@ -502,7 +502,7 @@ static void scope_frgb(t_scope *x, t_symbol *s, int ac, t_atom *av)
x->x_fggreen = (int)fggreen;
x->x_fgblue = (int)fgblue;
if (cv = scope_isvisible(x))
- sys_vgui(".x%x.c itemconfigure %s -fill #%2.2x%2.2x%2.2x\n",
+ sys_vgui(".x%lx.c itemconfigure %s -fill #%2.2x%2.2x%2.2x\n",
cv, x->x_fgtag, x->x_fgred, x->x_fggreen, x->x_fgblue);
}
@@ -525,7 +525,7 @@ static void scope_brgb(t_scope *x, t_symbol *s, int ac, t_atom *av)
x->x_bggreen = (int)bggreen;
x->x_bgblue = (int)bgblue;
if (cv = scope_isvisible(x))
- sys_vgui(".x%x.c itemconfigure %s -fill #%2.2x%2.2x%2.2x\n",
+ sys_vgui(".x%lx.c itemconfigure %s -fill #%2.2x%2.2x%2.2x\n",
cv, x->x_bgtag, x->x_bgred, x->x_bggreen, x->x_bgblue);
}
@@ -553,7 +553,7 @@ static void scope_displace(t_gobj *z, t_glist *glist, int dx, int dy)
if (glist_isvisible(glist))
{
t_canvas *cv = scope_getcanvas(x, glist);
- sys_vgui(".x%x.c move %s %d %d\n", cv, x->x_tag, dx, dy);
+ sys_vgui(".x%lx.c move %s %d %d\n", cv, x->x_tag, dx, dy);
canvas_fixlinesfor(cv, t);
}
}
@@ -568,12 +568,12 @@ static void scope_select(t_gobj *z, t_glist *glist, int state)
int x1, y1, x2, y2;
scope_getrect(z, glist, &x1, &y1, &x2, &y2);
- sys_vgui(".x%x.c itemconfigure %s -outline blue -width %f -fill %s\n",
+ sys_vgui(".x%lx.c itemconfigure %s -outline blue -width %f -fill %s\n",
cv, x->x_bgtag, SCOPE_SELBDWIDTH, SCOPE_SELCOLOR);
sys_vgui("canvas %s -width %d -height %d -bg #fedc00 -bd 0\n",
sh->h_pathname, SCOPEHANDLE_WIDTH, SCOPEHANDLE_HEIGHT);
- sys_vgui(".x%x.c create window %f %f -anchor nw\
+ sys_vgui(".x%lx.c create window %f %f -anchor nw\
-width %d -height %d -window %s -tags %s\n",
cv, x2 - (SCOPEHANDLE_WIDTH - SCOPE_SELBDWIDTH),
y2 - (SCOPEHANDLE_HEIGHT - SCOPE_SELBDWIDTH),
@@ -588,7 +588,7 @@ static void scope_select(t_gobj *z, t_glist *glist, int state)
}
else
{
- sys_vgui(".x%x.c itemconfigure %s -outline black -width %f\
+ sys_vgui(".x%lx.c itemconfigure %s -outline black -width %f\
-fill #%2.2x%2.2x%2.2x\n", cv, x->x_bgtag, SCOPE_GRIDWIDTH,
x->x_bgred, x->x_bggreen, x->x_bgblue);
sys_vgui("destroy %s\n", sh->h_pathname);
@@ -608,7 +608,7 @@ static void scope_drawfgmono(t_scope *x, t_canvas *cv,
float *bp;
dx = (float)(x2 - x1) / (float)x->x_bufsize;
sc = ((float)x->x_height - 2.) / (float)(x->x_maxval - x->x_minval);
- sys_vgui(".x%x.c create line \\\n", cv);
+ sys_vgui(".x%lx.c create line \\\n", cv);
for (i = 0, xx = x1, bp = x->x_xbuffer;
i < x->x_bufsize; i++, xx += dx, bp++)
{
@@ -624,11 +624,11 @@ static void scope_drawfgmono(t_scope *x, t_canvas *cv,
/* margin lines: masking overflows, so that they appear as gaps,
rather than clipped signal values, LATER rethink */
- sys_vgui(".x%x.c create line %d %d %d %d\
+ sys_vgui(".x%lx.c create line %d %d %d %d\
-fill #%2.2x%2.2x%2.2x -width %f -tags {%s %s}\n",
cv, x1, y1, x2, y1, x->x_bgred, x->x_bggreen, x->x_bgblue,
1., x->x_fgtag, x->x_tag);
- sys_vgui(".x%x.c create line %d %d %d %d\
+ sys_vgui(".x%lx.c create line %d %d %d %d\
-fill #%2.2x%2.2x%2.2x -width %f -tags {%s %s}\n",
cv, x1, y2, x2, y2, x->x_bgred, x->x_bggreen, x->x_bgblue,
1., x->x_fgtag, x->x_tag);
@@ -647,7 +647,7 @@ static void scope_drawfgxy(t_scope *x, t_canvas *cv,
/* subtract 1-pixel margins, see below */
xsc = ((float)x->x_width - 2.) / (float)(x->x_maxval - x->x_minval);
ysc = ((float)x->x_height - 2.) / (float)(x->x_maxval - x->x_minval);
- sprintf(cmd1, ".x%x.c create line", (int)cv);
+ sprintf(cmd1, ".x%lx.c create line", (int)cv);
sprintf(cmd2, "-fill #%2.2x%2.2x%2.2x -width %f -tags {%s %s}\n ",
x->x_fgred, x->x_fggreen, x->x_fgblue,
SCOPE_FGWIDTH, x->x_fgtag, x->x_tag);
@@ -704,17 +704,17 @@ static void scope_drawbg(t_scope *x, t_canvas *cv,
float dx, dy, xx, yy;
dx = (x2 - x1) * 0.125;
dy = (y2 - y1) * 0.25;
- sys_vgui(".x%x.c create rectangle %d %d %d %d\
+ sys_vgui(".x%lx.c create rectangle %d %d %d %d\
-fill #%2.2x%2.2x%2.2x -width %f -tags {%s %s}\n",
cv, x1, y1, x2, y2,
x->x_bgred, x->x_bggreen, x->x_bgblue,
SCOPE_GRIDWIDTH, x->x_bgtag, x->x_tag);
for (i = 0, xx = x1 + dx; i < 7; i++, xx += dx)
- sys_vgui(".x%x.c create line %f %d %f %d\
+ sys_vgui(".x%lx.c create line %f %d %f %d\
-width %f -tags {%s %s}\n", cv, xx, y1, xx, y2,
SCOPE_GRIDWIDTH, x->x_gridtag, x->x_tag);
for (i = 0, yy = y1 + dy; i < 3; i++, yy += dy)
- sys_vgui(".x%x.c create line %d %f %d %f\
+ sys_vgui(".x%lx.c create line %d %f %d %f\
-width %f -tags {%s %s}\n", cv, x1, yy, x2, yy,
SCOPE_GRIDWIDTH, x->x_gridtag, x->x_tag);
}
@@ -739,7 +739,7 @@ static void scope_redrawmono(t_scope *x, t_canvas *cv)
dx = (float)(x2 - x1) / (float)x->x_bufsize;
sc = ((float)x->x_height - 2.) / (float)(x->x_maxval - x->x_minval);
xx = x1;
- sys_vgui(".x%x.c coords %s \\\n", cv, x->x_fgtag);
+ sys_vgui(".x%lx.c coords %s \\\n", cv, x->x_fgtag);
while (nleft > SCOPE_GUICHUNKMONO)
{
int i = SCOPE_GUICHUNKMONO;
@@ -784,13 +784,13 @@ static void scope_redrawxy(t_scope *x, t_canvas *cv)
{
int x1, y1, x2, y2;
scope_getrect((t_gobj *)x, x->x_glist, &x1, &y1, &x2, &y2);
- sys_vgui(".x%x.c delete %s\n", cv, x->x_fgtag);
+ sys_vgui(".x%lx.c delete %s\n", cv, x->x_fgtag);
scope_drawfgxy(x, cv, x1, y1, x2, y2);
}
static void scope_revis(t_scope *x, t_canvas *cv)
{
- sys_vgui(".x%x.c delete %s\n", cv, x->x_tag);
+ sys_vgui(".x%lx.c delete %s\n", cv, x->x_tag);
if (x->x_xymode)
scope_drawxy(x, cv);
else
@@ -808,7 +808,7 @@ static void scope_vis(t_gobj *z, t_glist *glist, int vis)
#if FORKY_VERSION < 37
rtext_new(glist, t, glist->gl_editor->e_rtext, 0);
#endif
- sprintf(sh->h_pathname, ".x%x.h%x", (int)cv, (int)sh);
+ sprintf(sh->h_pathname, ".x%lx.h%x", (int)cv, (int)sh);
if (x->x_xymode)
scope_drawxy(x, cv);
else
@@ -820,7 +820,7 @@ static void scope_vis(t_gobj *z, t_glist *glist, int vis)
t_rtext *rt = glist_findrtext(glist, t);
if (rt) rtext_free(rt);
#endif
- sys_vgui(".x%x.c delete %s\n", cv, x->x_tag);
+ sys_vgui(".x%lx.c delete %s\n", cv, x->x_tag);
x->x_canvas = 0;
}
}
@@ -869,7 +869,7 @@ static void scope_setxymode(t_scope *x, int xymode)
t_canvas *cv;
if (cv = scope_isvisible(x))
{
- sys_vgui(".x%x.c delete %s\n", cv, x->x_fgtag);
+ sys_vgui(".x%lx.c delete %s\n", cv, x->x_fgtag);
if (!xymode)
{
int x1, y1, x2, y2;
@@ -906,7 +906,7 @@ static void scopehandle__clickhook(t_scopehandle *sh, t_floatarg f)
x->x_height += sh->h_dragy;
if (cv = scope_isvisible(x))
{
- sys_vgui(".x%x.c delete %s\n", cv, sh->h_outlinetag);
+ sys_vgui(".x%lx.c delete %s\n", cv, sh->h_outlinetag);
scope_revis(x, cv);
sys_vgui("destroy %s\n", sh->h_pathname);
scope_select((t_gobj *)x, x->x_glist, 1);
@@ -922,7 +922,7 @@ static void scopehandle__clickhook(t_scopehandle *sh, t_floatarg f)
int x1, y1, x2, y2;
scope_getrect((t_gobj *)x, x->x_glist, &x1, &y1, &x2, &y2);
sys_vgui("lower %s\n", sh->h_pathname);
- sys_vgui(".x%x.c create rectangle %d %d %d %d\
+ sys_vgui(".x%lx.c create rectangle %d %d %d %d\
-outline blue -width %f -tags %s\n",
cv, x1, y1, x2, y2, SCOPE_SELBDWIDTH, sh->h_outlinetag);
}
@@ -947,7 +947,7 @@ static void scopehandle__motionhook(t_scopehandle *sh,
{
t_canvas *cv;
if (cv = scope_isvisible(x))
- sys_vgui(".x%x.c coords %s %d %d %d %d\n",
+ sys_vgui(".x%lx.c coords %s %d %d %d %d\n",
cv, sh->h_outlinetag, x1, y1, newx, newy);
sh->h_dragx = dx;
sh->h_dragy = dy;
diff --git a/shared/toxy/scriptlet.c b/shared/toxy/scriptlet.c
index db836ab..622512e 100644
--- a/shared/toxy/scriptlet.c
+++ b/shared/toxy/scriptlet.c
@@ -238,7 +238,7 @@ static char *scriptlet_dedot(t_scriptlet *sp, char *ibuf,
t_canvas *cv;
if (cv = scriptlet_canvasvalidate(sp, visedonly))
{
- sprintf(obuf, ".x%x.c.%s%x", (int)cv, sp->s_item->s_name,
+ sprintf(obuf, ".x%lx.c.%s%x", (int)cv, sp->s_item->s_name,
(int)sp->s_owner);
len = 1;
}
@@ -250,7 +250,7 @@ static char *scriptlet_dedot(t_scriptlet *sp, char *ibuf,
t_canvas *cv;
if (cv = scriptlet_canvasvalidate(sp, visedonly))
{
- sprintf(obuf, ".x%x", (int)cv);
+ sprintf(obuf, ".x%lx", (int)cv);
len = 1;
}
}
@@ -284,7 +284,7 @@ static char *scriptlet_dedot(t_scriptlet *sp, char *ibuf,
{
glist = cv->gl_owner;
if (glist && glist_isvisible(glist))
- sprintf(obuf, ".x%x", (int)glist);
+ sprintf(obuf, ".x%lx", (int)glist);
else
obuf[0] = 0;
len = 7;
@@ -293,7 +293,7 @@ static char *scriptlet_dedot(t_scriptlet *sp, char *ibuf,
{
glist = canvas_getrootfor(cv);
if (glist && glist_isvisible(glist))
- sprintf(obuf, ".x%x", (int)glist);
+ sprintf(obuf, ".x%lx", (int)glist);
else
obuf[0] = 0;
len = 5;
@@ -303,7 +303,7 @@ static char *scriptlet_dedot(t_scriptlet *sp, char *ibuf,
if (glist = canvas_getrootfor(cv))
glist = glist->gl_owner;
if (glist && glist_isvisible(glist))
- sprintf(obuf, ".x%x", (int)glist);
+ sprintf(obuf, ".x%lx", (int)glist);
else
obuf[0] = 0;
len = 6;
@@ -313,7 +313,7 @@ static char *scriptlet_dedot(t_scriptlet *sp, char *ibuf,
glist = cv;
while (glist->gl_owner) glist = glist->gl_owner;
if (glist && glist_isvisible(glist))
- sprintf(obuf, ".x%x", (int)glist);
+ sprintf(obuf, ".x%lx", (int)glist);
else
obuf[0] = 0;
len = 4;
diff --git a/toxy/tot.c b/toxy/tot.c
index 0fb5763..58a21b9 100644
--- a/toxy/tot.c
+++ b/toxy/tot.c
@@ -157,7 +157,7 @@ static t_symbol *tot_dogetpathname(t_tot *x, int visedonly, int complain)
else
{
char buf[32];
- sprintf(buf, ".x%x.c", (int)cv);
+ sprintf(buf, ".x%lx.c", (int)cv);
return (gensym(buf));
}
}
@@ -399,7 +399,7 @@ static void tot_detach(t_tot *x)
t_pd *gc;
t_symbol *target;
char buf[64];
- sprintf(buf, ".x%x", (int)cv);
+ sprintf(buf, ".x%lx", (int)cv);
target = gensym(buf);
if (!tot_guiconnect_class)
{
@@ -426,7 +426,7 @@ static void tot_attach(t_tot *x)
t_pd *gc;
t_symbol *target;
char buf[64];
- sprintf(buf, ".x%x", (int)cv);
+ sprintf(buf, ".x%lx", (int)cv);
target = gensym(buf);
if (gc = pd_findbyclass(target, tot_guiconnect_class))
{
@@ -461,7 +461,7 @@ static void tot_capture(t_tot *x, t_symbol *s, t_floatarg f)
{
char buf[64];
ts->ts_cv = cv;
- sprintf(buf, ".x%x", (int)cv);
+ sprintf(buf, ".x%lx", (int)cv);
pd_bind((t_pd *)ts, ts->ts_target = gensym(buf));
}
}
@@ -592,7 +592,7 @@ static void *tot_new(t_symbol *s1, t_symbol *s2)
glist = tot_getglist(x);
if (glist == x->x_glist)
{
- sprintf(buf, ".x%x.c", (int)glist);
+ sprintf(buf, ".x%lx.c", (int)glist);
x->x_cvpathname = gensym(buf);
}
else x->x_cvpathname = 0;
diff --git a/toxy/widget.c b/toxy/widget.c
index 71c24a8..c2306f9 100644
--- a/toxy/widget.c
+++ b/toxy/widget.c
@@ -204,7 +204,7 @@ static t_symbol *widget_getcvpathname(t_widget *x, t_glist *glist)
else
{
char buf[32];
- sprintf(buf, ".x%x.c", (int)cv);
+ sprintf(buf, ".x%lx.c", (int)cv);
return (gensym(buf));
}
}
@@ -1145,9 +1145,9 @@ static void *widget_new(t_symbol *s, int ac, t_atom *av)
if (!(x->x_tkclass = widgettype_tkclass(x->x_typedef)))
x->x_tkclass = x->x_type;
- sprintf(buf, ".x%x.c", (int)x->x_glist);
+ sprintf(buf, ".x%lx.c", (int)x->x_glist);
x->x_cvpathname = gensym(buf);
- sprintf(buf, ".x%x", (int)x->x_glist);
+ sprintf(buf, ".x%lx", (int)x->x_glist);
x->x_cvtarget = gensym(buf);
sprintf(buf, "::toxy::v%x", (int)x);
x->x_varname = gensym(buf);