//
// This is a C++ version of function processLayoutFile in configure.py,
// which uses the following regex
- // \Declare(LaTeX|DocBook|LinuxDoc)Class\s*(\[([^,]*)(,.*)*\])*\s*{(.*)}
+ // \Declare(LaTeX|DocBook)Class\s*(\[([^,]*)(,.*)*\])*\s*{(.*)}
ifstream ifs(layout_file.c_str());
- static regex const reg("^#\\s*\\\\Declare(LaTeX|DocBook|LinuxDoc)Class\\s*"
+ static regex const reg("^#\\s*\\\\Declare(LaTeX|DocBook)Class\\s*"
"(?:\\[([^,]*)(?:,.*)*\\])*\\s*\\{(.*)\\}\\s*");
string line;
while (getline(ifs, line)) {
// Reads the style files
-void LyXSetStyle()
+bool LyXSetStyle()
{
lyxerr[Debug::TCLASS] << "LyXSetStyle: parsing configuration..." << endl;
if (!textclasslist.read()) {
lyxerr[Debug::TCLASS] << "LyXSetStyle: an error occured "
"during parsing.\n Exiting." << endl;
- exit(1);
+ return false;
}
lyxerr[Debug::TCLASS] << "LyXSetStyle: configuration parsed." << endl;
+ return true;
}