Commit d5fcd320 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

Merge branch 'aggraef/purr-data-mingw64-base'

parents ef07efad ff179e72
...@@ -162,10 +162,6 @@ realclean: ...@@ -162,10 +162,6 @@ realclean:
os = $(shell uname|sed 's/^\(MINGW[0-9]*\)_NT.*/\1/') os = $(shell uname|sed 's/^\(MINGW[0-9]*\)_NT.*/\1/')
# NOTE: For mingw64 the external tests report 2176 instead of the
# expected 2251 objects, which makes the 'check' target fail; you can
# have 'make' ignore such errors by invoking it as 'make -i check'.
ifeq ($(os),Linux) ifeq ($(os),Linux)
# Linux (all flavors) # Linux (all flavors)
pdprog = packages/linux_make/build/usr/bin/pd-l2ork pdprog = packages/linux_make/build/usr/bin/pd-l2ork
......
...@@ -48,7 +48,7 @@ DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \ ...@@ -48,7 +48,7 @@ DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \
BUILDSRC_OS_NAME = $(OS_NAME) BUILDSRC_OS_NAME = $(OS_NAME)
WARN_FLAGS = -Wall -W -Wno-unused-parameter WARN_FLAGS = -Wall -W -Wno-unused-parameter
CFLAGS = -DPD -I$(pd_src)/src $(WARN_FLAGS) $(DEBUG_CFLAGS) $(CFLAGS_ADD) -I$(gem_src)/src CFLAGS = -DPD -D__USE_MINGW_ANSI_STDIO=1 -I$(pd_src)/src $(WARN_FLAGS) $(DEBUG_CFLAGS) $(CFLAGS_ADD) -I$(gem_src)/src
LDFLAGS = LDFLAGS =
LIBS = -lm LIBS = -lm
...@@ -1343,6 +1343,7 @@ motex_clean: ...@@ -1343,6 +1343,7 @@ motex_clean:
# MRPEACH # MRPEACH
MRPEACH_NAME=mrpeach MRPEACH_NAME=mrpeach
MRPEACH_OBJECTS := $(wildcard $(externals_src)/mrpeach/*/*.c) MRPEACH_OBJECTS := $(wildcard $(externals_src)/mrpeach/*/*.c)
mrpeach: WARN_FLAGS=-Wno-pedantic-ms-format
mrpeach: $(MRPEACH_OBJECTS:.c=.$(EXTENSION)) mrpeach: $(MRPEACH_OBJECTS:.c=.$(EXTENSION))
mrpeach_install: mrpeach mrpeach_install: mrpeach
......
...@@ -50,7 +50,7 @@ OSCTimeTag OSCTT_BiggestPossibleTimeTag(void) { ...@@ -50,7 +50,7 @@ OSCTimeTag OSCTT_BiggestPossibleTimeTag(void) {
OSCTimeTag OSCTT_PlusSeconds(OSCTimeTag original, float secondsOffset) { OSCTimeTag OSCTT_PlusSeconds(OSCTimeTag original, float secondsOffset) {
int8 offset = (int8) (secondsOffset * TWO_TO_THE_32_FLOAT); int8 offset = (int8) (secondsOffset * TWO_TO_THE_32_FLOAT);
/* printf("* OSCTT_PlusSeconds %llx plus %f seconds (i.e., %lld offset) is %llx\n", original, /* printf("* OSCTT_PlusSeconds %zx plus %f seconds (i.e., %lld offset) is %zx\n", original,
secondsOffset, offset, original + offset); */ secondsOffset, offset, original + offset); */
return original + offset; return original + offset;
...@@ -58,7 +58,7 @@ OSCTimeTag OSCTT_PlusSeconds(OSCTimeTag original, float secondsOffset) { ...@@ -58,7 +58,7 @@ OSCTimeTag OSCTT_PlusSeconds(OSCTimeTag original, float secondsOffset) {
int OSCTT_Compare(OSCTimeTag left, OSCTimeTag right) { int OSCTT_Compare(OSCTimeTag left, OSCTimeTag right) {
#if 0 #if 0
printf("***** OSCTT_Compare(%llx, %llx): %d\n", left, right, printf("***** OSCTT_Compare(%zx, %zx): %d\n", left, right,
(left<right) ? -1 : ((left == right) ? 0 : 1)); (left<right) ? -1 : ((left == right) ? 0 : 1));
#endif #endif
if (left < right) { if (left < right) {
...@@ -107,7 +107,7 @@ OSCTimeTag OSCTT_CurrentTime(void) { ...@@ -107,7 +107,7 @@ OSCTimeTag OSCTT_CurrentTime(void) {
result += usecOffset; result += usecOffset;
/* printf("* OSCTT_CurrentTime is %llx\n", result); */ /* printf("* OSCTT_CurrentTime is %zx\n", result); */
return result; return result;
} }
......
...@@ -108,7 +108,7 @@ main() { ...@@ -108,7 +108,7 @@ main() {
printf("Testing time tags\n"); printf("Testing time tags\n");
tt = OSCTT_CurrentTime(); tt = OSCTT_CurrentTime();
printf("Time now is %llx\n", tt); printf("Time now is %zx\n", tt);
printf("Testing bundles\n"); printf("Testing bundles\n");
if (OSC_openBundle(b, tt)) { if (OSC_openBundle(b, tt)) {
......
...@@ -22,15 +22,15 @@ main() { ...@@ -22,15 +22,15 @@ main() {
OSCTimeTag now, later; OSCTimeTag now, later;
now = OSCTT_CurrentTime(); now = OSCTT_CurrentTime();
printf("Now it's %llu (0x%llx)\n", now, now); printf("Now it's %llu (0x%zx)\n", now, now);
printf("Immediately would be %llu (0x%llx)\n", OSCTT_Immediately(), printf("Immediately would be %llu (0x%zx)\n", OSCTT_Immediately(),
OSCTT_Immediately()); OSCTT_Immediately());
later = OSCTT_PlusSeconds(now, 1.0f); later = OSCTT_PlusSeconds(now, 1.0f);
printf("One second from now would be %llu (0x%llx)\n", later, later); printf("One second from now would be %llu (0x%zx)\n", later, later);
now = OSCTT_CurrentTime(); now = OSCTT_CurrentTime();
printf("And *now* it's %llu (0x%llx)\n", now, now); printf("And *now* it's %llu (0x%zx)\n", now, now);
} }
...@@ -302,7 +302,7 @@ OSCTimeTag ParseTimeTag(char *s) { ...@@ -302,7 +302,7 @@ OSCTimeTag ParseTimeTag(char *s) {
if (isdigit(*p) || (*p >= 'a' && *p <='f') || (*p >= 'A' && *p <='F')) { if (isdigit(*p) || (*p >= 'a' && *p <='f') || (*p >= 'A' && *p <='F')) {
/* They specified the 8-byte tag in hex */ /* They specified the 8-byte tag in hex */
OSCTimeTag tt; OSCTimeTag tt;
if (sscanf(p, "%llx", &tt) != 1) { if (sscanf(p, "%zx", &tt) != 1) {
complain("warning: couldn't parse time tag %s\n", s); complain("warning: couldn't parse time tag %s\n", s);
return OSCTT_Immediately(); return OSCTT_Immediately();
} }
......
...@@ -133,32 +133,32 @@ static void set_tk_widget_ids(t_entry *x, t_canvas *canvas) ...@@ -133,32 +133,32 @@ static void set_tk_widget_ids(t_entry *x, t_canvas *canvas)
x->x_canvas = canvas; x->x_canvas = canvas;
/* Tk ID for the current canvas that this object is drawn in */ /* Tk ID for the current canvas that this object is drawn in */
sprintf(buf,".x%lx.c", (long unsigned int) canvas); sprintf(buf,".x%zx.c", (t_uint) canvas);
x->canvas_id = getbytes(strlen(buf) + 1); x->canvas_id = getbytes(strlen(buf) + 1);
strcpy(x->canvas_id, buf); strcpy(x->canvas_id, buf);
/* Tk ID for the "frame" the other things are drawn in */ /* Tk ID for the "frame" the other things are drawn in */
sprintf(buf,"%s.frame%lx", x->canvas_id, (long unsigned int)x); sprintf(buf,"%s.frame%zx", x->canvas_id, (t_uint)x);
x->frame_id = getbytes(strlen(buf) + 1); x->frame_id = getbytes(strlen(buf) + 1);
strcpy(x->frame_id, buf); strcpy(x->frame_id, buf);
sprintf(buf,"%s.text%lx", x->frame_id, (long unsigned int)x); sprintf(buf,"%s.text%zx", x->frame_id, (t_uint)x);
x->text_id = getbytes(strlen(buf) + 1); x->text_id = getbytes(strlen(buf) + 1);
strcpy(x->text_id, buf); /* Tk ID for the "text", the meat! */ strcpy(x->text_id, buf); /* Tk ID for the "text", the meat! */
sprintf(buf,"%s.window%lx", x->canvas_id, (long unsigned int)x); sprintf(buf,"%s.window%zx", x->canvas_id, (t_uint)x);
x->window_tag = getbytes(strlen(buf) + 1); x->window_tag = getbytes(strlen(buf) + 1);
strcpy(x->window_tag, buf); /* Tk ID for the resizing "window" */ strcpy(x->window_tag, buf); /* Tk ID for the resizing "window" */
sprintf(buf,"%s.handle%lx", x->canvas_id, (long unsigned int)x); sprintf(buf,"%s.handle%zx", x->canvas_id, (t_uint)x);
x->handle_id = getbytes(strlen(buf) + 1); x->handle_id = getbytes(strlen(buf) + 1);
strcpy(x->handle_id, buf); /* Tk ID for the resizing "handle" */ strcpy(x->handle_id, buf); /* Tk ID for the resizing "handle" */
sprintf(buf,"%s.scrollbar%lx", x->frame_id, (long unsigned int)x); sprintf(buf,"%s.scrollbar%zx", x->frame_id, (t_uint)x);
x->scrollbar_id = getbytes(strlen(buf) + 1); x->scrollbar_id = getbytes(strlen(buf) + 1);
strcpy(x->scrollbar_id, buf); /* Tk ID for the optional "scrollbar" */ strcpy(x->scrollbar_id, buf); /* Tk ID for the optional "scrollbar" */
sprintf(buf,"all%lx", (long unsigned int)x); sprintf(buf,"all%zx", (t_uint)x);
x->all_tag = getbytes(strlen(buf) + 1); x->all_tag = getbytes(strlen(buf) + 1);
strcpy(x->all_tag, buf); /* Tk ID for the optional "scrollbar" */ strcpy(x->all_tag, buf); /* Tk ID for the optional "scrollbar" */
} }
...@@ -273,7 +273,7 @@ static void create_widget(t_entry *x) ...@@ -273,7 +273,7 @@ static void create_widget(t_entry *x)
DEBUG(post("create_widget");); DEBUG(post("create_widget"););
/* I guess this is for fine-tuning of the rect size based on width and height? */ /* I guess this is for fine-tuning of the rect size based on width and height? */
sys_vgui("namespace eval entry%lx {} \n", x); sys_vgui("namespace eval entry%zx {} \n", x);
/* Seems we have to delete the widget in case it already exists (Provided by Guenter)*/ /* Seems we have to delete the widget in case it already exists (Provided by Guenter)*/
sys_vgui("destroy %s\n", x->frame_id); sys_vgui("destroy %s\n", x->frame_id);
...@@ -298,7 +298,7 @@ static void create_widget(t_entry *x) ...@@ -298,7 +298,7 @@ static void create_widget(t_entry *x)
static void entry_drawme(t_entry *x, t_glist *glist, int firsttime) static void entry_drawme(t_entry *x, t_glist *glist, int firsttime)
{ {
DEBUG(post("entry_drawme: firsttime %d canvas %lx glist %lx", firsttime, x->x_canvas, glist);); DEBUG(post("entry_drawme: firsttime %d canvas %zx glist %zx", firsttime, x->x_canvas, glist););
set_tk_widget_ids(x,glist_getcanvas(glist)); set_tk_widget_ids(x,glist_getcanvas(glist));
if (firsttime) if (firsttime)
{ {
...@@ -321,7 +321,7 @@ static void entry_drawme(t_entry *x, t_glist *glist, int firsttime) ...@@ -321,7 +321,7 @@ static void entry_drawme(t_entry *x, t_glist *glist, int firsttime)
static void entry_erase(t_entry* x,t_glist* glist) static void entry_erase(t_entry* x,t_glist* glist)
{ {
DEBUG(post("entry_erase: canvas %lx glist %lx", x->x_canvas, glist);); DEBUG(post("entry_erase: canvas %zx glist %zx", x->x_canvas, glist););
set_tk_widget_ids(x,glist_getcanvas(glist)); set_tk_widget_ids(x,glist_getcanvas(glist));
erase_inlets(x); erase_inlets(x);
...@@ -348,7 +348,7 @@ static void entry_getrect(t_gobj *z, t_glist *owner, ...@@ -348,7 +348,7 @@ static void entry_getrect(t_gobj *z, t_glist *owner,
static void entry_displace(t_gobj *z, t_glist *glist, int dx, int dy) static void entry_displace(t_gobj *z, t_glist *glist, int dx, int dy)
{ {
t_entry *x = (t_entry *)z; t_entry *x = (t_entry *)z;
DEBUG(post("entry_displace: canvas %lx glist %lx", x->x_canvas, glist);); DEBUG(post("entry_displace: canvas %zx glist %zx", x->x_canvas, glist););
x->x_obj.te_xpix += dx; x->x_obj.te_xpix += dx;
x->x_obj.te_ypix += dy; x->x_obj.te_ypix += dy;
if (glist_isvisible(glist)) if (glist_isvisible(glist))
...@@ -369,7 +369,7 @@ static void entry_displace(t_gobj *z, t_glist *glist, int dx, int dy) ...@@ -369,7 +369,7 @@ static void entry_displace(t_gobj *z, t_glist *glist, int dx, int dy)
static void entry_select(t_gobj *z, t_glist *glist, int state) static void entry_select(t_gobj *z, t_glist *glist, int state)
{ {
t_entry *x = (t_entry *)z; t_entry *x = (t_entry *)z;
DEBUG(post("entry_select: canvas %lx glist %lx state %d", x->x_canvas, glist, state);); DEBUG(post("entry_select: canvas %zx glist %zx state %d", x->x_canvas, glist, state););
if( (state) && (!x->x_selected)) if( (state) && (!x->x_selected))
{ {
...@@ -422,7 +422,7 @@ static void entry_activate(t_gobj *z, t_glist *glist, int state) ...@@ -422,7 +422,7 @@ static void entry_activate(t_gobj *z, t_glist *glist, int state)
static void entry_delete(t_gobj *z, t_glist *glist) static void entry_delete(t_gobj *z, t_glist *glist)
{ {
DEBUG(post("entry_delete: glist %lx", glist);); DEBUG(post("entry_delete: glist %zx", glist););
t_text *x = (t_text *)z; t_text *x = (t_text *)z;
canvas_deletelinesfor(glist, x); canvas_deletelinesfor(glist, x);
} }
...@@ -431,7 +431,7 @@ static void entry_delete(t_gobj *z, t_glist *glist) ...@@ -431,7 +431,7 @@ static void entry_delete(t_gobj *z, t_glist *glist)
static void entry_vis(t_gobj *z, t_glist *glist, int vis) static void entry_vis(t_gobj *z, t_glist *glist, int vis)
{ {
t_entry *x = (t_entry*)z; t_entry *x = (t_entry*)z;
DEBUG(post("entry_vis: vis %d canvas %lx glist %lx", vis, x->x_canvas, glist);); DEBUG(post("entry_vis: vis %d canvas %zx glist %zx", vis, x->x_canvas, glist););
if (vis) { if (vis) {
entry_drawme(x, glist, 1); entry_drawme(x, glist, 1);
} }
...@@ -760,7 +760,7 @@ static void *entry_new(t_symbol *s, int argc, t_atom *argv) ...@@ -760,7 +760,7 @@ static void *entry_new(t_symbol *s, int argc, t_atom *argv)
x->x_data_outlet = outlet_new(&x->x_obj, &s_float); x->x_data_outlet = outlet_new(&x->x_obj, &s_float);
x->x_status_outlet = outlet_new(&x->x_obj, &s_symbol); x->x_status_outlet = outlet_new(&x->x_obj, &s_symbol);
sprintf(buf,"entry%lx",(long unsigned int)x); sprintf(buf,"entry%zx",(t_uint)x);
x->tcl_namespace = getbytes(strlen(buf) + 1); x->tcl_namespace = getbytes(strlen(buf) + 1);
strcpy(x->tcl_namespace, buf); strcpy(x->tcl_namespace, buf);
......
...@@ -76,13 +76,13 @@ static void draw_inlets(t_popup *x, t_glist *glist, int firsttime, int nin, int ...@@ -76,13 +76,13 @@ static void draw_inlets(t_popup *x, t_glist *glist, int firsttime, int nin, int
{ {
int onset = text_xpix(&x->x_obj, glist) + (x->x_rect_width - IOWIDTH) * i / nplus; int onset = text_xpix(&x->x_obj, glist) + (x->x_rect_width - IOWIDTH) * i / nplus;
if (firsttime) if (firsttime)
sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxo%d %lxo}\n", sys_vgui(".x%zx.c create rectangle %d %d %d %d -tags {%zxo%d %zxo}\n",
glist_getcanvas(glist), glist_getcanvas(glist),
onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 2, onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 2,
onset + IOWIDTH, text_ypix(&x->x_obj, glist) + x->x_rect_height-1, onset + IOWIDTH, text_ypix(&x->x_obj, glist) + x->x_rect_height-1,
x, i, x); x, i, x);
else else
sys_vgui(".x%lx.c coords %lxo%d %d %d %d %d\n", sys_vgui(".x%zx.c coords %zxo%d %d %d %d %d\n",
glist_getcanvas(glist), x, i, glist_getcanvas(glist), x, i,
onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 2, onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 2,
onset + IOWIDTH, text_ypix(&x->x_obj, glist) + x->x_rect_height-1); onset + IOWIDTH, text_ypix(&x->x_obj, glist) + x->x_rect_height-1);
...@@ -94,13 +94,13 @@ static void draw_inlets(t_popup *x, t_glist *glist, int firsttime, int nin, int ...@@ -94,13 +94,13 @@ static void draw_inlets(t_popup *x, t_glist *glist, int firsttime, int nin, int
{ {
int onset = text_xpix(&x->x_obj, glist) + (x->x_rect_width - IOWIDTH) * i / nplus; int onset = text_xpix(&x->x_obj, glist) + (x->x_rect_width - IOWIDTH) * i / nplus;
if (firsttime) if (firsttime)
sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxi%d %lxi}\n", sys_vgui(".x%zx.c create rectangle %d %d %d %d -tags {%zxi%d %zxi}\n",
glist_getcanvas(glist), glist_getcanvas(glist),
onset, text_ypix(&x->x_obj, glist)-2, onset, text_ypix(&x->x_obj, glist)-2,
onset + IOWIDTH, text_ypix(&x->x_obj, glist)-1, onset + IOWIDTH, text_ypix(&x->x_obj, glist)-1,
x, i, x); x, i, x);
else else
sys_vgui(".x%lx.c coords %lxi%d %d %d %d %d\n", sys_vgui(".x%zx.c coords %zxi%d %d %d %d %d\n",
glist_getcanvas(glist), x, i, glist_getcanvas(glist), x, i,
onset, text_ypix(&x->x_obj, glist), onset, text_ypix(&x->x_obj, glist),
onset + IOWIDTH, text_ypix(&x->x_obj, glist)-1); onset + IOWIDTH, text_ypix(&x->x_obj, glist)-1);
...@@ -116,14 +116,14 @@ static void draw_handle(t_popup *x, t_glist *glist, int firsttime) { ...@@ -116,14 +116,14 @@ static void draw_handle(t_popup *x, t_glist *glist, int firsttime) {
int onset = text_xpix(&x->x_obj, glist) + (x->x_rect_width - IOWIDTH); int onset = text_xpix(&x->x_obj, glist) + (x->x_rect_width - IOWIDTH);
if (firsttime) { if (firsttime) {
sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %lxhandle\n", sys_vgui(".x%zx.c create rectangle %d %d %d %d -tags %zxhandle\n",
glist_getcanvas(glist), glist_getcanvas(glist),
onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 12, onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 12,
onset + IOWIDTH-2, text_ypix(&x->x_obj, glist) + x->x_rect_height-4, onset + IOWIDTH-2, text_ypix(&x->x_obj, glist) + x->x_rect_height-4,
x); x);
} }
else { else {
sys_vgui(".x%lx.c coords %lxhandle %d %d %d %d\n", sys_vgui(".x%zx.c coords %zxhandle %d %d %d %d\n",
glist_getcanvas(glist), x, glist_getcanvas(glist), x,
onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 12, onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 12,
onset + IOWIDTH-2, text_ypix(&x->x_obj, glist) + x->x_rect_height-4); onset + IOWIDTH-2, text_ypix(&x->x_obj, glist) + x->x_rect_height-4);
...@@ -155,19 +155,19 @@ static void create_widget(t_popup *x, t_glist *glist) ...@@ -155,19 +155,19 @@ static void create_widget(t_popup *x, t_glist *glist)
/* Seems we have to delete the widget in case it already exists (Provided by Guenter)*/ /* Seems we have to delete the widget in case it already exists (Provided by Guenter)*/
if(x->initialized) if(x->initialized)
{ {
sys_vgui("destroy .x%lx.c.s%lx\n",glist_getcanvas(glist),x); sys_vgui("destroy .x%zx.c.s%zx\n",glist_getcanvas(glist),x);
sys_vgui("set %lxw .x%lx.c.s%lx ; menubutton $%lxw -relief raised -background \"%s\" -text \"%s\" -direction flush -menu $%lxw.menu ; menu $%lxw.menu -tearoff 0\n", sys_vgui("set %zxw .x%zx.c.s%zx ; menubutton $%zxw -relief raised -background \"%s\" -text \"%s\" -direction flush -menu $%zxw.menu ; menu $%zxw.menu -tearoff 0\n",
x,canvas,x,x,x->x_colour->s_name,temp_name->s_name,x,x); x,canvas,x,x,x->x_colour->s_name,temp_name->s_name,x,x);
for(i=0 ; i<x->x_num_options ; i++) for(i=0 ; i<x->x_num_options ; i++)
{ {
sys_vgui(".x%lx.c.s%lx.menu add command -label \"%s\" -command {.x%lx.c.s%lx configure -text \"%s\" ; popup_sel%lx \"%d\"} \n", sys_vgui(".x%zx.c.s%zx.menu add command -label \"%s\" -command {.x%zx.c.s%zx configure -text \"%s\" ; popup_sel%zx \"%d\"} \n",
canvas, x, x->x_options[i]->s_name, canvas, x, x->x_options[i]->s_name, x, i); canvas, x, x->x_options[i]->s_name, canvas, x, x->x_options[i]->s_name, x, i);
} }
} }
DEBUG(post("id: .x%lx.c.s%lx", canvas, x);) DEBUG(post("id: .x%zx.c.s%zx", canvas, x);)
DEBUG(post("create_widget end");) DEBUG(post("create_widget end");)
} }
...@@ -181,21 +181,21 @@ static void popup_drawme(t_popup *x, t_glist *glist, int firsttime) ...@@ -181,21 +181,21 @@ static void popup_drawme(t_popup *x, t_glist *glist, int firsttime)
DEBUG(post("drawme %d",firsttime);) DEBUG(post("drawme %d",firsttime);)
if (firsttime) { if (firsttime) {
DEBUG(post("glist %lx canvas %lx",x->x_glist,canvas);) DEBUG(post("glist %zx canvas %zx",x->x_glist,canvas);)
create_widget(x,glist); create_widget(x,glist);
x->x_glist = canvas; x->x_glist = canvas;
sys_vgui(".x%lx.c create window %d %d -width %d -height %d -anchor nw -window .x%lx.c.s%lx -tags %lxS\n", sys_vgui(".x%zx.c create window %d %d -width %d -height %d -anchor nw -window .x%zx.c.s%zx -tags %zxS\n",
canvas,text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist), x->x_width, x->x_height, x->x_glist,x,x); canvas,text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist), x->x_width, x->x_height, x->x_glist,x,x);
} }
else { else {
sys_vgui(".x%lx.c coords %lxS %d %d\n", sys_vgui(".x%zx.c coords %zxS %d %d\n",
canvas, x, canvas, x,
text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)); text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist));
} }
draw_inlets(x, glist, firsttime, 2,2); draw_inlets(x, glist, firsttime, 2,2);
// draw_handle(x, glist, firsttime); // draw_handle(x, glist, firsttime);
sys_vgui(".x%lx.c.s%lx configure -state \"%s\"\n", canvas, x, x->x_disabled?"disabled":"active"); sys_vgui(".x%zx.c.s%zx configure -state \"%s\"\n", canvas, x, x->x_disabled?"disabled":"active");
// Output a bang to first outlet when we're ready to receive float messages the first time!. // Output a bang to first outlet when we're ready to receive float messages the first time!.
...@@ -212,15 +212,15 @@ static void popup_erase(t_popup* x,t_glist* glist) ...@@ -212,15 +212,15 @@ static void popup_erase(t_popup* x,t_glist* glist)
DEBUG(post("erase start");) DEBUG(post("erase start");)
if(x->initialized){ if(x->initialized){
sys_vgui("destroy .x%lx.c.s%lx\n",glist_getcanvas(glist),x); sys_vgui("destroy .x%zx.c.s%zx\n",glist_getcanvas(glist),x);
sys_vgui(".x%lx.c delete %lxS\n",glist_getcanvas(glist), x); sys_vgui(".x%zx.c delete %zxS\n",glist_getcanvas(glist), x);
/* inlets and outlets */ /* inlets and outlets */
sys_vgui(".x%lx.c delete %lxi\n",glist_getcanvas(glist),x); /* Added tag for all inlets of one instance */ sys_vgui(".x%zx.c delete %zxi\n",glist_getcanvas(glist),x); /* Added tag for all inlets of one instance */
sys_vgui(".x%lx.c delete %lxo\n",glist_getcanvas(glist),x); /* Added tag for all outlets of one instance */ sys_vgui(".x%zx.c delete %zxo\n",glist_getcanvas(glist),x); /* Added tag for all outlets of one instance */
sys_vgui(".x%lx.c delete %lxhandle\n",glist_getcanvas(glist),x,0); sys_vgui(".x%zx.c delete %zxhandle\n",glist_getcanvas(glist),x,0);
} }
DEBUG(post("erase end");) DEBUG(post("erase end");)
...@@ -258,7 +258,7 @@ static void popup_displace(t_gobj *z, t_glist *glist, ...@@ -258,7 +258,7 @@ static void popup_displace(t_gobj *z, t_glist *glist,
x->x_obj.te_ypix += dy; x->x_obj.te_ypix += dy;
if (glist_isvisible(glist)) if (glist_isvisible(glist))
{ {
if(x->initialized)sys_vgui(".x%lx.c coords %lxSEL %d %d %d %d\n", if(x->initialized)sys_vgui(".x%zx.c coords %zxSEL %d %d %d %d\n",
glist_getcanvas(glist), x, glist_getcanvas(glist), x,
text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1,
text_xpix(&x->x_obj, glist) + x->x_rect_width, text_ypix(&x->x_obj, glist) + x->x_rect_height-2); text_xpix(&x->x_obj, glist) + x->x_rect_width, text_ypix(&x->x_obj, glist) + x->x_rect_height-2);
...@@ -276,15 +276,15 @@ static void popup_select(t_gobj *z, t_glist *glist, int state) ...@@ -276,15 +276,15 @@ static void popup_select(t_gobj *z, t_glist *glist, int state)
t_popup *x = (t_popup *)z; t_popup *x = (t_popup *)z;
if(x->initialized){ if(x->initialized){
if (state) { if (state) {
sys_vgui(".x%lx.c create rectangle \ sys_vgui(".x%zx.c create rectangle \
%d %d %d %d -tags %lxSEL -outline blue\n", %d %d %d %d -tags %zxSEL -outline blue\n",
glist_getcanvas(glist), glist_getcanvas(glist),
text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1,
text_xpix(&x->x_obj, glist) + x->x_rect_width, text_ypix(&x->x_obj, glist) + x->x_rect_height-2, text_xpix(&x->x_obj, glist) + x->x_rect_width, text_ypix(&x->x_obj, glist) + x->x_rect_height-2,
x); x);
} }
else { else {
sys_vgui(".x%lx.c delete %lxSEL\n", sys_vgui(".x%zx.c delete %zxSEL\n",
glist_getcanvas(glist), x); glist_getcanvas(glist), x);
} }
} }
...@@ -389,7 +389,7 @@ static void popup_options(t_popup* x, t_symbol *s, int argc, t_atom *argv) ...@@ -389,7 +389,7 @@ static void popup_options(t_popup* x, t_symbol *s, int argc, t_atom *argv)
x->x_num_options = argc; x->x_num_options = argc;
/* delete old menu items */ /* delete old menu items */
if(visible)sys_vgui(".x%lx.c.s%lx.menu delete 0 end \n", x->x_glist, x); if(visible)sys_vgui(".x%zx.c.s%zx.menu delete 0 end \n", x->x_glist, x);
if(argc>x->x_maxoptions){ if(argc>x->x_maxoptions){
/* resize the options-array */ /* resize the options-array */
...@@ -401,7 +401,7 @@ static void popup_options(t_popup* x, t_symbol *s, int argc, t_atom *argv) ...@@ -401,7 +401,7 @@ static void popup_options(t_popup* x, t_symbol *s, int argc, t_atom *argv)
for(i=0 ; i<argc ; i++) for(i=0 ; i<argc ; i++)
{ {
x->x_options[i] = atom_getsymbol(argv+i); x->x_options[i] = atom_getsymbol(argv+i);
if(visible)sys_vgui(".x%lx.c.s%lx.menu add command -label \"%s\" -command {.x%lx.c.s%lx configure -text \"%s\" ; popup_sel%lx \"%d\"} \n", if(visible)sys_vgui(".x%zx.c.s%zx.menu add command -label \"%s\" -command {.x%zx.c.s%zx configure -text \"%s\" ; popup_sel%zx \"%d\"} \n",
x->x_glist, x, x->x_options[i]->s_name, x->x_glist, x, x->x_options[i]->s_name, x, i); x->x_glist, x, x->x_options[i]->s_name, x->x_glist, x, x->x_options[i]->s_name, x, i);
} }
...@@ -415,7 +415,7 @@ static void popup_bgcolour(t_popup* x, t_symbol* col) ...@@ -415,7 +415,7 @@ static void popup_bgcolour(t_popup* x, t_symbol* col)
DEBUG(post("bgcolour start");) DEBUG(post("bgcolour start");)
x->x_colour = col; x->x_colour = col;
if(visible)sys_vgui(".x%lx.c.s%lx configure -background \"%s\"\n", x->x_glist, x, col->s_name); if(visible)sys_vgui(".x%zx.c.s%zx configure -background \"%s\"\n", x->x_glist, x, col->s_name);
} }
/* Function to change name of popup */ /* Function to change name of popup */
...@@ -425,7 +425,7 @@ static void popup_name(t_popup* x, t_symbol *name) ...@@ -425,7 +425,7 @@ static void popup_name(t_popup* x, t_symbol *name)
DEBUG(post("name start");) DEBUG(post("name start");)
x->x_name = name; x->x_name = name;
if(visible)sys_vgui(".x%lx.c.s%lx configure -text \"%s\"\n", x->x_glist, x, name->s_name); if(visible)sys_vgui(".x%zx.c.s%zx configure -text \"%s\"\n", x->x_glist, x, name->s_name);
} }
/* Function to select a menu option by inlet */ /* Function to select a menu option by inlet */
...@@ -437,7 +437,7 @@ static void popup_iselect(t_popup* x, t_floatarg item) ...@@ -437,7 +437,7 @@ static void popup_iselect(t_popup* x, t_floatarg item)
int i=(int)item; int i=(int)item;
if( i<x->x_num_options && i>=0) if( i<x->x_num_options && i>=0)
{