/*
*******************************************************************************
*
-* Copyright (C) 2009-2011, International Business Machines
+* Copyright (C) 2009-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
#include "cmemory.h"
#include "mutex.h"
#include "normalizer2impl.h"
+#include "putilimp.h"
#include "uassert.h"
#include "uset_imp.h"
#include "utrie2.h"
/*
*******************************************************************************
*
-* Copyright (C) 2004-2011, International Business Machines
+* Copyright (C) 2004-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
#include "unicode/utypes.h"
#include "unicode/uset.h"
+#include "putilimp.h"
#include "uset_imp.h"
#include "udataswp.h"
#define UCASE_MAX_DELTA 0x1ff
#define UCASE_MIN_DELTA (-UCASE_MAX_DELTA-1)
-#define UCASE_GET_DELTA(props) ((int16_t)(props)>>UCASE_DELTA_SHIFT)
+#if U_SIGNED_RIGHT_SHIFT_IS_ARITHMETIC
+# define UCASE_GET_DELTA(props) ((int16_t)(props)>>UCASE_DELTA_SHIFT)
+#else
+# define UCASE_GET_DELTA(props) (int16_t)(((props)&0x8000) ? (((props)>>UCASE_DELTA_SHIFT)|0xfc00) : ((uint16_t)(props)>>UCASE_DELTA_SHIFT))
+#endif
/* case-ignorable uses one of the delta bits, see gencase/store.c */
#define UCASE_CASE_IGNORABLE 0x40
/*
******************************************************************************
* *
-* Copyright (C) 1999-2011, International Business Machines *
+* Copyright (C) 1999-2012, International Business Machines *
* Corporation and others. All Rights Reserved. *
* *
******************************************************************************
#include "unicode/utypes.h"
#include "unicode/udata.h"
#include "unicode/ures.h"
+#include "putilimp.h"
#include "udataswp.h"
/**