]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlex_pimpl.C
remove noload/don't typeset
[lyx.git] / src / lyxlex_pimpl.C
index 3156c864da197cfffcf1ccd40fb8dfcf0fad0fff..a4e71bee93cbf3269a91fa88e63409b45f47ad4b 100644 (file)
@@ -352,8 +352,8 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                                        is.get(cc);
                                        c = cc;
                                } while (c > ' ' && c != ',' && is
-                                        && (i != LEX_MAX_BUFF-1));
-                               if (i == LEX_MAX_BUFF-1) {
+                                        && (i != LEX_MAX_BUFF - 1));
+                               if (i == LEX_MAX_BUFF - 1) {
                                        printError("Line too long");
                                }
                                buff[i] = '\0';
@@ -379,8 +379,11 @@ int LyXLex::Pimpl::search_kw(char const * const tag) const
        keyword_item * res =
                lower_bound(table, table + no_items,
                            search_tag, compare_tags());
+       // use the compare_ascii_no_case instead of compare_no_case,
+       // because in turkish, 'i' is not the lowercase version of 'I',
+       // and thus turkish locale breaks parsing of tags.
        if (res != table + no_items
-           && !compare_no_case(res->tag, tag))
+           && !compare_ascii_no_case(res->tag, tag))
                return res->code;
        return LEX_UNDEF;
 }
@@ -461,14 +464,14 @@ bool LyXLex::Pimpl::nextToken()
                                        is.get(cc);
                                        c = cc;
                                } while (c > ' ' && c != '\\' && is
-                                        && i != (LEX_MAX_BUFF-1));
+                                        && i != (LEX_MAX_BUFF - 1));
                        } else {
                                do {
                                        buff[i++] = c;
                                        is.get(cc);
                                        c = cc;
                                } while (c >= ' ' && c != '\\' && is
-                                        && i != (LEX_MAX_BUFF-1));
+                                        && i != (LEX_MAX_BUFF - 1));
                        }
 
                        if (i == (LEX_MAX_BUFF - 1)) {