From ace24185986a7d0af523513b3aba12fcc6bc046a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Tue, 20 Mar 2007 21:53:01 +0000 Subject: [PATCH] trivial changes for all-in-one compilation git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17494 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/format.C | 26 +++++++++++++------------- src/graphics/PreviewLoader.C | 4 ++-- src/support/docstream.C | 7 +++++++ src/support/lstrings.C | 2 +- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/format.C b/src/format.C index fa327785da..d762f29736 100644 --- a/src/format.C +++ b/src/format.C @@ -53,9 +53,9 @@ namespace os = support::os; namespace { -string const token_from("$$i"); -string const token_path("$$p"); -string const token_socket("$$a"); +string const token_from_format("$$i"); +string const token_path_format("$$p"); +string const token_socket_format("$$a"); class FormatNamesEqual : public std::unary_function { @@ -309,12 +309,12 @@ bool Formats::view(Buffer const & buffer, FileName const & filename, command += 'r'; } - if (!contains(command, token_from)) - command += ' ' + token_from; + if (!contains(command, token_from_format)) + command += ' ' + token_from_format; - command = subst(command, token_from, quoteName(filename.toFilesystemEncoding())); - command = subst(command, token_path, quoteName(onlyPath(filename.toFilesystemEncoding()))); - command = subst(command, token_socket, quoteName(theLyXServerSocket().address())); + command = subst(command, token_from_format, quoteName(filename.toFilesystemEncoding())); + command = subst(command, token_path_format, quoteName(onlyPath(filename.toFilesystemEncoding()))); + command = subst(command, token_socket_format, quoteName(theLyXServerSocket().address())); lyxerr[Debug::FILES] << "Executing command: " << command << std::endl; // FIXME UNICODE utf8 can be wrong for files buffer.message(_("Executing command: ") + from_utf8(command)); @@ -368,12 +368,12 @@ bool Formats::edit(Buffer const & buffer, FileName const & filename, string command = format->editor(); - if (!contains(command, token_from)) - command += ' ' + token_from; + if (!contains(command, token_from_format)) + command += ' ' + token_from_format; - command = subst(command, token_from, quoteName(filename.toFilesystemEncoding())); - command = subst(command, token_path, quoteName(onlyPath(filename.toFilesystemEncoding()))); - command = subst(command, token_socket, quoteName(theLyXServerSocket().address())); + command = subst(command, token_from_format, quoteName(filename.toFilesystemEncoding())); + command = subst(command, token_path_format, quoteName(onlyPath(filename.toFilesystemEncoding()))); + command = subst(command, token_socket_format, quoteName(theLyXServerSocket().address())); lyxerr[Debug::FILES] << "Executing command: " << command << std::endl; // FIXME UNICODE utf8 can be wrong for files buffer.message(_("Executing command: ") + from_utf8(command)); diff --git a/src/graphics/PreviewLoader.C b/src/graphics/PreviewLoader.C index bc8a60f288..68d8262a9c 100644 --- a/src/graphics/PreviewLoader.C +++ b/src/graphics/PreviewLoader.C @@ -268,11 +268,11 @@ private: double font_scaling_factor_; /// We don't own this - static Converter const * pconverter_; + static lyx::Converter const * pconverter_; }; -Converter const * PreviewLoader::Impl::pconverter_; +lyx::Converter const * PreviewLoader::Impl::pconverter_; // diff --git a/src/support/docstream.C b/src/support/docstream.C index ac9a8ed230..cc767c87df 100644 --- a/src/support/docstream.C +++ b/src/support/docstream.C @@ -18,6 +18,13 @@ #include #include +#ifdef min +#undef min +#endif + +#ifdef max +#undef max +#endif using lyx::ucs4_codeset; diff --git a/src/support/lstrings.C b/src/support/lstrings.C index fe161be991..2ed7d93e4c 100644 --- a/src/support/lstrings.C +++ b/src/support/lstrings.C @@ -753,7 +753,7 @@ getVectorFromStringT(String const & str, String const & delim) if (str.empty()) return vec; String keys = rtrim(str); - for(;;) { + for(; ;) { typename String::size_type const idx = keys.find(delim); if (idx == String::npos) { vec.push_back(ltrim(keys)); -- 2.39.2