diff options
author | Dundar Goc <gocdundar@gmail.com> | 2022-05-05 13:36:14 +0200 |
---|---|---|
committer | Dundar Goc <gocdundar@gmail.com> | 2022-05-09 10:03:29 +0200 |
commit | e31b32a293f6ba8708499a176234f8be1df6a145 (patch) | |
tree | 87e129c92affece6421d4585b5d5c20996891ec5 /src/nvim/grid.c | |
parent | dbdd58e548fcf55848359b696275fd848756db7b (diff) | |
download | rneovim-e31b32a293f6ba8708499a176234f8be1df6a145.tar.gz rneovim-e31b32a293f6ba8708499a176234f8be1df6a145.tar.bz2 rneovim-e31b32a293f6ba8708499a176234f8be1df6a145.zip |
refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/grid.c')
-rw-r--r-- | src/nvim/grid.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/nvim/grid.c b/src/nvim/grid.c index b150d3819e..8a5d8081c0 100644 --- a/src/nvim/grid.c +++ b/src/nvim/grid.c @@ -2,10 +2,10 @@ // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include "nvim/arabic.h" -#include "nvim/highlight.h" -#include "nvim/vim.h" #include "nvim/grid.h" +#include "nvim/highlight.h" #include "nvim/ui.h" +#include "nvim/vim.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "grid.c.generated.h" @@ -39,12 +39,12 @@ void grid_adjust(ScreenGrid **grid, int *row_off, int *col_off) /// Put a unicode char, and up to MAX_MCO composing chars, in a screen cell. int schar_from_cc(char_u *p, int c, int u8cc[MAX_MCO]) { - int len = utf_char2bytes(c, p); + int len = utf_char2bytes(c, (char *)p); for (int i = 0; i < MAX_MCO; i++) { if (u8cc[i] == 0) { break; } - len += utf_char2bytes(u8cc[i], p + len); + len += utf_char2bytes(u8cc[i], (char *)p + len); } p[len] = 0; return len; @@ -113,10 +113,10 @@ int grid_fix_col(ScreenGrid *grid, int col, int row) /// output a single character directly to the grid void grid_putchar(ScreenGrid *grid, int c, int row, int col, int attr) { - char_u buf[MB_MAXBYTES + 1]; + char buf[MB_MAXBYTES + 1]; buf[utf_char2bytes(c, buf)] = NUL; - grid_puts(grid, buf, row, col, attr); + grid_puts(grid, (char_u *)buf, row, col, attr); } /// get a single character directly from grid.chars into "bytes[]". @@ -705,4 +705,3 @@ void grid_free_all_mem(void) xfree(linebuf_char); xfree(linebuf_attr); } - |