Hi folks,
Here's the literate programming fix for lyx. It was fairly simple.
This fix is against 1.1.4cvs.
--
Kayvan Aghaiepour Sylvan | Proud husband of | Father to my kids:
Sylvan Associates, Inc. | Laura Isabella Sylvan | Katherine Yelena
http://www.successlinks.com/kayvan | Reach your goals now! | Robin Gregory
Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v
retrieving revision 1.107
diff -u -r1.107 ChangeLog
--- ChangeLog 1999/12/01 00:57:27 1.107
+++ ChangeLog 1999/12/01 07:35:29
@@ -1,3 +1,8 @@
+1999-11-30 Kayvan A. Sylvan <[EMAIL PROTECTED]>
+
+ * src/ImportNoweb.C (documentclass): fixed bounds for substr
+ operation, yielding correct results for the reLyX command.
+
1999-12-01 Lars Gullik Bj�nnes <[EMAIL PROTECTED]>
* src/support/filetools.C (ExpandPath): removed an over eager
Index: src/ImportNoweb.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ImportNoweb.C,v
retrieving revision 1.7
diff -u -r1.7 ImportNoweb.C
--- src/ImportNoweb.C 1999/11/30 23:15:11 1.7
+++ src/ImportNoweb.C 1999/12/01 07:38:40
@@ -54,10 +54,6 @@
{
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 @@
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;
}
}