Skip to content

Commit 015c507

Browse files
committed
Removed some ep's and commented out unused functions that use EPs
1 parent 892ca33 commit 015c507

File tree

7 files changed

+27
-7
lines changed

7 files changed

+27
-7
lines changed

engine/src/debug.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ void MCB_unparsebreaks(MCExecPoint& ep)
402402
}
403403
}
404404
#endif
405+
#ifdef LEGACY_EXEC
405406
static MCObject *getobj(MCExecPoint& ep)
406407
{
407408
MCObject *objptr = NULL;
@@ -417,7 +418,7 @@ static MCObject *getobj(MCExecPoint& ep)
417418
delete tchunk;
418419
return objptr;
419420
}
420-
421+
#endif
421422
void MCB_parsebreaks(MCExecContext& ctxt, MCStringRef p_input)
422423
{
423424
MCB_clearbreaks(NULL);
@@ -503,7 +504,7 @@ void MCB_parsebreaks(MCExecContext& ctxt, MCStringRef p_input)
503504
t_last_offset = t_return_offset + 1;
504505
}
505506
}
506-
507+
#ifdef LEGACY_EXEC
507508
void MCB_parsebreaks(MCExecPoint& ep)
508509
{
509510
MCB_clearbreaks(NULL);
@@ -573,7 +574,7 @@ void MCB_parsebreaks(MCExecPoint& ep)
573574
}
574575
delete buffer;
575576
}
576-
577+
#endif
577578
////////////////////////////////////////////////////////////////////////////////
578579

579580
void MCB_clearwatches(void)

engine/src/debug.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ extern void MCB_done(MCExecContext &ctxt);
7272
extern void MCB_setvar(MCExecContext &ctxt, MCValueRef p_value, MCNameRef name);
7373

7474
extern void MCB_parsebreaks(MCExecContext& ctxt, MCStringRef p_input);
75+
#ifdef LEGACY_EXEC
7576
extern void MCB_parsebreaks(MCExecPoint& breaks);
77+
#endif
7678
extern bool MCB_unparsebreaks(MCStringRef& r_value);
7779
#ifdef LEGACY_EXEC
7880
extern void MCB_unparsebreaks(MCExecPoint& breaks);

engine/src/external.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,15 @@ bool MCExternalHandlerList::IsEmpty(void)
5252
return m_handlers . Count() == 0;
5353
}
5454

55+
#ifdef LEGACY_EXEC
5556
bool MCExternalHandlerList::ListExternals(MCExecPoint& ep)
5657
{
5758
ep . clear();
5859
for(uint32_t i = 0; i < m_externals . Count(); i++)
5960
ep . concatcstring(m_externals[i] -> GetName(), EC_RETURN, i == 0);
6061
return true;
6162
}
63+
#endif
6264

6365
bool MCExternalHandlerList::ListExternals(MCStringRef& r_list)
6466
{
@@ -86,6 +88,7 @@ bool MCExternalHandlerList::ListExternals(MCStringRef& r_list)
8688
return t_success;
8789
}
8890

91+
#ifdef LEGACY_EXEC
8992
bool MCExternalHandlerList::ListHandlers(MCExecPoint& ep, Handler_type p_type)
9093
{
9194
ep . clear();
@@ -94,6 +97,7 @@ bool MCExternalHandlerList::ListHandlers(MCExecPoint& ep, Handler_type p_type)
9497
ep . concatnameref(m_handlers[i] . name, EC_RETURN, j++ == 0);
9598
return true;
9699
}
100+
#endif
97101

98102
bool MCExternalHandlerList::ListHandlers(Handler_type p_type, MCStringRef& r_list)
99103
{

engine/src/external.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,15 @@ class MCExternalHandlerList
7979
bool IsEmpty(void);
8080

8181
// Create a return-delimited list of external names.
82+
#ifdef LEGACY_EXEC
8283
bool ListExternals(MCExecPoint& ep);
84+
#endif
8385
bool ListExternals(MCStringRef& r_list);
8486

8587
// Create a return-delimited list of external handlers of the given type.
88+
#ifdef LEGACY_EXEC
8689
bool ListHandlers(MCExecPoint& ep, Handler_type type);
90+
#endif
8791
bool ListHandlers(Handler_type p_type, MCStringRef& r_list);
8892

8993
// Looks to see if there is a handler of the given type.

engine/src/field.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,13 +1141,16 @@ Boolean MCField::mup(uint2 which)
11411141
while (bptr != linkend->next());
11421142
// MW-2011-08-18: [[ Layers ]] Invalidate the links part of the field.
11431143
layer_redrawrect(linkrect);
1144-
MCExecPoint ep;
1144+
1145+
MCAutoStringRef t_string;
11451146
if (linkstart->getlinktext() == NULL)
1146-
returntext(ep, linksi, linkei);
1147+
{
1148+
returntext(linksi, linkei, &t_string);
1149+
}
11471150
else
1148-
ep.setvalueref(linkstart->getlinktext());
1151+
t_string = MCValueRetain(linkstart->getlinktext());
11491152
linkstart = linkend = NULL;
1150-
if (message_with_valueref_args(MCM_link_clicked, ep.getvalueref()) == ES_NORMAL)
1153+
if (message_with_valueref_args(MCM_link_clicked, *t_string) == ES_NORMAL)
11511154
return True;
11521155
}
11531156
else
@@ -1581,6 +1584,7 @@ Exec_stat MCField::getprop_legacy(uint4 parid, Properties which, MCExecPoint& ep
15811584
return ES_NORMAL;
15821585
}
15831586

1587+
15841588
// MW-2012-01-25: [[ ParaStyles ]] Parse the given string as a list of tab-stops.
15851589
// MW-2012-02-11: [[ TabWidths ]] The 'which' parameter determines what style of tabStops to
15861590
// parse - widths or stops.

engine/src/fieldh.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ void MCField::exportastext(uint32_t p_part_id, MCExecPoint& ep, int32_t p_start_
632632

633633
// MW-2012-02-20: [[ FieldExport ]] This method exports the content of the
634634
// field as either native or unicode including any list indices.
635+
635636
void MCField::exportasplaintext(MCExecPoint& ep, MCParagraph *p_paragraphs, int32_t p_start_index, int32_t p_finish_index, bool p_as_unicode)
636637
{
637638
MCAutoStringRef t_string;

engine/src/fieldrtf.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,7 @@ static bool export_rtf_emit_paragraphs(void *p_context, MCFieldExportEventType p
807807
}
808808

809809
// MW-2012-02-29: [[ FieldExport ]] New RTF export method.
810+
#ifdef LEGACY_EXEC
810811
void MCField::exportasrtftext(MCExecPoint& ep, MCParagraph *p_paragraphs, int32_t p_start_index, int32_t p_finish_index)
811812
{
812813
MCAutoStringRef t_string;
@@ -816,11 +817,14 @@ void MCField::exportasrtftext(MCExecPoint& ep, MCParagraph *p_paragraphs, int32_
816817
else
817818
ep . clear();
818819
}
820+
#endif
819821

822+
#ifdef LEGACY_EXEC
820823
void MCField::exportasrtftext(uint32_t p_part_id, MCExecPoint& ep, int32_t p_start_index, int32_t p_finish_index)
821824
{
822825
exportasrtftext(ep, resolveparagraphs(p_part_id), p_start_index, p_finish_index);
823826
}
827+
#endif
824828

825829
bool MCField::exportasrtftext(uint32_t p_part_id, int32_t p_start_index, int32_t p_finish_index, MCStringRef &r_string)
826830
{

0 commit comments

Comments
 (0)