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:
Felipe Oliveira Carvalho
2014-03-22 00:06:37 -03:00
committed by Thiago de Arruda
parent fd6fd35eef
commit 8b2a5e678e
7 changed files with 269 additions and 280 deletions

View File

@@ -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