diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-12-21 12:00:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-21 19:00:05 +0800 |
commit | ec1738a6ed08dd3a89fd07950fa2dcc55a72b705 (patch) | |
tree | 2df3877a3d10926a2fcb17b4e2ff07fd70d03ceb /src/nvim/hardcopy.c | |
parent | c24605a5a08873d0c7161941b0c7d0aba63d1ccc (diff) | |
download | rneovim-ec1738a6ed08dd3a89fd07950fa2dcc55a72b705.tar.gz rneovim-ec1738a6ed08dd3a89fd07950fa2dcc55a72b705.tar.bz2 rneovim-ec1738a6ed08dd3a89fd07950fa2dcc55a72b705.zip |
refactor: replace char_u with char 16 - remove STRNCMP (#21208)
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/hardcopy.c')
-rw-r--r-- | src/nvim/hardcopy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c index 3e43eca92c..0240761483 100644 --- a/src/nvim/hardcopy.c +++ b/src/nvim/hardcopy.c @@ -232,7 +232,7 @@ struct prt_ps_resource_S { char_u filename[MAXPATHL + 1]; PrtResourceType type; char_u title[256]; - char_u version[256]; + char version[256]; }; struct prt_dsc_comment_S { @@ -243,7 +243,7 @@ struct prt_dsc_comment_S { struct prt_dsc_line_S { int type; - char_u *string; + char *string; int len; }; @@ -251,7 +251,7 @@ struct prt_dsc_line_S { // couple of KB of comments! #define PRT_FILE_BUFFER_LEN (2048) struct prt_resfile_buffer_S { - char_u buffer[PRT_FILE_BUFFER_LEN]; + char buffer[PRT_FILE_BUFFER_LEN]; int len; int line_start; int line_end; @@ -1550,8 +1550,8 @@ static int prt_resfile_strncmp(int offset, const char *string, int len) if (len > (prt_resfile.line_end - (prt_resfile.line_start + offset))) { return 1; } - return STRNCMP(&prt_resfile.buffer[prt_resfile.line_start + offset], - string, len); + return strncmp(&prt_resfile.buffer[prt_resfile.line_start + offset], + string, (size_t)len); } static int prt_resfile_skip_nonws(int offset) @@ -1751,7 +1751,7 @@ static bool prt_check_resource(const struct prt_ps_resource_S *resource, const c FUNC_ATTR_NONNULL_ALL { // Version number m.n should match, the revision number does not matter - if (STRNCMP(resource->version, version, strlen(version)) != 0) { + if (strncmp(resource->version, version, strlen(version)) != 0) { semsg(_("E621: \"%s\" resource file has wrong version"), resource->name); return false; |