mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 00:18:33 +00:00
Move arabic.h #defines from arabic.h to arabic.c
- Move arabic_shape() decl from main.h to arabic.h - Move arabic_combine() and arabic_maycombine() from mbyte.c to arabic.c as these functions use the #defines I moved. - Remove the unnecessary include of arabic.h in globals.h - Remove include of arabic.c (sic) in main.c (change CMakeLists.txt to compile arabic.c normally)
This commit is contained in:

committed by
Thiago de Arruda

parent
fd6fd35eef
commit
8b2a5e678e
28
src/mbyte.c
28
src/mbyte.c
@@ -1532,34 +1532,6 @@ int mb_cptr2char_adv(char_u **pp)
|
||||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check whether we are dealing with Arabic combining characters.
|
||||
* Note: these are NOT really composing characters!
|
||||
*/
|
||||
int arabic_combine(
|
||||
int one, /* first character */
|
||||
int two /* character just after "one" */
|
||||
)
|
||||
{
|
||||
if (one == a_LAM)
|
||||
return arabic_maycombine(two);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check whether we are dealing with a character that could be regarded as an
|
||||
* Arabic combining character, need to check the character before this.
|
||||
*/
|
||||
int arabic_maycombine(int two)
|
||||
{
|
||||
if (p_arshape && !p_tbidi)
|
||||
return two == a_ALEF_MADDA
|
||||
|| two == a_ALEF_HAMZA_ABOVE
|
||||
|| two == a_ALEF_HAMZA_BELOW
|
||||
|| two == a_ALEF;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the character pointed to by "p2" is a composing character when it
|
||||
* comes after "p1". For Arabic sometimes "ab" is replaced with "c", which
|
||||
|
Reference in New Issue
Block a user