This fixes some faulty uses of c_str.
? c_str-1.diff Index: src/Spacing.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/Spacing.C,v retrieving revision 1.36 diff -u -p -r1.36 Spacing.C --- src/Spacing.C 16 Aug 2004 11:27:46 -0000 1.36 +++ src/Spacing.C 16 Sep 2004 17:47:01 -0000 @@ -56,7 +56,7 @@ void Spacing::set(Spacing::Space sp, flo void Spacing::set(Spacing::Space sp, string const & val) { float fval = 0.0; - istringstream istr(val.c_str()); + istringstream istr(val); istr >> fval; set(sp, fval); } Index: src/mathed/math_extern.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_extern.C,v retrieving revision 1.67 diff -u -p -r1.67 math_extern.C --- src/mathed/math_extern.C 24 Jul 2004 10:55:27 -0000 1.67 +++ src/mathed/math_extern.C 16 Sep 2004 17:47:02 -0000 @@ -200,7 +200,7 @@ bool extractString(MathAtom const & at, // convert this inset somehow to a number bool extractNumber(MathArray const & ar, int & i) { - istringstream is(charSequence(ar.begin(), ar.end()).c_str()); + istringstream is(charSequence(ar.begin(), ar.end())); is >> i; return is; } @@ -208,7 +208,7 @@ bool extractNumber(MathArray const & ar, bool extractNumber(MathArray const & ar, double & d) { - istringstream is(charSequence(ar.begin(), ar.end()).c_str()); + istringstream is(charSequence(ar.begin(), ar.end())); is >> d; return is; } @@ -963,7 +963,7 @@ namespace { break; // search line with "Incorrect syntax" - istringstream is(out.c_str()); + istringstream is(out); string line; while (is) { getline(is, line); @@ -1080,7 +1080,7 @@ namespace { string out = captureOutput("mint -i 1 -S -s -q -q", expr + ';'); if (out.empty()) break; // expression syntax is ok - istringstream is(out.c_str()); + istringstream is(out); string line; getline(is, line); if (line.find("on line") != 0) @@ -1134,7 +1134,7 @@ namespace { break; // search line with single caret - istringstream is(out.c_str()); + istringstream is(out); string line; while (is) { getline(is, line); Index: src/mathed/math_hullinset.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_hullinset.C,v retrieving revision 1.148 diff -u -p -r1.148 math_hullinset.C --- src/mathed/math_hullinset.C 13 Sep 2004 18:14:37 -0000 1.148 +++ src/mathed/math_hullinset.C 16 Sep 2004 17:47:02 -0000 @@ -875,7 +875,7 @@ void MathHullInset::doExtern(LCursor & c { string lang; string extra; - istringstream iss(func.argument.c_str()); + istringstream iss(func.argument); iss >> lang >> extra; if (extra.empty()) extra = "noextra"; @@ -1337,7 +1337,7 @@ int MathHullInset::docbook(Buffer const else name = "informalequation"; - string bname = name; + string bname = name; if (! label(0).empty()) bname += " id=\"" + label(0)+ "\""; ms << MTag(bname.c_str()); @@ -1350,7 +1350,7 @@ int MathHullInset::docbook(Buffer const res = latex(buf, ms.os(), runparams); ms << ETag("alt"); } - + ms << ETag(name.c_str()); return ms.line() + res; } Index: src/mathed/math_nestinset.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_nestinset.C,v retrieving revision 1.136 diff -u -p -r1.136 math_nestinset.C --- src/mathed/math_nestinset.C 14 Aug 2004 21:03:55 -0000 1.136 +++ src/mathed/math_nestinset.C 16 Sep 2004 17:47:02 -0000 @@ -392,7 +392,7 @@ void MathNestInset::priv_dispatch(LCurso cur.message(_("Paste")); replaceSelection(cur); size_t n = 0; - istringstream is(cmd.argument.c_str()); + istringstream is(cmd.argument); is >> n; pasteSelection(cur, n); cur.clearSelection(); // bug 393 @@ -612,7 +612,7 @@ void MathNestInset::priv_dispatch(LCurso lyxerr << "LFUN_SETXY broken!" << endl; int x = 0; int y = 0; - istringstream is(cmd.argument.c_str()); + istringstream is(cmd.argument); is >> x >> y; cur.setScreenPos(x, y); break; Index: src/mathed/math_parser.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_parser.C,v retrieving revision 1.304 diff -u -p -r1.304 math_parser.C --- src/mathed/math_parser.C 14 Aug 2004 14:03:42 -0000 1.304 +++ src/mathed/math_parser.C 16 Sep 2004 17:47:02 -0000 @@ -389,7 +389,7 @@ void Parser::tokenize(istream & is) void Parser::tokenize(string const & buffer) { - istringstream is(buffer.c_str(), ios::in | ios::binary); + istringstream is(buffer, ios::in | ios::binary); char c; while (is.get(c)) { @@ -1216,7 +1216,7 @@ void Parser::parse1(MathGridInset & grid void mathed_parse_cell(MathArray & ar, string const & str) { - istringstream is(str.c_str()); + istringstream is(str); mathed_parse_cell(ar, is); } @@ -1229,7 +1229,7 @@ void mathed_parse_cell(MathArray & ar, i bool mathed_parse_normal(MathAtom & t, string const & str) { - istringstream is(str.c_str()); + istringstream is(str); return Parser(is).parse(t); } @@ -1248,7 +1248,7 @@ bool mathed_parse_normal(MathAtom & t, L void mathed_parse_normal(MathGridInset & grid, string const & str) { - istringstream is(str.c_str()); + istringstream is(str); Parser(is).parse1(grid, 0, MathInset::MATH_MODE, false); }
-- Lgb