two fixes for RH7.0

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/lyx-1_1_5@1259 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2000-12-05 17:32:22 +00:00
parent 336ba00f77
commit 5e14f5ee5b
3 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2000-12-05 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/support/lstrings.C (prefixIs): make it compile with
!USE_INCLUDED_STRING
(suffixIs): ditto
* src/paragraph.C (TeXFootnote): Change HAVE_OSTREAM to HAVE_SSTREAM
2000-11-27 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/bufferview_funcs.C (FontSize): fix the font-size changing

View File

@ -4021,7 +4021,7 @@ LyXParagraph * LyXParagraph::TeXFootnote(ostream & os, TexRow & texrow,
"Footnote in a Footnote -- not supported"
<< endl;
}
#ifndef HAVE_OSTREAM
#ifndef HAVE_SSTREAM
delete [] dummy.str();
#endif
}

View File

@ -175,8 +175,13 @@ bool prefixIs(string const & a, char const * pre)
unsigned int l = strlen(pre);
if (l > a.length() || a.empty())
return false;
else
else {
#if !defined(USE_INCLUDED_STRING)
return ::strncmp(a.c_str(), pre, l) == 0;
#else
return a.compare(0, l, pre, l) == 0;
#endif
}
}
@ -193,7 +198,12 @@ bool suffixIs(string const & a, char const * suf)
if (suflen > a.length())
return false;
else {
#if !defined(USE_INCLUDED_STRING)
string const tmp(a, a.length() - suflen);
return ::strncmp(tmp.c_str(), suf, suflen) == 0;
#else
return a.compare(a.length() - suflen, suflen, suf) == 0;
#endif
}
}