File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535
3636#if MICROPY_USE_READLINE == 1
3737#include "lib/mp-readline/readline.h"
38- #elif MICROPY_USE_READLINE == 2
39- #include <readline/readline.h>
40- #include <readline/history.h>
41- #include <readline/tilde.h>
4238#endif
4339
4440char * prompt (char * p ) {
@@ -66,12 +62,6 @@ char *prompt(char *p) {
6662 char * line = malloc (vstr .len + 1 );
6763 memcpy (line , vstr .buf , vstr .len + 1 );
6864 vstr_clear (& vstr );
69- #elif MICROPY_USE_READLINE == 2
70- // GNU readline
71- char * line = readline (p );
72- if (line ) {
73- add_history (line );
74- }
7565#else
7666 // simple read string
7767 static char buf [256 ];
@@ -124,8 +114,6 @@ void prompt_read_history(void) {
124114 }
125115 vstr_clear (& vstr );
126116 }
127- #elif MICROPY_USE_READLINE == 2
128- read_history (tilde_expand ("~/.micropython.history" ));
129117 #endif
130118#endif
131119}
@@ -152,8 +140,6 @@ void prompt_write_history(void) {
152140 close (fd );
153141 }
154142 }
155- #elif MICROPY_USE_READLINE == 2
156- write_history (tilde_expand ("~/.micropython.history" ));
157143 #endif
158144#endif
159145}
Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ STATIC int do_repl(void) {
249249
250250 #else
251251
252- // use GNU or simple readline
252+ // use simple readline
253253
254254 for (;;) {
255255 char * line = prompt (">>> " );
You can’t perform that action at this time.
0 commit comments