Skip to content

Commit 37dc28a

Browse files
committed
[[ Cleanup ]] Remove some unused syntax-related code
1 parent 423e267 commit 37dc28a

File tree

5 files changed

+0
-159
lines changed

5 files changed

+0
-159
lines changed

engine/src/cmds.cpp

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -448,88 +448,6 @@ void MCDo::compile(MCSyntaxFactoryRef ctxt)
448448
MCSyntaxFactoryEndStatement(ctxt);
449449
}
450450

451-
typedef struct
452-
{
453-
const char *token;
454-
const char *command;
455-
}
456-
DT;
457-
458-
static DT domenu_table[] = {
459-
{"new stack...", "create stack\n\
460-
set the mainStack of the topStack to \"Home\"\n\
461-
modal \"Stack Properties\""},
462-
{"open stack...", "answer file \"Choose a stack to open...\"\n\
463-
if it is not empty then\n\
464-
set the cursor to watch\n\
465-
topLevel it\n\
466-
end if"},
467-
{"close stack", "close this stack"},
468-
{"compact stack", "compact stack"},
469-
{"print card", "print this card"},
470-
{"print stack...", "print this stack"},
471-
{"quit hypercard", "quit"},
472-
{"quit", "quit"},
473-
{"undo", "undo"},
474-
{"cut", "cut"},
475-
{"copy", "copy"},
476-
{"paste", "paste"},
477-
{"new card", "create card"},
478-
{"delete card", "delete this card"},
479-
{"cut card", "cut this card"},
480-
{"copy card", "copy this card"},
481-
{"background", "edit background"},
482-
{"back", "go back"},
483-
{"home", "go home"},
484-
{"help", "help"},
485-
{"recent", "go recent"},
486-
{"first", "go to first card"},
487-
{"prev", "go to prev card"},
488-
{"next", "go to next card"},
489-
{"last", "go to last card"},
490-
{"find...", "modeless \"Find\""},
491-
{"message", "modeless \"Message Box\""},
492-
{"bring closer", "set the layer of the selobj to the layer of the selobj+1"},
493-
{"send farther", "set the layer of the selobj to the layer of the selobj-1"},
494-
{"new button", "create button"},
495-
{"new field", "create field"},
496-
{"new background", "create background"},
497-
};
498-
499-
/* doMenu items
500-
About Hypercard..., New Stack..., Open Stack..., Close Stack, Save A
501-
Copy..., Compact Stack, Protect Stack..., Delete Stack..., Page
502-
Setup..., Print Field..., Print Card, Print Stack..., Print Report...,
503-
Quit Hypercard, Undo, Cut, Copy, Paste, New Card, Delete Card, Cut
504-
Card, Copy Card, Text Style..., Background, Icon..., Back, Home, Help,
505-
recent, First, Prev, Next, Last, Find..., Message, Scroll, Next
506-
Window, Button Info..., Field Info..., Card Info..., Bkgnd Info...,
507-
Stack Info..., Bring Closer, Send Farther, New Button, New Field, New
508-
Background, Plain, Bold, Italic, Underline, Outline, Shadow, Condense,
509-
Extend, Group, Other..., Select, Select All, Fill, Invert, Pickup,
510-
Darken, Lighten, Trace Edges, Rotate Left, Rotate Right, Flip
511-
Vertical, Flip Horizontal, Opaque, Transparent, Keep, Revert, grid,
512-
Fatbits, Power Keys, Line Size..., brush Shape..., Edit pattern...,
513-
Polygon Sides..., Draw filled, Draw centered, Draw multiple, Rotate,
514-
Slant, distort, Perspective, Import Paint..., Export Paint..., New
515-
Icon, Close Icon Editor, Duplicate Icon, Cut Icon, Copy Icon, Erase,
516-
Frame, Gray, Mirror Horizontal, Mirror Vertical, Rotate 90, Shadow,
517-
Delete Report, Cut Report, Copy Report, Report Items..., Report
518-
Name..., New Report, New Item, Item Info..., Close Script, Save
519-
Script, Revert To Saved, Print Script, Find Again, Find Selection,
520-
Scroll To Selection, Replace..., Replace Again, Comment, Uncomment,
521-
Set Checkpoint, Step, Step Into, Trace, Go, Trace Delay..., Abort,
522-
Variable Watcher, Message Watcher
523-
*/
524-
const char *MCDoMenu::lookup(MCStringRef s)
525-
{
526-
uint2 size = ELEMENTS(domenu_table);
527-
while(size--)
528-
if (MCStringIsEqualToCString(s, domenu_table[size].token, kMCCompareCaseless))
529-
return domenu_table[size].command;
530-
return NULL;
531-
}
532-
533451
MCDoMenu::~MCDoMenu()
534452
{
535453
delete source;

engine/src/cmds.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,6 @@ class MCKill : public MCStatement
14891489
sig = NULL;
14901490
pname = NULL;
14911491
}
1492-
int4 lookup(MCStringRef s);
14931492
virtual ~MCKill();
14941493
virtual Parse_stat parse(MCScriptPoint &);
14951494
virtual void exec_ctxt(MCExecContext &);

engine/src/cmdsf.cpp

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,9 +1078,6 @@ void MCExport::compile(MCSyntaxFactoryRef ctxt)
10781078

10791079
////////////////////////////////////////////////////////////////////////////////
10801080

1081-
#define OPEN_BRACKET '['
1082-
#define CLOSE_BRACKET ']'
1083-
10841081
MCFilter::~MCFilter()
10851082
{
10861083
delete container;
@@ -1685,39 +1682,6 @@ void MCImport::compile(MCSyntaxFactoryRef ctxt)
16851682
MCSyntaxFactoryEndStatement(ctxt);
16861683
}
16871684

1688-
typedef struct
1689-
{
1690-
const char *token;
1691-
int4 which;
1692-
}
1693-
ST;
1694-
1695-
static ST signal_table[] = {
1696-
#if defined(TARGET_PLATFORM_LINUX)
1697-
{"abrt", SIGABRT}, {"alrm", SIGALRM}, {"bus", SIGBUS}, {"chld", SIGCHLD},
1698-
{"cld", SIGCLD}, {"cont", SIGCONT}, {"emt", SIGBOGUS}, {"fpe", SIGFPE},
1699-
{"hup", SIGHUP}, {"ill", SIGILL}, {"info", SIGBOGUS}, {"int", SIGINT},
1700-
{"io", SIGIO}, {"iot", SIGIOT}, {"kill", SIGKILL}, {"lwp", SIGBOGUS},
1701-
{"phone", SIGBOGUS}, {"pipe", SIGPIPE}, {"poll", SIGPOLL}, {"prof", SIGPROF},
1702-
{"pwr", SIGPWR}, {"quit", SIGQUIT}, {"segv", SIGSEGV}, {"stop", SIGSTOP},
1703-
{"sys", SIGSYS}, {"term", SIGTERM}, {"trap", SIGTRAP}, {"tstp", SIGTSTP},
1704-
{"ttin", SIGTTIN}, {"ttou", SIGTTOU}, {"urg", SIGURG}, {"usr1", SIGUSR1},
1705-
{"usr2", SIGUSR2}, {"vtalrm", SIGVTALRM}, {"waiting", SIGBOGUS},
1706-
{"winch", SIGWINCH}, {"xcpu", SIGXCPU}, {"xfsz", SIGXFSZ}
1707-
#else
1708-
{"xfsz", 1}
1709-
#endif
1710-
};
1711-
1712-
int4 MCKill::lookup(MCStringRef s)
1713-
{
1714-
uint2 size = ELEMENTS(signal_table);
1715-
while(size--)
1716-
if (MCStringIsEqualToCString(s, signal_table[size].token, kMCCompareCaseless))
1717-
return signal_table[size].which;
1718-
return SIGTERM;
1719-
}
1720-
17211685
MCKill::~MCKill()
17221686
{
17231687
delete sig;

engine/src/funcs.cpp

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2721,8 +2721,6 @@ void MCSetResource::compile(MCSyntaxFactoryRef ctxt)
27212721

27222722
///////////////////////////////////////////////////////////////////////////////
27232723

2724-
MCScriptEnvironment *MCHTTPProxyForURL::pac_engine = NULL;
2725-
27262724
MCHTTPProxyForURL::~MCHTTPProxyForURL(void)
27272725
{
27282726
delete url;
@@ -2769,38 +2767,6 @@ void MCHTTPProxyForURL::compile(MCSyntaxFactoryRef ctxt)
27692767
compile_with_args(ctxt, kMCNetworkEvalHTTPProxyForURLMethodInfo, url, host);
27702768
}
27712769

2772-
char *MCHTTPProxyForURL::PACdnsResolve(const char* const* p_arguments, unsigned int p_argument_count)
2773-
{
2774-
if (p_argument_count != 1)
2775-
return NULL;
2776-
2777-
MCAutoStringRef t_address_string;
2778-
MCAutoStringRef p_arguments0_string;
2779-
/* UNCHECKED */ MCStringCreateWithCString(p_arguments[0], &p_arguments0_string);
2780-
MCS_dnsresolve(*p_arguments0_string, &t_address_string);
2781-
2782-
char *t_address = nil;
2783-
if (*t_address_string != nil)
2784-
/* UNCHECKED */ MCStringConvertToCString(*t_address_string, t_address);
2785-
2786-
return t_address;
2787-
}
2788-
2789-
char *MCHTTPProxyForURL::PACmyIpAddress(const char* const* p_arguments, unsigned int p_argument_count)
2790-
{
2791-
if (p_argument_count != 0)
2792-
return NULL;
2793-
2794-
MCAutoStringRef t_address_string;
2795-
MCS_hostaddress(&t_address_string);
2796-
2797-
char *t_address = nil;
2798-
if (*t_address_string != nil)
2799-
/* UNCHECKED */ MCStringConvertToCString(*t_address_string, t_address);
2800-
2801-
return t_address;
2802-
}
2803-
28042770
///////////////////////////////////////////////////////////////////////////////
28052771

28062772
MCControlAtLoc::~MCControlAtLoc()

engine/src/funcs.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2486,8 +2486,6 @@ class MCHTTPProxyForURL: public MCFunction
24862486
MCExpression *host;
24872487
MCExpression *pac;
24882488

2489-
static MCScriptEnvironment *pac_engine;
2490-
24912489
public:
24922490
MCHTTPProxyForURL(void)
24932491
{
@@ -2501,10 +2499,6 @@ class MCHTTPProxyForURL: public MCFunction
25012499
virtual Parse_stat parse(MCScriptPoint& sp, Boolean the);
25022500
virtual void eval_ctxt(MCExecContext &, MCExecValue &);
25032501
virtual void compile(MCSyntaxFactoryRef);
2504-
2505-
private:
2506-
static char *PACdnsResolve(const char* const* p_arguments, unsigned int p_argument_count);
2507-
static char *PACmyIpAddress(const char* const* p_arguments, unsigned int p_argument_count);
25082502
};
25092503

25102504
class MCRandomBytes: public MCUnaryFunctionCtxt<uinteger_t, MCDataRef, MCSecurityEvalRandomBytes, EE_RANDOMBYTES_BADCOUNT, PE_RANDOMBYTES_BADPARAM, kMCSecurityEvalRandomBytesMethodInfo>

0 commit comments

Comments
 (0)