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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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 //
    18 // Produces debugging output for CLD2. See debug_empty.h for suppressing this.
    21 #ifndef I18N_ENCODINGS_CLD2_INTERNAL_DEBUG_H_
    22 #define I18N_ENCODINGS_CLD2_INTERNAL_DEBUG_H_
    24 #include <string>
    25 #include "scoreonescriptspan.h"
    27 namespace CLD2 {
    29 // For showing one chunk
    30 void CLD2_Debug(const char* text,
    31                 int lo_offset,
    32                 int hi_offset,
    33                 bool more_to_come, bool score_cjk,
    34                 const ScoringHitBuffer* hitbuffer,
    35                 const ScoringContext* scoringcontext,
    36                 const ChunkSpan* cspan,
    37                 const ChunkSummary* chunksummary);
    39 // For showing all chunks
    40 void CLD2_Debug2(const char* text,
    41                  bool more_to_come, bool score_cjk,
    42                  const ScoringHitBuffer* hitbuffer,
    43                  const ScoringContext* scoringcontext,
    44                  const SummaryBuffer* summarybuffer);
    46 std::string GetPlainEscapedText(const std::string& txt);
    47 std::string GetHtmlEscapedText(const std::string& txt);
    48 std::string GetColorHtmlEscapedText(Language lang, const std::string& txt);
    49 std::string GetLangColorHtmlEscapedText(Language lang, const std::string& txt);
    51 void DumpResultChunkVector(FILE* f, const char* src,
    52                            ResultChunkVector* resultchunkvector);
    55 }     // End namespace CLD2
    57 #endif  // I18N_ENCODINGS_CLD2_INTERNAL_DEBUG_H_

mercurial