Merge pull request #9 from omasanori/without-rl
Fix warnings when !PIC_ENABLE_READLINE.
This commit is contained in:
commit
259766f4d5
|
@ -35,12 +35,14 @@ void
|
||||||
repl(pic_state *pic)
|
repl(pic_state *pic)
|
||||||
{
|
{
|
||||||
char code[CODE_MAX_LENGTH] = "", line[LINE_MAX_LENGTH];
|
char code[CODE_MAX_LENGTH] = "", line[LINE_MAX_LENGTH];
|
||||||
char *read_line, *prompt;
|
char *prompt;
|
||||||
pic_value v, vs;
|
pic_value v, vs;
|
||||||
struct pic_proc *proc;
|
struct pic_proc *proc;
|
||||||
int ai, n, i;
|
int ai, n, i;
|
||||||
|
|
||||||
#if ! PIC_ENABLE_READLINE
|
#if PIC_ENABLE_READLINE
|
||||||
|
char *read_line;
|
||||||
|
#else
|
||||||
char last_char;
|
char last_char;
|
||||||
int char_index;
|
int char_index;
|
||||||
#endif
|
#endif
|
||||||
|
@ -65,7 +67,7 @@ repl(pic_state *pic)
|
||||||
free(read_line);
|
free(read_line);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
printf(prompt);
|
printf("%s", prompt);
|
||||||
|
|
||||||
char_index = 0;
|
char_index = 0;
|
||||||
while ((last_char = getchar()) != '\n') {
|
while ((last_char = getchar()) != '\n') {
|
||||||
|
|
Loading…
Reference in New Issue