From a0abcf44533e242c524ed2955838880d00feadc9 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Thu, 17 Sep 2009 13:21:07 +0000 Subject: Add missing gclient dependencies to .gitignore. Fix the format of many directories so they don't show up in git status anymore. Run dos2unix on *.cc, caught many inconsistent and CRLF files. TBR=evan TEST=still build, git status shows nothing BUG=none Review URL: http://codereview.chromium.org/211010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26441 0039d316-1c4b-4281-b951-d872f2087c98 --- .../encodings/compact_lang_det/getonescriptspan.cc | 1140 ++++++++++---------- 1 file changed, 570 insertions(+), 570 deletions(-) (limited to 'third_party/cld') diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.cc b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.cc index 05d4a45..146f862 100644 --- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.cc +++ b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.cc @@ -1,570 +1,570 @@ -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.h" -#include -#include - -#include "third_party/cld/bar/toolbar/cld/i18n/encodings/lang_enc.h" -#include "third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propjustletter.h" -#include "third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propletterscriptnum.h" -#include "third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8scannotjustletterspecial.h" - -#include "third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h" -#include "third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h" -#include "third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_google.h" -#include "third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils.h" -#include "third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib.h" -#include "third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h" -#include "third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils.h" - -static const Language GRAY_LANG = (Language)254; - -static const int kMaxUpToWordBoundary = 50; // span < this make longer, - // else make shorter -static const int kMaxAdvanceToWordBoundary = 10; // +/- this many bytes - // to round to word boundary, - // direction above - -static const char kSpecialSymbol[256] = { // true for < > & - 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,1,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,1,0,1,0, - 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, - - 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, -}; - - - -#define LT 0 // < -#define GT 1 // > -#define EX 2 // ! -#define HY 3 // - -#define QU 4 // " -#define AP 5 // ' -#define SL 6 // / -#define S_ 7 -#define C_ 8 -#define R_ 9 -#define I_ 10 -#define P_ 11 -#define T_ 12 -#define Y_ 13 -#define L_ 14 -#define E_ 15 -#define CR 16 // or -#define NL 17 // non-letter: ASCII whitespace, digit, punctuation -#define PL 18 // possible letter, incl. & -#define xx 19 // - -// Map byte to one of ~20 interesting categories for cheap tag parsing -static const uint8 kCharToSub[256] = { - NL,NL,NL,NL, NL,NL,NL,NL, NL,NL,CR,NL, NL,CR,NL,NL, - NL,NL,NL,NL, NL,NL,NL,NL, NL,NL,NL,NL, NL,NL,NL,NL, - NL,EX,QU,NL, NL,NL,PL,AP, NL,NL,NL,NL, NL,HY,NL,SL, - NL,NL,NL,NL, NL,NL,NL,NL, NL,NL,NL,NL, LT,NL,GT,NL, - - PL,PL,PL,C_, PL,E_,PL,PL, PL,I_,PL,PL, L_,PL,PL,PL, - P_,PL,R_,S_, T_,PL,PL,PL, PL,Y_,PL,NL, NL,NL,NL,NL, - PL,PL,PL,C_, PL,E_,PL,PL, PL,I_,PL,PL, L_,PL,PL,PL, - P_,PL,R_,S_, T_,PL,PL,PL, PL,Y_,PL,NL, NL,NL,NL,NL, - - NL,NL,NL,NL, NL,NL,NL,NL, NL,NL,NL,NL, NL,NL,NL,NL, - NL,NL,NL,NL, NL,NL,NL,NL, NL,NL,NL,NL, NL,NL,NL,NL, - NL,NL,NL,NL, NL,NL,NL,NL, NL,NL,NL,NL, NL,NL,NL,NL, - NL,NL,NL,NL, NL,NL,NL,NL, NL,NL,NL,NL, NL,NL,NL,NL, - - PL,PL,PL,PL, PL,PL,PL,PL, PL,PL,PL,PL, PL,PL,PL,PL, - PL,PL,PL,PL, PL,PL,PL,PL, PL,PL,PL,PL, PL,PL,PL,PL, - PL,PL,PL,PL, PL,PL,PL,PL, PL,PL,PL,PL, PL,PL,PL,PL, - PL,PL,PL,PL, PL,PL,PL,PL, PL,PL,PL,PL, PL,PL,PL,PL, -}; - -#undef LT -#undef GT -#undef EX -#undef HY -#undef QU -#undef AP -#undef SL -#undef S_ -#undef C_ -#undef R_ -#undef I_ -#undef P_ -#undef T_ -#undef Y_ -#undef L_ -#undef E_ -#undef CR -#undef NL -#undef PL -#undef xx - - -#define OK 0 -#define X_ 1 - -// State machine to do cheap parse of non-letter strings incl. tags -// advances -// | | -// advances ... for