ReactOS 0.4.15-dev-8344-g0574987
compose.c File Reference
#include "windef.h"
Include dependency graph for compose.c:

Go to the source code of this file.

Functions

static int binary_search (WCHAR ch, int low, int high)
 
WCHAR DECLSPEC_HIDDEN wine_compose (const WCHAR *str)
 

Variables

static const WCHAR table [0x85e]
 

Function Documentation

◆ binary_search()

static int binary_search ( WCHAR  ch,
int  low,
int  high 
)
inlinestatic

Definition at line 387 of file compose.c.

388{
389 while (low <= high)
390 {
391 int pos = (low + high) / 2;
392 if (table[2 * pos] < ch) low = pos + 1;
393 else if (table[2 * pos] > ch) high = pos - 1;
394 else return pos;
395 }
396 return -1;
397}

Referenced by wine_compose().

◆ wine_compose()

WCHAR DECLSPEC_HIDDEN wine_compose ( const WCHAR str)

Definition at line 399 of file compose.c.

400{
401 int pos, idx = 1, start = 0, count = 70;
402 for (;;)
403 {
404 if ((pos = binary_search( str[idx], start, count - 1 )) == -1) return 0;
405 if (!idx--) return table[2 * pos + 1];
406 start = table[2 * pos + 1];
407 count = table[2 * pos + 3];
408 }
409}
static int binary_search(WCHAR ch, int low, int high)
Definition: compose.c:387
unsigned int idx
Definition: utils.c:41
GLuint start
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
const WCHAR * str

Referenced by get_length_dbcs(), get_length_mbs_utf8_compose(), get_length_sbcs(), utf8_mbstowcs_compose(), wcstombs_dbcs_slow(), and wcstombs_sbcs_slow().

Variable Documentation

◆ table

const WCHAR table[0x85e]
static

Definition at line 11 of file compose.c.