@@ -1045,7 +1045,7 @@ if (sp.next(type) != PS_NORMAL)
10451045 return PS_NORMAL ;
10461046}
10471047
1048- Exec_stat MCMarking::exec (MCExecPoint &ep )
1048+ void MCMarking::exec_ctxt (MCExecContext &ctxt )
10491049{
10501050#ifdef /* MCMarking */ LEGACY_EXEC
10511051 if (card != NULL )
@@ -1075,27 +1075,25 @@ Exec_stat MCMarking::exec(MCExecPoint &ep)
10751075
10761076 MCdefaultstackptr->markfind (ep, mode, ep.getsvalue (), field, mark);
10771077 }
1078- return ES_NORMAL ;
1078+ return ES_NORMAL ;
10791079#endif /* MCMarking */
1080-
1081- MCExecContext ctxt (ep);
1082- if (card != nil)
1080+
1081+ if (card != NULL )
10831082 {
1084- MCObjectPtr t_object;
1085- if (card->getobj (ep, t_object, True) != ES_NORMAL || t_object . object->gettype () != CT_CARD )
1083+ MCObjectPtr t_object;
1084+ if (!card->getobj (ctxt, t_object, True)
1085+ || t_object . object -> gettype () != CT_CARD )
10861086 {
1087- MCeerror-> add ( EE_MARK_BADCARD , line, pos );
1088- return ES_ERROR ;
1089- }
1090-
1087+ ctxt . LegacyThrow ( EE_MARK_BADCARD );
1088+ return ;
1089+ }
1090+
10911091 if (mark)
10921092 MCInterfaceExecMarkCard (ctxt, t_object);
10931093 else
10941094 MCInterfaceExecUnmarkCard (ctxt, t_object);
1095-
10961095 }
1097- if (tofind == nil)
1098- {
1096+ if (tofind == nil)
10991097 if (mark)
11001098 {
11011099 if (where != nil)
@@ -1110,22 +1108,18 @@ Exec_stat MCMarking::exec(MCExecPoint &ep)
11101108 else
11111109 MCInterfaceExecUnmarkAllCards (ctxt);
11121110 }
1113- }
11141111 else
1115- {
1112+ {
11161113 MCAutoStringRef t_needle;
1117- if (tofind->eval (ep) != ES_NORMAL )
1118- {
1119- MCeerror->add (EE_MARK_BADSTRING , line, pos);
1120- return ES_ERROR ;
1121- }
1122- ep . copyasstringref (&t_needle);
1114+
1115+ if (!ctxt . EvalExprAsStringRef (tofind, EE_MARK_BADSTRING , &t_needle))
1116+ return ;
1117+
11231118 if (mark)
11241119 MCInterfaceExecMarkFind (ctxt, mode, *t_needle, field);
11251120 else
11261121 MCInterfaceExecUnmarkFind (ctxt, mode, *t_needle, field);
1127- }
1128- return ES_NORMAL ;
1122+ }
11291123}
11301124
11311125MCPut::~MCPut ()
0 commit comments