summaryrefslogtreecommitdiffstats
path: root/apps/plugins/pdbox
diff options
context:
space:
mode:
authorWincent Balin <wincent@rockbox.org>2009-08-05 13:19:17 +0000
committerWincent Balin <wincent@rockbox.org>2009-08-05 13:19:17 +0000
commit349db581b5b20edd34cba511ffbada38d7de8a42 (patch)
treeb0b6299db88bf13fa2654c55eb49000a2d2f021a /apps/plugins/pdbox
parentd0f8dfe10c6d40ee136eb7c81a33a800b687ea10 (diff)
downloadrockbox-349db581b5b20edd34cba511ffbada38d7de8a42.tar.gz
rockbox-349db581b5b20edd34cba511ffbada38d7de8a42.tar.bz2
rockbox-349db581b5b20edd34cba511ffbada38d7de8a42.zip
PDBox: Changed type of t_int to remove 64-bit related warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22167 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox')
-rw-r--r--apps/plugins/pdbox/PDa/src/g_canvas.c4
-rw-r--r--apps/plugins/pdbox/PDa/src/g_rtext.c3
-rw-r--r--apps/plugins/pdbox/PDa/src/m_pd.h8
3 files changed, 12 insertions, 3 deletions
diff --git a/apps/plugins/pdbox/PDa/src/g_canvas.c b/apps/plugins/pdbox/PDa/src/g_canvas.c
index fde19461d0..6b33a4af44 100644
--- a/apps/plugins/pdbox/PDa/src/g_canvas.c
+++ b/apps/plugins/pdbox/PDa/src/g_canvas.c
@@ -95,7 +95,7 @@ static void glist_doupdatewindowlist(t_glist *gl, char *sbuf)
char tbuf[1024];
#ifdef ROCKBOX
snprintf(tbuf, sizeof(tbuf),
- "{%s .x%x} ", gl->gl_name->s_name, (t_int) canvas);
+ "{%s .x%x} ", gl->gl_name->s_name, (unsigned int) canvas);
#else /* ROCKBOX */
sprintf(tbuf, "{%s .x%x} ", gl->gl_name->s_name, (t_int)canvas);
#endif /* ROCKBOX */
@@ -712,7 +712,7 @@ static t_editor *editor_new(t_glist *owner)
x->e_deleted = binbuf_new();
x->e_glist = owner;
#ifdef ROCKBOX
- snprintf(buf, sizeof(buf), ".x%x", (t_int)owner);
+ snprintf(buf, sizeof(buf), ".x%x", (unsigned int) owner);
#else /* ROCKBOX */
sprintf(buf, ".x%x", (t_int)owner);
#endif /* ROCKBOX */
diff --git a/apps/plugins/pdbox/PDa/src/g_rtext.c b/apps/plugins/pdbox/PDa/src/g_rtext.c
index 03aea97e9b..03b19c678a 100644
--- a/apps/plugins/pdbox/PDa/src/g_rtext.c
+++ b/apps/plugins/pdbox/PDa/src/g_rtext.c
@@ -66,7 +66,8 @@ t_rtext *rtext_new(t_glist *glist, t_text *who)
glist->gl_editor->e_rtext = x;
#ifdef ROCKBOX
snprintf(x->x_tag, strlen(x->x_tag),
- ".x%x.t%x", (t_int)glist_getcanvas(x->x_glist), (t_int)x);
+ ".x%x.t%x", (unsigned int) glist_getcanvas(x->x_glist),
+ (unsigned int) x);
#else /* ROCKBOX */
sprintf(x->x_tag, ".x%x.t%x", (t_int)glist_getcanvas(x->x_glist),
(t_int)x);
diff --git a/apps/plugins/pdbox/PDa/src/m_pd.h b/apps/plugins/pdbox/PDa/src/m_pd.h
index 9f60baa293..efd5cf13c5 100644
--- a/apps/plugins/pdbox/PDa/src/m_pd.h
+++ b/apps/plugins/pdbox/PDa/src/m_pd.h
@@ -49,15 +49,23 @@ extern "C" {
#include <stddef.h> /* just for size_t -- how lame! */
#endif
+#ifdef ROCKBOX
+#include <inttypes.h>
+#endif
+
#define MAXPDSTRING 1000 /* use this for anything you want */
#define MAXPDARG 5 /* max number of args we can typecheck today */
/* signed and unsigned integer types the size of a pointer: */
+#ifdef ROCKBOX
+typedef intptr_t t_int;
+#else /* ROCKBOX */
#ifdef __alpha__
typedef long t_int;
#else
typedef int t_int;
#endif
+#endif /* ROCKBOX */
typedef float t_float; /* a floating-point number at most the same size */
typedef float t_floatarg; /* floating-point type for function calls */