From f775add258e8c20de7216694d16c36a701afdec5 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 14 Dec 2012 12:30:08 +0100 Subject: [PATCH] Whitespace only --- src/tex2lyx/Context.cpp | 2 +- src/tex2lyx/Context.h | 2 +- src/tex2lyx/Parser.cpp | 10 +++++----- src/tex2lyx/table.cpp | 12 ++++++------ src/tex2lyx/tex2lyx.cpp | 8 ++++---- src/tex2lyx/text.cpp | 8 ++++---- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/tex2lyx/Context.cpp b/src/tex2lyx/Context.cpp index ecf6a14199..0eb1fa137d 100644 --- a/src/tex2lyx/Context.cpp +++ b/src/tex2lyx/Context.cpp @@ -96,7 +96,7 @@ Context::Context(bool need_layout_, Context::~Context() { if (!par_extra_stuff.empty()) - cerr << "Bug: Ignoring par-level extra stuff '" + cerr << "Bug: Ignoring par-level extra stuff '" << par_extra_stuff << '\'' << endl; } diff --git a/src/tex2lyx/Context.h b/src/tex2lyx/Context.h index 0ed5f59b2f..cf006f3222 100644 --- a/src/tex2lyx/Context.h +++ b/src/tex2lyx/Context.h @@ -113,7 +113,7 @@ public: /// Add extra stuff if not already there void add_extra_stuff(std::string const &); - /*! + /*! * Add paragraph-level extra stuff if not already there. This * will be reset at the next check_layout() */ diff --git a/src/tex2lyx/Parser.cpp b/src/tex2lyx/Parser.cpp index 01f14b8dc9..010e9dd7c9 100644 --- a/src/tex2lyx/Parser.cpp +++ b/src/tex2lyx/Parser.cpp @@ -3,7 +3,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author André Pönitz + * \author André Pönitz * * Full author contact details are available in file CREDITS. */ @@ -27,7 +27,7 @@ CatCode theCatcode[256]; void catInit() { static bool init_done = false; - if (init_done) + if (init_done) return; init_done = true; @@ -164,8 +164,8 @@ Parser::Parser(idocstream & is) Parser::Parser(string const & s) - : lineno_(0), pos_(0), - iss_(new idocstringstream(from_utf8(s))), is_(*iss_), + : lineno_(0), pos_(0), + iss_(new idocstringstream(from_utf8(s))), is_(*iss_), encoding_latex_("utf8") { } @@ -539,7 +539,7 @@ void Parser::tokenize_one() { catInit(); char_type c; - if (!is_.get(c)) + if (!is_.get(c)) return; switch (catcode(c)) { diff --git a/src/tex2lyx/table.cpp b/src/tex2lyx/table.cpp index 79781c7495..751020bb74 100644 --- a/src/tex2lyx/table.cpp +++ b/src/tex2lyx/table.cpp @@ -734,13 +734,13 @@ void parse_table(Parser & p, ostream & os, bool is_long_tabular, } } - else if (t.cat() == catSpace + else if (t.cat() == catSpace || t.cat() == catNewline - || t.cat() == catLetter - || t.cat() == catSuper - || t.cat() == catSub - || t.cat() == catOther - || t.cat() == catActive + || t.cat() == catLetter + || t.cat() == catSuper + || t.cat() == catSub + || t.cat() == catOther + || t.cat() == catActive || t.cat() == catParameter) os << t.cs(); diff --git a/src/tex2lyx/tex2lyx.cpp b/src/tex2lyx/tex2lyx.cpp index dc19f78a7b..ceb4e92ed3 100644 --- a/src/tex2lyx/tex2lyx.cpp +++ b/src/tex2lyx/tex2lyx.cpp @@ -925,7 +925,7 @@ bool tex2lyx(FileName const & infilename, ostream & os, string const & encoding) } // anonymous namespace -bool tex2lyx(string const & infilename, FileName const & outfilename, +bool tex2lyx(string const & infilename, FileName const & outfilename, string const & encoding) { if (outfilename.isReadableFile()) { @@ -1002,7 +1002,7 @@ int main(int argc, char * argv[]) easyParse(argc, argv); - if (argc <= 1) + if (argc <= 1) error_message("Not enough arguments."); try { @@ -1059,13 +1059,13 @@ int main(int argc, char * argv[]) // Read the encodings table. FileName const symbols_path = libFileSearch(string(), "unicodesymbols"); if (symbols_path.empty()) { - cerr << "Error: Could not find file \"unicodesymbols\"." + cerr << "Error: Could not find file \"unicodesymbols\"." << endl; return EXIT_FAILURE; } FileName const enc_path = libFileSearch(string(), "encodings"); if (enc_path.empty()) { - cerr << "Error: Could not find file \"encodings\"." + cerr << "Error: Could not find file \"encodings\"." << endl; return EXIT_FAILURE; } diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index ef334e1b7f..f406869153 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -1430,7 +1430,7 @@ void parse_environment(Parser & p, ostream & os, bool outer, // This hack must be removed once bug 8049 is fixed! if ((it + 1 != et) && (it + 2 != et || *it2 != '\n')) os << "\n\\end_layout\n\\begin_layout Verbatim\n"; - } else + } else os << *it; } os << "\n\\end_layout\n\n"; @@ -1471,7 +1471,7 @@ void parse_environment(Parser & p, ostream & os, bool outer, handle_ert(os, "\\", parent_context); else if (*it == '$') handle_ert(os, "$", parent_context); - else + else os << *it; } handle_ert(os, "\\end{" + name + "}", @@ -3625,8 +3625,8 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, context, "\\lang", context.font.language, lang); } - - else if (prefixIs(t.cs(), "text") + + else if (prefixIs(t.cs(), "text") && is_known(t.cs().substr(4), preamble.polyglossia_languages)) { // scheme is \textLANGUAGE{text} where LANGUAGE is in polyglossia_languages[] string lang; -- 2.39.2