1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

ECMASCRIPT: Fix unused SEE specific variables when using spidermonkey

This commit is contained in:
Jonas Fonseca 2006-01-28 18:26:45 +01:00 committed by Jonas Fonseca
parent de468660f1
commit 20f5b76bb2

View File

@ -866,16 +866,19 @@ try_submit_given_form(struct session *ses, struct document_view *doc_view,
struct view_state *vs = doc_view->vs;
struct ecmascript_interpreter *interpreter;
int res = 1;
unsigned char *ret = form->onsubmit;
if (vs->ecmascript_fragile)
ecmascript_reset_state(vs);
interpreter = vs->ecmascript;
assert(interpreter);
#ifdef CONFIG_ECMASCRIPT_SEE
/* SEE doesn't like return outside functions */
while ((ret = strstr(ret, "return "))) {
while (*ret != ' ') *ret++ = ' ';
{
unsigned char *ret = form->onsubmit;
/* SEE doesn't like return outside functions */
while ((ret = strstr(ret, "return "))) {
while (*ret != ' ') *ret++ = ' ';
}
}
#endif
add_to_string(&code, form->onsubmit);