From 07372646121629fdfdde578880a13aca834e1ba8 Mon Sep 17 00:00:00 2001 From: superturbocat2001 Date: Fri, 5 Feb 2021 08:44:05 +0000 Subject: [PATCH] Fix load_console tinypy git-svn-id: svn://kolibrios.org@8577 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/tinypy/tinypy/tinypy.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/programs/develop/tinypy/tinypy/tinypy.c b/programs/develop/tinypy/tinypy/tinypy.c index 89349d6b11..2237337dc8 100644 --- a/programs/develop/tinypy/tinypy/tinypy.c +++ b/programs/develop/tinypy/tinypy/tinypy.c @@ -105,6 +105,7 @@ Agreement. #include #include "bc.c" +#include "../std_modules/ksys/start_app.c" #ifdef __GNUC__ #define tp_inline __inline__ @@ -1285,7 +1286,9 @@ tp_obj tp_replace(TP) { #ifdef CONIO #include "conio.c" tp_obj tp_print(TP) { - console_init(); + if(!con_enabled){ + console_init(); + } int n = 0; tp_obj e; TP_LOOP(e) @@ -1395,8 +1398,10 @@ tp_obj tp_range(TP) { * enables this, you better remove it before deploying your app :P */ tp_obj tp_system(TP) { - char s[TP_CSTR_LEN]; tp_cstr(tp,TP_STR(),s,TP_CSTR_LEN); - int r = system(s); + const char * s = TP_TYPE(TP_STRING).string.val; + char *command=strtok((char*)s," "); + char *argm=strtok(NULL, " "); + int r =start_app(command, argm); return tp_number(r); }