Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
903b24f0
Commit
903b24f0
authored
Jan 01, 2014
by
Paul Sokolovsky
Browse files
Add readline history support.
parent
83c437cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
unix/main.c
View file @
903b24f0
...
...
@@ -16,6 +16,7 @@
#include
"repl.h"
#include
<readline/readline.h>
#include
<readline/history.h>
static
char
*
str_join
(
const
char
*
s1
,
int
sep_char
,
const
char
*
s2
)
{
int
l1
=
strlen
(
s1
);
...
...
@@ -38,6 +39,7 @@ static void do_repl(void) {
// EOF
return
;
}
add_history
(
line
);
if
(
mp_repl_is_compound_stmt
(
line
))
{
for
(;;)
{
char
*
line2
=
readline
(
"... "
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment