This cannot use i::ReadLine, because users of readline() do not necessarily
want linebreak-escapes as in JS syntax.  Also, this patch causes it to
return null instead of the final line.  See the test below.
C:\v8>type foo1.txt
First Line\
Non-Empty-Line

After Empty-Line
Final Line
C:\v8>type foo1.txt|d8 -e "var l, x=0;while((l=readline())!==null)
print(x++,l)"
0 First Line
Non-Empty-Line
1
2 After Empty-Line

C:\v8>

-Matthew

On Mon, Sep 7, 2009 at 7:39 AM, <[email protected]> wrote:

> Landed in http://code.google.com/p/v8/source/detail?r=2838.
>
>
> http://codereview.chromium.org/173262
>

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to