I just commited the attached patch to cvs. It only matters when using
lyxstring. It is afaik harmless, but since mathed is such a sensitive
beast, I thought I'd just post it there too.
JMarc
Index: src/mathed/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.79
diff -u -r1.79 ChangeLog
--- src/mathed/ChangeLog 2001/04/27 12:35:55 1.79
+++ src/mathed/ChangeLog 2001/05/02 08:17:39
@@ -1,3 +1,14 @@
+2001-05-02 Jean-Marc Lasgouttes <[EMAIL PROTECTED]>
+
+ * math_macrotemplate.h: do not use explicitely std::string, but
+ string.
+
+ * math_macroarg.C: avoid bringing the whole std:: namespace in
+ global-land. When you do that, there is an ambiguity between
+ lyxstring and std::string (which may be defined at the same time).
+
+ * formula.C (HandleExtern): add .c_str() to .str() (useful when
+ using lyxtring)
2001-04-27 André Pönitz <[EMAIL PROTECTED]>
Index: src/mathed/formula.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/formula.C,v
retrieving revision 1.102
diff -u -r1.102 formula.C
--- src/mathed/formula.C 2001/04/27 20:26:24 1.102
+++ src/mathed/formula.C 2001/05/02 08:17:39
@@ -1419,7 +1419,7 @@
string outfile = "/tmp/lyx2" + arg + ".out";
ostringstream os;
par->WriteNormal(os);
- string code = os.str();
+ string code = os.str().c_str();
string script = "lyx2" + arg + " '" + code + "' " + outfile;
lyxerr << "calling: " << script << endl;
Systemcalls cmd(Systemcalls::System, script, 0);
Index: src/mathed/math_macroarg.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_macroarg.C,v
retrieving revision 1.8
diff -u -r1.8 math_macroarg.C
--- src/mathed/math_macroarg.C 2001/04/27 12:35:55 1.8
+++ src/mathed/math_macroarg.C 2001/05/02 08:17:39
@@ -10,8 +10,7 @@
#include "Lsstream.h"
#include "debug.h"
-
-using namespace std;
+using std::endl;
MathMacroArgument::MathMacroArgument(int n)
: MathedInset(string(), LM_OT_MACRO_ARG, LM_ST_TEXT),
Index: src/mathed/math_macrotemplate.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_macrotemplate.C,v
retrieving revision 1.16
diff -u -r1.16 math_macrotemplate.C
--- src/mathed/math_macrotemplate.C 2001/04/25 15:43:57 1.16
+++ src/mathed/math_macrotemplate.C 2001/05/02 08:17:39
@@ -12,7 +12,7 @@
#include "debug.h"
#include "Painter.h"
-using namespace std;
+//using namespace std;
MathMacroTemplate::MathMacroTemplate() :
MathParInset(LM_ST_TEXT, "undefined", LM_OT_MACRO),
Index: src/mathed/math_macrotemplate.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_macrotemplate.h,v
retrieving revision 1.12
diff -u -r1.12 math_macrotemplate.h
--- src/mathed/math_macrotemplate.h 2001/04/24 16:13:38 1.12
+++ src/mathed/math_macrotemplate.h 2001/05/02 08:17:39
@@ -22,7 +22,7 @@
///
MathMacroTemplate();
///
- MathMacroTemplate(std::string const & name, int nargs);
+ MathMacroTemplate(string const & name, int nargs);
///
void WriteDef(std::ostream &, bool fragile) const;
/// Number of arguments