Changeset 27
- Timestamp:
- 02/07/06 16:12:19 (3 years ago)
- Location:
- trunk/orca
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/orca/console.c
r1 r27 79 79 if( ! orErrorIsType(OR_ERROR_QUIT) ) 80 80 { 81 orPrintNative( orErrorThrown ); 82 ret = -1; 81 if( ! orErrorIsType(OR_ERROR_HALT) ) 82 orPrintNative( orErrorThrown ); 83 orResetEnv( &env ); 84 goto halt; 85 //ret = -1; 83 86 } 84 87 } … … 87 90 { 88 91 printf( "ORCA-Core %s (%s)\n", VERSION_STR, __DATE__ ); 89 92 halt: 90 93 while( 1 ) 91 94 { … … 119 122 if( ! orErrorIsType(OR_ERROR_HALT) ) 120 123 orPrintNative( orErrorThrown ); 121 or ErrorClear;124 orResetEnv( &env ); 122 125 } 123 126 else -
trunk/orca/ovalue.c
r26 r27 523 523 memReport( 1 ); 524 524 #endif 525 } 526 527 528 /** 529 Recover from an error. It does not modify any existing values; nothing 530 is freed and no files are closed. 531 This should only be used from outside a top-level eval call. 532 */ 533 void orResetEnv( OEnv* env ) 534 { 535 env->callStack.used = 0; 536 env->dataStack.used = 0; 537 env->quickHoldsTop = env->quickHolds; 538 env->error = 0; //orErrorClear; 525 539 } 526 540 -
trunk/orca/ovalue.h
r26 r27 384 384 void orInitEnv( OEnv*, int dataStackSize, int callStackSize ); 385 385 void orFreeEnv( OEnv* ); 386 void orResetEnv( OEnv* ); 386 387 void orAtomStr( OAtom, OString* ); 387 388 OAtom orInternAtom( const char* str, int len ); -
trunk/orca/qt/main.cpp
r1 r27 60 60 OPEN_CONSOLE 61 61 62 if( orErrorIsType(OR_ERROR_HALT) )62 if( ! orErrorIsType(OR_ERROR_HALT) ) 63 63 { 64 orErrorClear; 65 // Reset stack. 66 orEnv->dataStack.used = 0; 67 orEnv->callStack.used = 0; 64 orResetEnv( &env ); 68 65 goto halt; 69 66 } … … 111 108 if( ! orErrorIsType(OR_ERROR_HALT) ) 112 109 orPrintNative( orErrorThrown ); 113 or ErrorClear;110 orResetEnv( &env ); 114 111 } 115 112 else
