| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ENCODINGS_COMPACT_LANG_DET_GETONESCRIPTSPAN_H_ | 5 #ifndef ENCODINGS_COMPACT_LANG_DET_GETONESCRIPTSPAN_H_ |
| 6 #define ENCODINGS_COMPACT_LANG_DET_GETONESCRIPTSPAN_H_ | 6 #define ENCODINGS_COMPACT_LANG_DET_GETONESCRIPTSPAN_H_ |
| 7 | 7 |
| 8 #include "encodings/compact_lang_det/letterscript_enum.h" | 8 #include "encodings/compact_lang_det/letterscript_enum.h" |
| 9 #include "encodings/compact_lang_det/compact_lang_det_impl.h" | 9 #include "encodings/compact_lang_det/compact_lang_det_impl.h" |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 // Copy next run of same-script non-tag letters to buffer [NUL terminated] | 60 // Copy next run of same-script non-tag letters to buffer [NUL terminated] |
| 61 // Force Latin and Cyrillic scripts to be lowercase | 61 // Force Latin and Cyrillic scripts to be lowercase |
| 62 bool GetOneScriptSpanLower(getone::LangSpan* span); | 62 bool GetOneScriptSpanLower(getone::LangSpan* span); |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 int SkipToFrontOfSpan(const char* src, int len, int* script); | 65 int SkipToFrontOfSpan(const char* src, int len, int* script); |
| 66 | 66 |
| 67 const char* start_byte_; | 67 const char* start_byte_; |
| 68 const char* next_byte_; | 68 const char* next_byte_; |
| 69 const char* next_byte_limit_; | 69 // const char* next_byte_limit_; |
| 70 int byte_length_; | 70 int byte_length_; |
| 71 bool is_plain_text_; | 71 bool is_plain_text_; |
| 72 char* script_buffer_; // Holds text with expanded entities | 72 char* script_buffer_; // Holds text with expanded entities |
| 73 char* script_buffer_lower_; // Holds lowercased text | 73 char* script_buffer_lower_; // Holds lowercased text |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 | 76 |
| 77 class LangScanner { | 77 class LangScanner { |
| 78 public: | 78 public: |
| 79 LangScanner(const CompactLangDetImpl::LangDetObj* langdetobj, | 79 LangScanner(const CompactLangDetImpl::LangDetObj* langdetobj, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 int maxlangs_; | 122 int maxlangs_; |
| 123 int minlangspan_; | 123 int minlangspan_; |
| 124 int rb_size_; | 124 int rb_size_; |
| 125 int next_rb_; | 125 int next_rb_; |
| 126 int rb_mask_; | 126 int rb_mask_; |
| 127 uint32* rb_; | 127 uint32* rb_; |
| 128 int* offset_rb_; | 128 int* offset_rb_; |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 #endif // ENCODINGS_COMPACT_LANG_DET_GETONESCRIPTSPAN_H_ | 131 #endif // ENCODINGS_COMPACT_LANG_DET_GETONESCRIPTSPAN_H_ |
| OLD | NEW |