scuffed-code/icu4c/source/test/cintltst/cbiditst.h
Helena Chapman 1ccc7d153f ICU version 1.3 merge from CMVS.
X-SVN-Rev: 9
1999-09-30 23:47:52 +00:00

91 lines
2.4 KiB
C

/*
*******************************************************************************
* *
* COPYRIGHT: *
* (C) Copyright International Business Machines Corporation, 1999 *
* Licensed Material - Program-Property of IBM - All Rights Reserved. *
* US Government Users Restricted Rights - Use, duplication, or disclosure *
* restricted by GSA ADP Schedule Contract with IBM Corp. *
* *
*******************************************************************************
* file name: cbiditst.h
* encoding: US-ASCII
* tab size: 8 (not used)
* indentation:4
*
* created on: 1999sep22
* created by: Markus W. Scherer
*/
#ifndef CBIDITST_H
#define CBIDITST_H
#include "utypes.h"
#include "uchar.h"
#include "ubidi.h"
#ifdef XP_CPLUSPLUS
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 .
*/
enum {
L= U_LEFT_TO_RIGHT,
R= U_RIGHT_TO_LEFT,
EN= U_EUROPEAN_NUMBER,
ES= U_EUROPEAN_NUMBER_SEPARATOR,
ET= U_EUROPEAN_NUMBER_TERMINATOR,
AN= U_ARABIC_NUMBER,
CS= U_COMMON_NUMBER_SEPARATOR,
B= U_BLOCK_SEPARATOR,
S= U_SEGMENT_SEPARATOR,
WS= U_WHITE_SPACE_NEUTRAL,
ON= U_OTHER_NEUTRAL,
LRE=U_LEFT_TO_RIGHT_EMBEDDING,
LRO=U_LEFT_TO_RIGHT_OVERRIDE,
AL= U_RIGHT_TO_LEFT_ARABIC,
RLE=U_RIGHT_TO_LEFT_EMBEDDING,
RLO=U_RIGHT_TO_LEFT_OVERRIDE,
PDF=U_POP_DIRECTIONAL_FORMAT,
NSM=U_DIR_NON_SPACING_MARK,
BN= U_BOUNDARY_NEUTRAL,
dirPropCount
};
extern const char *
dirPropNames[dirPropCount];
extern const UChar
charFromDirProp[dirPropCount];
typedef struct {
const uint8_t *text;
UTextOffset length;
UBiDiLevel paraLevel;
UTextOffset lineStart, lineLimit;
UBiDiDirection direction;
UBiDiLevel resultLevel;
const UBiDiLevel *levels;
const uint8_t *visualMap;
} BiDiTestData;
extern BiDiTestData
tests[];
extern int
bidiTestCount;
#ifdef XP_CPLUSPLUS
}
#endif
#endif