rename internal apis and cleanup

This commit is contained in:
Vincent Wei
2019-03-11 11:51:16 +08:00
parent e8714be5ef
commit 11124ef8a0
8 changed files with 102 additions and 93 deletions

View File

@@ -10099,8 +10099,7 @@ MG_EXPORT int GUIAPI BIDIGetTextLogicalAChars (LOGFONT* log_font,
/**
* \fn void GUIAPI BIDIGetTextRangesLog2Vis (LOGFONT* log_font,
* const char* text, int text_len,
* int start_index, int end_index,
* const char* text, int text_len, int start_index, int end_index,
* int** ranges, int* nr_ranges)
* \brief Get a list of visual ranges corresponding to a given logical range.
*

View File

@@ -3597,7 +3597,7 @@ static const BidiType linear_enum_to_bidi_type[] = {
#undef _UNIBIDI_ADD_TYPE
};
static BidiType unicode_bidi_char_type(Achar32 ch)
static BidiType __mg_unicode_bidi_char_type(Achar32 ch)
{
ch = REAL_ACHAR(ch);
return linear_enum_to_bidi_type[UNIBIDI_GET_BIDI_TYPE(ch)];
@@ -3669,7 +3669,7 @@ void UCharGetBracketTypes(const Uchar32 *str, int len,
#include "unicode-bidi-mirroring-table.inc"
static BOOL unicode_bidi_mirror_char(Achar32 ch, Achar32* mirrored_ch)
static BOOL __mg_unicode_bidi_mirror_char(Achar32 ch, Achar32* mirrored_ch)
{
register Achar32 result;
register Uint32 mbc_mask;
@@ -3698,26 +3698,26 @@ BOOL GUIAPI UCharGetMirror(Uchar32 ch, Uchar32* mirrored_ch)
#include "unicode-bidi-tables.h"
static BidiType unicode_bidi_char_type (Achar32 chv)
static BidiType __mg_unicode_bidi_char_type (Achar32 chv)
{
Achar32 chv_first = 0;
Achar32 chv_last = (Achar32)TABLESIZE (__mg_unicode_bidi_char_type_map);
Achar32 chv_last = (Achar32)TABLESIZE (__mg___mg_unicode_bidi_char_type_map);
Achar32 chv_mid;
chv = REAL_ACHAR(chv);
while (chv_last >= chv_first) {
chv_mid = (chv_first + chv_last)/2;
if ((__mg_unicode_bidi_char_type_map[chv_mid].chv <= chv)
&& ((__mg_unicode_bidi_char_type_map[chv_mid].chv + __mg_unicode_bidi_char_type_map[chv_mid].count) > chv)) {
return __mg_unicode_bidi_char_type_map[chv_mid].type;
if ((__mg___mg_unicode_bidi_char_type_map[chv_mid].chv <= chv)
&& ((__mg___mg_unicode_bidi_char_type_map[chv_mid].chv + __mg___mg_unicode_bidi_char_type_map[chv_mid].count) > chv)) {
return __mg___mg_unicode_bidi_char_type_map[chv_mid].type;
}
if (chv >= (__mg_unicode_bidi_char_type_map[chv_mid].chv + __mg_unicode_bidi_char_type_map[chv_mid].count)) {
if (chv >= (__mg___mg_unicode_bidi_char_type_map[chv_mid].chv + __mg___mg_unicode_bidi_char_type_map[chv_mid].count)) {
chv_first = chv_mid + 1;
}
else {
if (chv < __mg_unicode_bidi_char_type_map[chv_mid].chv)
if (chv < __mg___mg_unicode_bidi_char_type_map[chv_mid].chv)
chv_last = chv_mid - 1;
else
chv_last = chv_mid;
@@ -3727,7 +3727,7 @@ static BidiType unicode_bidi_char_type (Achar32 chv)
return BIDI_TYPE_LTR;
}
static BOOL unicode_bidi_mirror_char (Achar32 chv, Achar32* mirrored)
static BOOL __mg_unicode_bidi_mirror_char (Achar32 chv, Achar32* mirrored)
{
return get_mirror_char (__mg_unicode_mirror_table,
TABLESIZE (__mg_unicode_mirror_table), chv, mirrored);
@@ -3735,7 +3735,7 @@ static BOOL unicode_bidi_mirror_char (Achar32 chv, Achar32* mirrored)
BidiType GUIAPI UCharGetBidiType(Uchar32 uc)
{
return unicode_bidi_char_type(uc);
return __mg_unicode_bidi_char_type(uc);
}
BidiBracketType GUIAPI UCharGetBracketType(Uchar32 uc)
@@ -3785,7 +3785,7 @@ void GUIAPI UCharGetBidiTypes(const Uchar32 *str, int len, BidiType *btypes)
/** The function returns the mirror character of a UNICODE character. */
BOOL GUIAPI UCharGetMirror(Uchar32 uc, Uchar32* mirrored)
{
return unicode_bidi_mirror_char (uc, mirrored);
return __mg_unicode_bidi_mirror_char (uc, mirrored);
}
#endif /* !_USE_UNIBIDI */
@@ -3989,8 +3989,8 @@ static CHARSETOPS CharsetOps_utf8 = {
utf8_len_first_substr,
utf8_get_next_word,
utf8_pos_first_char,
unicode_bidi_char_type,
unicode_bidi_mirror_char,
__mg_unicode_bidi_char_type,
__mg_unicode_bidi_mirror_char,
NULL,
utf8_conv_from_uc32,
};
@@ -4215,8 +4215,8 @@ static CHARSETOPS CharsetOps_utf16le = {
utf16le_len_first_substr,
utf16le_get_next_word,
utf16le_pos_first_char,
unicode_bidi_char_type,
unicode_bidi_mirror_char,
__mg_unicode_bidi_char_type,
__mg_unicode_bidi_mirror_char,
NULL,
utf16le_conv_from_uc32
};
@@ -4441,8 +4441,8 @@ static CHARSETOPS CharsetOps_utf16be = {
utf16be_len_first_substr,
utf16be_get_next_word,
utf16be_pos_first_char,
unicode_bidi_char_type,
unicode_bidi_mirror_char,
__mg_unicode_bidi_char_type,
__mg_unicode_bidi_mirror_char,
NULL,
utf16be_conv_from_uc32
};

View File

@@ -655,7 +655,7 @@ static void bidi_reverse_chars (void* context, int len, int pos)
}
}
void __mg_charset_bidi_get_embeddlevels (const CHARSETOPS* charset_ops,
void __mg_legacy_bidi_get_embeddlevels (const CHARSETOPS* charset_ops,
Achar32* achars, int len, int pel, Uint8* embedding_levels, Uint8 type)
{
int i = 0;
@@ -703,7 +703,7 @@ static void bidi_map_reverse (void* context, int len, int pos)
}
}
Achar32* __mg_charset_bidi_map_reorder (const CHARSETOPS* charset_ops,
Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
Achar32* achars, int len, GLYPHMAPINFO* map, int pel)
{
BYTE max_level = 1;
@@ -739,7 +739,7 @@ Achar32* __mg_charset_bidi_map_reorder (const CHARSETOPS* charset_ops,
return achars;
}
Achar32* __mg_charset_bidi_index_reorder (const CHARSETOPS* charset_ops,
Achar32* __mg_legacy_bidi_index_reorder (const CHARSETOPS* charset_ops,
Achar32* achars, int len, int* index_map, int pel)
{
BYTE max_level = 1;
@@ -762,7 +762,7 @@ Achar32* __mg_charset_bidi_index_reorder (const CHARSETOPS* charset_ops,
}
#endif
Achar32* __mg_charset_bidi_achars_reorder (const CHARSETOPS* charset_ops,
Achar32* __mg_legacy_bidi_achars_reorder (const CHARSETOPS* charset_ops,
Achar32* achars, int len, int pel,
void* extra, CB_REVERSE_EXTRA cb_reverse_extra)
{
@@ -789,7 +789,7 @@ Achar32* __mg_charset_bidi_achars_reorder (const CHARSETOPS* charset_ops,
return achars;
}
Uint32 __mg_charset_bidi_str_base_dir (const CHARSETOPS* charset_ops,
Uint32 __mg_legacy_bidi_str_base_dir (const CHARSETOPS* charset_ops,
Achar32* achars, int len)
{
BYTE base_level = 0;

View File

@@ -18,7 +18,7 @@
#ifndef _UNICODE_BIDI_TABLES_H
#define _UNICODE_BIDI_TABLES_H
static const BIDICHAR_TYPE_MAP __mg_unicode_bidi_char_type_map[] =
static const BIDICHAR_TYPE_MAP __mg___mg_unicode_bidi_char_type_map[] =
{
{ 0x000000, 0x0009, BIDI_TYPE_BN },
{ 0x000009, 0x0001, BIDI_TYPE_SS },

View File

@@ -58,8 +58,9 @@
#include "minigui.h"
#include "gdi.h"
#include "devfont.h"
#ifdef _MGCHARSET_UNICODE
#include "devfont.h"
#include "bidi.h"
#include "unicode-bidi.h"
@@ -474,9 +475,9 @@ static const char char_from_level_array[] = {
'*', '*', '*', '*', '*'
};
#define unicode_bidi_char_from_level(level) char_from_level_array[(level) + 1]
#define unibidi_char_from_level(level) char_from_level_array[(level) + 1]
static const char *unicode_bidi_get_bidi_type_name(BidiType t)
static const char *unibidi_get_bidi_type_name(BidiType t)
{
switch ((int)t) {
# define _BIDI_ADD_TYPE(TYPE,SYMBOL) case BIDI_TYPE_##TYPE: return #TYPE;
@@ -494,7 +495,7 @@ static void print_types_re(const BidiRun *pp)
_DBG_PRINTF (" Run types : ");
for_run_list (pp, pp) {
_DBG_PRINTF ("%d:%d(%s)[%d,%d] ",
pp->pos, pp->len, unicode_bidi_get_bidi_type_name (pp->type), pp->level, pp->isolate_level);
pp->pos, pp->len, unibidi_get_bidi_type_name (pp->type), pp->level, pp->isolate_level);
}
_DBG_PRINTF ("\n");
}
@@ -506,7 +507,7 @@ static void print_resolved_levels(const BidiRun *pp)
{
register int i;
for (i = RL_LEN (pp); i; i--)
_DBG_PRINTF ("%c", unicode_bidi_char_from_level (RL_LEVEL (pp)));
_DBG_PRINTF ("%c", unibidi_char_from_level (RL_LEVEL (pp)));
}
_DBG_PRINTF ("\n");
}
@@ -517,7 +518,7 @@ static void print_resolved_types(const BidiRun *pp)
for_run_list (pp, pp) {
int i;
for (i = RL_LEN (pp); i; i--)
_DBG_PRINTF ("%s ", unicode_bidi_get_bidi_type_name (pp->type));
_DBG_PRINTF ("%s ", unibidi_get_bidi_type_name (pp->type));
}
_DBG_PRINTF ("\n");
}
@@ -528,7 +529,7 @@ static void print_bidi_string(const BidiType *bidi_types, const int len)
_DBG_PRINTF (" Org. types : ");
for (i = 0; i < len; i++)
_DBG_PRINTF ("%s ", unicode_bidi_get_bidi_type_name (bidi_types[i]));
_DBG_PRINTF ("%s ", unibidi_get_bidi_type_name (bidi_types[i]));
_DBG_PRINTF ("\n");
}
@@ -642,7 +643,7 @@ static void print_pairing_nodes(BidiPairingNode *nodes)
#define BIDI_EMBEDDING_DIRECTION(link) \
BIDI_LEVEL_TO_DIR(RL_LEVEL(link))
int unicode_bidi_get_par_direction(const BidiType *bidi_types, const int len)
int __mg_unicode_bidi_get_par_direction(const BidiType *bidi_types, const int len)
{
register int i;
@@ -736,7 +737,7 @@ static void free_pairing_nodes(BidiPairingNode *nodes)
}
}
BidiLevel unicode_bidi_get_paragraph_els_ex(const BidiType *bidi_types,
BidiLevel __mg_unicode_bidi_get_paragraph_els(const BidiType *bidi_types,
const BidiBracketType *bracket_types, const int len,
int *pbase_dir, BidiLevel *embedding_levels)
{
@@ -752,7 +753,7 @@ BidiLevel unicode_bidi_get_paragraph_els_ex(const BidiType *bidi_types,
goto out;
}
_DBG_PRINTF ("in unicode_bidi_get_paragraph_els");
_DBG_PRINTF ("in __mg_unicode_bidi_get_paragraph_els");
/* Determinate character types */
{
@@ -789,8 +790,8 @@ BidiLevel unicode_bidi_get_paragraph_els_ex(const BidiType *bidi_types,
}
}
base_dir = BIDI_LEVEL_TO_DIR (base_level);
_DBG_PRINTF (" base level : %c", unicode_bidi_char_from_level (base_level));
_DBG_PRINTF (" base dir : %s", unicode_bidi_get_bidi_type_name (base_dir));
_DBG_PRINTF (" base level : %c", unibidi_char_from_level (base_level));
_DBG_PRINTF (" base dir : %s", unibidi_get_bidi_type_name (base_dir));
base_level_per_iso_level[0] = base_level;
@@ -1505,7 +1506,7 @@ BidiLevel unicode_bidi_get_paragraph_els_ex(const BidiType *bidi_types,
separator or paragraph separator, and
4. any sequence of whitespace characters and/or isolate formatting
characters at the end of the line.
... (to be continued in unicode_bidi_reorder_line()). */
... (to be continued in __mg_unicode_bidi_reorder_line()). */
list = new_run_list ();
if (!list) goto out;
q = list;
@@ -1564,7 +1565,7 @@ BidiLevel unicode_bidi_get_paragraph_els_ex(const BidiType *bidi_types,
status = TRUE;
out:
_DBG_PRINTF ("leaving unicode_bidi_get_paragraph_els");
_DBG_PRINTF ("leaving __mg_unicode_bidi_get_paragraph_els");
if (main_run_list)
free_run_list (main_run_list);
@@ -1575,12 +1576,12 @@ out:
static void
bidi_string_reverse(Achar32 *str, int len)
bidi_string_reverse(Uchar32 *str, int len)
{
int i;
for (i = 0; i < len / 2; i++) {
Achar32 tmp = str[i];
Uchar32 tmp = str[i];
str[i] = str[len - 1 - i];
str[len - 1 - i] = tmp;
}
@@ -1597,11 +1598,10 @@ static void index_array_reverse (int *arr, int len)
}
}
BidiLevel unicode_bidi_reorder_line(Uint32 flags,
const BidiType *bidi_types, int len,
int off, int base_dir,
BidiLevel *embedding_levels,
Achar32 *visual_str, int *map,
BidiLevel __mg_unicode_bidi_reorder_line(Uint32 flags,
const BidiType *bidi_types, int len, int off,
int base_dir, BidiLevel *embedding_levels,
Uchar32 *visual_str, int *map,
void* extra, CB_REVERSE_EXTRA cb_reverse_extra)
{
BOOL status = FALSE;
@@ -1612,7 +1612,7 @@ BidiLevel unicode_bidi_reorder_line(Uint32 flags,
goto out;
}
_DBG_PRINTF ("in unicode_bidi_reorder_line");
_DBG_PRINTF ("in __mg_unicode_bidi_reorder_line");
_DBG_PRINTF ("reset the embedding levels, 4. whitespace at the end of line");
{
@@ -1703,3 +1703,4 @@ out:
return status ? max_level + 1 : 0;
}
#endif /* _MGCHARSET_UNICODE */

View File

@@ -210,7 +210,7 @@ print ()
print ("#ifndef _UNICODE_BIDI_TABLES_H")
print ("#define _UNICODE_BIDI_TABLES_H")
print ("")
print ("static const BIDICHAR_TYPE_MAP __mg_unicode_bidi_char_type_map[] =")
print ("static const BIDICHAR_TYPE_MAP __mg___mg_unicode_bidi_char_type_map[] =")
print ("{")
cur_chv = 0

View File

@@ -47,10 +47,14 @@ extern "C" {
#endif /* __cplusplus */
#ifdef BIDI_DEBUG
#define DBGLOG(s) do { if (1) { fprintf(stderr, s); } } while (0)
#define DBGLOG2(s, t1) do { if (1) { fprintf(stderr, s, t1); } } while (0)
#define DBGLOG3(s, t1,t2) do { if (1) { fprintf(stderr, s, t1,t2); } } while (0)
#define DBGLOG4(s, t1,t2,t3) do { if (1) { fprintf(stderr, s, t1,t2,t3); } } while (0)
#define DBGLOG(s) \
do { if (1) { fprintf(stderr, s); } } while (0)
#define DBGLOG2(s, t1) \
do { if (1) { fprintf(stderr, s, t1); } } while (0)
#define DBGLOG3(s, t1,t2) \
do { if (1) { fprintf(stderr, s, t1, t2); } } while (0)
#define DBGLOG4(s, t1,t2,t3) \
do { if (1) { fprintf(stderr, s, t1, t2, t3); } } while (0)
#else
#define DBGLOG(s)
#define DBGLOG2(s, t1)
@@ -61,9 +65,12 @@ extern "C" {
typedef struct _TYPERUN TYPERUN;
typedef struct _BIDICHAR_TYPE_MAP {
Uchar32 chv; // Starting code point of Unicode character
Uint16 count; // Total number of Unicode characters of same type starting from chv
Uint16 type; // Type of Unicode characters
// Starting code point of Unicode character
Uchar32 chv;
// Total number of Unicode characters of same type starting from chv
Uint16 count;
// Type of Unicode characters
Uint16 type;
} BIDICHAR_TYPE_MAP;
#define MGBIDI_BRACKET_NONE 0
@@ -83,28 +90,29 @@ typedef struct _BIDICHAR_MIRROR_MAP {
Uint16 mirrored;
} BIDICHAR_MIRROR_MAP;
Achar32* __mg_charset_bidi_achars_reorder (const CHARSETOPS* charset_ops,
Achar32* __mg_legacy_bidi_achars_reorder (const CHARSETOPS* charset_ops,
Achar32* achars, int len, int pel,
void* extra, CB_REVERSE_EXTRA cb_reverse_extra);
/*
Achar32* __mg_charset_bidi_map_reorder (const CHARSETOPS* charset_ops,
Achar32* achars, int len, GLYPHMAPINFO* map, int pel);
Achar32* __mg_charset_bidi_index_reorder (const CHARSETOPS* charset_ops,
Achar32* achars, int len, int* index_map, int pel);
*/
void __mg_charset_bidi_get_embeddlevels (const CHARSETOPS* charset_ops,
void __mg_legacy_bidi_get_embeddlevels (const CHARSETOPS* charset_ops,
Achar32* achars, int len, int pel, Uint8* embedding_levels, Uint8 type);
Uint32 __mg_charset_bidi_str_base_dir (const CHARSETOPS* charset_ops,
Uint32 __mg_legacy_bidi_str_base_dir (const CHARSETOPS* charset_ops,
Achar32* achars, int len);
#if 0
// Deprecated
Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
Achar32* achars, int len, GLYPHMAPINFO* map, int pel);
Achar32* __mg_legacy_bidi_index_reorder (const CHARSETOPS* charset_ops,
Achar32* achars, int len, int* index_map, int pel);
#endif
#ifdef _MGCHARSET_UNICODE
/**
* \fn unicode_bidi_get_paragraph_dir
* \fn __mg_unicode_bidi_get_paragraph_dir
* \brief get base paragraph direction
*
* This function finds the base direction of a single paragraph,
@@ -112,7 +120,7 @@ Uint32 __mg_charset_bidi_str_base_dir (const CHARSETOPS* charset_ops,
* http://www.unicode.org/reports/tr9/#P2.
*
* You typically do not need this function as
* unicode_bidi_get_paragraph_els_ex() knows how to compute base direction
* __mg_unicode_bidi_get_paragraph_els() knows how to compute base direction
* itself, but you may need this to implement a more sophisticated paragraph
* direction handling. Note that you can pass more than a paragraph to this
* function and the direction of the first non-neutral paragraph is returned,
@@ -121,17 +129,17 @@ Uint32 __mg_charset_bidi_str_base_dir (const CHARSETOPS* charset_ops,
* direction of the previous paragraph.
*
* \param bidi_types the pointer to the BidiType array as returned by
* unicode_bidi_get_bidi_types()
* __mg_unicode_bidi_get_bidi_types()
* \param len The length of bidi_types
*
* \return Base pargraph direction. No weak paragraph direction is returned,
* only BIDI_PGDIR_LTR, BIDI_PGDIR_RTL, or BIDI_PGDIR_ON.
*
*/
int unicode_bidi_get_paragraph_dir(const BidiType *bidi_types, int len);
int __mg_unicode_bidi_get_paragraph_dir(const BidiType *bidi_types, int len);
/**
* \fn unicode_bidi_get_paragraph_els_ex
* \fn __mg_unicode_bidi_get_paragraph_els
* \brief Get bidi embedding levels of a paragraph
*
* This function finds the bidi embedding levels of a single paragraph,
@@ -139,13 +147,13 @@ int unicode_bidi_get_paragraph_dir(const BidiType *bidi_types, int len);
* http://www.unicode.org/reports/tr9/.
*
* This function implements rules P2 to I1 inclusive, and parts 1 to 3 of L1.
* Part 4 of L1 is implemented in unicode_bidi_reorder_line().
* Part 4 of L1 is implemented in __mg_unicode_bidi_reorder_line().
*
* There are a few macros defined in mgbidi-bidi-types.h to work with this
* embedding levels.
*
* \param bidi_types the pointer to the BidiType array as returned by
* unicode_bidi_get_bidi_types()
* __mg_unicode_bidi_get_bidi_types()
* \param bracket_types The pointer to a Uint8 which contains the
bracket types as returned by UCharGetBracketTypes()
* \param len The length of the list.
@@ -156,12 +164,12 @@ int unicode_bidi_get_paragraph_dir(const BidiType *bidi_types, int len);
* \return The Maximum level found plus one, or zero if any error occurred
* (memory allocation failure most probably).
*/
BidiLevel unicode_bidi_get_paragraph_els_ex(const BidiType *bidi_types,
BidiLevel __mg_unicode_bidi_get_paragraph_els(const BidiType *bidi_types,
const BidiBracketType* bracket_types, int len,
int *base_dir, BidiLevel *embedding_levels);
/**
* \fn unicode_bidi_reorder_line
* \fn __mg_unicode_bidi_reorder_line
* \brief Reorder a line of logical string to visual
*
* This function reorders the characters in a line of text from logical to
@@ -174,7 +182,7 @@ BidiLevel unicode_bidi_get_paragraph_els_ex(const BidiType *bidi_types,
* As a side effect it also sets position maps if not NULL.
*
* You should provide the resolved paragraph direction and embedding levels as
* set by unicode_bidi_get_paragraph_els_ex(). Also note that the embedding
* set by __mg_unicode_bidi_get_paragraph_els(). Also note that the embedding
* levels may change a bit. To be exact, the embedding level of any sequence
* of white space at the end of line is reset to the paragraph embedding level
* (That is part 4 of rule L1).
@@ -194,15 +202,15 @@ BidiLevel unicode_bidi_get_paragraph_els_ex(const BidiType *bidi_types,
*
* \param flags The reorder flags.
* \param bidi_types the pointer to the BidiType array as returned by
* unicode_bidi_get_bidi_types()
* \param bracket_types The pointer to a Uint8 which contains the
bracket types as returned by UCharGetBracketTypes()
* __mg_unicode_bidi_get_bidi_types()
* \param bracket_types The pointer to a BidiBracketType array which
* contains the bracket types as returned by UCharGetBracketTypes()
* \param len The length of the list.
* \param off The input offset of the beginning of the line in the paragraph.
* \param base_dir The resolved paragraph base direction.
* \param embedding_levels The embedding levels, as returned by
unicode_bidi_get_paragraph_els_ex()
* \param visual_str
__mg_unicode_bidi_get_paragraph_els()
* \param visual_str The Uchar32 string will be reordered.
* \param extra The pointer to the extra array to reorder; can be NULL.
* \param cb_reverse_extra The callback function to reverse the extra array.
* \param map a map of string indices which is reordered to reflect
@@ -211,12 +219,13 @@ BidiLevel unicode_bidi_get_paragraph_els_ex(const BidiType *bidi_types,
* \return Maximum level found in this line plus one, or zero if any error
* occurred (memory allocation failure most probably).
*/
BidiLevel unicode_bidi_reorder_line(Uint32 flags, const BidiType *bidi_types,
int len, int off, int base_dir, BidiLevel *embedding_levels,
Achar32 *visual_str, int *map,
BidiLevel __mg_unicode_bidi_reorder_line(Uint32 flags,
const BidiType *bidi_types, int len, int off,
int base_dir, BidiLevel *embedding_levels,
Uchar32 *visual_str, int *map,
void* extra, CB_REVERSE_EXTRA cb_reverse_extra);
#endif
#endif /* _MGCHARSET_UNICODE */
#ifdef __cplusplus
}

View File

@@ -535,7 +535,7 @@ Achar32* _gdi_bidi_reorder (PDC pdc, const unsigned char* text, int text_len,
if (mbc_devfont && mbc_devfont->charset_ops->bidi_char_type) {
logical_achars = _gdi_get_achars_string (pdc, text, text_len, nr_achars);
if (*nr_achars > 0)
__mg_charset_bidi_achars_reorder (mbc_devfont->charset_ops,
__mg_legacy_bidi_achars_reorder (mbc_devfont->charset_ops,
logical_achars, *nr_achars, -1, NULL, NULL);
}
@@ -936,7 +936,7 @@ int _gdi_reorder_text_break (PDC pdc, const unsigned char* text,
logical_achars = _gdi_get_achars_string_break(pdc, text, text_len,
&nr_achars, context);
__mg_charset_bidi_achars_reorder (mbc_devfont->charset_ops,
__mg_legacy_bidi_achars_reorder (mbc_devfont->charset_ops,
logical_achars, nr_achars, -1, NULL, NULL);
if(!logical_achars)
@@ -1419,7 +1419,7 @@ int GUIAPI BIDIGetTextVisualAChars(LOGFONT* log_font,
if (nr_achars > 0 && mbc_devfont
&& mbc_devfont->charset_ops->bidi_char_type) {
__mg_charset_bidi_achars_reorder (mbc_devfont->charset_ops,
__mg_legacy_bidi_achars_reorder (mbc_devfont->charset_ops,
*achs, nr_achars, -1,
*achs_map, bidi_reverse_map);
}
@@ -1434,7 +1434,7 @@ Achar32* GUIAPI BIDILogAChars2VisAChars(LOGFONT* log_font,
if (nr_achars > 0 && mbc_devfont
&& mbc_devfont->charset_ops->bidi_char_type) {
__mg_charset_bidi_achars_reorder (mbc_devfont->charset_ops,
__mg_legacy_bidi_achars_reorder (mbc_devfont->charset_ops,
achs, nr_achars, -1,
achs_map, bidi_reverse_map);
@@ -1452,7 +1452,7 @@ BOOL GUIAPI BIDILogAChars2VisACharsEx(LOGFONT* log_font,
if (nr_achars > 0 && mbc_devfont
&& mbc_devfont->charset_ops->bidi_char_type) {
__mg_charset_bidi_achars_reorder (mbc_devfont->charset_ops,
__mg_legacy_bidi_achars_reorder (mbc_devfont->charset_ops,
achs, nr_achars, pel, extra, cb_reorder_extra);
return TRUE;
@@ -1471,7 +1471,7 @@ void GUIAPI BIDIGetLogicalEmbedLevelsEx(LOGFONT* log_font,
*embedding_levels = malloc(nr_achars * sizeof (Uint8));
if (mbc_devfont && mbc_devfont->charset_ops->bidi_char_type) {
__mg_charset_bidi_get_embeddlevels (mbc_devfont->charset_ops,
__mg_legacy_bidi_get_embeddlevels (mbc_devfont->charset_ops,
achs, nr_achars, pel, *embedding_levels, 0);
}
else {
@@ -1489,7 +1489,7 @@ void GUIAPI BIDIGetVisualEmbedLevelsEx(LOGFONT* log_font,
*embedding_levels = malloc(nr_achars * sizeof (Uint8));
if (mbc_devfont && mbc_devfont->charset_ops->bidi_char_type) {
__mg_charset_bidi_get_embeddlevels (mbc_devfont->charset_ops,
__mg_legacy_bidi_get_embeddlevels (mbc_devfont->charset_ops,
achs, nr_achars, pel, *embedding_levels, 1);
}
else {