try to make VERSION_INFO more portable in configure; apply older patch from dekel for lyxstring::operator>>

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH-1_2_X@4722 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-07-20 15:18:53 +00:00
parent b2dce214b7
commit 3c3c8a968f
5 changed files with 36 additions and 55 deletions

View File

@ -1,3 +1,8 @@
2002-07-20 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* configure.in: try to fix the shell code that builds VERSION_INFO
to be compatible with more shells
2002-07-04 Kayvan A. Sylvan <kayvan@sylvan.com>
* configure.in (LYX_USE_FRONTEND): The order of libraries is

View File

@ -201,10 +201,8 @@ case "$lyx_use_frontend" in
FRONTEND_LIBS="@XFORMS_IMAGE_LIB@ @XFORMS_LIB@ @XPM_LIB@"
;;
esac
FRONTEND_INFO=`cat <<EOF
libXpm version: ${XPM_VERSION}\n\
libforms version: ${XFORMS_VERSION}\n
`
FRONTEND_INFO=" libXpm version: ${XPM_VERSION}\n\
libforms version: ${XFORMS_VERSION}\n"
;;
gnome)
AM_PATH_GTKMM(1.2.1,,
@ -340,8 +338,7 @@ LYX_CHECK_DECL_HDRS(mkstemp,[unistd.h stdlib.h])
### Some information on what just happened
real_bindir=`eval "echo \`eval \"echo ${bindir}\"\`"`
real_datadir=`eval "echo \`eval \"echo ${datadir}/${PACKAGE}\"\`"`
VERSION_INFO=`cat <<EOF
Configuration\n\
VERSION_INFO="Configuration\n\
Host type: ${host}\n\
Special build flags: ${lyx_flags}\n\
C Compiler: ${CC}\n\
@ -352,8 +349,7 @@ Configuration\n\
Frontend: ${lyx_use_frontend}\n\
${FRONTEND_INFO}\
LyX binary dir: ${real_bindir}\n\
LyX files dir: ${real_datadir}\n
`
LyX files dir: ${real_datadir}\n"
AC_SUBST(VERSION_INFO)

View File

@ -1,3 +1,8 @@
2002-07-20 Dekel Tsur <dekelts@tau.ac.il>
* lyxstring.C (operator>>): replace code which works only with
_some_ versions of GNU STL with generic one
2002-06-20 Herbert Voss <voss@perce.de>
* filetools.[C]: (readExtFromCOntents) add support for

View File

@ -1732,64 +1732,37 @@ void swap(lyxstring & str1, lyxstring & str2)
#include <iostream>
#if 0
istream & operator>>(istream & is, lyxstring & s)
{
#if 0
// very bad solution
char * nome = new char[1024];
is >> nome;
lyxstring tmp(nome);
delete [] nome;
if (!tmp.empty()) s = tmp;
#else
// better solution
int w = is.width(0);
s.clear();
char c = 0;
bool skipspace = true;
while (is.get(c)) {
if (isspace(c)) { is.putback(c); break; }
s += c;
if (isspace(c)) {
if (!skipspace) {
is.putback(c);
break;
}
} else {
s += c;
skipspace = false;
}
if (--w == 1) break;
}
if (s.empty()) is.setstate(std::ios::failbit);
#endif
return is;
}
#else
istream & operator>>(istream & is, lyxstring & str)
{
typedef istream istream_type;
typedef int int_type;
typedef std::streambuf streambuf_type;
typedef string string_type;
typedef string::size_type size_type;
size_type extracted = 0;
#if 0
istream_type::sentry cerb(is, false);
if (cerb) {
#else
if (is.ipfx0()) {
#endif
str.erase();
std::streamsize w = is.width();
size_type n;
n = w > 0 ? static_cast<size_type>(w) : str.max_size();
int_type const eof = EOF;
streambuf_type * sb = is.rdbuf();
int_type c = sb->sgetc();
while (extracted < n
&& c != eof && !isspace(c)) {
str += c;
++extracted;
c = sb->snextc();
}
if (c == eof)
is.setstate(std::ios::eofbit);
is.width(0);
}
#if 1
is.isfx();
#endif
if (!extracted)
is.setstate(std::ios::failbit);
return is;
}
#endif
ostream & operator<<(ostream & o, lyxstring const & s)

View File

@ -51,10 +51,12 @@ What's new
- fix bug where error insets were not correctly removed
- fix some cursor bugs with right-to-ledft languages
- fix some cursor bugs with right-to-left languages
- fix Arabic text rendering
- fix a crash when using iso10646-1 encoding
- fix bug where using case changing commands on the last word of a
paragraph would change the whole document (without any undo possible!)