From eb834bce7f62b4aa60688b32213b16190f37696f Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Mon, 2 Dec 2013 09:57:16 -0800 Subject: [PATCH] Adds readline --- cocos/CCConsole.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/cocos/CCConsole.cpp b/cocos/CCConsole.cpp index 5442b8ea6f..63e2d17b6f 100644 --- a/cocos/CCConsole.cpp +++ b/cocos/CCConsole.cpp @@ -52,6 +52,31 @@ void Console::cancel() } +ssize_t net_readline( int fd, void *vptr, size_t maxlen ) +{ + ssize_t n, rc; + char c, *ptr; + + ptr = (char*)vptr ; + + for( n=1; n