2000-01-15 02:00:06 +00:00
|
|
|
/********************************************************************
|
2013-08-30 16:32:45 +00:00
|
|
|
* COPYRIGHT:
|
|
|
|
* Copyright (c) 1997-2013, International Business Machines Corporation and
|
2000-01-15 02:00:06 +00:00
|
|
|
* others. All Rights Reserved.
|
|
|
|
********************************************************************/
|
|
|
|
/* file name: cbiditst.h
|
1999-09-30 23:47:52 +00:00
|
|
|
* encoding: US-ASCII
|
|
|
|
* tab size: 8 (not used)
|
|
|
|
* indentation:4
|
|
|
|
*
|
|
|
|
* created on: 1999sep22
|
|
|
|
* created by: Markus W. Scherer
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CBIDITST_H
|
|
|
|
#define CBIDITST_H
|
|
|
|
|
1999-12-28 23:57:50 +00:00
|
|
|
#include "unicode/utypes.h"
|
|
|
|
#include "unicode/uchar.h"
|
|
|
|
#include "unicode/ubidi.h"
|
1999-09-30 23:47:52 +00:00
|
|
|
|
2011-07-23 00:10:30 +00:00
|
|
|
#ifdef __cplusplus
|
1999-09-30 23:47:52 +00:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define MAX_STRING_LENGTH 200
|
|
|
|
|
|
|
|
/* length of an array */
|
|
|
|
#define ARRAY_LENGTH(array) (sizeof(array)/sizeof(array[0]))
|
|
|
|
|
|
|
|
/* Comparing the description of the BiDi algorithm with this implementation
|
|
|
|
is easier with the same names for the BiDi types in the code as there.
|
|
|
|
See UCharDirection in uchar.h .
|
|
|
|
*/
|
2007-07-19 00:19:21 +00:00
|
|
|
#define L U_LEFT_TO_RIGHT
|
|
|
|
#define R U_RIGHT_TO_LEFT
|
|
|
|
#define EN U_EUROPEAN_NUMBER
|
|
|
|
#define ES U_EUROPEAN_NUMBER_SEPARATOR
|
|
|
|
#define ET U_EUROPEAN_NUMBER_TERMINATOR
|
|
|
|
#define AN U_ARABIC_NUMBER
|
|
|
|
#define CS U_COMMON_NUMBER_SEPARATOR
|
|
|
|
#define B U_BLOCK_SEPARATOR
|
|
|
|
#define S U_SEGMENT_SEPARATOR
|
|
|
|
#define WS U_WHITE_SPACE_NEUTRAL
|
|
|
|
#define ON U_OTHER_NEUTRAL
|
|
|
|
#define LRE U_LEFT_TO_RIGHT_EMBEDDING
|
|
|
|
#define LRO U_LEFT_TO_RIGHT_OVERRIDE
|
|
|
|
#define AL U_RIGHT_TO_LEFT_ARABIC
|
|
|
|
#define RLE U_RIGHT_TO_LEFT_EMBEDDING
|
|
|
|
#define RLO U_RIGHT_TO_LEFT_OVERRIDE
|
|
|
|
#define PDF U_POP_DIRECTIONAL_FORMAT
|
|
|
|
#define NSM U_DIR_NON_SPACING_MARK
|
|
|
|
#define BN U_BOUNDARY_NEUTRAL
|
2013-08-30 16:32:45 +00:00
|
|
|
#define FSI U_FIRST_STRONG_ISOLATE
|
|
|
|
#define LRI U_LEFT_TO_RIGHT_ISOLATE
|
|
|
|
#define RLI U_RIGHT_TO_LEFT_ISOLATE
|
|
|
|
#define PDI U_POP_DIRECTIONAL_ISOLATE
|
1999-09-30 23:47:52 +00:00
|
|
|
|
2006-09-28 08:40:02 +00:00
|
|
|
extern const char * const
|
2007-07-19 00:19:21 +00:00
|
|
|
dirPropNames[U_CHAR_DIRECTION_COUNT];
|
1999-09-30 23:47:52 +00:00
|
|
|
|
2004-04-05 18:06:41 +00:00
|
|
|
extern UChar
|
2007-07-19 00:19:21 +00:00
|
|
|
charFromDirProp[U_CHAR_DIRECTION_COUNT];
|
1999-09-30 23:47:52 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
const uint8_t *text;
|
2002-03-12 01:32:42 +00:00
|
|
|
int32_t length;
|
1999-09-30 23:47:52 +00:00
|
|
|
UBiDiLevel paraLevel;
|
2002-03-12 01:32:42 +00:00
|
|
|
int32_t lineStart, lineLimit;
|
1999-09-30 23:47:52 +00:00
|
|
|
UBiDiDirection direction;
|
|
|
|
UBiDiLevel resultLevel;
|
|
|
|
const UBiDiLevel *levels;
|
|
|
|
const uint8_t *visualMap;
|
|
|
|
} BiDiTestData;
|
|
|
|
|
2006-09-28 08:40:02 +00:00
|
|
|
extern const BiDiTestData
|
1999-09-30 23:47:52 +00:00
|
|
|
tests[];
|
|
|
|
|
2006-09-28 08:40:02 +00:00
|
|
|
extern const int
|
1999-09-30 23:47:52 +00:00
|
|
|
bidiTestCount;
|
|
|
|
|
2011-07-23 00:10:30 +00:00
|
|
|
#ifdef __cplusplus
|
1999-09-30 23:47:52 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|