aboutsummaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorN.N. <krzyszcz@users.sourceforge.net>2004-02-29 17:16:44 +0000
committerN.N. <krzyszcz@users.sourceforge.net>2004-02-29 17:16:44 +0000
commitd9072a0e0ecb227c9a42dddf027e29a04f080f4e (patch)
tree9fe2c53b5227af13a38a79488731f5385dc408b7 /shared
parent7932bdec0718f93a4b29eddb3c62ec5068b37bec (diff)
scriptlet bugs: qpush and params
svn path=/trunk/externals/miXed/; revision=1365
Diffstat (limited to 'shared')
-rw-r--r--shared/toxy/scriptlet.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/shared/toxy/scriptlet.c b/shared/toxy/scriptlet.c
index 9bc312d..4806065 100644
--- a/shared/toxy/scriptlet.c
+++ b/shared/toxy/scriptlet.c
@@ -22,7 +22,7 @@
#define SCRIPTLET_INISIZE 1024
#define SCRIPTLET_MARGIN 64
#define SCRIPTLET_MAXARGS 9 /* do not increase (parser's constraint) */
-#define SCRIPTLET_MAXPUSH 20000 /* Tcl limit? LATER investigate */
+#define SCRIPTLET_MAXPUSH 20000 /* cf SOCKSIZE in t_tkcmd.c, LATER revisit */
enum { SCRIPTLET_CVOK, SCRIPTLET_CVUNKNOWN, SCRIPTLET_CVMISSING };
@@ -144,22 +144,23 @@ static char *scriptlet_dedot(t_scriptlet *sp, char *ibuf, char *obuf,
}
else if (argprops)
{
- char *ptr;
+ char *iptr, *optr, c;
int cnt;
- for (ptr = ibuf + 1, cnt = 1; *ptr; ptr++, cnt++)
+ for (iptr = ibuf + 1, c = *iptr, cnt = 1; c;
+ iptr++, c = *iptr, cnt++)
{
- char c = *ptr;
if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z'))
{
- cnt = 0;
+ *iptr = 0;
break;
}
}
- if (cnt && (ptr = props_getvalue(argprops, ibuf + 1)))
+ if (optr = props_getvalue(argprops, ibuf + 1))
{
- strcpy(obuf, ptr);
+ strcpy(obuf, optr);
len = cnt;
}
+ if (c) *iptr = c;
}
}
break;
@@ -424,8 +425,9 @@ void scriptlet_qpush(t_scriptlet *sp)
strcpy(tail, "]}}\n");
sys_gui(sp->s_buffer);
*tail = 0;
- sprintf(buf, "after 0 {::toxy::query}\nvwait ::toxy::reply\n\
- pd [concat %s _rp $::toxy::reply \\;]\n", sp->s_rptarget->s_name);
+ /* LATER find out if reply does not fit better inside the query proc */
+ sprintf(buf, "after 0 {::toxy::query\n\
+ pd [concat %s _rp $::toxy::reply \\;]}\n", sp->s_rptarget->s_name);
sys_gui(buf);
}
}