]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlex_pimpl.C
lyxstring compile fixes ; small stuff
[lyx.git] / src / lyxlex_pimpl.C
index 173d542ceebec217572749e68a97ef8a70274664..bcb41376211e00a5e3b20d7844be60e2142cf944 100644 (file)
@@ -22,7 +22,10 @@ struct compare_tags {
        // used by lower_bound, sort and sorted
        inline
        int operator()(keyword_item const & a, keyword_item const & b) const {
-               return compare_no_case(a.tag, b.tag) < 0;
+               // we use the ascii version, because in turkish, 'i'
+               // is not the lowercase version of 'I', and thus
+               // turkish locale breaks parsing of tags.
+               return compare_ascii_no_case(a.tag, b.tag) < 0;
        }
 };
 // } // end of anon namespace
@@ -44,7 +47,7 @@ string const LyXLex::Pimpl::GetString() const
 
 void LyXLex::Pimpl::printError(string const & message) const
 {
-       string tmpmsg = subst(message, "$$Token", GetString());
+       string const tmpmsg = subst(message, "$$Token", GetString());
        lyxerr << "LyX: " << tmpmsg << " [around line " << lineno
               << " of file " << MakeDisplayPath(name) << ']' << endl;
 }
@@ -170,7 +173,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                                lyxerr[Debug::LYXLEX] << "Comment read: `" << c
                                                      << buff << "'" << endl;
 #else
-                               // unfortunately is ignore buggy (Lgb)
+                               // unfortunately ignore is buggy (Lgb)
                                is.ignore(100, '\n');
 #endif
                                ++lineno;
@@ -397,8 +400,8 @@ bool LyXLex::Pimpl::EatLine()
        while(is && c != '\n' && i != (LEX_MAX_BUFF - 1)) {
                is.get(cc);
                c = cc;
-               lyxerr[Debug::LYXLEX] << "LyXLex::EatLine read char: `"
-                                     << c << "'" << endl;
+               //lyxerr[Debug::LYXLEX] << "LyXLex::EatLine read char: `"
+               //                    << c << "'" << endl;
                if (c != '\r')
                        buff[i++] = c;
        }