Skip to content

Commit 5e83a75

Browse files
committed
unix: Remove remaining, obsolete traces of GNU readline support.
1 parent 3d91c12 commit 5e83a75

2 files changed

Lines changed: 1 addition & 15 deletions

File tree

unix/input.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
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

4440
char *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
}

unix/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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(">>> ");

0 commit comments

Comments
 (0)