/*
******************************************************************************
*
-* Copyright (C) 1997-2013, International Business Machines
+* Copyright (C) 1997-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
U_CAPI void U_EXPORT2
u_getVersion(UVersionInfo versionArray) {
+ (void)copyright; // Suppress unused variable warning from clang.
u_versionFromString(versionArray, U_ICU_VERSION);
}
/*
**********************************************************************
-* Copyright (C) 2000-2012, International Business Machines
+* Copyright (C) 2000-2014, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: ucnv2022.cpp
while (hi != low) /*binary search*/{
- register int32_t mid = (hi+low) >> 1; /*Finds median*/
+ int32_t mid = (hi+low) >> 1; /*Finds median*/
if (mid == oldmid)
break;
/*
*******************************************************************************
*
-* Copyright (C) 1999-2013, International Business Machines
+* Copyright (C) 1999-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* @internal
*/
#define U8_COUNT_TRAIL_BYTES(leadByte) \
- ((leadByte)<0xf0 ? \
- ((leadByte)>=0xc0)+((leadByte)>=0xe0) : \
- (leadByte)<0xfe ? 3+((leadByte)>=0xf8)+((leadByte)>=0xfc) : 0)
+ ((unsigned char)(leadByte)<0xf0 ? \
+ ((unsigned char)(leadByte)>=0xc0)+((unsigned char)(leadByte)>=0xe0) : \
+ (unsigned char)(leadByte)<0xfe ? 3+((unsigned char)(leadByte)>=0xf8)+((unsigned char)(leadByte)>=0xfc) : 0)
/**
* Counts the trail bytes for a UTF-8 lead byte of a valid UTF-8 sequence.
/* ------------------------------------------------------------------ */
/* Decimal Number arithmetic module */
/* ------------------------------------------------------------------ */
-/* Copyright (c) IBM Corporation, 2000-2012. All rights reserved. */
+/* Copyright (c) IBM Corporation, 2000-2014. All rights reserved. */
/* */
/* This software is made available under the terms of the */
/* ICU License -- ICU 1.8.1 and later. */
/* ------------------------------------------------------------------ */
/* round-for-reround digits */
/* ------------------------------------------------------------------ */
+#if 0
static const uByte DECSTICKYTAB[10]={1,1,2,3,4,6,6,7,8,9}; /* used if sticky */
+#endif
/* ------------------------------------------------------------------ */
/* Powers of ten (powers[n]==10**n, 0<=n<=9) */
/*
**********************************************************************
-* Copyright (C) 1997-2012, International Business Machines
+* Copyright (C) 1997-2014, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
//static const char I64_MIN_REP[] = "9223372036854775808";
-static const uint8_t DIGIT_HAVE_NONE=0;
-static const uint8_t DIGIT_HAVE_DOUBLE=1;
-static const uint8_t DIGIT_HAVE_INT64=2;
-
U_NAMESPACE_BEGIN
// -------------------------------------
/*
*******************************************************************************
-* Copyright (C) 2007-2013, International Business Machines Corporation and
+* Copyright (C) 2007-2014, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
static const UChar PK_VAR_F[]={LOW_F,0};
static const UChar PK_VAR_T[]={LOW_T,0};
static const UChar PK_VAR_V[]={LOW_V,0};
-static const UChar PK_VAR_J[]={LOW_J,0};
static const UChar PK_WITHIN[]={LOW_W,LOW_I,LOW_T,LOW_H,LOW_I,LOW_N,0};
static const UChar PK_DECIMAL[]={LOW_D,LOW_E,LOW_C,LOW_I,LOW_M,LOW_A,LOW_L,0};
static const UChar PK_INTEGER[]={LOW_I,LOW_N,LOW_T,LOW_E,LOW_G,LOW_E,LOW_R,0};
//
// file: regexcmp.cpp
//
-// Copyright (C) 2002-2013 International Business Machines Corporation and others.
+// Copyright (C) 2002-2014 International Business Machines Corporation and others.
// All Rights Reserved.
//
// This file contains the ICU regular expression compiler, which is responsible
if (U_FAILURE(*fStatus)) {
return NULL;
}
+ (void)chLowerP; // Suppress compiler unused variable warning.
U_ASSERT(fC.fChar == chLowerP || fC.fChar == chP);
UBool negated = (fC.fChar == chP);
/*
******************************************************************************
* *
-* Copyright (C) 2001-2009, International Business Machines *
+* Copyright (C) 2001-2014, International Business Machines *
* Corporation and others. All Rights Reserved. *
* *
******************************************************************************
static UBool i18n_cleanup(void)
{
ECleanupI18NType libType = UCLN_I18N_START;
+ (void)copyright; /* Suppress unused variable warning with clang. */
while (++libType<UCLN_I18N_COUNT) {
if (gCleanupFunctions[libType])
/*
******************************************************************************
* *
-* Copyright (C) 2001-2013, International Business Machines *
+* Copyright (C) 2001-2014, International Business Machines *
* Corporation and others. All Rights Reserved. *
* *
******************************************************************************
{
ECleanupIOType libType = UCLN_IO_START;
+ (void)copyright; // Suppress unused variable warning.
while (++libType<UCLN_IO_COUNT) {
if (gCleanupFunctions[libType])
{
/*
*
- * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp. and others 1998-2014 - All Rights Reserved
*
*/
IndicRearrangementProcessor2::IndicRearrangementProcessor2(
const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
- : StateTableProcessor2(morphSubtableHeader, success), indicRearrangementSubtableHeader(morphSubtableHeader, success),
- entryTable(stHeader, success, entryTableOffset, LE_UNBOUNDED_ARRAY)
+ : StateTableProcessor2(morphSubtableHeader, success), entryTable(stHeader, success, entryTableOffset, LE_UNBOUNDED_ARRAY),
+ indicRearrangementSubtableHeader(morphSubtableHeader, success)
{
}
/*
- * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp. and others 1998-2014 - All Rights Reserved
*/
#include "LETypes.h"
LEUnicode32 DefaultCharMapper::mapChar(LEUnicode32 ch) const
{
+ (void)copyright; // Suppress unused variable warning.
if (fFilterControls) {
le_int32 index = OpenTypeUtilities::search((le_uint32)ch, (le_uint32 *)controlChars, controlCharsCount);
/*
*
- * (C) Copyright IBM Corp and Others. 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp and Others. 1998-2014 - All Rights Reserved
*
*/
LigatureSubstitutionProcessor2::LigatureSubstitutionProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
: StateTableProcessor2(morphSubtableHeader, success),
ligActionOffset(0),
- ligatureSubstitutionHeader(morphSubtableHeader, success), componentOffset(0), ligatureOffset(0), entryTable()
+ componentOffset(0), ligatureOffset(0), entryTable(), ligatureSubstitutionHeader(morphSubtableHeader, success)
{
if (LE_FAILURE(success)) return;
}
do {
- le_uint32 componentGlyph = componentStack[m--]; // pop off
+ le_int32 componentGlyph = componentStack[m--]; // pop off
ap.addObject(success);
action = SWAPL(*ap.getAlias());
offset = action & lafComponentOffsetMask;
if (offset != 0) {
- if(componentGlyph > glyphStorage.getGlyphCount()) {
+ if(componentGlyph > glyphStorage.getGlyphCount() || componentGlyph < 0) {
LE_DEBUG_BAD_FONT("preposterous componentGlyph");
currGlyph+= dir;
return nextStateIndex; // get out! bad font
/*
*
- * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp. and others 1998-2014 - All Rights Reserved
*
*/
}
StateTableProcessor2::StateTableProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
- : SubtableProcessor2(morphSubtableHeader, success), stateTableHeader(morphSubtableHeader, success),
- stHeader(stateTableHeader, success, (const StateTableHeader2*)&stateTableHeader->stHeader),
- nClasses(0), classTableOffset(0), stateArrayOffset(0), entryTableOffset(0), classTable(), format(0),
- stateArray()
+ : SubtableProcessor2(morphSubtableHeader, success),
+ dir(1),
+ format(0),
+ nClasses(0),
+ classTableOffset(0),
+ stateArrayOffset(0),
+ entryTableOffset(0),
+ classTable(),
+ stateArray(),
+ stateTableHeader(morphSubtableHeader, success),
+ stHeader(stateTableHeader, success, (const StateTableHeader2*)&stateTableHeader->stHeader)
{
if (LE_FAILURE(success)) {
return;
/*
*
- * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp. and others 1998-2014 - All Rights Reserved
*
*/
}
SubtableProcessor2::SubtableProcessor2(const LEReferenceTo<MorphSubtableHeader2> &morphSubtableHeader, LEErrorCode &success)
- : subtableHeader(morphSubtableHeader, success), length(0), coverage(0), subtableFeatures(0L)
+ : length(0), coverage(0), subtableFeatures(0L), subtableHeader(morphSubtableHeader, success)
{
if(LE_FAILURE(success)) return;
/*
**********************************************************************
- * Copyright (C) 2002-2013, International Business Machines
+ * Copyright (C) 2002-2014, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
return;
}
+ (void)copyright; // Suppress unused variable warning.
(void)fVertical; // Suppress warning for unused field fVertical.
// FIXME: should check the limit arrays for consistency...
le_int32 styleCount = sizeof styleRunArrays / sizeof styleRunArrays[0];
StyleRuns styleRuns(styleRunArrays, styleCount);
LEErrorCode layoutStatus = LE_NO_ERROR;
-
+
fStyleRunCount = styleRuns.getRuns(NULL, NULL);
fStyleRunLimits = LE_NEW_ARRAY(le_int32, fStyleRunCount);
}
// Make big arrays for the glyph widths, glyph-to-char and char-to-glyph maps,
- // in logical order. (Both maps need an extra entry for the end of the text.)
+ // in logical order. (Both maps need an extra entry for the end of the text.)
//
// For each layout get the positions and convert them into glyph widths, in
// logical order. Get the glyph-to-char mapping, offset by starting index in the
fGlyphToCharMap = LE_NEW_ARRAY(le_int32, fGlyphCount + 1);
fCharToMinGlyphMap = LE_NEW_ARRAY(le_int32, fCharCount + 1);
fCharToMaxGlyphMap = LE_NEW_ARRAY(le_int32, fCharCount + 1);
- if ((fGlyphWidths == NULL) || (fGlyphToCharMap == NULL) ||
+ if ((fGlyphWidths == NULL) || (fGlyphToCharMap == NULL) ||
(fCharToMinGlyphMap == NULL) || (fCharToMaxGlyphMap == NULL)) {
status = LE_MEMORY_ALLOCATION_ERROR;
return;
fStyleRunInfo[run].glyphs = LE_NEW_ARRAY(LEGlyphID, glyphCount);
fStyleRunInfo[run].positions = LE_NEW_ARRAY(float, glyphCount * 2 + 2);
- if ((fStyleRunInfo[run].glyphs == NULL) ||
+ if ((fStyleRunInfo[run].glyphs == NULL) ||
(fStyleRunInfo[run].positions == NULL)) {
status = LE_MEMORY_ALLOCATION_ERROR;
return;
}
}
-
+
le_bool ParagraphLayout::isComplex(const LEUnicode chars[], le_int32 count)
{
UErrorCode scriptStatus = U_ZERO_ERROR;
// previous run, even though this glyph may be in the middle of the
// run.
fVisualRunLastX -= fStyleRunInfo[run].positions[leftGlyph * 2];
-
+
// Make rightGlyph be the glyph just to the right of
// the run's glyphs
rightGlyph += 1;
le_int32 glyphCount = lastRun->getGlyphCount();
const float *positions = lastRun->getPositions();
-
+
return (le_int32) positions[glyphCount * 2];
}
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2013, International Business Machines Corporation and
+ * Copyright (c) 1997-2014, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/*****************************************************************************
}
#endif
-static const UVersionInfo ICU_34 = {3,4,0,0};
-
static void TestFromUCountPending(){
#if !UCONFIG_NO_LEGACY_CONVERSION
UErrorCode status = U_ZERO_ERROR;
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 2001-2013, International Business Machines Corporation and
+ * Copyright (c) 2001-2014, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/*******************************************************************************
+/*
const static char impTest[][20] = {
"\\u4e00",
"a",
"B",
"\\u4e01"
};
+*/
static void TestImplicitTailoring(void) {
/********************************************************************
- * Copyright (c) 1997-2013, International Business Machines
+ * Copyright (c) 1997-2014, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************/
"asfdasd", "5464", "12235",
/* test the last index */
"zyyy", "YI",
- '\0'
+ NULL
};
UScriptCode expected[] ={
/* locales should return */
const int32_t capacity = 10;
- for( ; testNames[i]!='\0'; i++){
+ for( ; testNames[i]!=NULL; i++){
UScriptCode script[10]={USCRIPT_INVALID_CODE};
uscript_getCode(testNames[i],script,capacity, &err);
if( script[0] != expected[i]){
/* test names */
"Cyrillic","Deseret","Devanagari","Ethiopic","Georgian",
"Gothic", "Greek", "Gujarati",
- '\0'
+ NULL
};
i=0;
while(i<sizeof(testAbbr)/sizeof(UScriptCode)){
"Knda","Kana","Khmr","Laoo",
"Latn",
"Mlym", "Mong",
- '\0'
+ NULL
};
i=0;
while(i<sizeof(testAbbr)/sizeof(UScriptCode)){
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2013, International Business Machines Corporation and
+ * Copyright (c) 1997-2014, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/*******************************************************************************
/* test data ---------------------------------------------------------------- */
-static const UChar LAST_CHAR_CODE_IN_FILE = 0xFFFD;
static const char tagStrings[] = "MnMcMeNdNlNoZsZlZpCcCfCsCoCnLuLlLtLmLoPcPdPsPePoSmScSkSoPiPf";
static const int32_t tagValues[] =
{
/*
*******************************************************************************
*
-* Copyright (C) 2007-2013, International Business Machines
+* Copyright (C) 2007-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
static const UChar skel_Hmm[] = { 0x0048, 0x006D, 0x006D, 0 };
static const UChar skel_HHmm[] = { 0x0048, 0x0048, 0x006D, 0x006D, 0 };
static const UChar skel_hhmm[] = { 0x0068, 0x0068, 0x006D, 0x006D, 0 };
-static const UChar patn_Hcmm[] = { 0x0048, 0x003A, 0x006D, 0x006D, 0 }; /* H:mm */
static const UChar patn_hcmm_a[] = { 0x0068, 0x003A, 0x006D, 0x006D, 0x0020, 0x0061, 0 }; /* h:mm a */
static const UChar patn_HHcmm[] = { 0x0048, 0x0048, 0x003A, 0x006D, 0x006D, 0 }; /* HH:mm */
static const UChar patn_hhcmm_a[] = { 0x0068, 0x0068, 0x003A, 0x006D, 0x006D, 0x0020, 0x0061, 0 }; /* hh:mm a */
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1996-2010, International Business Machines Corporation and
+ * Copyright (c) 1996-2014, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
#include "unicode/simpletz.h"
-static const double DAY_MS = 24.*60.*60.*1000.;
-
#define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break
AstroTest::AstroTest(): astro(NULL), gc(NULL) {