// Chars_Main LOCAL PROCEDURES // void Chars_Main() { // VARIABLES System_INTEGER Chars_Main_i; // 0 System_CHAR Chars_Main_ch; // 1 Chars_Main__T_1 Chars_Main_str; // 2 Chars_Main__T_3 Chars_Main__V_5; // 3 // TMP System_BOOLEAN Chars_Main__V_10; // 4 // TMP System_CHAR Chars_Main__V_11; // 5 // TMP System_BOOLEAN Chars_Main__V_14; // 6 // TMP Chars_Main__T_26 Chars_Main__V_16; // 7 // TMP Chars_Main__T_27 Chars_Main__V_17; // 8 // TMP System_INTEGER Chars_Main__V_19; // 9 // TMP Chars_Main__T_28 Chars_Main__V_20; // 10 // TMP Chars_Main__T_23 Chars_Main__V_25; // 11 // TMP // VAR INIT Chars_Main__T_1* _tmp_31; Chars_Main__T_3* _tmp_33; Chars_Main__T_23* _tmp_42; _tmp_31 = &(Chars_Main_str); _tmp_31->lenght = 256; _tmp_33 = &(Chars_Main__V_5); _tmp_33->lenght = 15; _tmp_42 = &(Chars_Main__V_25); _tmp_42->lenght = 9; // OPERATORS __Assign_STR((System_String*)&Chars_Main__V_5, (char*)Chars_Main__C_2); Out_Str((System_String*)&Chars_Main__V_5); __Assign_INT(Chars_Main_i, 0); Chars_Main__L_7: ; __Less_INT(Chars_Main__V_10, Chars_Main_i, 255); if(Chars_Main__V_10 == false) goto Chars_Main__L_8; Chars_Main__V_11 = In_Char(); __Assign_CHAR(Chars_Main_ch, Chars_Main__V_11); __Eq_CHAR(Chars_Main__V_14, Chars_Main_ch, '\r'); if(Chars_Main__V_14 == false) goto Chars_Main__L_15; goto Chars_Main__L_8; goto Chars_Main__L_12; Chars_Main__L_15: ; Chars_Main__L_12: ; Chars_Main__V_16 = &(Chars_Main_str.data[Chars_Main_i]); __Assign_CHAR((*Chars_Main__V_16), Chars_Main_ch); Chars_Main__V_17 = &(Chars_Main_str.data[Chars_Main_i]); Out_Char((*Chars_Main__V_17)); __Add_INT(Chars_Main__V_19, Chars_Main_i, 1); __Assign_INT(Chars_Main_i, Chars_Main__V_19); goto Chars_Main__L_7; Chars_Main__L_8: ; Chars_Main__V_20 = &(Chars_Main_str.data[Chars_Main_i]); __Assign_CHAR((*Chars_Main__V_20), '\0'); Out_Ln(); __Assign_STR((System_String*)&Chars_Main__V_25, (char*)Chars_Main__C_22); Out_Str((System_String*)&Chars_Main__V_25); Out_Str((System_String*)&Chars_Main_str); Out_Ln(); }
*/ void Display_Backtrace(REBCNT lines) /* ***********************************************************************/ { REBCNT tail; REBCNT i; if (Trace_Limit > 0) { tail = Trace_Buffer->tail; i = tail - 1; for (lines++ ;lines > 0; lines--, i--) { i = Find_Str_Char(Trace_Buffer, 0, i, tail, -1, LF, 0); if (i == NOT_FOUND || i == 0) { i = 0; break; } } if (lines == 0) i += 2; // start of next line Prin_OS_String(BIN_SKIP(Trace_Buffer, i), tail-i, 0); //RESET_SERIES(Trace_Buffer); } else { Out_Str(cb_cast("backtrace not enabled"), 1); } }
*/ RL_API void RL_Print_TOS(REBOOL mold, const REBYTE *marker) /* ** Print top REBOL stack value to the console. ** ** Returns: ** Nothing ** Arguments: ** mold - should value be MOLDed instead of FORMed. ** marker - placed at beginning of line to indicate output. ** Notes: ** This function is used for the main console evaluation ** input loop to print the results of evaluation from stack. ** The REBOL data stack is an abstract structure that can ** change between releases. This function allows the host ** to print the result of processed functions. ** Marker is usually "==" to show output. ** The system/options/result-types determine which values ** are automatically printed. ** ***********************************************************************/ { if (DSP != 0) Debug_Fmt(Str_Stack_Misaligned, DSP); // We shouldn't get any THROWN() values exposed to the client assert(!THROWN(DS_TOP)); if (!IS_UNSET(DS_TOP)) { if (marker) Out_Str(marker, 0); Out_Value(DS_TOP, 500, mold, 1); // limit print length } }
// StandartProcs_Test2 LOCAL PROCEDURES // void StandartProcs_Test2() { // VARIABLES StandartProcs_Test2__T_0 StandartProcs_Test2_i; // 0 StandartProcs_Test2__T_2 StandartProcs_Test2_r; // 1 StandartProcs_Test2__T_4 StandartProcs_Test2__V_6; // 2 // TMP StandartProcs_Test2__T_21 StandartProcs_Test2__V_7; // 3 // TMP StandartProcs_Test2__T_22 StandartProcs_Test2__V_9; // 4 // TMP StandartProcs_Test2__T_12 StandartProcs_Test2__V_14; // 5 // TMP StandartProcs_Test2__T_23 StandartProcs_Test2__V_15; // 6 // TMP StandartProcs_Test2__T_17 StandartProcs_Test2__V_19; // 7 // TMP StandartProcs_Test2__T_24 StandartProcs_Test2__V_20; // 8 // TMP // VAR INIT StandartProcs_Test2__T_4* _tmp_27; StandartProcs_Test2__T_12* _tmp_31; StandartProcs_Test2__T_17* _tmp_34; _tmp_27 = &(StandartProcs_Test2__V_6); _tmp_27->lenght = 8; _tmp_31 = &(StandartProcs_Test2__V_14); _tmp_31->lenght = 7; _tmp_34 = &(StandartProcs_Test2__V_19); _tmp_34->lenght = 7; // OPERATORS __Assign_STR((System_String*)&StandartProcs_Test2__V_6, (char*)StandartProcs_Test2__C_3); Out_Str((System_String*)&StandartProcs_Test2__V_6); Out_Ln(); StandartProcs_Test2_r = (StandartProcs_Test2__T_2)calloc(1, sizeof(StandartProcs_Test2__T_2)); StandartProcs_Test2__V_7 = &(StandartProcs_Test2_r->StandartProcs_Test2__T_1_a); __Assign_INT((*StandartProcs_Test2__V_7), 100); StandartProcs_Test2__V_9 = &(StandartProcs_Test2_r->StandartProcs_Test2__T_1_b); __Assign_REAL((*StandartProcs_Test2__V_9), 200); __Assign_STR((System_String*)&StandartProcs_Test2__V_14, (char*)StandartProcs_Test2__C_11); Out_Str((System_String*)&StandartProcs_Test2__V_14); StandartProcs_Test2__V_15 = &(StandartProcs_Test2_r->StandartProcs_Test2__T_1_a); Out_Int((*StandartProcs_Test2__V_15)); Out_Ln(); __Assign_STR((System_String*)&StandartProcs_Test2__V_19, (char*)StandartProcs_Test2__C_16); Out_Str((System_String*)&StandartProcs_Test2__V_19); StandartProcs_Test2__V_20 = &(StandartProcs_Test2_r->StandartProcs_Test2__T_1_b); Out_Real((*StandartProcs_Test2__V_20)); Out_Ln(); free(StandartProcs_Test2_r); }
*/ RL_API void RL_Print_TOS(REBCNT flags, REBYTE *marker) /* ** Print top REBOL stack value to the console. (pending changes) ** ** Returns: ** Nothing ** Arguments: ** flags - special flags (set to zero at this time). ** marker - placed at beginning of line to indicate output. ** Notes: ** This function is used for the main console evaluation ** input loop to print the results of evaluation from stack. ** The REBOL data stack is an abstract structure that can ** change between releases. This function allows the host ** to print the result of processed functions. ** Note that what is printed is actually TOS+1. ** Marker is usually "==" to show output. ** The system/options/result-types determine which values ** are automatically printed. ** ***********************************************************************/ { REBINT dsp = DSP; REBVAL *top = DS_VALUE(dsp+1); REBOL_STATE state; REBVAL *types; if (dsp != 0) Debug_Fmt(Str_Stack_Misaligned, dsp); PUSH_STATE(state, Saved_State); if (SET_JUMP(state)) { POP_STATE(state, Saved_State); Catch_Error(DS_NEXT); // Stores error value here Out_Value(DS_NEXT, 0, FALSE, 0); // error DSP = 0; return; } SET_STATE(state, Saved_State); if (!IS_UNSET(top)) { if (!IS_ERROR(top)) { types = Get_System(SYS_OPTIONS, OPTIONS_RESULT_TYPES); if (IS_TYPESET(types) && TYPE_CHECK(types, VAL_TYPE(top))) { if (marker) Out_Str(marker, 0); Out_Value(top, 500, TRUE, 1); // limit, molded } // else { // Out_Str(Get_Type_Name(top), 1); // } } else { if (VAL_ERR_NUM(top) != RE_HALT) { Out_Value(top, 640, FALSE, 0); // error FORMed // if (VAL_ERR_NUM(top) > RE_THROW_MAX) { // Out_Str("** Note: use WHY? for more about this error", 1); // } } } } POP_STATE(state, Saved_State); DSP = 0; }