Current CVS is broken by use of QuoteName. The attached patch is a simple
fix that will work in 'many' cases. View it as a stop gap rather than as a
permanent solution.
Committing now...
--
Angus
Index: src/support/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/ChangeLog,v
retrieving revision 1.265
diff -u -p -r1.265 ChangeLog
--- src/support/ChangeLog 26 Sep 2004 14:19:47 -0000 1.265
+++ src/support/ChangeLog 25 Oct 2004 14:03:22 -0000
@@ -1,3 +1,8 @@
+2004-10-25 Angus Leeming <[EMAIL PROTECTED]>
+
+ * forkedcall.C (generateChild): strip quotes from each argument
+ of argv.
+
2004-09-26 Lars Gullik Bjonnes <[EMAIL PROTECTED]>
* pch.h: use proper signal include
Index: src/support/forkedcall.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/forkedcall.C,v
retrieving revision 1.18
diff -u -p -r1.18 forkedcall.C
--- src/support/forkedcall.C 26 Mar 2004 23:55:33 -0000 1.18
+++ src/support/forkedcall.C 25 Oct 2004 14:03:24 -0000
@@ -270,6 +270,29 @@ int Forkedcall::generateChild()
argv.push_back(&*vit);
prev = *vit;
}
+ // Strip quotes. Does so naively, assuming that the word begins
+ // and ends in quotes.
+ vector<char *>::iterator ait = argv.begin();
+ vector<char *>::iterator const aend = argv.end();
+ for (; ait != aend; ++ait) {
+ char * word = *ait;
+ std::size_t const len = strlen(word);
+ if (len >= 2) {
+ char & first = word[0];
+ char & last = word[len-1];
+
+ if (first == last &&
+ (first == '\'' || first == '"')) {
+ first = '\0';
+ last = '\0';
+ *ait += 1;
+ }
+ }
+ }
+
+ ait = argv.begin();
+ for (; ait != aend; ++ait)
+ std::cout << *ait << std::endl;
argv.push_back(0);
#ifndef __EMX__