From: <bi...@us...> - 2008-09-06 23:14:18
|
Revision: 3205 http://oorexx.svn.sourceforge.net/oorexx/?rev=3205&view=rev Author: bigrixx Date: 2008-09-06 23:14:29 +0000 (Sat, 06 Sep 2008) Log Message: ----------- fix lines() errors with stdin Modified Paths: -------------- main/trunk/common/platform/unix/SysFile.cpp Modified: main/trunk/common/platform/unix/SysFile.cpp =================================================================== --- main/trunk/common/platform/unix/SysFile.cpp 2008-09-06 22:31:01 UTC (rev 3204) +++ main/trunk/common/platform/unix/SysFile.cpp 2008-09-06 23:14:29 UTC (rev 3205) @@ -1121,7 +1121,8 @@ tv.tv_sec = 0; tv.tv_usec = 0; - return (select(fileno(stdin) + 1, &rset, NULL, NULL, &tv) == -1) ? false : true; + int result = select(fileno(stdin), &rset, NULL, NULL, &tv); + return (result > 0) ? true : false; } return fileeof; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |