Commit 740c06b4 authored by Johny Mattsson's avatar Johny Mattsson
Browse files

Fix unwanted newlines in Lua output.

The old NodeMCU puts() did not do the standard newline, while the RTOS C
library one certainly does.
parent 61291bd8
...@@ -533,7 +533,7 @@ static void dojob(lua_Load *load){ ...@@ -533,7 +533,7 @@ static void dojob(lua_Load *load){
load->done = 0; load->done = 0;
load->line_position = 0; load->line_position = 0;
memset(load->line, 0, load->len); memset(load->line, 0, load->len);
puts(load->prmt); printf(load->prmt);
} }
#ifndef uart_putc #ifndef uart_putc
...@@ -599,7 +599,7 @@ static bool readline(lua_Load *load){ ...@@ -599,7 +599,7 @@ static bool readline(lua_Load *load){
if (load->line_position == 0) if (load->line_position == 0)
{ {
/* Get a empty line, then go to get a new line */ /* Get a empty line, then go to get a new line */
puts(load->prmt); printf(load->prmt);
} else { } else {
load->done = 1; load->done = 1;
need_dojob = true; need_dojob = true;
......
...@@ -332,8 +332,8 @@ extern int readline4lua(const char *prompt, char *buffer, int length); ...@@ -332,8 +332,8 @@ extern int readline4lua(const char *prompt, char *buffer, int length);
** avoids including 'stdio.h' everywhere.) ** avoids including 'stdio.h' everywhere.)
*/ */
#if !defined(LUA_USE_STDIO) #if !defined(LUA_USE_STDIO)
#define luai_writestring(s, l) puts(s) #define luai_writestring(s, l) printf(s)
#define luai_writeline() puts("\n") #define luai_writeline() puts("")
#endif // defined(LUA_USE_STDIO) #endif // defined(LUA_USE_STDIO)
/* /*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment