History

moved g_shell out of chuck_shell.cpp

Ge Wang committed 9 years ago

Commit 4ff85261 parent e1c0b212 files · +241 −37Browse files

Unified · Split

2 files
  1. src/core/chuck_shell.cpp +208 −37
  2. src/host/chuck_main.cpp +33 −0
src/core/chuck_shell.cpp+208−37
@@ -47,9 +47,8 @@ · 46 unmodified lines
4747
4848 using namespace std;
4949
50−// REFACTOR-2017: TODO Ge: where should this live? not in chuck_main if it's in core!
51−// global shell pointer (lives in chuck_main)
52−extern Chuck_Shell * g_shell;
50+
51+
5352
5453 //-----------------------------------------------------------------------------
5554 // name: tokenize_string
@@ -189,36 +188,6 @@ int win32_tmpnam(char *file_path) · 133 unmodified lines
189188 #endif
190189
191190
192−//-----------------------------------------------------------------------------
193−// name: shell_cb
194−// desc: thread routine
195−//-----------------------------------------------------------------------------
196−void * shell_cb( void * p )
197−{
198− Chuck_Shell * shell;
199− // log
200− EM_log( CK_LOG_INFO, "starting thread routine for shell..." );
201−
202− // assuming this is absolutely necessary, an assert may be better
203− assert( p != NULL );
204−
205− shell = ( Chuck_Shell * ) p;
206−
207− //atexit( wait_for_shell );
208−
209− // run the shell
210− shell->run();
211−
212− // delete and set to NULL
213− SAFE_DELETE( g_shell );
214− // perhaps let shell destructor clean up mode and ui?
215−
216− EM_log( CK_LOG_INFO, "exiting thread routine for shell..." );
217−
218− return NULL;
219−}
220−
221−
222191
223192
224193 //-----------------------------------------------------------------------------
@@ -235,6 +204,9 @@ Chuck_Shell::Chuck_Shell() · 10 unmodified lines
235204 code_entry_active = FALSE;
236205 }
237206
207+
208+
209+
238210 //-----------------------------------------------------------------------------
239211 // name: ~Chuck_Shell()
240212 // desc: ...
@@ -254,6 +226,9 @@ Chuck_Shell::~Chuck_Shell() · 13 unmodified lines
254226 initialized = FALSE;
255227 }
256228
229+
230+
231+
257232 //-----------------------------------------------------------------------------
258233 // name: init()
259234 // desc: ...
@@ -409,6 +384,9 @@ t_CKBOOL Chuck_Shell::init( Chuck_VM * vm, Chuck_Shell_UI * ui ) · 149 unmodified lines
409384 return TRUE;
410385 }
411386
387+
388+
389+
412390 //-----------------------------------------------------------------------------
413391 // name: run()
414392 // desc: ...
@@ -460,6 +438,9 @@ void Chuck_Shell::run() · 45 unmodified lines
460438 EM_log( CK_LOG_SYSTEM, "exiting chuck shell..." );
461439 }
462440
441+
442+
443+
463444 //-----------------------------------------------------------------------------
464445 // name: execute
465446 // desc: ...
@@ -551,6 +532,9 @@ t_CKBOOL Chuck_Shell::execute( string & in, string & out ) · 85 unmodified lines
551532 return TRUE;
552533 }
553534
535+
536+
537+
554538 //-----------------------------------------------------------------------------
555539 // name: start_code()
556540 // desc: ...
@@ -562,6 +546,9 @@ void Chuck_Shell::start_code() · 5 unmodified lines
562546 scope = 0;
563547 }
564548
549+
550+
551+
565552 //-----------------------------------------------------------------------------
566553 // name: continue_code()
567554 // desc: ...
@@ -602,6 +589,9 @@ void Chuck_Shell::continue_code( string & in ) · 34 unmodified lines
602589 code_entry_active = FALSE;
603590 }
604591
592+
593+
594+
605595 //-----------------------------------------------------------------------------
606596 // name: do_code()
607597 // desc: ...
@@ -676,6 +666,9 @@ void Chuck_Shell::do_code( string & code, string & out, string command ) · 68 unmodified lines
676666 prompt = variables["COMMAND_PROMPT"];
677667 }
678668
669+
670+
671+
679672 //-----------------------------------------------------------------------------
680673 // name: do_context()
681674 // desc: ...
@@ -685,6 +678,9 @@ void Chuck_Shell::do_code_context( string & ) · 3 unmodified lines
685678
686679 }
687680
681+
682+
683+
688684 //-----------------------------------------------------------------------------
689685 // name: close()
690686 // desc: ...
@@ -695,6 +691,9 @@ void Chuck_Shell::close() · 4 unmodified lines
695691 //
696692 }
697693
694+
695+
696+
698697 //-----------------------------------------------------------------------------
699698 // name: kill()
700699 // desc: ...
@@ -711,6 +710,9 @@ void Chuck_Shell::exit() · 10 unmodified lines
711710 */
712711 }
713712
713+
714+
715+
714716 //-----------------------------------------------------------------------------
715717 // name: init()
716718 // desc: ...
@@ -722,6 +724,9 @@ t_CKBOOL Chuck_Shell_Network_VM::init( const string & hostname, t_CKINT port ) · 5 unmodified lines
722724 return TRUE;
723725 }
724726
727+
728+
729+
725730 //-----------------------------------------------------------------------------
726731 // name: copy()
727732 // desc: ...
@@ -733,6 +738,9 @@ Chuck_Shell_VM * Chuck_Shell_Network_VM::copy() · 5 unmodified lines
733738 return net_vm;
734739 }
735740
741+
742+
743+
736744 //-----------------------------------------------------------------------------
737745 // name: add_shred()
738746 // desc: ...
@@ -781,6 +789,9 @@ t_CKBOOL Chuck_Shell_Network_VM::add_shred( const vector< string > & files, · 42 unmodified lines
781789 return return_val;
782790 }
783791
792+
793+
794+
784795 //-----------------------------------------------------------------------------
785796 // name: remove_shred()
786797 // desc: ...
@@ -829,6 +840,9 @@ t_CKBOOL Chuck_Shell_Network_VM::remove_shred( const vector< string > & ids, · 42 unmodified lines
829840 return return_val;
830841 }
831842
843+
844+
845+
832846 //-----------------------------------------------------------------------------
833847 // name: remove_all()
834848 // desc: ...
@@ -847,6 +861,9 @@ t_CKBOOL Chuck_Shell_Network_VM::remove_all( string & out ) · 12 unmodified lines
847861 return return_val;
848862 }
849863
864+
865+
866+
850867 //-----------------------------------------------------------------------------
851868 // name: remove_last()
852869 // desc: ...
@@ -865,6 +882,9 @@ t_CKBOOL Chuck_Shell_Network_VM::remove_last( string & out ) · 12 unmodified lines
865882 return return_val;
866883 }
867884
885+
886+
887+
868888 //-----------------------------------------------------------------------------
869889 // name: replace_shred()
870890 // desc: ...
@@ -924,6 +944,9 @@ t_CKBOOL Chuck_Shell_Network_VM::replace_shred( const vector< string > &vec, · 53 unmodified lines
924944 return return_val;
925945 }
926946
947+
948+
949+
927950 //-----------------------------------------------------------------------------
928951 // name: status()
929952 // desc: ...
@@ -945,6 +968,9 @@ t_CKBOOL Chuck_Shell_Network_VM::status( string & out ) · 15 unmodified lines
945968 return return_val;
946969 }
947970
971+
972+
973+
948974 //-----------------------------------------------------------------------------
949975 // name: kill()
950976 // desc: ...
@@ -967,6 +993,9 @@ t_CKBOOL Chuck_Shell_Network_VM::kill( string & out ) · 16 unmodified lines
967993 return return_val;
968994 }
969995
996+
997+
998+
970999 //-----------------------------------------------------------------------------
9711000 // name: fullname()
9721001 // desc: returns a somewhat descriptive full name for this VM
@@ -979,6 +1008,9 @@ string Chuck_Shell_Network_VM::fullname() · 6 unmodified lines
9791008 return hostname + buf;
9801009 }
9811010
1011+
1012+
1013+
9821014 //-----------------------------------------------------------------------------
9831015 // name: init()
9841016 // desc: ...
@@ -988,6 +1020,9 @@ t_CKBOOL Chuck_Shell_UI::init() · 3 unmodified lines
9881020 return TRUE;
9891021 }
9901022
1023+
1024+
1025+
9911026 //-----------------------------------------------------------------------------
9921027 // name: init()
9931028 // desc: ...
@@ -998,6 +1033,9 @@ t_CKBOOL Chuck_Shell::Command::init( Chuck_Shell * caller ) · 4 unmodified lines
9981033 return TRUE;
9991034 }
10001035
1036+
1037+
1038+
10011039 //-----------------------------------------------------------------------------
10021040 // name: usage()
10031041 // desc: ...
@@ -1007,6 +1045,9 @@ string Chuck_Shell::Command::usage() · 3 unmodified lines
10071045 return "no usage specified";
10081046 }
10091047
1048+
1049+
1050+
10101051 //-----------------------------------------------------------------------------
10111052 // name: long_usage()
10121053 // desc: ...
@@ -1016,6 +1057,9 @@ string Chuck_Shell::Command::long_usage() · 3 unmodified lines
10161057 return "no usage specified";
10171058 }
10181059
1060+
1061+
1062+
10191063 //-----------------------------------------------------------------------------
10201064 // name: execute()
10211065 // desc: ...
@@ -1045,6 +1089,9 @@ t_CKINT Chuck_Shell::Command_Add::execute( vector< string > & argv, · 23 unmodified lines
10451089 return result;
10461090 }
10471091
1092+
1093+
1094+
10481095 //-----------------------------------------------------------------------------
10491096 // name: usage()
10501097 // desc: ...
@@ -1053,7 +1100,10 @@ string Chuck_Shell::Command_Add::usage() · 2 unmodified lines
10531100 {
10541101 return "add file ...";
10551102 }
1056−
1103+
1104+
1105+
1106+
10571107 //-----------------------------------------------------------------------------
10581108 // name: execute()
10591109 // desc: ...
@@ -1081,6 +1131,9 @@ t_CKINT Chuck_Shell::Command_Remove::execute( vector< string > & argv, · 21 unmodified lines
10811131 return result;
10821132 }
10831133
1134+
1135+
1136+
10841137 //-----------------------------------------------------------------------------
10851138 // name: usage()
10861139 // desc: ...
@@ -1090,6 +1143,9 @@ string Chuck_Shell::Command_Remove::usage() · 3 unmodified lines
10901143 return "remove shred_number ...";
10911144 }
10921145
1146+
1147+
1148+
10931149 //-----------------------------------------------------------------------------
10941150 // name: execute()
10951151 // desc: ...
@@ -1117,6 +1173,9 @@ t_CKINT Chuck_Shell::Command_Removeall::execute( vector< string > & argv, · 21 unmodified lines
11171173 return result;
11181174 }
11191175
1176+
1177+
1178+
11201179 //-----------------------------------------------------------------------------
11211180 // name: usage()
11221181 // desc: ...
@@ -1126,6 +1185,9 @@ string Chuck_Shell::Command_Removeall::usage() · 3 unmodified lines
11261185 return "removeall";
11271186 }
11281187
1188+
1189+
1190+
11291191 //-----------------------------------------------------------------------------
11301192 // name: execute()
11311193 // desc: ...
@@ -1146,6 +1208,9 @@ t_CKINT Chuck_Shell::Command_Removelast::execute( vector< string > & argv, · 14 unmodified lines
11461208 return result;
11471209 }
11481210
1211+
1212+
1213+
11491214 //-----------------------------------------------------------------------------
11501215 // name: usage()
11511216 // desc: ...
@@ -1155,6 +1220,9 @@ string Chuck_Shell::Command_Removelast::usage() · 3 unmodified lines
11551220 return "removelast";
11561221 }
11571222
1223+
1224+
1225+
11581226 //-----------------------------------------------------------------------------
11591227 // name: execute()
11601228 // desc: ...
@@ -1173,6 +1241,9 @@ t_CKINT Chuck_Shell::Command_Replace::execute( vector< string > & argv, · 12 unmodified lines
11731241 return 0;
11741242 }
11751243
1244+
1245+
1246+
11761247 //-----------------------------------------------------------------------------
11771248 // name: usage()
11781249 // desc: ...
@@ -1182,6 +1253,9 @@ string Chuck_Shell::Command_Replace::usage() · 3 unmodified lines
11821253 return "replace shred_id file ...";
11831254 }
11841255
1256+
1257+
1258+
11851259 //-----------------------------------------------------------------------------
11861260 // name: execute()
11871261 // desc: ...
@@ -1209,6 +1283,9 @@ t_CKINT Chuck_Shell::Command_Status::execute( vector< string > & argv, · 21 unmodified lines
12091283 return result;
12101284 }
12111285
1286+
1287+
1288+
12121289 //-----------------------------------------------------------------------------
12131290 // name: usage()
12141291 // desc: ...
@@ -1218,6 +1295,9 @@ string Chuck_Shell::Command_Status::usage() · 3 unmodified lines
12181295 return "status";
12191296 }
12201297
1298+
1299+
1300+
12211301 //-----------------------------------------------------------------------------
12221302 // name: execute()
12231303 // desc: ...
@@ -1232,6 +1312,9 @@ t_CKINT Chuck_Shell::Command_Kill::execute( vector< string > & argv, · 8 unmodified lines
12321312 return 0;
12331313 }
12341314
1315+
1316+
1317+
12351318 //-----------------------------------------------------------------------------
12361319 // name: execute()
12371320 // desc: ...
@@ -1243,8 +1326,9 @@ t_CKINT Chuck_Shell::Command_Close::execute( vector< string > & argv, · 5 unmodified lines
12431326
12441327 out += "closing chuck shell... bye!\n";
12451328
1246− if( g_shell != NULL )
1247− out += "(note: in-process VM still running, hit ctrl-c to exit)\n";
1329+ // REFACTOR-2017: removed: this needs to be done outside
1330+ // if( g_shell != NULL )
1331+ // out += "(note: in-process VM still running, hit ctrl-c to exit)\n";
12481332
12491333 if( argv.size() > 0 )
12501334 out += "close: warning: ignoring excess arguments...\n";
@@ -1252,6 +1336,9 @@ t_CKINT Chuck_Shell::Command_Close::execute( vector< string > & argv, · 1 unmodified line
12521336 return 0;
12531337 }
12541338
1339+
1340+
1341+
12551342 //-----------------------------------------------------------------------------
12561343 // name: execute()
12571344 // desc: ...
@@ -1266,6 +1353,9 @@ t_CKINT Chuck_Shell::Command_Exit::execute( vector< string > & argv, · 8 unmodified lines
12661353 return 0;
12671354 }
12681355
1356+
1357+
1358+
12691359 //-----------------------------------------------------------------------------
12701360 // name: execute()
12711361 // desc: ...
@@ -1393,6 +1483,9 @@ t_CKINT Chuck_Shell::Command_Ls::execute( vector< string > & argv, · 121 unmodified lines
13931483 return 0;
13941484 }
13951485
1486+
1487+
1488+
13961489 //-----------------------------------------------------------------------------
13971490 // name: execute()
13981491 // desc: ...
@@ -1427,6 +1520,9 @@ t_CKINT Chuck_Shell::Command_Cd::execute( vector< string > & argv, · 28 unmodified lines
14271520 return 0;
14281521 }
14291522
1523+
1524+
1525+
14301526 //-----------------------------------------------------------------------------
14311527 // name: execute()
14321528 // desc: ...
@@ -1461,6 +1557,9 @@ t_CKINT Chuck_Shell::Command_Pwd::execute( vector< string > & argv, · 28 unmodified lines
14611557 return 0;
14621558 }
14631559
1560+
1561+
1562+
14641563 //-----------------------------------------------------------------------------
14651564 // name: execute()
14661565 // desc: ...
@@ -1507,6 +1606,9 @@ t_CKINT Chuck_Shell::Command_Alias::execute( vector< string > & argv, · 40 unmodified lines
15071606 return 0;
15081607 }
15091608
1609+
1610+
1611+
15101612 //-----------------------------------------------------------------------------
15111613 // name: execute()
15121614 // desc: ...
@@ -1528,6 +1630,9 @@ t_CKINT Chuck_Shell::Command_Unalias::execute( vector< string > & argv, · 15 unmodified lines
15281630 return 0;
15291631 }
15301632
1633+
1634+
1635+
15311636 //-----------------------------------------------------------------------------
15321637 // name: execute()
15331638 // desc: ...
@@ -1560,6 +1665,9 @@ t_CKINT Chuck_Shell::Command_Source::execute( vector< string > & argv, · 26 unmodified lines
15601665 return 0;
15611666 }
15621667
1668+
1669+
1670+
15631671 //-----------------------------------------------------------------------------
15641672 // name: execute()
15651673 // desc: ...
@@ -1571,6 +1679,9 @@ t_CKINT Chuck_Shell::Command_Help::execute( vector< string > & argv, · 5 unmodified lines
15711679 return 0;
15721680 }
15731681
1682+
1683+
1684+
15741685 //-----------------------------------------------------------------------------
15751686 // name: init()
15761687 // desc: ...
@@ -1619,6 +1730,9 @@ t_CKBOOL Chuck_Shell::Command_VM::init( Chuck_Shell * caller ) · 42 unmodified lines
16191730 return TRUE;
16201731 }
16211732
1733+
1734+
1735+
16221736 //-----------------------------------------------------------------------------
16231737 // name: ~Command_VM()
16241738 // desc: ...
@@ -1632,6 +1746,9 @@ Chuck_Shell::Command_VM::~Command_VM() · 7 unmodified lines
16321746 SAFE_DELETE( allocated_commands[i] );
16331747 }
16341748
1749+
1750+
1751+
16351752 //-----------------------------------------------------------------------------
16361753 // name: execute()
16371754 // desc: ...
@@ -1657,6 +1774,9 @@ t_CKINT Chuck_Shell::Command_VM::execute( vector< string > & argv, · 19 unmodified lines
16571774 return 0;
16581775 }
16591776
1777+
1778+
1779+
16601780 //-----------------------------------------------------------------------------
16611781 // name: usage()
16621782 // desc: ...
@@ -1666,6 +1786,9 @@ string Chuck_Shell::Command_VM::usage() · 3 unmodified lines
16661786 return "vm [command] [args] ...";
16671787 }
16681788
1789+
1790+
1791+
16691792 //-----------------------------------------------------------------------------
16701793 // name: execute()
16711794 // desc: ...
@@ -1741,6 +1864,9 @@ t_CKINT Chuck_Shell::Command_VMAttach::execute( vector < string > & argv, · 69 unmodified lines
17411864 return result;
17421865 }
17431866
1867+
1868+
1869+
17441870 //-----------------------------------------------------------------------------
17451871 // name: execute()
17461872 // desc: ...
@@ -1772,6 +1898,9 @@ t_CKINT Chuck_Shell::Command_VMAdd::execute( vector< string > & argv, · 25 unmodified lines
17721898 return 0;
17731899 }
17741900
1901+
1902+
1903+
17751904 //-----------------------------------------------------------------------------
17761905 // name: execute()
17771906 // desc: ...
@@ -1798,6 +1927,9 @@ t_CKINT Chuck_Shell::Command_VMRemove::execute( vector< string > & argv, · 20 unmodified lines
17981927 return 0;
17991928 }
18001929
1930+
1931+
1932+
18011933 //-----------------------------------------------------------------------------
18021934 // name: execute()
18031935 // desc: ...
@@ -1830,6 +1962,9 @@ t_CKINT Chuck_Shell::Command_VMSwap::execute( vector< string > & argv, · 26 unmodified lines
18301962 return 0;
18311963 }
18321964
1965+
1966+
1967+
18331968 //-----------------------------------------------------------------------------
18341969 // name: execute()
18351970 // desc: ...
@@ -1863,6 +1998,9 @@ t_CKINT Chuck_Shell::Command_VMList::execute( vector< string > & argv, · 27 unmodified lines
18631998 return 0;
18641999 }
18652000
2001+
2002+
2003+
18662004 //-----------------------------------------------------------------------------
18672005 // name: execute()
18682006 // desc: ...
@@ -1889,6 +2027,9 @@ t_CKINT Chuck_Shell::Command_VMAttachAdd::execute( vector< string > & argv, · 20 unmodified lines
18892027 return result;
18902028 }
18912029
2030+
2031+
2032+
18922033 //-----------------------------------------------------------------------------
18932034 // name: init()
18942035 // desc: ...
@@ -1938,6 +2079,9 @@ t_CKBOOL Chuck_Shell::Command_Code::init( Chuck_Shell * caller ) · 43 unmodified lines
19382079 return TRUE;
19392080 }
19402081
2082+
2083+
2084+
19412085 //-----------------------------------------------------------------------------
19422086 // name: ~Command_Code()
19432087 // desc: ...
@@ -1951,6 +2095,9 @@ Chuck_Shell::Command_Code::~Command_Code() · 7 unmodified lines
19512095 SAFE_DELETE( allocated_commands[i] );
19522096 }
19532097
2098+
2099+
2100+
19542101 //-----------------------------------------------------------------------------
19552102 // name: execute()
19562103 // desc: ...
@@ -1976,6 +2123,9 @@ t_CKINT Chuck_Shell::Command_Code::execute( vector< string > & argv, · 19 unmodified lines
19762123 return 0;
19772124 }
19782125
2126+
2127+
2128+
19792129 //-----------------------------------------------------------------------------
19802130 // name: usage()
19812131 // desc: ...
@@ -1985,6 +2135,9 @@ string Chuck_Shell::Command_Code::usage() · 3 unmodified lines
19852135 return "code [command] [args] ...";
19862136 }
19872137
2138+
2139+
2140+
19882141 //-----------------------------------------------------------------------------
19892142 // name: execute()
19902143 // desc: ...
@@ -2011,6 +2164,9 @@ t_CKINT Chuck_Shell::Command_CodeSave::execute( vector < string > & argv, · 20 unmodified lines
20112164 return 0;
20122165 }
20132166
2167+
2168+
2169+
20142170 //-----------------------------------------------------------------------------
20152171 // name: execute()
20162172 // desc: ...
@@ -2029,6 +2185,9 @@ t_CKINT Chuck_Shell::Command_CodeList::execute( vector < string > & argv, · 12 unmodified lines
20292185 return 0;
20302186 }
20312187
2188+
2189+
2190+
20322191 //-----------------------------------------------------------------------------
20332192 // name: execute()
20342193 // desc: ...
@@ -2063,6 +2222,9 @@ t_CKINT Chuck_Shell::Command_CodeAdd::execute( vector < string > & argv, · 28 unmodified lines
20632222 return 0;
20642223 }
20652224
2225+
2226+
2227+
20662228 //-----------------------------------------------------------------------------
20672229 // name: execute()
20682230 // desc: ...
@@ -2101,6 +2263,9 @@ t_CKINT Chuck_Shell::Command_CodePrint::execute( vector < string > & argv, · 32 unmodified lines
21012263 return 0;
21022264 }
21032265
2266+
2267+
2268+
21042269 //-----------------------------------------------------------------------------
21052270 // name: execute()
21062271 // desc: ...
@@ -2131,6 +2296,9 @@ t_CKINT Chuck_Shell::Command_CodeDelete::execute( vector < string > & argv, · 24 unmodified lines
21312296 return 0;
21322297 }
21332298
2299+
2300+
2301+
21342302 //-----------------------------------------------------------------------------
21352303 // name: execute()
21362304 // desc: ...
@@ -2188,7 +2356,10 @@ t_CKINT Chuck_Shell::Command_CodeWrite::execute( vector < string > & argv, · 51 unmodified lines
21882356 out += "warning: ignoring excess arguments...\n";
21892357
21902358 return 0;
2191−}
2359+}
2360+
2361+
2362+
21922363
21932364 //-----------------------------------------------------------------------------
21942365 // name: execute()
src/host/chuck_main.cpp+33−0
@@ -42,6 +42,7 @@ · 41 unmodified lines
4242 // function prototypes
4343 //-----------------------------------------------------------------------------
4444 t_CKBOOL init_shell( Chuck_Shell * shell, Chuck_Shell_UI * ui, Chuck_VM * vm );
45+void * shell_cb( void * p );
4546 bool go( int argc, const char ** argv );
4647 void global_cleanup();
4748 void all_stop();
@@ -340,6 +341,38 @@ t_CKBOOL init_shell( Chuck_Shell * shell, Chuck_Shell_UI * ui, Chuck_VM * vm ) · 292 unmodified lines
340341
341342
342343
344+//-----------------------------------------------------------------------------
345+// name: shell_cb
346+// desc: thread routine
347+//-----------------------------------------------------------------------------
348+void * shell_cb( void * p )
349+{
350+ Chuck_Shell * shell;
351+ // log
352+ EM_log( CK_LOG_INFO, "starting thread routine for shell..." );
353+
354+ // assuming this is absolutely necessary, an assert may be better
355+ assert( p != NULL );
356+
357+ shell = ( Chuck_Shell * ) p;
358+
359+ //atexit( wait_for_shell );
360+
361+ // run the shell
362+ shell->run();
363+
364+ // delete and set to NULL
365+ SAFE_DELETE( g_shell );
366+ // perhaps let shell destructor clean up mode and ui?
367+
368+ EM_log( CK_LOG_INFO, "exiting thread routine for shell..." );
369+
370+ return NULL;
371+}
372+
373+
374+
375+
343376 //-----------------------------------------------------------------------------
344377 // name: go()
345378 // desc: parse args, init stuff, run!

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t