Angus Leeming wrote:
> Both failures are inside boost library code. I wonder, do we need to
> set any flags for a dual processor machine?
Ok, it appears that there is something rotten in boost::format.
Changing lstrings.C, so:
-#if USE_BOOST_FORMAT
+#if 0 // USE_BOOST_FORMAT
and all is well.
(All is as well as lyx 1.4.x on an intel box anyway ;-)
I'll dig further.
Meanwhile, FYI, here are the changes I needed to make to get the code
to compile. Some of them are thoughtless hacks, so I won't commit it
just yet, but you get the idea.
--
Angus
Index: src/text.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text.C,v
retrieving revision 1.553
diff -u -p -r1.553 text.C
--- src/text.C 18 Mar 2004 13:28:46 -0000 1.553
+++ src/text.C 24 Mar 2004 12:49:01 -0000
@@ -84,7 +84,7 @@ namespace {
int numberOfSeparators(Paragraph const & par, Row const & row)
{
- pos_type const first = max(row.pos(), par.beginOfBody());
+ pos_type const first = max(int(row.pos()), par.beginOfBody());
pos_type const last = row.endpos() - 1;
int n = 0;
for (pos_type p = first; p < last; ++p) {
@@ -117,7 +117,7 @@ int numberOfLabelHfills(Paragraph const
++first;
}
- last = min(last, par.beginOfBody());
+ last = min(int(last), par.beginOfBody());
int n = 0;
for (pos_type p = first; p < last; ++p) {
if (par.isHfill(p))
@@ -138,7 +138,7 @@ int numberOfHfills(Paragraph const & par
++first;
}
- first = max(first, par.beginOfBody());
+ first = max(int(first), par.beginOfBody());
int n = 0;
for (pos_type p = first; p < last; ++p) {
@@ -1341,7 +1341,8 @@ void LyXText::Delete(LCursor & cur)
CursorSlice sl = cur.top();
cursorRight(cur);
if (sl == cur.top()) {
- recordUndo(cur, Undo::DELETE, cur.par(), max(0, cur.par() - 1));
+ recordUndo(cur, Undo::DELETE, cur.par(),
+ max(par_type(0), cur.par() - 1));
backspace(cur);
}
}
@@ -1442,7 +1443,7 @@ ParagraphList::iterator LyXText::getPar(
}
-ParagraphList::iterator LyXText::getPar(int par) const
+ParagraphList::iterator LyXText::getPar(par_type par) const
{
//lyxerr << "getPar: " << par << " from " << paragraphs().size() << endl;
BOOST_ASSERT(par >= 0);
Index: src/frontends/controllers/ControlErrorList.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlErrorList.C,v
retrieving revision 1.18
diff -u -p -r1.18 ControlErrorList.C
--- src/frontends/controllers/ControlErrorList.C 27 Jan 2004 15:14:34 -0000 1.18
+++ src/frontends/controllers/ControlErrorList.C 24 Mar 2004 12:49:01 -0000
@@ -68,7 +68,7 @@ void ControlErrorList::goTo(int item)
return;
}
- int const end = std::min(err.pos_end, pit->size());
+ int const end = std::min(err.pos_end, int(pit->size()));
int const start = std::min(err.pos_start, end);
int const range = end - start;
Index: src/frontends/controllers/ControlSpellchecker.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlSpellchecker.C,v
retrieving revision 1.64
diff -u -p -r1.64 ControlSpellchecker.C
--- src/frontends/controllers/ControlSpellchecker.C 13 Feb 2004 07:30:58 -0000 1.64
+++ src/frontends/controllers/ControlSpellchecker.C 24 Mar 2004 12:49:01 -0000
@@ -160,7 +160,8 @@ bool isLetter(PosIterator & cur)
WordLangTuple nextWord(PosIterator & cur, PosIterator const & end,
- int & progress, BufferParams & bp)
+ PosIterator::difference_type & progress,
+ BufferParams & bp)
{
// skip until we have real text (will jump paragraphs)
for (; cur != end && !isLetter(cur); ++cur, ++progress);
Index: src/frontends/gtk/GMenubar.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/gtk/GMenubar.C,v
retrieving revision 1.7
diff -u -p -r1.7 GMenubar.C
--- src/frontends/gtk/GMenubar.C 28 Oct 2003 16:45:08 -0000 1.7
+++ src/frontends/gtk/GMenubar.C 24 Mar 2004 12:49:01 -0000
@@ -140,7 +140,7 @@ bool GMenubar::submenuDisabled(MenuItem
{
FuncStatus const flag =
view_->getLyXFunc().getStatus(i->func());
- if (!flag.disabled())
+ if (flag.enabled())
return false;
break;
}
@@ -206,7 +206,7 @@ void GMenubar::onSubMenuActivate(MenuIte
item.signal_activate().connect(
SigC::bind(SigC::slot(*this, &GMenubar::onCommandActivate),
&(*i), &item));
- if (flag.disabled())
+ if (!flag.enabled())
item.set_sensitive(false);
break;
}
Index: src/frontends/gtk/GToolbar.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/gtk/GToolbar.C,v
retrieving revision 1.10
diff -u -p -r1.10 GToolbar.C
--- src/frontends/gtk/GToolbar.C 30 Oct 2003 17:58:06 -0000 1.10
+++ src/frontends/gtk/GToolbar.C 24 Mar 2004 12:49:01 -0000
@@ -211,13 +211,13 @@ void GToolbar::update()
if (item->first.action == ToolbarBackend::LAYOUTS) {
LyXFunc const & lf = view_->getLyXFunc();
bool const sensitive =
- !lf.getStatus(FuncRequest(LFUN_LAYOUT)).disabled();
+ lf.getStatus(FuncRequest(LFUN_LAYOUT)).enabled();
widget->set_sensitive(sensitive);
continue;
}
FuncStatus const status = view_->
getLyXFunc().getStatus(item->first);
- bool sensitive = !status.disabled();
+ bool sensitive = status.enabled();
widget->set_sensitive(sensitive);
if (it->get_type() != Gtk::TOOLBAR_CHILD_BUTTON)
return;
Index: src/frontends/gtk/lyx_gui.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/gtk/lyx_gui.C,v
retrieving revision 1.13
diff -u -p -r1.13 lyx_gui.C
--- src/frontends/gtk/lyx_gui.C 15 Oct 2003 10:55:42 -0000 1.13
+++ src/frontends/gtk/lyx_gui.C 24 Mar 2004 12:49:01 -0000
@@ -325,8 +325,6 @@ void lyx_gui::start(string const & batch
view.show();
view.init();
- Buffer * last = 0;
-
// FIXME: some code below needs moving
lyxserver = new LyXServer(&view.getLyXFunc(), lyxrc.lyxpipes);
@@ -335,16 +333,8 @@ void lyx_gui::start(string const & batch
std::vector<string>::const_iterator cit = files.begin();
std::vector<string>::const_iterator end = files.end();
- for (; cit != end; ++cit) {
- Buffer * b = bufferlist.newBuffer(*cit);
- if (loadLyXFile(b, *cit))
- last = b;
- }
-
- // switch to the last buffer successfully loaded
- if (last) {
- view.view()->buffer(last);
- }
+ for (; cit != end; ++cit)
+ view.view()->loadLyXFile(*cit, true);
// handle the batch commands the user asked for
if (!batch.empty()) {
Index: src/support/lstrings.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/lstrings.C,v
retrieving revision 1.85
diff -u -p -r1.85 lstrings.C
--- src/support/lstrings.C 1 Feb 2004 12:46:13 -0000 1.85
+++ src/support/lstrings.C 24 Mar 2004 12:49:01 -0000
@@ -580,7 +580,7 @@ string const getStringFromVector(vector<
}
-#if USE_BOOST_FORMAT
+#if 0 //USE_BOOST_FORMAT
string bformat(string const & fmt, string const & arg1)
{