+ std::vector<string> dbase = getVectorFromString(str_in,"\n");
+ std::sort(dbase.begin(), dbase.end()); // sort entries
+ std::vector<string>::iterator p =
+ std::unique(dbase.begin(), dbase.end()); // compact
+ dbase.erase(p, dbase.end()); // shrink
+ return getStringFromVector(dbase,"\n");
+}
+
+} //namespace anon
+
+
+string const
+ControlTexinfo::getContents(texFileSuffix type, bool withFullPath) const
+{
+ static string const bstFilename("bstFiles.lst");
+ static string const clsFilename("clsFiles.lst");
+ static string const styFilename("styFiles.lst");
+
+ string filename;
+ switch (type) {
+ case bst:
+ filename = bstFilename;
+ break;
+ case cls:
+ filename = clsFilename;
+ break;
+ case sty:
+ filename = styFilename;
+ break;
+ }
+
+ string fileContents = GetFileContents(LibFileSearch(string(),filename));
+ // everything ok?
+ if (!fileContents.empty()) {
+ if (withFullPath)
+ return(sortEntries(fileContents));
+ else {
+ int Entries = 1;
+ string dummy = OnlyFilename(token(fileContents,'\n',1));
+ string contents = dummy;
+ do {
+ dummy = OnlyFilename(token(fileContents,'\n',++Entries));
+ contents += ("\n"+dummy);
+ } while (!dummy.empty());
+ return(sortEntries(contents));
+ }
+ } else
+ return _("Missing filelist. try Rescan");