projects
/
apple
/
icu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ICU-59117.0.1.tar.gz
[apple/icu.git]
/
icuSources
/
common
/
ubidi_props.h
diff --git
a/icuSources/common/ubidi_props.h
b/icuSources/common/ubidi_props.h
index 9e28e32ba958b1c59fd9400f4a346e94f03b1338..69e8853e69b1ca36082892f79bfc39412cbeca4f 100644
(file)
--- a/
icuSources/common/ubidi_props.h
+++ b/
icuSources/common/ubidi_props.h
@@
-1,12
+1,14
@@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
*
/*
*******************************************************************************
*
-* Copyright (C) 2004-201
0
, International Business Machines
+* Copyright (C) 2004-201
4
, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* file name: ubidi_props.h
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* file name: ubidi_props.h
-* encoding: U
S-ASCII
+* encoding: U
TF-8
* tab size: 8 (not used)
* indentation:4
*
* tab size: 8 (not used)
* indentation:4
*
@@
-21,6
+23,7
@@
#include "unicode/utypes.h"
#include "unicode/uset.h"
#include "unicode/utypes.h"
#include "unicode/uset.h"
+#include "putilimp.h"
#include "uset_imp.h"
#include "udataswp.h"
#include "uset_imp.h"
#include "udataswp.h"
@@
-63,6
+66,12
@@
ubidi_getJoiningType(const UBiDiProps *bdp, UChar32 c);
U_CFUNC UJoiningGroup
ubidi_getJoiningGroup(const UBiDiProps *bdp, UChar32 c);
U_CFUNC UJoiningGroup
ubidi_getJoiningGroup(const UBiDiProps *bdp, UChar32 c);
+U_CFUNC UBidiPairedBracketType
+ubidi_getPairedBracketType(const UBiDiProps *bdp, UChar32 c);
+
+U_CFUNC UChar32
+ubidi_getPairedBracket(const UBiDiProps *bdp, UChar32 c);
+
/* file definitions --------------------------------------------------------- */
#define UBIDI_DATA_NAME "ubidi"
/* file definitions --------------------------------------------------------- */
#define UBIDI_DATA_NAME "ubidi"
@@
-83,6
+92,8
@@
enum {
UBIDI_IX_JG_START,
UBIDI_IX_JG_LIMIT,
UBIDI_IX_JG_START,
UBIDI_IX_JG_LIMIT,
+ UBIDI_IX_JG_START2, /* new in format version 2.2, ICU 54 */
+ UBIDI_IX_JG_LIMIT2,
UBIDI_MAX_VALUES_INDEX=15,
UBIDI_IX_TOP=16
UBIDI_MAX_VALUES_INDEX=15,
UBIDI_IX_TOP=16
@@
-94,7
+105,7
@@
enum {
/* UBIDI_CLASS_SHIFT=0, */ /* bidi class: 5 bits (4..0) */
UBIDI_JT_SHIFT=5, /* joining type: 3 bits (7..5) */
/* UBIDI_CLASS_SHIFT=0, */ /* bidi class: 5 bits (4..0) */
UBIDI_JT_SHIFT=5, /* joining type: 3 bits (7..5) */
-
/* UBIDI__SHIFT=8, reserved
: 2 bits (9..8) */
+
UBIDI_BPT_SHIFT=8, /* Bidi_Paired_Bracket_Type(bpt)
: 2 bits (9..8) */
UBIDI_JOIN_CONTROL_SHIFT=10,
UBIDI_BIDI_CONTROL_SHIFT=11,
UBIDI_JOIN_CONTROL_SHIFT=10,
UBIDI_BIDI_CONTROL_SHIFT=11,
@@
-107,12
+118,19
@@
enum {
#define UBIDI_CLASS_MASK 0x0000001f
#define UBIDI_JT_MASK 0x000000e0
#define UBIDI_CLASS_MASK 0x0000001f
#define UBIDI_JT_MASK 0x000000e0
+#define UBIDI_BPT_MASK 0x00000300
#define UBIDI_MAX_JG_MASK 0x00ff0000
#define UBIDI_GET_CLASS(props) ((props)&UBIDI_CLASS_MASK)
#define UBIDI_GET_FLAG(props, shift) (((props)>>(shift))&1)
#define UBIDI_MAX_JG_MASK 0x00ff0000
#define UBIDI_GET_CLASS(props) ((props)&UBIDI_CLASS_MASK)
#define UBIDI_GET_FLAG(props, shift) (((props)>>(shift))&1)
+#if U_SIGNED_RIGHT_SHIFT_IS_ARITHMETIC
+# define UBIDI_GET_MIRROR_DELTA(props) ((int16_t)(props)>>UBIDI_MIRROR_DELTA_SHIFT)
+#else
+# define UBIDI_GET_MIRROR_DELTA(props) (int16_t)(((props)&0x8000) ? (((props)>>UBIDI_MIRROR_DELTA_SHIFT)|0xe000) : ((props)>>UBIDI_MIRROR_DELTA_SHIFT))
+#endif
+
enum {
UBIDI_ESC_MIRROR_DELTA=-4,
UBIDI_MIN_MIRROR_DELTA=-3,
enum {
UBIDI_ESC_MIRROR_DELTA=-4,
UBIDI_MIN_MIRROR_DELTA=-3,