@@ -181,14 +181,13 @@ friendly_repl_t repl;
181181void pyexec_friendly_repl_init (void ) {
182182 vstr_init (& repl .line , 32 );
183183 repl .cont_line = false;
184- readline_init (& repl .line );
185- mp_hal_stdout_tx_str (">>> " );
184+ readline_init (& repl .line , ">>> " );
186185}
187186
188- void pyexec_friendly_repl_reset () {
189- repl .cont_line = false;
187+ void pyexec_friendly_repl_reset (void ) {
190188 vstr_reset (& repl .line );
191- readline_init (& repl .line );
189+ repl .cont_line = false;
190+ readline_init (& repl .line , ">>> " );
192191}
193192
194193int pyexec_friendly_repl_process_char (int c ) {
@@ -229,8 +228,7 @@ int pyexec_friendly_repl_process_char(int c) {
229228
230229 vstr_add_byte (& repl .line , '\n' );
231230 repl .cont_line = true;
232- mp_hal_stdout_tx_str ("... " );
233- readline_note_newline ();
231+ readline_note_newline ("... " );
234232 return 0 ;
235233
236234 } else {
@@ -251,8 +249,7 @@ int pyexec_friendly_repl_process_char(int c) {
251249
252250 if (mp_repl_continue_with_input (vstr_null_terminated_str (& repl .line ))) {
253251 vstr_add_byte (& repl .line , '\n' );
254- mp_hal_stdout_tx_str ("... " );
255- readline_note_newline ();
252+ readline_note_newline ("... " );
256253 return 0 ;
257254 }
258255
@@ -270,7 +267,6 @@ exec: ;
270267friendly_repl_reset : // TODO
271268input_restart :
272269 pyexec_friendly_repl_reset ();
273- mp_hal_stdout_tx_str (">>> " );
274270 return 0 ;
275271 }
276272}
0 commit comments