Change the eq function specification.
Bug fix in wiki.
Update the motor-file function.
mlenv->setMStack (&obj);
ans = progn (rest, mlenv);
- if (mlenv->breaksym ()
- && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) {
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym () && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) { mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (cell->car ());
return mlenv->retval = ans ();
}
obj.finit = false;
}
ans = progn (rest, mlenv);
- if (mlenv->breaksym ()
- && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) {
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym () && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) { mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (cell->car ());
}
return mlenv->retval = ans ();
static const ustring q (CharConst ("rollback"));
obj->fbegin = false;
obj->sql_s (q);
- if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())) {
- mlenv->setBreaksym (NULL);
+// if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())) {
+// mlenv->setBreaksym (NULL);
+ if (mlenv->stopBreak (cell->car ())) {
obj->retry --;
if (obj->retry > 0) {
fexit = false;
mlenv->setMStack (&obj);
obj.opendb ();
ans = progn (arg, mlenv);
- if (mlenv->breaksym ()
- && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) {
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym () && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) { mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (cell->car ());
obj.closedb ();
}
}
ans = progn (body, mlenv);
- if (mlenv->breaksym ()
- && (mlenv->breaksym ()->isNil ()
- || eq (mlenv->breaksym (), lambda->car ()))) {
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym () && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), lambda->car ()))) { mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (lambda->car ());
mlenv->endLocal ();
return ans.release ();
return ellipsis (u, cLOGSHORTSIZE);
}
+bool equal (MNode* a, MNode* b) {
+ if (a && b) {
+ if (a->type == b->type) {
+ switch (a->type) {
+ case MNode::MC_NIL:
+ return true;
+ case MNode::MC_CONS:
+ if (a->car () == b->car () && a->cdr () == b->cdr ())
+ return true;
+ else
+ return false;
+ case MNode::MC_STR:
+ if (*a->str == *b->str)
+ return true;
+ else
+ return false;
+ case MNode::MC_SYM:
+ if (*a->sym == *b->sym)
+ return true;
+ else
+ return false;
+ case MNode::MC_DOUBLE:
+ if (a->real == b->real)
+ return true;
+ else
+ return false;
+ default:
+ assert (0);
+ }
+ } else {
+ return false;
+ }
+ } else if (a == NULL) {
+ if (b == NULL) {
+ return true;
+ } else {
+ return b->isNil ();
+ }
+ } else { /* b == NULL */
+ return a->isNil ();
+ }
+}
+
void MotorSexp::scan (const ustring& text, bool skip) {
uiterator b = text.begin ();
uiterator e = text.end ();
return (a == NULL || a->isNil ());
}
-inline bool eq (MNode* a, MNode* b) {
- if (a && b) {
- if (a->type == b->type) {
- switch (a->type) {
- case MNode::MC_NIL:
- return true;
- case MNode::MC_CONS:
- if (a->car () == b->car () && a->cdr () == b->cdr ())
- return true;
- else
- return false;
- case MNode::MC_STR:
- if (*a->str == *b->str)
- return true;
- else
- return false;
- case MNode::MC_SYM:
- if (*a->sym == *b->sym)
- return true;
- else
- return false;
- case MNode::MC_DOUBLE:
- if (a->real == b->real)
- return true;
- else
- return false;
- default:
- assert (0);
- }
- } else {
- return false;
- }
- } else if (a == NULL && b == NULL) {
- return true;
- } else {
- return false;
- }
-};
+extern bool equal (MNode* a, MNode* b);
inline double to_double (MNode* c) {
if (c)
virtual void setBreakval (MNode* p) {
mlPool->breakval = p;
};
+ virtual bool stopBreak (MNode* fnname) {
+ if (breaksym ()
+ && (breaksym ()->isNil ()
+// || eq (breaksym (), fnname))) {
+ || equal (breaksym (), fnname))) {
+ setBreaksym (NULL);
+ return true;
+ }
+ return false;
+ };
#ifdef DEBUG
virtual void setNodebugFunc (const ustring& name) {
mlPool->nodebugFunc.set (name);
progn_ex (&ml.top, mlenv);
}
catch (ustring& msg) {
-#if 0
- if (log) {
- if (mlenv->currentCell ()) {
- mlenv->logLinenum (mlenv->currentCell ());
- *log << mlenv->currentCell ()->dump_string_short () << ": ";
- }
- *log << logText (msg) << "\n";
- }
-#endif
logMessage (msg);
mlenv->currentCell = NULL;
}
void MotorEnv::doMotor (const ustring& file, const ustring& type, MotorOutput* out) {
ustring f;
- if (out == NULL)
- out = output;
if (file == uDash) {
f = appenv->scriptName ();
if (f.size () == 0)
return;
- motor->compile_file (f, true);
+// motor->compile_file (f, true);
+ doMotorFile (f, true, type, out);
} else if (path_resource (file, f)) {
if (f.size () == 0)
return;
- motor->compile_file (f);
+// motor->compile_file (f);
+ doMotorFile (f, false, type, out);
} else {
return;
}
+}
+
+void MotorEnv::doMotorFile (const ustring& file, bool skipHead, const ustring& type, MotorOutput* out) {
+ if (out == NULL)
+ out = output;
+
+ motor->compile_file (file, skipHead);
try {
standardResponse (type, out->charset (), uEmpty, false);
motor->output (out, this);
} catch (ustring& msg) {
-#if 0
- if (log) {
- if (mlenv->currentCell ()) {
- mlenv->logLinenum (mlenv->currentCell ());
- *log << mlenv->currentCell ()->dump_string_short () << ": ";
- }
- *log << logText (msg) << "\n";
- }
-#endif
logMessage (msg);
mlenv->currentCell = NULL;
}
doMotor (file, mimetype);
};
virtual void doMotor (const ustring& file, const ustring& type, MotorOutput* out = NULL);
+ virtual void doMotorFile (const ustring& file, bool skipHead, const ustring& type, MotorOutput* out = NULL);
virtual void outputFile (const ustring& src, const ustring& type);
virtual void outputFile (const ustring& src, const ustring& type, bool finline, const ustring& dispname);
virtual void standardResponse () {
}
bool checkResourceName (const ustring& name) {
- static uregex re ("^(" kWNAME "{0,127}/)*" kWNAME "{0,127}(\\." kWORD "{1,16})?$");
+// static uregex re ("^(" kWNAME "{0,127}/)*" kWNAME "{0,127}(\\." kWORD "{1,16})?$");
+ static uregex re ("^([a-zA-Z0-9_][a-zA-Z0-9_.-]{0,127}/)*[a-zA-Z0-9_][a-zA-Z0-9_.-]{0,127}(\\." kWORD "{1,16})?$");
return (checkRe (name, re));
}
/*DOC:
===eq===
- (eq TEXT TEXT...) -> 1 or NIL
+ (eq OBJECT OBJECT...) -> 1 or NIL
-string equal
+Check if all args are the same lisp object.
*/
//#AFUNC eq ml_eq
//#WIKIFUNC eq
MNode* ml_eq (MNode* cell, MlEnv* mlenv) {
MNode* arg = cell->cdr ();
- ustring v1, v2;
+ MNodePtr v1, v2;
if (! arg)
throw (uErrorWrongNumber);
- v1 = eval_str (arg->car (), mlenv);
+ v1 = eval (arg->car (), mlenv);
nextNode (arg);
while (arg) {
- v2 = eval_str (arg->car (), mlenv);
- if (v1 == v2) {
- v1 = v2;
+ v2 = eval (arg->car (), mlenv);
+ if (equal (v1 (), v2 ())) {
} else {
return newMNode_bool (false);
}
/*DOC:
===ne===
- (ne TEXT TEXT) -> 1 or NIL
+ (ne OBJECT OBJECT) -> 1 or NIL
-string not equal
+object not equal
*/
//#AFUNC ne ml_ne
//#WIKIFUNC ne
MNode* ml_ne (MNode* cell, MlEnv* mlenv) {
MNode* arg = cell->cdr ();
- ustring v1, v2;
+ MNodePtr v1, v2;
if (! arg)
throw (uErrorWrongNumber);
- v1 = eval_str (arg->car (), mlenv);
+ v1 = eval (arg->car (), mlenv);
nextNode (arg);
if (! arg)
throw (uErrorWrongNumber);
- v2 = eval_str (arg->car (), mlenv);
+ v2 = eval (arg->car (), mlenv);
nextNode (arg);
if (arg)
throw (uErrorWrongNumber);
- return newMNode_bool (v1 != v2);
+ return newMNode_bool (! equal (v1 (), v2 ()));
}
/*DOC:
throw (msg);
}
}
- if (mlenv->breaksym ()
- && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) {
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym () && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) { mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (cell->car ());
}
return ans.release ();
throw (msg);
}
}
- if (mlenv->breaksym ()
- && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) {
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym () && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) { mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (cell->car ());
return mlenv->retval = ans ();
}
}
}
}
- if (mlenv->breaksym ()
- && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) {
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym () && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) { mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (cell->car ());
return ans.release ();
}
throw (msg);
}
}
- if (mlenv->breaksym ()
- && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) {
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym () && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) { mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (cell->car ());
return ans.release ();
}
if (ml.top.isCons ()) {
ans = progn (&ml.top, mlenv);
if (mlenv->breaksym ()) {
- if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))
- mlenv->setBreaksym (NULL);
+// if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())) mlenv->setBreaksym (NULL);
+ mlenv->stopBreak (cell->car ());
rest = NULL;
}
}
#include "ml-motor.h"
#include "ml.h"
+#include "ml-store.h"
#include "mlenv.h"
#include "motorenv.h"
#include "motoroutput.h"
type = mimetype (type);
if (! mlenv->env->responseDone) {
-#if 0
- if (name.length () > 0)
- mlenv->env->standardResponse (type, finline, name);
- else if (matchHead (type, CharConst ("text/")) && charset.length () > 0)
- mlenv->env->standardResponse (type, charset);
- else
- mlenv->env->standardResponse (type);
-#endif
mlenv->env->standardResponse (type, charset, name, finline);
}
/*DOC:
===motor-file===
- (motor-file HTMLFILE [:type MIMETYPE] [#error | :error BOOL] [:code ENCODING] [#continue | :continue BOOL]) -> NIL
+ (motor-file HTMLFILE [:type MIMETYPE] [#error | :error BOOL] [:code ENCODING] [#continue | :continue BOOL]
+ [#serial | #named | #static | :serial BOOL | :named BOOL | :static BOOL]) -> NIL
*/
bool ferr = false;
ustring encoding;
bool cflag = false;
+ StoreType storetype (mlenv);
std::vector<MNode*> params;
std::vector<MNode*> keywords;
static paramList kwlist[] = {
- {CharConst ("type"), false},
- {CharConst ("error"), true},
- {CharConst ("code"), false},
- {CharConst ("continue"), true},
+ {CharConst ("type"), false}, // 0
+ {CharConst ("error"), true}, // 1
+ {CharConst ("code"), false}, // 2
+ {CharConst ("continue"), true}, // 3
+ {CharConst ("serial"), true}, // 4
+ {CharConst ("named"), true}, // 5
+ {CharConst ("static"), true}, // 6
{NULL, 0, 0}
};
+ storetype.setStatic ();
setParams (arg, 1, ¶ms, kwlist, &keywords, NULL, true);
file = eval_str (params[0], mlenv);
- if (keywords[0]) {
+ if (keywords[0]) { // type
type = eval_asciiword (keywords[0], mlenv);
if (! checkMimeType (type))
type.resize (0);
}
- if (keywords[1])
+ if (keywords[1]) // error
ferr = eval_bool (keywords[1], mlenv);
- if (keywords[2])
+ if (keywords[2]) // code
encoding = eval_str (keywords[2], mlenv);
- if (keywords[3] && eval_bool (keywords[3], mlenv))
+ if (keywords[3] && eval_bool (keywords[3], mlenv)) // continue
cflag = true;
+ if (eval_bool (keywords[4], mlenv)) // serial
+ storetype.setSerial ();
+ if (eval_bool (keywords[5], mlenv)) // named
+ storetype.setNamed ();
+ if (eval_bool (keywords[6], mlenv)) // static
+ storetype.setStatic ();
if (file.size () == 0)
throw (uErrorFilenameEmpty);
- if (!checkResourceName (file))
- throw (file + uErrorBadFile);
+// if (!checkResourceName (file))
+// throw (file + uErrorBadFile);
+ file = storetype.src (mlenv, file);
if (ferr)
mlenv->env->setErrorFlag ();
if (encoding.empty ()) {
if (type.size () == 0) {
- mlenv->env->doMotor (file);
+// mlenv->env->doMotor (file);
+ mlenv->env->doMotorFile (file, false, mlenv->env->mimetype);
} else {
- mlenv->env->doMotor (file, type);
+// mlenv->env->doMotor (file, type);
+ mlenv->env->doMotorFile (file, false, type);
}
} else {
MotorOutputIConvOStream out (encoding.c_str ());
if (type.size () == 0) {
- mlenv->env->doMotor (file, mlenv->env->mimetype, &out);
+// mlenv->env->doMotor (file, mlenv->env->mimetype, &out);
+ mlenv->env->doMotorFile (file, false, mlenv->env->mimetype, &out);
} else {
- mlenv->env->doMotor (file, type, &out);
+// mlenv->env->doMotor (file, type, &out);
+ mlenv->env->doMotorFile (file, false, type, &out);
}
}
*/
//#AFUNC mail-address-p ml_mail_address_p
+//#WIKIFUNC mail-address-p
MNode* ml_mail_address_p (MNode* cell, MlEnv* mlenv) {
MNode* arg = cell->cdr ();
ustring str;
/*DOC:
===write-file===
- (write-file FILENAME STRING [#serial | #named | :serial BOOL | :named BOOL] [:code ENCODING] [#crlf | :crlf BOOL]) -> NIL
+ (write-file FILENAME STRING [#serial | #named | :serial BOOL | :named BOOL] [:code ENCODING]
+ [#crlf | :crlf BOOL]) -> NIL
*/
//#AFUNC write-file ml_write_file
throw (msg);
}
}
- if (mlenv->breaksym ()
- && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) {
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym () && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) { mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (cell->car ());
return ans.release ();
}
setParams (arg, 1, ¶ms, kwlist_file, &keywords, NULL);
filename = eval_str (params[0], mlenv);
if (eval_bool (keywords[0], mlenv)) // serial
-// storetype = F_SERIAL;
storetype.setSerial ();
if (eval_bool (keywords[1], mlenv)) // named
-// storetype = F_NAMED;
storetype.setNamed ();
if (eval_bool (keywords[2], mlenv)) // static
-// storetype = F_STATIC;
storetype.setStatic ();
if (keywords[3]) // type
type = eval_str (keywords[3], mlenv);
} else if (! checkMimeType (type)) {
type = mimetype (type);
}
-
-#if 0
- switch (storetype) {
- case F_SERIAL:
- src = mlenv->env->path_store_file (filename);
- break;
- case F_NAMED:
- src = mlenv->env->path_storage_file (filename);
- break;
- case F_STATIC:
- if (mlenv->env->path_resource (filename, src)) {
- } else {
- throw (filename + uErrorNotFound);
- }
- break;
- default:
- throw (uErrorNoStore);
- }
-#endif
src = storetype.src (mlenv, filename);
};
};
/*DOC:
===response-motor===
- (response-motor HTMLFILE [#serial | #named | #static | :serial BOOL | :named BOOL | :static BOOL] [:type MIME_TYPE] [#continue | :continue BOOL]) -> NIL
+ (response-motor HTMLFILE [#serial | #named | #static | :serial BOOL | :named BOOL | :static BOOL]
+ [:type MIME_TYPE] [#continue | :continue BOOL]) -> NIL
*/
//#AFUNC response-motor ml_response_motor
}
/*DOC:
===response-file===
- (response-file FILENAME [#serial | #named | #static | :serial BOOL | :named BOOL | :static BOOL] [:type MIME_TYPE] [#inline | :inline BOOL] [:name NAME]) -> NIL
+ (response-file FILENAME [#serial | #named | #static | :serial BOOL | :named BOOL | :static BOOL]
+ [:type MIME_TYPE] [#inline | :inline BOOL] [:name NAME]) -> NIL
*/
//#AFUNC response-file ml_response_file
nextNode (arg);
if (arg) {
ans = progn (arg, mlenv);
- if (mlenv->breaksym ()
- && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())))
- mlenv->setBreaksym (NULL);
+// if (mlenv->breaksym () && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) mlenv->setBreaksym (NULL);
+ mlenv->stopBreak (cell->car ());
}
}
}
throw (a->dump_string () + uErrorBadType);
if (eval_bool (a->car (), mlenv)) {
ans = progn (a->cdr (), mlenv);
- if (mlenv->breaksym ()
- && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())))
- mlenv->setBreaksym (NULL);
+// if (mlenv->breaksym () && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) mlenv->setBreaksym (NULL);
+ mlenv->stopBreak (cell->car ());
break;
}
nextNode (arg);
throw (msg);
}
}
- if (mlenv->breaksym ()
- && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) {
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym () && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) { mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (cell->car ());
return ans.release ();
}
#endif /* DEBUG */
ans = eval (arg->car (), mlenv);
if (mlenv->breaksym ()) {
- if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())) {
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())) { mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (cell->car ());
return mlenv->breakval ();
}
nextNode (arg);
if (r) {
ans ()->set_car (newMNode_bool (true));
ans ()->set_cdr (progn (arg, mlenv));
- if (mlenv->breaksym ()) {
- if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym ()) { if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())) mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (cell->car ());
}
return ans.release ();
ans = new MNode;
ans ()->set_car (newMNode_bool (true));
ans ()->set_cdr (progn (arg, mlenv));
- if (mlenv->breaksym ()) {
- if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym ()) { if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())) mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (cell->car ());
return ans.release ();
}
mlenv->setVar (lv[j], mlenv->getAry (lv[j], (size_t)i));
ans = progn (rest, mlenv);
if (mlenv->breaksym ()) {
- if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))
- mlenv->setBreaksym (NULL);
+// if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())) mlenv->setBreaksym (NULL);
+ mlenv->stopBreak (cell->car ());
kp = false;
}
if (i > 0)
mlenv->setVar (lv[j], mlenv->getAry (lv[j], (size_t)i));
ans = progn (rest, mlenv);
if (mlenv->breaksym ()) {
- if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))
- mlenv->setBreaksym (NULL);
+// if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())) mlenv->setBreaksym (NULL);
+ mlenv->stopBreak (cell->car ());
kp = false;
}
if (i > 0)
}
ans = progn (rest, mlenv);
if (mlenv->breaksym ()) {
- if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))
- mlenv->setBreaksym (NULL);
+// if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())) mlenv->setBreaksym (NULL);
+ mlenv->stopBreak (cell->car ());
kp = false;
}
if (nsv == 0) {
}
ans = progn (rest, mlenv);
if (mlenv->breaksym ()) {
- if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))
- mlenv->setBreaksym (NULL);
+// if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())) mlenv->setBreaksym (NULL);
+ mlenv->stopBreak (cell->car ());
kp = false;
}
}
while (eval_bool (exp, mlenv)) {
ans = progn (arg, mlenv);
if (mlenv->breaksym ()) {
- if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))
- mlenv->setBreaksym (NULL);
+// if (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ())) mlenv->setBreaksym (NULL);
+ mlenv->stopBreak (cell->car ());
break;
}
}
}
ans = progn (arg, mlenv);
- if (mlenv->breaksym ()
- && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) {
- mlenv->setBreaksym (NULL);
- }
+// if (mlenv->breaksym () && (mlenv->breaksym ()->isNil () || eq (mlenv->breaksym (), cell->car ()))) { mlenv->setBreaksym (NULL); }
+ mlenv->stopBreak (cell->car ());
}
return mlenv->retval = ans ();
n = mlenv->getArySize (var);
if (n > 0) {
for (i = 1; i <= n; i ++) {
- if (eq (mlenv->getAry (var, i), value ())) {
+ if (equal (mlenv->getAry (var, i), value ())) {
return newMNode_num (i);
}
}
objv.splitCharA ('|', objvv);
if (objvv.size () > 0 && objvv.back ()->size () == 0)
objvv.pop_back ();
- attrib.shiftAttrib (objvv[0]);
+ if (objvv.size () > 0)
+ attrib.shiftAttrib (objvv[0]);
cell = new TableCell (wiki, WikiAttrib1::M_NORMAL);
- cell->cellBody (objvv[0].get (), this, 0);
+ if (objvv.size () > 0)
+ cell->cellBody (objvv[0].get (), this, 0);
captionHtml = cell->html;
delete cell;