History

moved g_shell out of chuck_shell.cpp

Ge Wang committed 9 years ago

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

Showing the changes to src/host/chuck_main.cpp (1 of 2 files). Show all

Unified · Split

src/host/chuck_main.cpp+33−0
@@ -42,6 +42,7 @@ · 41 unmodified lines
42// function prototypes42// function prototypes
43//-----------------------------------------------------------------------------43//-----------------------------------------------------------------------------
44t_CKBOOL init_shell( Chuck_Shell * shell, Chuck_Shell_UI * ui, Chuck_VM * vm );44t_CKBOOL init_shell( Chuck_Shell * shell, Chuck_Shell_UI * ui, Chuck_VM * vm );
45void * shell_cb( void * p );
45bool go( int argc, const char ** argv );46bool go( int argc, const char ** argv );
46void global_cleanup();47void global_cleanup();
47void all_stop();48void all_stop();
@@ -340,6 +341,38 @@ t_CKBOOL init_shell( Chuck_Shell * shell, Chuck_Shell_UI * ui, Chuck_VM * vm ) · 292 unmodified lines
340 341
341 342
342 343
344//-----------------------------------------------------------------------------
345// name: shell_cb
346// desc: thread routine
347//-----------------------------------------------------------------------------
348void * 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
343//-----------------------------------------------------------------------------376//-----------------------------------------------------------------------------
344// name: go()377// name: go()
345// desc: parse args, init stuff, run!378// 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