aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/arabic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/arabic.c')
-rw-r--r--src/nvim/arabic.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nvim/arabic.c b/src/nvim/arabic.c
index 84f4297c99..4587415c3b 100644
--- a/src/nvim/arabic.c
+++ b/src/nvim/arabic.c
@@ -22,7 +22,6 @@
#include "nvim/arabic.h"
#include "nvim/ascii_defs.h"
-#include "nvim/func_attr.h"
#include "nvim/macros_defs.h"
#include "nvim/option_vars.h"
@@ -258,6 +257,7 @@ bool arabic_maycombine(int two)
}
/// Check whether we are dealing with Arabic combining characters.
+/// Returns false for negative values.
/// Note: these are NOT really composing characters!
///
/// @param one First character.
@@ -271,22 +271,22 @@ bool arabic_combine(int one, int two)
return false;
}
-/// A_is_iso returns true if 'c' is an Arabic ISO-8859-6 character
+/// @return true if 'c' is an Arabic ISO-8859-6 character
/// (alphabet/number/punctuation)
-static int A_is_iso(int c)
+static bool A_is_iso(int c)
{
return find_achar(c) != NULL;
}
-/// A_is_ok returns true if 'c' is an Arabic 10646 (8859-6 or Form-B)
-static int A_is_ok(int c)
+/// @return true if 'c' is an Arabic 10646 (8859-6 or Form-B)
+static bool A_is_ok(int c)
{
return (A_is_iso(c) || c == a_BYTE_ORDER_MARK);
}
-/// A_is_valid returns true if 'c' is an Arabic 10646 (8859-6 or Form-B)
-/// with some exceptions/exclusions
-static int A_is_valid(int c)
+/// @return true if 'c' is an Arabic 10646 (8859-6 or Form-B)
+/// with some exceptions/exclusions
+static bool A_is_valid(int c)
{
return (A_is_ok(c) && c != a_HAMZA);
}
@@ -305,8 +305,8 @@ int arabic_shape(int c, int *c1p, int prev_c, int prev_c1, int next_c)
}
int curr_c;
- int curr_laa = arabic_combine(c, *c1p);
- int prev_laa = arabic_combine(prev_c, prev_c1);
+ bool curr_laa = arabic_combine(c, *c1p);
+ bool prev_laa = arabic_combine(prev_c, prev_c1);
if (curr_laa) {
if (A_is_valid(prev_c) && can_join(prev_c, a_LAM) && !prev_laa) {