aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--shared/hammer/file.c26
5 files changed, 35 insertions, 35 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);
}
diff --git a/shared/hammer/file.c b/shared/hammer/file.c
index 49d9964..ea0ae1b 100644
--- a/shared/hammer/file.c
+++ b/shared/hammer/file.c
@@ -162,17 +162,17 @@ void hammereditor_open(t_hammerfile *f, char *title, char *owner)
owner = 0;
}
if (owner)
- sys_vgui("hammereditor_open .%x %dx%d {%s: %s} %d\n",
- (int)f, 600, 340, owner, title, (f->f_editorfn != 0));
+ sys_vgui("hammereditor_open .%lx %dx%d {%s: %s} %d\n",
+ (unsigned long)f, 600, 340, owner, title, (f->f_editorfn != 0));
else
- sys_vgui("hammereditor_open .%x %dx%d {%s} %d\n",
- (int)f, 600, 340, (title ? title : "Untitled"),
+ sys_vgui("hammereditor_open .%lx %dx%d {%s} %d\n",
+ (unsigned long)f, 600, 340, (title ? title : "Untitled"),
(f->f_editorfn != 0));
}
static void hammereditor_tick(t_hammerfile *f)
{
- sys_vgui("hammereditor_close .%x 1\n", (int)f);
+ sys_vgui("hammereditor_close .%lx 1\n", (unsigned long)f);
}
void hammereditor_close(t_hammerfile *f, int ask)
@@ -182,7 +182,7 @@ void hammereditor_close(t_hammerfile *f, int ask)
a message box redraw to happen -- LATER investigate */
clock_delay(f->f_editorclock, 0);
else
- sys_vgui("hammereditor_close .%x 0\n", (int)f);
+ sys_vgui("hammereditor_close .%lx 0\n", (unsigned long)f);
}
void hammereditor_append(t_hammerfile *f, char *contents)
@@ -196,21 +196,21 @@ void hammereditor_append(t_hammerfile *f, char *contents)
{
char c = *ptr;
*ptr = 0;
- sys_vgui("hammereditor_append .%x {%s}\n", (int)f, contents);
- sys_vgui("hammereditor_append .%x \"%c\"\n", (int)f, c);
+ sys_vgui("hammereditor_append .%lx {%s}\n", (unsigned long)f, contents);
+ sys_vgui("hammereditor_append .%lx \"%c\"\n", (unsigned long)f, c);
*ptr = c;
contents = ptr + 1;
}
}
if (*contents)
- sys_vgui("hammereditor_append .%x {%s}\n", (int)f, contents);
+ sys_vgui("hammereditor_append .%lx {%s}\n", (unsigned long)f, contents);
}
}
void hammereditor_setdirty(t_hammerfile *f, int flag)
{
if (f->f_editorfn)
- sys_vgui("hammereditor_setdirty .%x %d\n", (int)f, flag);
+ sys_vgui("hammereditor_setdirty .%lx %d\n", (unsigned long)f, flag);
}
static void hammereditor_clear(t_hammerfile *f)
@@ -514,7 +514,7 @@ t_hammerfile *hammerfile_new(t_pd *master, t_hammerembedfn embedfn,
{
t_hammerfile *f;
char buf[64];
- sprintf(buf, "miXed.%x", (int)result);
+ sprintf(buf, "miXed.%lx", (unsigned long)result);
result->f_bindname = gensym(buf);
pd_bind((t_pd *)result, result->f_bindname);
result->f_currentdir =
@@ -524,7 +524,7 @@ t_hammerfile *hammerfile_new(t_pd *master, t_hammerembedfn embedfn,
f = (t_hammerfile *)pd_new(hammerfile_class);
f->f_master = master;
f->f_canvas = result->f_canvas;
- sprintf(buf, "miXed.%x", (int)f);
+ sprintf(buf, "miXed.%lx", (unsigned long)f);
f->f_bindname = gensym(buf);
pd_bind((t_pd *)f, f->f_bindname);
f->f_currentdir = f->f_inidir = result->f_currentdir;
@@ -541,7 +541,7 @@ t_hammerfile *hammerfile_new(t_pd *master, t_hammerembedfn embedfn,
if (!result->f_bindname)
{
char buf[64];
- sprintf(buf, "miXed.%x", (int)result);
+ sprintf(buf, "miXed.%lx", (unsigned long)result);
result->f_bindname = gensym(buf);
pd_bind((t_pd *)result, result->f_bindname);
}