w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ubidiimp.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 ******************************************************************************
5 *
6 * Copyright (C) 1999-2016, International Business Machines
7 * Corporation and others. All Rights Reserved.
8 *
9 ******************************************************************************
10 * file name: ubidiimp.h
11 * encoding: UTF-8
12 * tab size: 8 (not used)
13 * indentation:4
14 *
15 * created on: 1999aug06
16 * created by: Markus W. Scherer, updated by Matitiahu Allouche
17 */
18 
19 #ifndef UBIDIIMP_H
20 #define UBIDIIMP_H
21 
22 #include "unicode/utypes.h"
23 #include "unicode/ubidi.h"
24 #include "unicode/uchar.h"
25 #include "ubidi_props.h"
26 
27 /* miscellaneous definitions ---------------------------------------------- */
28 
29 // ICU-20853=ICU-20935 Solaris #defines CS and ES in sys/regset.h
30 #ifdef CS
31 # undef CS
32 #endif
33 #ifdef ES
34 # undef ES
35 #endif
36 
37 typedef uint8_t DirProp;
38 typedef uint32_t Flags;
39 
40 /* Comparing the description of the BiDi algorithm with this implementation
41  is easier with the same names for the BiDi types in the code as there.
42  See UCharDirection in uchar.h .
43 */
44 enum {
45  L= U_LEFT_TO_RIGHT, /* 0 */
46  R= U_RIGHT_TO_LEFT, /* 1 */
50  AN= U_ARABIC_NUMBER, /* 5 */
52  B= U_BLOCK_SEPARATOR, /* 7 */
55  ON= U_OTHER_NEUTRAL, /* 10 */
68  ENL, /* EN after W7 */ /* 23 */
69  ENR, /* EN not subject to W7 */ /* 24 */
71 };
72 
73 /* Sometimes, bit values are more appropriate
74  to deal with directionality properties.
75  Abbreviations in these macro names refer to names
76  used in the BiDi algorithm.
77 */
78 #define DIRPROP_FLAG(dir) (1UL<<(dir))
79 #define PURE_DIRPROP(prop) ((prop)&~0xE0) ?????????????????????????
80 
81 /* special flag for multiple runs from explicit embedding codes */
82 #define DIRPROP_FLAG_MULTI_RUNS (1UL<<31)
83 
84 /* are there any characters that are LTR or RTL? */
85 #define MASK_LTR (DIRPROP_FLAG(L)|DIRPROP_FLAG(EN)|DIRPROP_FLAG(ENL)|DIRPROP_FLAG(ENR)|DIRPROP_FLAG(AN)|DIRPROP_FLAG(LRE)|DIRPROP_FLAG(LRO)|DIRPROP_FLAG(LRI))
86 #define MASK_RTL (DIRPROP_FLAG(R)|DIRPROP_FLAG(AL)|DIRPROP_FLAG(RLE)|DIRPROP_FLAG(RLO)|DIRPROP_FLAG(RLI))
87 #define MASK_R_AL (DIRPROP_FLAG(R)|DIRPROP_FLAG(AL))
88 #define MASK_STRONG_EN_AN (DIRPROP_FLAG(L)|DIRPROP_FLAG(R)|DIRPROP_FLAG(AL)|DIRPROP_FLAG(EN)|DIRPROP_FLAG(AN))
89 
90 /* explicit embedding codes */
91 #define MASK_EXPLICIT (DIRPROP_FLAG(LRE)|DIRPROP_FLAG(LRO)|DIRPROP_FLAG(RLE)|DIRPROP_FLAG(RLO)|DIRPROP_FLAG(PDF))
92 
93 /* explicit isolate codes */
94 #define MASK_ISO (DIRPROP_FLAG(LRI)|DIRPROP_FLAG(RLI)|DIRPROP_FLAG(FSI)|DIRPROP_FLAG(PDI))
95 
96 #define MASK_BN_EXPLICIT (DIRPROP_FLAG(BN)|MASK_EXPLICIT)
97 
98 /* paragraph and segment separators */
99 #define MASK_B_S (DIRPROP_FLAG(B)|DIRPROP_FLAG(S))
100 
101 /* all types that are counted as White Space or Neutral in some steps */
102 #define MASK_WS (MASK_B_S|DIRPROP_FLAG(WS)|MASK_BN_EXPLICIT|MASK_ISO)
103 
104 /* types that are neutrals or could becomes neutrals in (Wn) */
105 #define MASK_POSSIBLE_N (DIRPROP_FLAG(ON)|DIRPROP_FLAG(CS)|DIRPROP_FLAG(ES)|DIRPROP_FLAG(ET)|MASK_WS)
106 
107 /*
108  * These types may be changed to "e",
109  * the embedding type (L or R) of the run,
110  * in the BiDi algorithm (N2)
111  */
112 #define MASK_EMBEDDING (DIRPROP_FLAG(NSM)|MASK_POSSIBLE_N)
113 
114 /* the dirProp's L and R are defined to 0 and 1 values in UCharDirection */
115 #define GET_LR_FROM_LEVEL(level) ((DirProp)((level)&1))
116 
117 #define IS_DEFAULT_LEVEL(level) ((level)>=0xfe)
118 
119 /*
120  * The following bit is used for the directional isolate status.
121  * Stack entries corresponding to isolate sequences are greater than ISOLATE.
122  */
123 #define ISOLATE 0x0100
124 
127 
128 #define GET_PARALEVEL(ubidi, index) \
129  ((UBiDiLevel)(!(ubidi)->defaultParaLevel || (index)<(ubidi)->paras[0].limit ? \
130  (ubidi)->paraLevel : ubidi_getParaLevelAtIndex((ubidi), (index))))
131 
132 /* number of paras entries allocated initially without malloc */
133 #define SIMPLE_PARAS_COUNT 10
134 /* number of isolate entries allocated initially without malloc */
135 #define SIMPLE_ISOLATES_COUNT 5
136 /* number of isolate run entries for paired brackets allocated initially without malloc */
137 #define SIMPLE_OPENINGS_COUNT 20
138 
139 #define CR 0x000D
140 #define LF 0x000A
141 
142 /* Run structure for reordering --------------------------------------------- */
143 enum {
147  RLM_AFTER=8
148 };
149 
150 typedef struct Para {
154 
155 enum { /* flags for Opening.flags */
158 };
159 
160 typedef struct Opening {
161  int32_t position; /* position of opening bracket */
162  int32_t match; /* matching char or -position of closing bracket */
163  int32_t contextPos; /* position of last strong char found before opening */
164  uint16_t flags; /* bits for L or R/AL found within the pair */
165  UBiDiDirection contextDir; /* L or R according to last strong char before opening */
166  uint8_t filler; /* to complete a nice multiple of 4 chars */
168 
169 typedef struct IsoRun {
170  int32_t contextPos; /* position of char determining context */
171  uint16_t start; /* index of first opening entry for this run */
172  uint16_t limit; /* index after last opening entry for this run */
173  UBiDiLevel level; /* level of this run */
174  DirProp lastStrong; /* bidi class of last strong char found in this run */
175  DirProp lastBase; /* bidi class of last base char found in this run */
176  UBiDiDirection contextDir; /* L or R to use as context for following openings */
178 
179 typedef struct BracketData {
181  /* array of opening entries which should be enough in most cases; no malloc() */
183  Opening *openings; /* pointer to current array of entries */
184  int32_t openingsCount; /* number of allocated entries */
185  int32_t isoRunLast; /* index of last used entry */
186  /* array of nested isolated sequence entries; can never excess UBIDI_MAX_EXPLICIT_LEVEL
187  + 1 for index 0, + 1 for before the first isolated sequence */
189  UBool isNumbersSpecial; /* reordering mode for NUMBERS_SPECIAL */
191 
192 typedef struct Isolate {
198 
199 typedef struct Run {
200  int32_t logicalStart, /* first character of the run; b31 indicates even/odd level */
201  visualLimit, /* last visual position of the run +1 */
202  insertRemove; /* if >0, flags for inserting LRM/RLM before/after run,
203  if <0, count of bidi controls within run */
204 } Run;
205 
206 /* in a Run, logicalStart will get this bit set if the run level is odd */
207 #define INDEX_ODD_BIT (1UL<<31)
208 
209 #define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((int32_t)((level)&1)<<31))
210 #define ADD_ODD_BIT_FROM_LEVEL(x, level) ((x)|=((int32_t)((level)&1)<<31))
211 #define REMOVE_ODD_BIT(x) ((x)&=~INDEX_ODD_BIT)
212 
213 #define GET_INDEX(x) ((x)&~INDEX_ODD_BIT)
214 #define GET_ODD_BIT(x) ((uint32_t)(x)>>31)
215 #define IS_ODD_RUN(x) ((UBool)(((x)&INDEX_ODD_BIT)!=0))
216 #define IS_EVEN_RUN(x) ((UBool)(((x)&INDEX_ODD_BIT)==0))
217 
219 ubidi_getRuns(UBiDi *pBiDi, UErrorCode *pErrorCode);
220 
221 /** BiDi control code points */
222 enum {
223  ZWNJ_CHAR=0x200c,
227  LRE_CHAR=0x202a,
232  LRI_CHAR=0x2066,
235  PDI_CHAR
236 };
237 
238 #define IS_BIDI_CONTROL_CHAR(c) (((uint32_t)(c)&0xfffffffc)==ZWNJ_CHAR || (uint32_t)((c)-LRE_CHAR)<5 || (uint32_t)((c)-LRI_CHAR)<4)
239 
240 /* InsertPoints structure for noting where to put BiDi marks ---------------- */
241 
242 typedef struct Point {
243  int32_t pos; /* position in text */
244  int32_t flag; /* flag for LRM/RLM, before/after */
246 
247 typedef struct InsertPoints {
248  int32_t capacity; /* number of points allocated */
249  int32_t size; /* number of points used */
250  int32_t confirmed; /* number of points confirmed */
251  UErrorCode errorCode; /* for eventual memory shortage */
252  Point *points; /* pointer to array of points */
254 
255 
256 /* UBiDi structure ----------------------------------------------------------- */
257 
258 struct UBiDi {
259  /* pointer to parent paragraph object (pointer to self if this object is
260  * a paragraph object); set to NULL in a newly opened object; set to a
261  * real value after a successful execution of ubidi_setPara or ubidi_setLine
262  */
263  const UBiDi * pParaBiDi;
264 
265  /* alias pointer to the current text */
266  const UChar *text;
267 
268  /* length of the current text */
270 
271  /* if the UBIDI_OPTION_STREAMING option is set, this is the length
272  * of text actually processed by ubidi_setPara, which may be shorter than
273  * the original length.
274  * Otherwise, it is identical to the original length.
275  */
277 
278  /* if the UBIDI_OPTION_REMOVE_CONTROLS option is set, and/or
279  * marks are allowed to be inserted in one of the reordering mode, the
280  * length of the result string may be different from the processed length.
281  */
283 
284  /* memory sizes in bytes */
286 
287  /* allocated memory */
294 
295  /* indicators for whether memory may be allocated after ubidi_open() */
297 
298  /* arrays with one value per text-character */
301 
302  /* are we performing an approximation of the "inverse BiDi" algorithm? */
304 
305  /* are we using the basic algorithm or its variation? */
307 
308  /* UBIDI_REORDER_xxx values must be ordered so that all the regular
309  * logical to visual modes come first, and all inverse BiDi modes
310  * come last.
311  */
312  #define UBIDI_REORDER_LAST_LOGICAL_TO_VISUAL UBIDI_REORDER_NUMBERS_SPECIAL
313 
314  /* bitmask for reordering options */
316 
317  /* must block separators receive level 0? */
319 
320  /* the paragraph level */
322  /* original paraLevel when contextual */
323  /* must be one of UBIDI_DEFAULT_xxx or 0 if not contextual */
325 
326  /* context data */
327  const UChar *prologue;
329  const UChar *epilogue;
331 
332  /* the following is set in ubidi_setPara, used in processPropertySeq */
333  const struct ImpTabPair * pImpTabPair; /* pointer to levels state table pair */
334 
335  /* the overall paragraph or line directionality - see UBiDiDirection */
337 
338  /* flags is a bit set for which directional properties are in the text */
340 
341  /* lastArabicPos is index to the last AL in the text, -1 if none */
343 
344  /* characters after trailingWSStart are WS and are */
345  /* implicitly at the paraLevel (rule (L1)) - levels may not reflect that */
347 
348  /* fields for paragraph handling */
349  int32_t paraCount; /* set in getDirProps() */
350  /* filled in getDirProps() */
352 
353  /* for relatively short text, we only need a tiny array of paras (no malloc()) */
355 
356  /* fields for line reordering */
357  int32_t runCount; /* ==-1: runs not set up yet */
359 
360  /* for non-mixed text, we only need a tiny array of runs (no malloc()) */
362 
363  /* maximum or current nesting depth of isolate sequences */
364  /* Within resolveExplicitLevels() and checkExplicitLevels(), this is the maximal
365  nesting encountered.
366  Within resolveImplicitLevels(), this is the index of the current isolates
367  stack entry. */
370 
371  /* for simple text, have a small stack (no malloc()) */
373 
374  /* for inverse Bidi with insertion of directional marks */
376 
377  /* for option UBIDI_OPTION_REMOVE_CONTROLS */
379 
380  /* for Bidi class callback */
381  UBiDiClassCallback *fnClassCallback; /* action pointer */
382  const void *coClassCallback; /* context pointer */
383 };
384 
385 #define IS_VALID_PARA(x) ((x) && ((x)->pParaBiDi==(x)))
386 #define IS_VALID_PARA_OR_LINE(x) ((x) && ((x)->pParaBiDi==(x) || (((x)->pParaBiDi) && (x)->pParaBiDi->pParaBiDi==(x)->pParaBiDi)))
387 
388 typedef union {
396 
397 /* Macros for initial checks at function entry */
398 #define RETURN_IF_NULL_OR_FAILING_ERRCODE(pErrcode, retvalue) UPRV_BLOCK_MACRO_BEGIN { \
399  if((pErrcode)==NULL || U_FAILURE(*pErrcode)) return retvalue; \
400 } UPRV_BLOCK_MACRO_END
401 #define RETURN_IF_NOT_VALID_PARA(bidi, errcode, retvalue) UPRV_BLOCK_MACRO_BEGIN { \
402  if(!IS_VALID_PARA(bidi)) { \
403  errcode=U_INVALID_STATE_ERROR; \
404  return retvalue; \
405  } \
406 } UPRV_BLOCK_MACRO_END
407 #define RETURN_IF_NOT_VALID_PARA_OR_LINE(bidi, errcode, retvalue) UPRV_BLOCK_MACRO_BEGIN { \
408  if(!IS_VALID_PARA_OR_LINE(bidi)) { \
409  errcode=U_INVALID_STATE_ERROR; \
410  return retvalue; \
411  } \
412 } UPRV_BLOCK_MACRO_END
413 #define RETURN_IF_BAD_RANGE(arg, start, limit, errcode, retvalue) UPRV_BLOCK_MACRO_BEGIN { \
414  if((arg)<(start) || (arg)>=(limit)) { \
415  (errcode)=U_ILLEGAL_ARGUMENT_ERROR; \
416  return retvalue; \
417  } \
418 } UPRV_BLOCK_MACRO_END
419 
420 #define RETURN_VOID_IF_NULL_OR_FAILING_ERRCODE(pErrcode) UPRV_BLOCK_MACRO_BEGIN { \
421  if((pErrcode)==NULL || U_FAILURE(*pErrcode)) return; \
422 } UPRV_BLOCK_MACRO_END
423 #define RETURN_VOID_IF_NOT_VALID_PARA(bidi, errcode) UPRV_BLOCK_MACRO_BEGIN { \
424  if(!IS_VALID_PARA(bidi)) { \
425  errcode=U_INVALID_STATE_ERROR; \
426  return; \
427  } \
428 } UPRV_BLOCK_MACRO_END
429 #define RETURN_VOID_IF_NOT_VALID_PARA_OR_LINE(bidi, errcode) UPRV_BLOCK_MACRO_BEGIN { \
430  if(!IS_VALID_PARA_OR_LINE(bidi)) { \
431  errcode=U_INVALID_STATE_ERROR; \
432  return; \
433  } \
434 } UPRV_BLOCK_MACRO_END
435 #define RETURN_VOID_IF_BAD_RANGE(arg, start, limit, errcode) UPRV_BLOCK_MACRO_BEGIN { \
436  if((arg)<(start) || (arg)>=(limit)) { \
437  (errcode)=U_ILLEGAL_ARGUMENT_ERROR; \
438  return; \
439  } \
440 } UPRV_BLOCK_MACRO_END
441 
442 /* helper function to (re)allocate memory if allowed */
444 ubidi_getMemory(BidiMemoryForAllocation *pMemory, int32_t *pSize, UBool mayAllocate, int32_t sizeNeeded);
445 
446 /* helper macros for each allocated array in UBiDi */
447 #define getDirPropsMemory(pBiDi, length) \
448  ubidi_getMemory((BidiMemoryForAllocation *)&(pBiDi)->dirPropsMemory, &(pBiDi)->dirPropsSize, \
449  (pBiDi)->mayAllocateText, (length))
450 
451 #define getLevelsMemory(pBiDi, length) \
452  ubidi_getMemory((BidiMemoryForAllocation *)&(pBiDi)->levelsMemory, &(pBiDi)->levelsSize, \
453  (pBiDi)->mayAllocateText, (length))
454 
455 #define getRunsMemory(pBiDi, length) \
456  ubidi_getMemory((BidiMemoryForAllocation *)&(pBiDi)->runsMemory, &(pBiDi)->runsSize, \
457  (pBiDi)->mayAllocateRuns, (length)*sizeof(Run))
458 
459 /* additional macros used by ubidi_open() - always allow allocation */
460 #define getInitialDirPropsMemory(pBiDi, length) \
461  ubidi_getMemory((BidiMemoryForAllocation *)&(pBiDi)->dirPropsMemory, &(pBiDi)->dirPropsSize, \
462  true, (length))
463 
464 #define getInitialLevelsMemory(pBiDi, length) \
465  ubidi_getMemory((BidiMemoryForAllocation *)&(pBiDi)->levelsMemory, &(pBiDi)->levelsSize, \
466  true, (length))
467 
468 #define getInitialOpeningsMemory(pBiDi, length) \
469  ubidi_getMemory((BidiMemoryForAllocation *)&(pBiDi)->openingsMemory, &(pBiDi)->openingsSize, \
470  true, (length)*sizeof(Opening))
471 
472 #define getInitialParasMemory(pBiDi, length) \
473  ubidi_getMemory((BidiMemoryForAllocation *)&(pBiDi)->parasMemory, &(pBiDi)->parasSize, \
474  true, (length)*sizeof(Para))
475 
476 #define getInitialRunsMemory(pBiDi, length) \
477  ubidi_getMemory((BidiMemoryForAllocation *)&(pBiDi)->runsMemory, &(pBiDi)->runsSize, \
478  true, (length)*sizeof(Run))
479 
480 #define getInitialIsolatesMemory(pBiDi, length) \
481  ubidi_getMemory((BidiMemoryForAllocation *)&(pBiDi)->isolatesMemory, &(pBiDi)->isolatesSize, \
482  true, (length)*sizeof(Isolate))
483 
484 #endif
unsigned char UChar
Definition: bzip2.c:163
signed short int16_t
Definition: stdint.h:76
unsigned short uint16_t
Definition: stdint.h:79
unsigned int uint32_t
Definition: stdint.h:80
signed int int32_t
Definition: stdint.h:77
unsigned char uint8_t
Definition: stdint.h:78
UBiDi * pBiDi
Definition: ubidiimp.h:180
int32_t openingsCount
Definition: ubidiimp.h:184
Opening * openings
Definition: ubidiimp.h:183
int32_t isoRunLast
Definition: ubidiimp.h:185
Opening simpleOpenings[20]
Definition: ubidiimp.h:182
IsoRun isoRuns[125+2]
Definition: ubidiimp.h:188
UBool isNumbersSpecial
Definition: ubidiimp.h:189
int32_t confirmed
Definition: ubidiimp.h:250
Point * points
Definition: ubidiimp.h:252
int32_t size
Definition: ubidiimp.h:249
UErrorCode errorCode
Definition: ubidiimp.h:251
int32_t capacity
Definition: ubidiimp.h:248
UBiDiDirection contextDir
Definition: ubidiimp.h:176
uint16_t start
Definition: ubidiimp.h:171
DirProp lastBase
Definition: ubidiimp.h:175
int32_t contextPos
Definition: ubidiimp.h:170
UBiDiLevel level
Definition: ubidiimp.h:173
DirProp lastStrong
Definition: ubidiimp.h:174
uint16_t limit
Definition: ubidiimp.h:172
int32_t start1
Definition: ubidiimp.h:194
int16_t stateImp
Definition: ubidiimp.h:196
int32_t startON
Definition: ubidiimp.h:193
int32_t state
Definition: ubidiimp.h:195
int32_t position
Definition: ubidiimp.h:161
UBiDiDirection contextDir
Definition: ubidiimp.h:165
uint16_t flags
Definition: ubidiimp.h:164
int32_t contextPos
Definition: ubidiimp.h:163
uint8_t filler
Definition: ubidiimp.h:166
int32_t match
Definition: ubidiimp.h:162
Definition: ubidiimp.h:150
int32_t level
Definition: ubidiimp.h:152
int32_t limit
Definition: ubidiimp.h:151
int32_t pos
Definition: ubidiimp.h:243
int32_t flag
Definition: ubidiimp.h:244
Definition: ubidiimp.h:199
int32_t insertRemove
Definition: ubidiimp.h:202
int32_t visualLimit
Definition: ubidiimp.h:201
int32_t logicalStart
Definition: ubidiimp.h:200
Para * parasMemory
Definition: ubidiimp.h:291
int32_t originalLength
Definition: ubidiimp.h:269
UBool mayAllocateText
Definition: ubidiimp.h:296
UBiDiLevel * levelsMemory
Definition: ubidiimp.h:289
int32_t dirPropsSize
Definition: ubidiimp.h:285
UBool orderParagraphsLTR
Definition: ubidiimp.h:318
const UBiDi * pParaBiDi
Definition: ubidiimp.h:263
UBiDiLevel defaultParaLevel
Definition: ubidiimp.h:324
int32_t isolateCount
Definition: ubidiimp.h:368
int32_t trailingWSStart
Definition: ubidiimp.h:346
uint32_t reorderingOptions
Definition: ubidiimp.h:315
UBool mayAllocateRuns
Definition: ubidiimp.h:296
UBiDiClassCallback * fnClassCallback
Definition: ubidiimp.h:381
const UChar * epilogue
Definition: ubidiimp.h:329
Opening * openingsMemory
Definition: ubidiimp.h:290
int32_t runCount
Definition: ubidiimp.h:357
int32_t paraCount
Definition: ubidiimp.h:349
int32_t controlCount
Definition: ubidiimp.h:378
Run simpleRuns[1]
Definition: ubidiimp.h:361
const struct ImpTabPair * pImpTabPair
Definition: ubidiimp.h:333
Run * runsMemory
Definition: ubidiimp.h:292
int32_t resultLength
Definition: ubidiimp.h:282
UBool isInverse
Definition: ubidiimp.h:303
Isolate * isolatesMemory
Definition: ubidiimp.h:293
Run * runs
Definition: ubidiimp.h:358
Flags flags
Definition: ubidiimp.h:339
DirProp * dirPropsMemory
Definition: ubidiimp.h:288
UBiDiReorderingMode reorderingMode
Definition: ubidiimp.h:306
UBiDiDirection direction
Definition: ubidiimp.h:336
int32_t levelsSize
Definition: ubidiimp.h:285
int32_t parasSize
Definition: ubidiimp.h:285
const UChar * text
Definition: ubidiimp.h:266
DirProp * dirProps
Definition: ubidiimp.h:299
int32_t openingsSize
Definition: ubidiimp.h:285
int32_t proLength
Definition: ubidiimp.h:328
Isolate simpleIsolates[5]
Definition: ubidiimp.h:372
int32_t isolatesSize
Definition: ubidiimp.h:285
const void * coClassCallback
Definition: ubidiimp.h:382
Para * paras
Definition: ubidiimp.h:351
InsertPoints insertPoints
Definition: ubidiimp.h:375
UBiDiLevel paraLevel
Definition: ubidiimp.h:321
int32_t length
Definition: ubidiimp.h:276
UBiDiLevel * levels
Definition: ubidiimp.h:300
int32_t lastArabicPos
Definition: ubidiimp.h:342
int32_t runsSize
Definition: ubidiimp.h:285
const UChar * prologue
Definition: ubidiimp.h:327
int32_t epiLength
Definition: ubidiimp.h:330
Isolate * isolates
Definition: ubidiimp.h:369
Para simpleParas[10]
Definition: ubidiimp.h:354
Definition: mendex.h:20
C API: Bidi algorithm.
#define UBIDI_MAX_EXPLICIT_LEVEL
Definition: ubidi.h:401
UBiDiDirection
Definition: ubidi.h:428
UCharDirection UBiDiClassCallback(const void *context, UChar32 c)
Definition: ubidi.h:2015
UBiDiReorderingMode
Definition: ubidi.h:698
uint8_t UBiDiLevel
Definition: ubidi.h:339
@ FOUND_L
Definition: ubidiimp.h:156
@ FOUND_R
Definition: ubidiimp.h:157
struct Isolate Isolate
struct Point Point
@ RLM_AFTER
Definition: ubidiimp.h:147
@ RLM_BEFORE
Definition: ubidiimp.h:146
@ LRM_BEFORE
Definition: ubidiimp.h:144
@ LRM_AFTER
Definition: ubidiimp.h:145
struct BracketData BracketData
#define SIMPLE_OPENINGS_COUNT
Definition: ubidiimp.h:137
struct InsertPoints InsertPoints
@ FSI
Definition: ubidiimp.h:64
@ LRO
Definition: ubidiimp.h:57
@ WS
Definition: ubidiimp.h:54
@ EN
Definition: ubidiimp.h:47
@ ENR
Definition: ubidiimp.h:69
@ PDI
Definition: ubidiimp.h:67
@ R
Definition: ubidiimp.h:46
@ LRE
Definition: ubidiimp.h:56
@ RLE
Definition: ubidiimp.h:59
@ B
Definition: ubidiimp.h:52
@ ET
Definition: ubidiimp.h:49
@ AN
Definition: ubidiimp.h:50
@ RLI
Definition: ubidiimp.h:66
@ ES
Definition: ubidiimp.h:48
@ RLO
Definition: ubidiimp.h:60
@ CS
Definition: ubidiimp.h:51
@ ON
Definition: ubidiimp.h:55
@ ENL
Definition: ubidiimp.h:68
@ AL
Definition: ubidiimp.h:58
@ LRI
Definition: ubidiimp.h:65
@ dirPropCount
Definition: ubidiimp.h:70
@ BN
Definition: ubidiimp.h:63
@ NSM
Definition: ubidiimp.h:62
@ L
Definition: ubidiimp.h:45
@ S
Definition: ubidiimp.h:53
@ LRO_CHAR
Definition: ubidiimp.h:230
@ LRE_CHAR
Definition: ubidiimp.h:227
@ LRI_CHAR
Definition: ubidiimp.h:232
@ RLM_CHAR
Definition: ubidiimp.h:226
@ ZWJ_CHAR
Definition: ubidiimp.h:224
@ RLI_CHAR
Definition: ubidiimp.h:233
@ LRM_CHAR
Definition: ubidiimp.h:225
@ RLE_CHAR
Definition: ubidiimp.h:228
@ FSI_CHAR
Definition: ubidiimp.h:234
@ PDF_CHAR
Definition: ubidiimp.h:229
@ RLO_CHAR
Definition: ubidiimp.h:231
@ ZWNJ_CHAR
Definition: ubidiimp.h:223
@ PDI_CHAR
Definition: ubidiimp.h:235
uint8_t DirProp
Definition: ubidiimp.h:37
struct IsoRun IsoRun
uint32_t Flags
Definition: ubidiimp.h:38
#define SIMPLE_PARAS_COUNT
Definition: ubidiimp.h:133
struct Para Para
struct Opening Opening
#define DIRPROP_FLAG(dir)
Definition: ubidiimp.h:78
#define SIMPLE_ISOLATES_COUNT
Definition: ubidiimp.h:135
struct Run Run
C API: Unicode Properties.
@ U_SEGMENT_SEPARATOR
Definition: uchar.h:946
@ U_EUROPEAN_NUMBER_TERMINATOR
Definition: uchar.h:938
@ U_BOUNDARY_NEUTRAL
Definition: uchar.h:966
@ U_RIGHT_TO_LEFT_ARABIC
Definition: uchar.h:956
@ U_RIGHT_TO_LEFT
Definition: uchar.h:932
@ U_POP_DIRECTIONAL_ISOLATE
Definition: uchar.h:974
@ U_COMMON_NUMBER_SEPARATOR
Definition: uchar.h:942
@ U_LEFT_TO_RIGHT
Definition: uchar.h:930
@ U_DIR_NON_SPACING_MARK
Definition: uchar.h:964
@ U_FIRST_STRONG_ISOLATE
Definition: uchar.h:968
@ U_ARABIC_NUMBER
Definition: uchar.h:940
@ U_POP_DIRECTIONAL_FORMAT
Definition: uchar.h:962
@ U_OTHER_NEUTRAL
Definition: uchar.h:950
@ U_WHITE_SPACE_NEUTRAL
Definition: uchar.h:948
@ U_RIGHT_TO_LEFT_OVERRIDE
Definition: uchar.h:960
@ U_RIGHT_TO_LEFT_EMBEDDING
Definition: uchar.h:958
@ U_EUROPEAN_NUMBER_SEPARATOR
Definition: uchar.h:936
@ U_LEFT_TO_RIGHT_ISOLATE
Definition: uchar.h:970
@ U_LEFT_TO_RIGHT_OVERRIDE
Definition: uchar.h:954
@ U_EUROPEAN_NUMBER
Definition: uchar.h:934
@ U_BLOCK_SEPARATOR
Definition: uchar.h:944
@ U_LEFT_TO_RIGHT_EMBEDDING
Definition: uchar.h:952
@ U_RIGHT_TO_LEFT_ISOLATE
Definition: uchar.h:972
int8_t UBool
Definition: umachine.h:269
#define U_CFUNC
Definition: umachine.h:84
Opening * openingsMemory
Definition: ubidiimp.h:391
DirProp * dirPropsMemory
Definition: ubidiimp.h:389
Isolate * isolatesMemory
Definition: ubidiimp.h:394
UBiDiLevel * levelsMemory
Definition: ubidiimp.h:390
#define ubidi_getRuns
Definition: urename.h:456
#define ubidi_getParaLevelAtIndex
Definition: urename.h:449
#define ubidi_getMemory
Definition: urename.h:444
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Definition: utypes.h:431