Skip to content
Snippets Groups Projects
Commit 659f3832 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

ingest testdata from Zach; deal with empty 'doc' line

parent a4e336f3
No related branches found
No related tags found
No related merge requests found
......@@ -513,8 +513,9 @@ void NFileIn::Load_96(FILE* F_in, string fshort)
if (!triv::freadln(F_in, &lin) || lin.length() < 24 || lin.substr(0, 3) != string("tit"))
throw "tag 'tit' not found in block 2";
fout->lDoc.push_back(triv::strip(lin.substr(24)));
while (triv::freadln(F_in, &lin) && lin.length() >= 24 && lin.substr(0, 3) == string("doc"))
fout->lDoc.push_back(triv::strip(lin.substr(24)));
while (triv::freadln(F_in, &lin) && lin.length() >= 3 && lin.substr(0, 3) == string("doc"))
if (lin.length() >= 24)
fout->lDoc.push_back(triv::strip(lin.substr(24)));
if (lin.substr(0, 3) != string("dir"))
throw "tag 'dir' not found in block 2, line '" + lin + "'";
while (triv::freadln(F_in, &lin)
......
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment