+void LaTeX::scanBlgFile(DepTable & dep)
+{
+ FileName const blg_file(changeExtension(file.absFileName(), "blg"));
+ LYXERR(Debug::LATEX, "Scanning blg file: " << blg_file);
+
+ ifstream ifs(blg_file.toFilesystemEncoding().c_str());
+ string token;
+ static regex const reg1(".*Found bibtex data file '([^']+).*");
+
+ while (getline(ifs, token)) {
+ token = rtrim(token, "\r");
+ smatch sub;
+ // FIXME UNICODE: We assume that citation keys and filenames
+ // in the aux file are in the file system encoding.
+ token = to_utf8(from_filesystem8bit(token));
+ if (regex_match(token, sub, reg1)) {
+ string data = sub.str(1);
+ if (!data.empty()) {
+ LYXERR(Debug::LATEX, "Found bib file: " << data);
+ handleFoundFile(data, dep);
+ }
+ }
+ }
+}
+
+