| 478 | |
| 479 | |
| 480 | static char *lua_readline (char *buff, const char *prompt) { |
| 481 | if (l_readline != NULL) /* is there a 'readline'? */ |
| 482 | return (*l_readline)(prompt); /* use it */ |
| 483 | else { /* emulate 'readline' over 'buff' */ |
| 484 | fputs(prompt, stdout); |
| 485 | fflush(stdout); /* show prompt */ |
| 486 | return fgets(buff, LUA_MAXINPUT, stdin); /* read line */ |
| 487 | } |
| 488 | } |
| 489 | |
| 490 | |
| 491 | static void lua_saveline (const char *line) { |