diff options
author | Pixel <pixel@nobis-crew.org> | 2008-10-08 11:07:50 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2008-10-08 11:07:50 -0700 |
commit | 1dfd804a05fca48a8c86e883ed175c3802d614d9 (patch) | |
tree | 627e1103fcea0e513caa7da5306e1be42e1d1d00 /lib | |
parent | 9062b574424503e9dd2c1773564f27826b7f41a4 (diff) |
Be nicer with windows telnet by changing the LuaPrinter behavior: now puts has to add the CR/LF itself.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/BLua.cc | 2 | ||||
-rw-r--r-- | lib/LuaCommandLine.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/BLua.cc b/lib/BLua.cc index 6731a6e..270e952 100644 --- a/lib/BLua.cc +++ b/lib/BLua.cc @@ -31,6 +31,7 @@ void LuaPrinter::puts(const char * msg) { fputs(msg, stdout); + fputs("\n", stdout); } LuaPrinter default_lua_printer; @@ -340,7 +341,6 @@ int LuaStatics::print(lua_State * _L) { L->puts(s); L->pop(); /* pop result */ } - L->puts("\n"); return 0; } diff --git a/lib/LuaCommandLine.cc b/lib/LuaCommandLine.cc index 0803e27..68f8763 100644 --- a/lib/LuaCommandLine.cc +++ b/lib/LuaCommandLine.cc @@ -38,7 +38,7 @@ class CommandLineSpawn : public Task { CommandLineSpawn(Lua * _L, const Socket & _s) : L(_L), s(_s) { SetBurst(); p = new LuaCommandLinePrinter(this); - b << "Lua Command Line - Ready to serve.\n"; + b << "Lua Command Line - Ready to serve.\r\n"; nL = L->thread(1); L->pop(); nL->SetPrinter(p); @@ -47,7 +47,7 @@ class CommandLineSpawn : public Task { delete p; } void puts(const char * msg) { - b << msg; + b << msg << "\r\n"; } virtual String GetName() { return "Command Line Spawn"; |