aboutsummaryrefslogtreecommitdiff
path: root/cyclone/hammer
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/hammer
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/hammer')
-rw-r--r--cyclone/hammer/active.c2
-rw-r--r--cyclone/hammer/comment.c18
-rw-r--r--cyclone/hammer/pv.c6
3 files changed, 13 insertions, 13 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);
}
}