1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/i18n/uspoof_wsconf.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,70 @@ 1.4 +/* 1.5 +****************************************************************************** 1.6 +* 1.7 +* Copyright (C) 2008-2012, International Business Machines 1.8 +* Corporation and others. All Rights Reserved. 1.9 +* 1.10 +****************************************************************************** 1.11 +* file name: uspoof_buildwsconf.h 1.12 +* encoding: US-ASCII 1.13 +* tab size: 8 (not used) 1.14 +* indentation:4 1.15 +* 1.16 +* created on: 2009Jan19 1.17 +* created by: Andy Heninger 1.18 +* 1.19 +* Internal classes and functions 1.20 +* for compiling whole script confusable data into its binary (runtime) form. 1.21 +*/ 1.22 + 1.23 +#ifndef __USPOOF_BUILDWSCONF_H__ 1.24 +#define __USPOOF_BUILDWSCONF_H__ 1.25 + 1.26 +#include "unicode/utypes.h" 1.27 + 1.28 +#if !UCONFIG_NO_NORMALIZATION 1.29 + 1.30 +#if !UCONFIG_NO_REGULAR_EXPRESSIONS 1.31 + 1.32 +#include "uspoof_impl.h" 1.33 +#include "utrie2.h" 1.34 + 1.35 + 1.36 +U_NAMESPACE_BEGIN 1.37 + 1.38 +// 1.39 +// class BuilderScriptSet. Represents the set of scripts (Script Codes) 1.40 +// containing characters that are confusable with one specific 1.41 +// code point. 1.42 +// 1.43 + 1.44 +class BuilderScriptSet: public UMemory { 1.45 + public: 1.46 + UChar32 codePoint; // The source code point. 1.47 + UTrie2 *trie; // Any-case or Lower-case Trie. 1.48 + // These Trie tables are the final result of the 1.49 + // build. This flag indicates which of the two 1.50 + // this set of data is for. 1.51 + ScriptSet *sset; // The set of scripts itself. 1.52 + 1.53 + // Vectors of all B 1.54 + uint32_t index; // Index of this set in the Build Time vector 1.55 + // of script sets. 1.56 + uint32_t rindex; // Index of this set in the final (runtime) 1.57 + // array of sets. 1.58 + UBool scriptSetOwned; // True if this BuilderScriptSet owns (should delete) 1.59 + // its underlying sset. 1.60 + 1.61 + BuilderScriptSet(); 1.62 + ~BuilderScriptSet(); 1.63 +}; 1.64 + 1.65 + 1.66 +void buildWSConfusableData(SpoofImpl *spImpl, const char * confusablesWS, 1.67 + int32_t confusablesWSLen, UParseError *pe, UErrorCode &status); 1.68 + 1.69 +U_NAMESPACE_END 1.70 + 1.71 +#endif // !UCONFIG_NO_REGULAR_EXPRESSIONS 1.72 +#endif // !UCONFIG_NO_NORMALIZATION 1.73 +#endif