Update of /cvsroot/pure-data/externals/miXed/toxy
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4606/toxy
Modified Files:
build_counter plustot.c plustot.h plustot.qlist.c tot.c
widget.c widgettype.c widgettype.h
Log Message:
restricted debug garbage to krzYszcz, few fixes in toxy
Index: plustot.qlist.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/plustot.qlist.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** plustot.qlist.c 19 Feb 2004 22:23:18 -0000 1.1
--- plustot.qlist.c 10 Dec 2004 20:47:06 -0000 1.2
***************
*** 10,14 ****
--- 10,16 ----
#include "plustot.h"
+ #ifdef KRZYSZCZ
#define PLUSTOT_QLIST_DEBUG
+ #endif
/* Need only an access to x_binbuf field. */
Index: widgettype.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/widgettype.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** widgettype.c 8 Dec 2004 15:40:14 -0000 1.8
--- widgettype.c 10 Dec 2004 20:47:06 -0000 1.9
***************
*** 17,21 ****
#define WIDGETTYPE_VERBOSE
- #define WIDGETTYPE_DEBUG
struct _widgettype
--- 17,20 ----
***************
*** 139,142 ****
--- 138,142 ----
post("adding widget type '%s'", typeval->wt_typekey->s_name);
#endif
+ scriptlet_reset(typeval->wt_iniscript);
return (typeval->wt_iniscript);
}
***************
*** 175,183 ****
--- 175,190 ----
{
if (!strcmp(buf, "vis") || !strcmp(buf, "ini"))
+ /* already reset */
return (mw->mw_parsedtype->wt_iniscript);
else if (!strcmp(buf, "new"))
+ {
+ scriptlet_reset(mw->mw_parsedtype->wt_newscript);
return (mw->mw_parsedtype->wt_newscript);
+ }
else if (!strcmp(buf, "free"))
+ {
+ scriptlet_reset(mw->mw_parsedtype->wt_freescript);
return (mw->mw_parsedtype->wt_freescript);
+ }
else
{
Index: build_counter
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/build_counter,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** build_counter 31 Mar 2004 10:24:20 -0000 1.10
--- build_counter 10 Dec 2004 20:47:06 -0000 1.11
***************
*** 1,7 ****
#define TOXY_VERSION "0.1"
#define TOXY_RELEASE "alpha"
! #define TOXY_BUILD 11
#if 0
! TOXY_SNAPSHOT = 0.1-alpha11
#endif
--- 1,7 ----
#define TOXY_VERSION "0.1"
#define TOXY_RELEASE "alpha"
! #define TOXY_BUILD 13
#if 0
! TOXY_SNAPSHOT = 0.1-alpha13
#endif
Index: tot.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/tot.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** tot.c 17 Apr 2004 17:45:29 -0000 1.5
--- tot.c 10 Dec 2004 20:47:06 -0000 1.6
***************
*** 16,20 ****
--- 16,22 ----
#include "build_counter"
+ #ifdef KRZYSZCZ
//#define TOT_DEBUG
+ #endif
/* probably much more than needed for canvas messages from gui */
Index: plustot.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/plustot.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** plustot.c 17 Apr 2004 17:45:29 -0000 1.2
--- plustot.c 10 Dec 2004 20:47:06 -0000 1.3
***************
*** 1,3 ****
! /* Copyright (c) 2003 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2003-2004 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 16,24 ****
#define PLUSTOT_VERBOSE
- #define PLUSTOT_DEBUG
- //#define PLUSTOT_DEBUGREFCOUNTS
#ifdef PLUSTOT_DEBUG
! # define PLUSDEBUG_ENDPOST(fn) endpost()
#else
# define PLUSDEBUG_ENDPOST(fn)
--- 16,23 ----
#define PLUSTOT_VERBOSE
#ifdef PLUSTOT_DEBUG
! //# define PLUSTOT_DEBUGREFCOUNTS
! # define PLUSDEBUG_ENDPOST(fn) fputc('\n', stderr)
#else
# define PLUSDEBUG_ENDPOST(fn)
***************
*** 27,33 ****
#ifdef PLUSTOT_DEBUGREFCOUNTS
# define PLUSDEBUG_INCRREFCOUNT(ob, fn) \
! {post("++ %x "fn, (int)(ob)); Tcl_IncrRefCount(ob);}
# define PLUSDEBUG_DECRREFCOUNT(ob, fn) \
! {post("-- %x "fn, (int)(ob)); Tcl_DecrRefCount(ob);}
#else
# define PLUSDEBUG_INCRREFCOUNT(ob, fn) Tcl_IncrRefCount(ob)
--- 26,32 ----
#ifdef PLUSTOT_DEBUGREFCOUNTS
# define PLUSDEBUG_INCRREFCOUNT(ob, fn) \
! {fprintf(stderr, "++ %x "fn"\n", (int)(ob)); Tcl_IncrRefCount(ob);}
# define PLUSDEBUG_DECRREFCOUNT(ob, fn) \
! {fprintf(stderr, "-- %x "fn"\n", (int)(ob)); Tcl_DecrRefCount(ob);}
#else
# define PLUSDEBUG_INCRREFCOUNT(ob, fn) Tcl_IncrRefCount(ob)
***************
*** 101,106 ****
{
#ifdef PLUSTOT_DEBUG
! post("plustin_create '%s' over %x",
! (id ? id->s_name : "default"), (int)interp);
#endif
tin->tin_interp = interp;
--- 100,105 ----
{
#ifdef PLUSTOT_DEBUG
! fprintf(stderr, "plustin_create '%s' over %x\n",
! (id ? id->s_name : "default"), (int)interp);
#endif
tin->tin_interp = interp;
***************
*** 120,125 ****
#ifdef PLUSTOT_DEBUG
t_symbol *id = plusenv_getid((t_plusenv *)tin);
! post("plustin_delete '%s' over %x",
! (id ? id->s_name : "default"), (int)tin->tin_interp);
#endif
Tcl_Preserve(tin->tin_interp);
--- 119,124 ----
#ifdef PLUSTOT_DEBUG
t_symbol *id = plusenv_getid((t_plusenv *)tin);
! fprintf(stderr, "plustin_delete '%s' over %x\n",
! (id ? id->s_name : "default"), (int)tin->tin_interp);
#endif
Tcl_Preserve(tin->tin_interp);
***************
*** 461,465 ****
{
#ifdef PLUSTOT_DEBUG
! post("growing +To %d -> %d", tob->tob_elbufsize, count);
#endif
tob->tob_elbuf =
--- 460,465 ----
{
#ifdef PLUSTOT_DEBUG
! fprintf(stderr, "growing +To %d -> %d\n",
! tob->tob_elbufsize, count);
#endif
tob->tob_elbuf =
***************
*** 577,581 ****
int n = count;
#ifdef PLUSTOT_DEBUG
! post("growing +To %d -> %d", tob->tob_elbufsize, count);
#endif
tob->tob_elbuf =
--- 577,582 ----
int n = count;
#ifdef PLUSTOT_DEBUG
! fprintf(stderr, "growing +To %d -> %d\n",
! tob->tob_elbufsize, count);
#endif
tob->tob_elbuf =
***************
*** 779,787 ****
#ifdef PLUSTOT_DEBUGREFCOUNTS
if (var->var_index)
! post("vv %x plusvar_postset [%s(%s)]",
! (int)tob->tob_value, var->var_name, var->var_index);
else
! post("vv %x plusvar_postset [%s]",
! (int)tob->tob_value, var->var_name);
#endif
}
--- 780,788 ----
#ifdef PLUSTOT_DEBUGREFCOUNTS
if (var->var_index)
! fprintf(stderr, "vv %x plusvar_postset [%s(%s)]\n",
! (int)tob->tob_value, var->var_name, var->var_index);
else
! fprintf(stderr, "vv %x plusvar_postset [%s]\n",
! (int)tob->tob_value, var->var_name);
#endif
}
***************
*** 1012,1017 ****
{
#ifdef PLUSTOT_DEBUG
! post("plusproxy_free (%s %d)",
! (pp->pp_var ? pp->pp_var->var_name : "empty"), pp->pp_ndx);
#endif
if (pp->pp_var)
--- 1013,1018 ----
{
#ifdef PLUSTOT_DEBUG
! fprintf(stderr, "plusproxy_free (%s %d)\n",
! (pp->pp_var ? pp->pp_var->var_name : "empty"), pp->pp_ndx);
#endif
if (pp->pp_var)
***************
*** 1066,1073 ****
t_symbol *id = plusenv_getid((t_plusenv *)tin);
t_symbol *glname = plustin_getglistname(tin);
! post("+proxy %d, glist %x",
! pp->pp_ndx, (int)((t_plustot *)pp->pp_master)->x_glist);
! post(" plustin '%s' (%s) over %x", (id ? id->s_name : "default"),
! (glname ? glname->s_name : "<anonymous>"), (int)tin->tin_interp);
}
#endif
--- 1067,1075 ----
t_symbol *id = plusenv_getid((t_plusenv *)tin);
t_symbol *glname = plustin_getglistname(tin);
! fprintf(stderr, "+proxy %d, glist %x\n",
! pp->pp_ndx, (int)((t_plustot *)pp->pp_master)->x_glist);
! fprintf(stderr, " plustin '%s' (%s) over %x\n",
! (id ? id->s_name : "default"),
! (glname ? glname->s_name : "<anonymous>"), (int)tin->tin_interp);
}
#endif
***************
*** 1093,1097 ****
else buf[size] = 0;
strncpy(buf, tp->start, size);
! startpost("%s ", buf);
}
#endif
--- 1095,1099 ----
else buf[size] = 0;
strncpy(buf, tp->start, size);
! fprintf(stderr, "%s ", buf);
}
#endif
***************
*** 1159,1163 ****
{
#ifdef PLUSTOT_DEBUG
! startpost("(inlet %d) ", inno);
#endif
if (inno >= x->x_nproxies)
--- 1161,1165 ----
{
#ifdef PLUSTOT_DEBUG
! fprintf(stderr, "(inlet %d) ", inno);
#endif
if (inno >= x->x_nproxies)
***************
*** 1256,1260 ****
strncpy(buf, tp->start, sz);
buf[sz] = 0;
! post("simple word's text: %s", buf);
}
#endif
--- 1258,1262 ----
strncpy(buf, tp->start, sz);
buf[sz] = 0;
! fprintf(stderr, "simple word's text: %s\n", buf);
}
#endif
***************
*** 1288,1292 ****
strncpy(buf, tp->start, sz);
buf[sz] = 0;
! post("other type (%d): %s", tp->type, buf);
}
#endif
--- 1290,1294 ----
strncpy(buf, tp->start, sz);
buf[sz] = 0;
! fprintf(stderr, "other type (%d): %s\n", tp->type, buf);
}
#endif
***************
*** 1306,1310 ****
int nvars;
#ifdef PLUSTOT_DEBUG
! if (!doit) startpost("variables: ");
#endif
nvars = plustot_doparsevariables(x, interp, buf, len, parsep, doit);
--- 1308,1312 ----
int nvars;
#ifdef PLUSTOT_DEBUG
! if (!doit) fprintf(stderr, "variables: ");
#endif
nvars = plustot_doparsevariables(x, interp, buf, len, parsep, doit);
***************
*** 1314,1321 ****
if (nvars > 0)
{
! post("\n%d variable substitutions", nvars);
! post("%d inlets requested", x->x_nproxies);
}
! else if (nvars == 0) post("none");
}
#endif
--- 1316,1323 ----
if (nvars > 0)
{
! fprintf(stderr, "\n%d variable substitutions\n", nvars);
! fprintf(stderr, "%d inlets requested\n", x->x_nproxies);
}
! else if (nvars == 0) fprintf(stderr, "none\n");
}
#endif
***************
*** 1395,1399 ****
int n = nwords;
#ifdef PLUSTOT_DEBUG
! post("growing words %d -> %d", x->x_maxwords, nwords);
#endif
x->x_words = grow_nodata(&n, &x->x_maxwords, x->x_words,
--- 1397,1401 ----
int n = nwords;
#ifdef PLUSTOT_DEBUG
! fprintf(stderr, "growing words %d -> %d\n", x->x_maxwords, nwords);
#endif
x->x_words = grow_nodata(&n, &x->x_maxwords, x->x_words,
***************
*** 1422,1426 ****
int n = nargs;
#ifdef PLUSTOT_DEBUG
! post("growing argv %d -> %d", x->x_maxargs, nargs);
#endif
x->x_argv = grow_nodata(&n, &x->x_maxargs, x->x_argv,
--- 1424,1428 ----
int n = nargs;
#ifdef PLUSTOT_DEBUG
! fprintf(stderr, "growing argv %d -> %d\n", x->x_maxargs, nargs);
#endif
x->x_argv = grow_nodata(&n, &x->x_maxargs, x->x_argv,
***************
*** 1456,1460 ****
char buf[TCL_UTF_MAX];
#ifdef PLUSTOT_DEBUG
! post("arguments:");
#endif
for (i = 1, tp = x->x_tailparse.tokenPtr;
--- 1458,1462 ----
char buf[TCL_UTF_MAX];
#ifdef PLUSTOT_DEBUG
! fprintf(stderr, "arguments:\n");
#endif
for (i = 1, tp = x->x_tailparse.tokenPtr;
***************
*** 1462,1469 ****
{
#ifdef PLUSTOT_DEBUG
! post(" %s token: type %d[%d], having %d[%d] component%s",
! loud_ordinal(i), tp->type, tp[1].type,
! tp->numComponents, tp[1].numComponents,
! (tp->numComponents > 1 ? "s" : ""));
#endif
ncomponents = tp->numComponents;
--- 1464,1472 ----
{
#ifdef PLUSTOT_DEBUG
! fprintf(stderr,
! " %s token: type %d[%d], having %d[%d] component%s\n",
! loud_ordinal(i), tp->type, tp[1].type,
! tp->numComponents, tp[1].numComponents,
! (tp->numComponents > 1 ? "s" : ""));
#endif
ncomponents = tp->numComponents;
***************
*** 1603,1607 ****
Tcl_Token *tp;
#ifdef PLUSTOT_DEBUG
! post("arguments:");
#endif
for (i = 1, tp = x->x_tailparse.tokenPtr;
--- 1606,1610 ----
Tcl_Token *tp;
#ifdef PLUSTOT_DEBUG
! fprintf(stderr, "arguments:\n");
#endif
for (i = 1, tp = x->x_tailparse.tokenPtr;
***************
*** 1610,1616 ****
int result;
#ifdef PLUSTOT_DEBUG
! startpost(" %s token: type %d[%d], having %d component%s",
! loud_ordinal(i), tp->type, tp[1].type,
! tp->numComponents, (tp->numComponents > 1 ? "s" : ""));
#endif
result = Tcl_EvalTokensStandard(interp, tp + 1, tp->numComponents);
--- 1613,1619 ----
int result;
#ifdef PLUSTOT_DEBUG
! fprintf(stderr, " %s token: type %d[%d], having %d component%s",
! loud_ordinal(i), tp->type, tp[1].type,
! tp->numComponents, (tp->numComponents > 1 ? "s" : ""));
#endif
result = Tcl_EvalTokensStandard(interp, tp + 1, tp->numComponents);
***************
*** 1623,1629 ****
Tcl_ResetResult(interp);
#ifdef PLUSTOT_DEBUG
! post(", %sshared: '%s'",
! (Tcl_IsShared(x->x_argv[i]) ? "" : "not "),
! Tcl_GetString(x->x_argv[i]));
#endif
}
--- 1626,1632 ----
Tcl_ResetResult(interp);
#ifdef PLUSTOT_DEBUG
! fprintf(stderr, ", %sshared: '%s'\n",
! (Tcl_IsShared(x->x_argv[i]) ? "" : "not "),
! Tcl_GetString(x->x_argv[i]));
#endif
}
***************
*** 1785,1791 ****
t_symbol *id = plusenv_getid((t_plusenv *)tin);
t_symbol *glname = plustin_getglistname(tin);
! post("+tot, glist %x", (int)x->x_glist);
! post(" plustin '%s' (%s) over %x", (id ? id->s_name : "default"),
! (glname ? glname->s_name : "<anonymous>"), (int)tin->tin_interp);
if (x->x_mainproxy)
plusproxy_debug(x->x_mainproxy);
--- 1788,1795 ----
t_symbol *id = plusenv_getid((t_plusenv *)tin);
t_symbol *glname = plustin_getglistname(tin);
! fprintf(stderr, "+tot, glist %x\n", (int)x->x_glist);
! fprintf(stderr, " plustin '%s' (%s) over %x\n",
! (id ? id->s_name : "default"),
! (glname ? glname->s_name : "<anonymous>"), (int)tin->tin_interp);
if (x->x_mainproxy)
plusproxy_debug(x->x_mainproxy);
Index: widgettype.h
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/widgettype.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** widgettype.h 8 Dec 2004 15:40:14 -0000 1.3
--- widgettype.h 10 Dec 2004 20:47:06 -0000 1.4
***************
*** 6,9 ****
--- 6,13 ----
#define __WIDGETTYPE_H__
+ #ifdef KRZYSZCZ
+ //#define WIDGETTYPE_DEBUG
+ #endif
+
EXTERN_STRUCT _widgettype;
#define t_widgettype struct _widgettype
Index: plustot.h
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/plustot.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** plustot.h 19 Feb 2004 22:23:18 -0000 1.1
--- plustot.h 10 Dec 2004 20:47:06 -0000 1.2
***************
*** 1,3 ****
! /* Copyright (c) 2003 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2003-2004 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 13,16 ****
--- 13,20 ----
#undef PD_EXTERN
+ #ifdef KRZYSZCZ
+ #define PLUSTOT_DEBUG
+ #endif
+
EXTERN_STRUCT _plustin;
#define t_plustin struct _plustin
Index: widget.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/widget.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** widget.c 8 Dec 2004 15:40:14 -0000 1.10
--- widget.c 10 Dec 2004 20:47:06 -0000 1.11
***************
*** 21,26 ****
--- 21,28 ----
static t_class *makeshift_class;
+ #ifdef KRZYSZCZ
//#define WIDGET_DEBUG
//#define TOW_DEBUG
+ #endif
enum { WIDGET_NOVIS = 0, WIDGET_PUSHVIS, WIDGET_REVIS };