aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/arabic.c
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
commit1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (patch)
treecd08258054db80bb9a11b1061bb091c70b76926a /src/nvim/arabic.c
parenteaa89c11d0f8aefbb512de769c6c82f61a8baca3 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-aucmd_textputpost.tar.gz
rneovim-aucmd_textputpost.tar.bz2
rneovim-aucmd_textputpost.zip
Merge remote-tracking branch 'upstream/master' into aucmd_textputpostaucmd_textputpost
Diffstat (limited to 'src/nvim/arabic.c')
-rw-r--r--src/nvim/arabic.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/nvim/arabic.c b/src/nvim/arabic.c
index 41024cafda..84f4297c99 100644
--- a/src/nvim/arabic.c
+++ b/src/nvim/arabic.c
@@ -1,6 +1,3 @@
-// This is an open source non-commercial project. Dear PVS-Studio, please check
-// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
-
/// @file arabic.c
///
/// Functions for Arabic language.
@@ -22,14 +19,12 @@
#include <stdbool.h>
#include <stddef.h>
-#include <stdint.h>
#include "nvim/arabic.h"
-#include "nvim/ascii.h"
-#include "nvim/macros.h"
-#include "nvim/mbyte.h"
-#include "nvim/option_defs.h"
-#include "nvim/vim.h"
+#include "nvim/ascii_defs.h"
+#include "nvim/func_attr.h"
+#include "nvim/macros_defs.h"
+#include "nvim/option_vars.h"
// Unicode values for Arabic characters.
enum {
@@ -297,13 +292,12 @@ static int A_is_valid(int c)
}
// Do Arabic shaping on character "c". Returns the shaped character.
-// out: "ccp" points to the first byte of the character to be shaped.
// in/out: "c1p" points to the first composing char for "c".
// in: "prev_c" is the previous character (not shaped)
// in: "prev_c1" is the first composing char for the previous char
// (not shaped)
// in: "next_c" is the next character (not shaped).
-int arabic_shape(int c, int *ccp, int *c1p, int prev_c, int prev_c1, int next_c)
+int arabic_shape(int c, int *c1p, int prev_c, int prev_c1, int next_c)
{
// Deal only with Arabic character, pass back all others
if (!A_is_ok(c)) {
@@ -347,14 +341,6 @@ int arabic_shape(int c, int *ccp, int *c1p, int prev_c, int prev_c1, int next_c)
curr_c = c;
}
- if ((curr_c != c) && (ccp != NULL)) {
- char buf[MB_MAXBYTES + 1];
-
- // Update the first byte of the character
- utf_char2bytes(curr_c, buf);
- *ccp = (uint8_t)buf[0];
- }
-
// Return the shaped character
return curr_c;
}