aboutsummaryrefslogtreecommitdiff
path: root/cyclone
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2013-01-22 19:17:13 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2013-01-22 19:17:13 +0000
commitd629edf90155d7e2e43b6a1d370746375f050815 (patch)
treeee88eb1101917a4d709bc1903229f6d500359ef9 /cyclone
parent9d9c5e05b6b360b967098acf25c1a97fe89e8c6b (diff)
fix so all pointers used as IDs work in 64-bit also
svn path=/trunk/externals/miXed/; revision=16965
Diffstat (limited to 'cyclone')
-rw-r--r--cyclone/hammer/active.c2
-rw-r--r--cyclone/hammer/comment.c18
-rw-r--r--cyclone/hammer/pv.c6
-rw-r--r--cyclone/sickle/Scope.c18
4 files changed, 22 insertions, 22 deletions
diff --git a/cyclone/hammer/active.c b/cyclone/hammer/active.c
index adce3c1..ccaf2d9 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%lx.c", (int)canvas_getcurrent());
+ sprintf(buf, ".x%lx.c", (unsigned long)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 09123e2..0be726f 100644
--- a/cyclone/hammer/comment.c
+++ b/cyclone/hammer/comment.c
@@ -76,7 +76,7 @@ static t_pd *commentsink = 0;
static void comment_draw(t_comment *x)
{
char buf[COMMENT_OUTBUFSIZE], *outbuf, *outp;
- int cvid = (int)x->x_canvas;
+ unsigned long cvid = (unsigned long)x->x_canvas;
int reqsize = x->x_textbufsize + 250; /* FIXME estimation */
if (reqsize > COMMENT_OUTBUFSIZE)
{
@@ -105,7 +105,7 @@ static void comment_draw(t_comment *x)
static void comment_update(t_comment *x)
{
char buf[COMMENT_OUTBUFSIZE], *outbuf, *outp;
- int cvid = (int)x->x_canvas;
+ unsigned long cvid = (unsigned long)x->x_canvas;
int reqsize = x->x_textbufsize + 250; /* FIXME estimation */
if (reqsize > COMMENT_OUTBUFSIZE)
{
@@ -245,7 +245,7 @@ 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;
+ unsigned long cvid = (unsigned long)x->x_canvas;
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);
@@ -267,7 +267,7 @@ 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;
+ unsigned long cvid = (unsigned long)x->x_canvas;
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);
@@ -283,7 +283,7 @@ static void comment__releasehook(t_comment *x, t_symbol *bindsym)
static void comment__motionhook(t_comment *x, t_symbol *bindsym,
t_floatarg xx, t_floatarg yy)
{
- int cvid = (int)x->x_canvas;
+ unsigned long cvid = (unsigned long)x->x_canvas;
if (xx > x->x_x1 + COMMENT_MINWIDTH)
sys_vgui(".x%lx.c coords %s %d %d %d %d\n",
cvid, x->x_outlinetag,
@@ -685,9 +685,9 @@ static void *comment_new(t_symbol *s, int ac, t_atom *av)
t->te_type = T_TEXT;
x->x_glist = canvas_getcurrent();
x->x_canvas = 0;
- sprintf(x->x_tag, "all%x", (int)x);
- sprintf(x->x_texttag, "t%x", (int)x);
- sprintf(x->x_outlinetag, "h%x", (int)x);
+ sprintf(x->x_tag, "all%lx", (unsigned long)x);
+ sprintf(x->x_texttag, "t%lx", (unsigned long)x);
+ sprintf(x->x_outlinetag, "h%lx", (unsigned long)x);
x->x_pixwidth = 0;
x->x_fontsize = 0;
x->x_fontfamily = 0;
@@ -768,7 +768,7 @@ textpart:
x->x_transclock = clock_new(x, (t_method)comment_transtick);
x->x_bbset = 0;
x->x_bbpending = 0;
- sprintf(buf, "miXed%x", (int)x);
+ sprintf(buf, "miXed%lx", (unsigned long)x);
x->x_bindsym = gensym(buf);
pd_bind((t_pd *)x, x->x_bindsym);
if (!commentsink)
diff --git a/cyclone/hammer/pv.c b/cyclone/hammer/pv.c
index a444b51..85f4ddc 100644
--- a/cyclone/hammer/pv.c
+++ b/cyclone/hammer/pv.c
@@ -358,11 +358,11 @@ static void pv_objstatus(t_pv *x, t_glist *glist)
for (g = glist->gl_list; g; g = g->g_next)
{
if (g == (t_gobj *)x)
- post("%x (this object) owning patcher [%s]",
- (int)g, glist->gl_name->s_name);
+ post("%lx (this object) owning patcher [%s]",
+ (unsigned long)g, glist->gl_name->s_name);
else if (pd_class(&g->g_pd) == pv_class
&& ((t_pv *)g)->x_name == x->x_name)
- post("%x owning patcher [%s]", (int)g, glist->gl_name->s_name);
+ post("%lx owning patcher [%s]", (unsigned long)g, glist->gl_name->s_name);
}
}
diff --git a/cyclone/sickle/Scope.c b/cyclone/sickle/Scope.c
index 6bbfab9..49f1344 100644
--- a/cyclone/sickle/Scope.c
+++ b/cyclone/sickle/Scope.c
@@ -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%lx.c create line", (int)cv);
+ sprintf(cmd1, ".x%lx.c create line", (unsigned long)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);
@@ -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%lx.h%x", (int)cv, (int)sh);
+ sprintf(sh->h_pathname, ".x%lx.h%lx", (unsigned long)cv, (unsigned long)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%lx.c delete %s\n", cv, x->x_tag);
+ sys_vgui(".x%lx.c delete %s\n", (unsigned long)cv, x->x_tag);
x->x_canvas = 0;
}
}
@@ -998,10 +998,10 @@ static void *scope_new(t_symbol *s, int ac, t_atom *av)
scope_brgb(x, 0, ac, av);
/* CHECKME last argument (default 0) */
- sprintf(x->x_tag, "all%x", (int)x);
- sprintf(x->x_bgtag, "bg%x", (int)x);
- sprintf(x->x_gridtag, "gr%x", (int)x);
- sprintf(x->x_fgtag, "fg%x", (int)x);
+ sprintf(x->x_tag, "all%lx", (unsigned long)x);
+ sprintf(x->x_bgtag, "bg%lx", (unsigned long)x);
+ sprintf(x->x_gridtag, "gr%lx", (unsigned long)x);
+ sprintf(x->x_fgtag, "fg%lx", (unsigned long)x);
x->x_xymode = 0;
x->x_ksr = sys_getsr() * 0.001; /* redundant */
x->x_frozen = 0;
@@ -1012,9 +1012,9 @@ static void *scope_new(t_symbol *s, int ac, t_atom *av)
x->x_handle = pd_new(scopehandle_class);
sh = (t_scopehandle *)x->x_handle;
sh->h_master = x;
- sprintf(buf, "_h%x", (int)sh);
+ sprintf(buf, "_h%lx", (unsigned long)sh);
pd_bind(x->x_handle, sh->h_bindsym = gensym(buf));
- sprintf(sh->h_outlinetag, "h%x", (int)sh);
+ sprintf(sh->h_outlinetag, "h%lx", (unsigned long)sh);
sh->h_dragon = 0;
return (x);
}