void CfrTil_Key ( ) { #if 0 ReadLine_Key ( _Context_->ReadLiner0 ) ; _DataStack_Push ( _Context_->ReadLiner0->InputKeyedCharacter ) ; #else _DataStack_Push ( Key ( ) ) ; #endif }
void CfrTil_dlsym ( ) { char * sym = ( char* ) _DataStack_Pop ( ) ; char * lib = ( char* ) _DataStack_Pop ( ) ; _DataStack_Push ( ( int ) _dlsym ( lib, sym ) ) ; }
void File_Tell ( ) { FILE * file = ( FILE * ) _DataStack_Pop ( ) ; int32 result = ftell ( file ) ; _DataStack_Push ( result ) ; }
void CfrTil_Filename ( ) { byte * filename = _Context_->ReadLiner0->bp_Filename ; if ( ! filename ) filename = ( byte* ) "command line" ; _DataStack_Push ( ( int32 ) filename ) ; }
void CfrTil_Parse ( ) { Lexer * lexer = _Context_->Lexer0 ; byte * token = ( byte* ) _DataStack_Pop ( ) ; Lexer_ParseObject ( lexer, token ) ; _DataStack_Push ( lexer->Literal ) ; }
void File_Open ( ) { byte * filename = ( byte* ) _DataStack_Pop ( ) ; FILE * file = fopen ( ( char* ) filename, "r" ) ; if ( file == NULL ) { perror ( "\nFile_Open error : " ) ; CfrTil_Quit ( ) ; } else _DataStack_Push ( ( int32 ) file ) ; }
void File_Read ( ) { int32 size = _DataStack_Pop ( ) ; byte * ptr = ( byte * ) _DataStack_Pop ( ) ; FILE * file = ( FILE * ) _DataStack_Pop ( ) ; int32 result = fread ( ptr, size, 1, file ) ; _DataStack_Push ( result ) ; if ( result != size ) { if ( ! feof ( file ) ) { if ( ferror ( file ) ) { perror ( "\nFile_Read error : " ) ; CfrTil_Quit ( ) ; } } } }
void _CfrTil_EndBlock1 ( BlockInfo * bi ) { Compiler * compiler = _Context_->Compiler0 ; if ( _Stack_IsEmpty ( compiler->BlockStack ) ) { _CfrTil_InstallGotoCallPoints_Keyed ( bi, GI_RETURN ) ; if ( compiler->NumberOfRegisterVariables && ( compiler->NumberOfStackVariables == 1 ) && Compiler_GetState ( compiler, ( RETURN_TOS | RETURN_EAX ) ) ) { bi->bp_First = bi->Start ; if ( Compiler_GetState ( compiler, RETURN_EAX ) ) { Compile_Move_EAX_To_TOS ( DSP ) ; } } else if ( _Compiler_IsFrameNecessary ( compiler ) && ( ! GetState ( compiler, DONT_REMOVE_STACK_VARIABLES ) ) ) { if ( Compiler_GetState ( compiler, SAVE_ESP ) ) // SAVE_ESP is set by 'return' { _ESP_Setup ( ) ; bi->bp_First = bi->FrameStart ; } else bi->bp_First = bi->AfterEspSave ; // 3 : after ESP_Save code in frame setup code _Compiler_RemoveLocalFrame ( compiler ) ; } else { bi->bp_First = bi->Start ; } } _Compile_Return ( ) ; _DataStack_Push ( ( int32 ) bi->bp_First ) ; bi->bp_Last = Here ; _SetOffsetForCallOrJump ( bi->JumpOffset, Here, 0 ) ; }
void CfrTil_Kbhit ( void ) { _DataStack_Push ( ( int32 ) kbhit ( ) ) ; }
void File_Exists () { byte * name = ( byte* ) _DataStack_Pop ( ) ; _DataStack_Push ( _File_Exists ( name ) ) ; }
void File_Size ( ) { FILE * file = ( FILE * ) _DataStack_Pop ( ) ; _DataStack_Push ( _File_Size ( file ) ) ; }
void CfrTil_Interpreter_IsDone ( ) { _DataStack_Push ( GetState ( _Context_->Interpreter0, END_OF_FILE | END_OF_STRING | INTERPRETER_DONE ) ) ; }
void CfrTil_LineCharacterNumber ( ) { _DataStack_Push ( ( int32 ) _Context_->ReadLiner0->InputLineCharacterNumber ) ; }
void CfrTil_Interpret_ReadToList ( ) { dllist * interpList = _CfrTil_Interpret_ReadToList ( ) ; _DataStack_Push ( ( int32 ) interpList ) ; }
void CfrTil_Token ( ) { _DataStack_Push ( ( int32 ) Lexer_ReadToken ( _Context_->Lexer0 ) ) ; }
void CfrTil_AllocateNew ( ) { _DataStack_Push ( ( int32 ) _CfrTil_AllocateNew ( _DataStack_Pop ( ), OBJECT_MEMORY ) ) ; }
void CfrTil_DataStack_Size ( ) { _DataStack_Push ( DataStack_Depth ( ) ) ; }
void CfrTil_Debugger_Verbosity ( ) { _DataStack_Push ( ( int32 ) & _Debugger_->Verbosity ) ; }
void CfrTil_Postfix_Find ( ) { Word * word = Finder_Word_FindUsing ( _Context_->Finder0, ( byte* ) _DataStack_Pop ( ) ) ; _DataStack_Push ( ( int32 ) word ) ; }
void CfrTil_Find ( ) { _DataStack_Push ( ( int32 ) Finder_FindToken ( _Context_->Finder0, _Context_->Lexer0->OriginalToken ) ) ; }
void CfrTil_LineNumber ( ) { _DataStack_Push ( ( int32 ) _Context_->ReadLiner0->i32_LineNumber ) ; }
void CfrTil_TokenToWord () { byte * token = (byte*) _DataStack_Pop ( ) ; _DataStack_Push ( (int32) _Interpreter_TokenToWord ( _Context_->Interpreter0, token ) ) ; }