Fixed eval scope, comma expression.

git-svn-id: svn://10.0.0.236/trunk@137443 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rogerl%netscape.com
2003-02-05 23:58:52 +00:00
parent c5a6b17522
commit 87d54fa2f3
3 changed files with 55 additions and 31 deletions

View File

@@ -188,6 +188,12 @@ size_t JS::LineReader::readLine(string &str)
crWasLast = false;
str.resize(0);
#ifdef XP_UNIX
char line[256];
if (fgets(line, sizeof line, file) == NULL)
return 0;
str = line;
#else
while ((ch = getc(in)) != EOF) {
if (ch == '\n') {
if (!str.size() && oldCRWasLast)
@@ -202,7 +208,7 @@ size_t JS::LineReader::readLine(string &str)
}
str += static_cast<char>(ch);
}
#endif
return str.size();
}