Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | // Copyright 2013 Google Inc. All Rights Reserved. |
michael@0 | 2 | // |
michael@0 | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
michael@0 | 4 | // you may not use this file except in compliance with the License. |
michael@0 | 5 | // You may obtain a copy of the License at |
michael@0 | 6 | // |
michael@0 | 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
michael@0 | 8 | // |
michael@0 | 9 | // Unless required by applicable law or agreed to in writing, software |
michael@0 | 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
michael@0 | 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
michael@0 | 12 | // See the License for the specific language governing permissions and |
michael@0 | 13 | // limitations under the License. |
michael@0 | 14 | |
michael@0 | 15 | // |
michael@0 | 16 | // Author: dsites@google.com (Dick Sites) |
michael@0 | 17 | // |
michael@0 | 18 | |
michael@0 | 19 | |
michael@0 | 20 | #ifndef I18N_ENCODINGS_CLD2_INTERNAL_LANGSPAN_H_ |
michael@0 | 21 | #define I18N_ENCODINGS_CLD2_INTERNAL_LANGSPAN_H_ |
michael@0 | 22 | |
michael@0 | 23 | #include "generated_language.h" |
michael@0 | 24 | #include "generated_ulscript.h" |
michael@0 | 25 | |
michael@0 | 26 | namespace CLD2 { |
michael@0 | 27 | |
michael@0 | 28 | typedef struct { |
michael@0 | 29 | char* text; // Pointer to the span, somewhere |
michael@0 | 30 | int text_bytes; // Number of bytes of text in the span |
michael@0 | 31 | int offset; // Offset of start of span in original input buffer |
michael@0 | 32 | ULScript ulscript; // Unicode Letters Script of this span |
michael@0 | 33 | Language lang; // Language identified for this span |
michael@0 | 34 | bool truncated; // true if buffer filled up before a |
michael@0 | 35 | // different script or EOF was found |
michael@0 | 36 | } LangSpan; |
michael@0 | 37 | |
michael@0 | 38 | } // namespace CLD2 |
michael@0 | 39 | #endif // I18N_ENCODINGS_CLD2_INTERNAL_LANGSPAN_H_ |
michael@0 | 40 |