aboutsummaryrefslogtreecommitdiff
path: root/shared/toxy/scriptlet.c
diff options
context:
space:
mode:
authorN.N. <krzyszcz@users.sourceforge.net>2003-10-03 12:08:32 +0000
committerN.N. <krzyszcz@users.sourceforge.net>2003-10-03 12:08:32 +0000
commitb3a15eee3ab2d393dcdbe9a87ad354755a2f9a86 (patch)
tree70e62c9d8dfad8c0a89df44439b95468bdb984e3 /shared/toxy/scriptlet.c
parentef674aef4f1d6a513dcfdfaf5b0ebd078d25abac (diff)
*** empty log message ***
svn path=/trunk/externals/miXed/; revision=1064
Diffstat (limited to 'shared/toxy/scriptlet.c')
-rw-r--r--shared/toxy/scriptlet.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/shared/toxy/scriptlet.c b/shared/toxy/scriptlet.c
index 2592cee..e2f9883 100644
--- a/shared/toxy/scriptlet.c
+++ b/shared/toxy/scriptlet.c
@@ -277,6 +277,11 @@ static char *scriptlet_dedot(t_scriptlet *sp, char *ibuf, char *obuf,
return (len ? ibuf + len : 0);
}
+int scriptlet_isempty(t_scriptlet *sp)
+{
+ return (!(sp->s_tail > sp->s_head && *sp->s_head));
+}
+
void scriptlet_reset(t_scriptlet *sp)
{
sp->s_cvstate = SCRIPTLET_CVUNKNOWN;
@@ -395,6 +400,20 @@ void scriptlet_qpush(t_scriptlet *sp)
}
}
+/* Non-expanding -- LATER think if this is likely to cause any confusion.
+ Especially, consider the widget_vis() vs. widget_update() case. */
+void scriptlet_vpush(t_scriptlet *sp, char *varname)
+{
+ if (scriptlet_ready(sp))
+ {
+ char *tail = sp->s_tail;
+ strcpy(tail, "}\n");
+ sys_vgui("set ::toxy::%s { ", varname);
+ sys_gui(sp->s_head);
+ *tail = 0;
+ }
+}
+
int scriptlet_evaluate(t_scriptlet *insp, t_scriptlet *outsp,
int visedonly, int ac, t_atom *av, t_props *argprops)
{