browser/components/translation/cld2/internal/langspan.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial