literate fix from Kayvan A. Sylvan

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@345 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 1999-12-01 09:07:41 +00:00
parent 3227c66baf
commit 0f95478223
2 changed files with 6 additions and 5 deletions

View File

@ -1,3 +1,8 @@
1999-11-30 Kayvan A. Sylvan <kayvan@satyr.sylvan.com>
* src/ImportNoweb.C (documentclass): fixed bounds for substr
operation, yielding correct results for the reLyX command.
1999-12-01 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/support/filetools.C (ExpandPath): removed an over eager

View File

@ -54,10 +54,6 @@ string ImportNoweb::documentclass()
{
string result = "literate-article"; // Default
#warning If you use literate programming you should verify that this works
// This method has been rewritten to use ifstream, but since I
// don't use literate programming myself I am unable to check
// this correclty. (Lgb)
ifstream ifs(file.c_str());
if (!ifs) return "nofile"; // Should not happen!
@ -67,7 +63,7 @@ string ImportNoweb::documentclass()
if (p != string::npos) {
p = line.find('{', p);
string::size_type q = line.find('}', p);
result = "literate-" + line.substr(p, q - p);
result = "literate-" + line.substr(p + 1, q - p - 1);
break;
}
}