From ab254289c832cd045c56e6012d14b048618cb833 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 29 Jun 2001 11:54:39 +0000 Subject: [PATCH] lyxstring compile fixes ; small stuff git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2159 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 4 ++++ INSTALL | 11 +++-------- src/BufferView_pimpl.C | 2 +- src/ChangeLog | 7 +++++++ src/Spacing.C | 2 +- src/insets/ChangeLog | 5 +++++ src/insets/insettext.C | 2 +- src/lyxfunc.C | 4 ++-- src/lyxrc.C | 6 +++--- src/mathed/ChangeLog | 5 +++++ src/mathed/formulabase.C | 6 +++--- 11 files changed, 35 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 859f52a40f..c0a7e5203b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-06-29 John Levon + + * INSTALL: change RedHat stuff to insist on updating gcc + 2001-06-14 John Levon * Makefile.am: no point in including 200k historical diff --git a/INSTALL b/INSTALL index db183465c6..645f1108df 100644 --- a/INSTALL +++ b/INSTALL @@ -308,14 +308,9 @@ notify us. are needed for compilation). A 'make symlinks' in linux kernel sources fixes that. - o if you are using the standard compiler that comes with RedHat Linux 7.0 - (rpm versions 69 or below), it is known to miscompile LyX under some - circumstances. Compiling without optimisation seems to work : - - CXXFLAGS="-g" - ./configure ... - - You must use at least gcc 2.96-69 to compile LyX (check "rpm -q gcc"). + o if you are using RedHat Linux 7.x, you must make sure you have the + latest updated gcc and related packages installed (at least -85), + or LyX will not compile or will be mis-compiled. o if you get an error message when compiling LyX that looks like this : diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 2d115a0151..7fb0cc1c1a 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -2598,7 +2598,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) cur_value = par->params().spacing().getValue(); } - istringstream istr(argument); + istringstream istr(argument.c_str()); string tmp; istr >> tmp; diff --git a/src/ChangeLog b/src/ChangeLog index 8921964e54..f4f8c70a7f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2001-06-29 Jean-Marc Lasgouttes + + * lyxfunc.C (Dispatch): + * Spacing.C (set): + * BufferView_pimpl.C (Dispatch): use .c_str() on istringstream + constructor argument. + 2001-06-29 Lars Gullik Bjønnes * paragraph.C (Paragraph): dont't clear, and just set layout. diff --git a/src/Spacing.C b/src/Spacing.C index 61cf42bbce..103eb91fdc 100644 --- a/src/Spacing.C +++ b/src/Spacing.C @@ -59,7 +59,7 @@ void Spacing::set(Spacing::Space sp, float val) void Spacing::set(Spacing::Space sp, string const & val) { float fval; - istringstream istr(val); + istringstream istr(val.c_str()); istr >> fval; set(sp, fval); } diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 406c3d1822..b9074b1433 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2001-06-29 Jean-Marc Lasgouttes + + * insettext.C (localDispatch): use .c_str() on istringstream + constructor argument. + 2001-06-29 John Levon * insettoc.h: diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 18b49617ed..82f7eeba19 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -1056,7 +1056,7 @@ InsetText::localDispatch(BufferView * bv, cur_value = par->params().spacing().getValue(); } - std::istringstream istr(arg); + std::istringstream istr(arg.c_str()); string tmp; istr >> tmp; Spacing::Space new_spacing = cur_spacing; diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 532f8f8856..58bfe884af 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -1264,7 +1264,7 @@ string const LyXFunc::Dispatch(int ac, #else string file_name; int row; - istringstream istr(argument); + istringstream istr(argument.c_str()); istr >> file_name >> row; #endif // Must replace extension of the file to be .lyx and get full path @@ -1287,7 +1287,7 @@ string const LyXFunc::Dispatch(int ac, case LFUN_GOTO_PARAGRAPH: { - istringstream istr(argument); + istringstream istr(argument.c_str()); int id; istr >> id; diff --git a/src/lyxrc.C b/src/lyxrc.C index 14b41778a3..8a4db60be5 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -278,7 +278,7 @@ int LyXRC::read(string const & filename) lexrc.setFile(filename); if (!lexrc.IsOK()) return -2; - lyxerr[Debug::INIT] << "Reading '" << filename << "'..." << endl; + lyxerr[Debug::LYXRC] << "Reading '" << filename << "'..." << endl; while (lexrc.IsOK()) { // By using two switches we take advantage of the compiler @@ -707,7 +707,7 @@ int LyXRC::read(string const & filename) } if ((action = lyxaction.LookupFunc(cmd))>= 0) { - if (lyxerr.debugging(Debug::KBMAP)) { + if (lyxerr.debugging(Debug::LYXRC)) { lyxerr << "RC_BIND: Sequence `" << seq << "' Command `" << cmd << "' Action `" @@ -715,7 +715,7 @@ int LyXRC::read(string const & filename) } res = toplevel_keymap->bind(seq, action); if (res != 0 - && lyxerr.debugging(Debug::KBMAP)) { + && lyxerr.debugging(Debug::LYXRC)) { lexrc.printError( "RC_BIND: " "Invalid key sequence `" diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index aa8b80fcb9..1f732a7db3 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,8 @@ +2001-06-29 Jean-Marc Lasgouttes + + * formulabase.C (localDispatch): use .c_str() on istringstream + constructor argument. + 2001-06-27 Jean-Marc Lasgouttes * math_grid.C (addCol): add second argument to cellinfo_.insert. diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index ae6c3f1c92..bb41159605 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -553,7 +553,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action, int y; int x1; int y1; - istringstream is(arg); + istringstream is(arg.c_str()); is >> x >> y; lyxerr << "LFUN_SETXY: x: " << x << " y: " << y << "\n"; par_->GetXY(x1, y1); @@ -667,7 +667,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action, int n = 1; string v_align; string h_align; - istringstream is(arg); + istringstream is(arg.c_str()); is >> m >> n >> v_align >> h_align; MathArrayInset * p = new MathArrayInset(m, n); p->valign(v_align[0]); @@ -688,7 +688,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action, if (arg.empty()) break; - istringstream is(arg); + istringstream is(arg.c_str()); string lt; string rt; is >> lt >> rt; -- 2.39.2