- files.registerFile(fname, embed);
- };
- // the last line must be </manifest>
- if (tmp != "</manifest>") {
- lyxerr << "Invalid manifest file, lacking </manifest>" << endl;
- return is;
+ ++line;
+ if (token == "\\begin_manifest") {
+ begin_manifest_line = line;
+ continue;
+ }
+
+ LYXERR(Debug::PARSER) << "Handling document manifest token: `"
+ << token << '\'' << endl;
+
+ if (token == "\\filename")
+ lex >> filename;
+ else if (token == "\\inzipName")
+ lex >> inzipName;
+ else if (token == "\\status") {
+ lex >> status;
+ registerFile(filename, status, NULL, inzipName);
+ filename = "";
+ inzipName = "";
+ } else {
+ docstring const s = _("\\begin_file is missing");
+ errorList.push_back(ErrorItem(_("Manifest error"),
+ s, -1, 0, 0));
+ }
+ }
+ if (begin_manifest_line) {
+ docstring const s = _("\\begin_manifest is missing");
+ errorList.push_back(ErrorItem(_("Manifest error"),
+ s, -1, 0, 0));