diff options
author | Andrej Zieger <jerdna-regeiz@users.noreply.github.com> | 2019-05-26 17:06:50 +0200 |
---|---|---|
committer | Andrej Zieger <jerdna-regeiz@users.noreply.github.com> | 2019-05-26 19:32:32 +0200 |
commit | 80f40f0203f5af167f8c77bf6b9f22a4d1abd6da (patch) | |
tree | 3fd67d3bca8a4dfb144ca27cf68c117050e28073 /src/nvim/mbyte.c | |
parent | 0b9e57aca1ec12f35c2a2531be9769eff076c6b2 (diff) | |
download | rneovim-80f40f0203f5af167f8c77bf6b9f22a4d1abd6da.tar.gz rneovim-80f40f0203f5af167f8c77bf6b9f22a4d1abd6da.tar.bz2 rneovim-80f40f0203f5af167f8c77bf6b9f22a4d1abd6da.zip |
lint
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r-- | src/nvim/mbyte.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index c161bad66f..683087bd7b 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -2085,31 +2085,31 @@ static char_u *iconv_string(const vimconv_T *const vcp, char_u *str, to = (char *)result + done; tolen = len - done - 2; - /* Avoid a warning for systems with a wrong iconv() prototype by - * casting the second argument to void *. */ + // Avoid a warning for systems with a wrong iconv() prototype by + // casting the second argument to void *. if (iconv(vcp->vc_fd, (void *)&from, &fromlen, &to, &tolen) != SIZE_MAX) { - /* Finished, append a NUL. */ + // Finished, append a NUL. *to = NUL; break; } - /* Check both ICONV_EINVAL and EINVAL, because the dynamically loaded - * iconv library may use one of them. */ + // Check both ICONV_EINVAL and EINVAL, because the dynamically loaded + // iconv library may use one of them. if (!vcp->vc_fail && unconvlenp != NULL && (ICONV_ERRNO == ICONV_EINVAL || ICONV_ERRNO == EINVAL)) { - /* Handle an incomplete sequence at the end. */ + // Handle an incomplete sequence at the end. *to = NUL; *unconvlenp = fromlen; break; - } - /* Check both ICONV_EILSEQ and EILSEQ, because the dynamically loaded - * iconv library may use one of them. */ - else if (!vcp->vc_fail - && (ICONV_ERRNO == ICONV_EILSEQ || ICONV_ERRNO == EILSEQ - || ICONV_ERRNO == ICONV_EINVAL || ICONV_ERRNO == EINVAL)) { - /* Can't convert: insert a '?' and skip a character. This assumes - * conversion from 'encoding' to something else. In other - * situations we don't know what to skip anyway. */ + } else if (!vcp->vc_fail + && (ICONV_ERRNO == ICONV_EILSEQ || ICONV_ERRNO == EILSEQ + || ICONV_ERRNO == ICONV_EINVAL || ICONV_ERRNO == EINVAL)) { + // Check both ICONV_EILSEQ and EILSEQ, because the dynamically loaded + // iconv library may use one of them. + + // Can't convert: insert a '?' and skip a character. This assumes + // conversion from 'encoding' to something else. In other + // situations we don't know what to skip anyway. *to++ = '?'; if (utf_ptr2cells((char_u *)from) > 1) { *to++ = '?'; @@ -2122,7 +2122,7 @@ static char_u *iconv_string(const vimconv_T *const vcp, char_u *str, XFREE_CLEAR(result); break; } - /* Not enough room or skipping illegal sequence. */ + // Not enough room or skipping illegal sequence. done = to - (char *)result; } @@ -2132,11 +2132,9 @@ static char_u *iconv_string(const vimconv_T *const vcp, char_u *str, } # if defined(DYNAMIC_ICONV) -/* - * Dynamically load the "iconv.dll" on Win32. - */ +// Dynamically load the "iconv.dll" on Win32. -#ifndef DYNAMIC_ICONV /* just generating prototypes */ +#ifndef DYNAMIC_ICONV // just generating prototypes # define HINSTANCE int #endif static HINSTANCE hIconvDLL = 0; |