+2001-03-14 Juergen Vigna <jug@sad.it>
+
+ * tabular.C (l_getline): pay attention on \r\n (from Windows-files)
+
2001-03-14 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
* buffer.C: add hack to fix compability reading of minipages.
void l_getline(istream & is, string & str)
{
getline(is, str);
- while(str.empty())
+ while(str.empty() || ((str.length()==1) && (str[0] == '\r')))
getline(is, str);
}
cell_info[i][j].inset.Read(buf, lex);
l_getline(is, line);
}
- if (line != "</cell>") {
+ if (!prefixIs(line, "</cell>")) {
lyxerr << "Wrong tabular format (expected </cell> got" <<
line << ")" << endl;
return;
}
}
l_getline(is, line);
- if (line != "</row>") {
+ if (!prefixIs(line, "</row>")) {
lyxerr << "Wrong tabular format (expected </row> got" <<
line << ")" << endl;
return;
}
}
- while (line != "</lyxtabular>") {
+ while (!prefixIs(line, "</lyxtabular>")) {
l_getline(is, line);
}
set_row_column_number_info();