mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
Enable -Wconversion: Passing-by: Remove dead code (MACOS_CONVERT).
MacOS (pre Mac OS X) is not supported anymore.
This commit is contained in:
parent
7a7c933b86
commit
690e43b461
@ -1235,7 +1235,6 @@ retry:
|
||||
if (size <= 0)
|
||||
break;
|
||||
|
||||
|
||||
# ifdef USE_ICONV
|
||||
if (iconv_fd != (iconv_t)-1) {
|
||||
/*
|
||||
@ -1294,16 +1293,6 @@ retry:
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef MACOS_CONVERT
|
||||
if (fio_flags & FIO_MACROMAN) {
|
||||
/*
|
||||
* Conversion from Apple MacRoman char encoding to UTF-8 or
|
||||
* latin1. This is in os_mac_conv.c.
|
||||
*/
|
||||
if (macroman2enc(ptr, &size, real_size) == FAIL)
|
||||
goto rewind_retry;
|
||||
} else
|
||||
# endif
|
||||
if (fio_flags != 0) {
|
||||
int u8c;
|
||||
char_u *dest;
|
||||
@ -4029,38 +4018,6 @@ static int buf_write_bytes(struct bw_info *ip)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ifdef MACOS_CONVERT
|
||||
else if (flags & FIO_MACROMAN) {
|
||||
/*
|
||||
* Convert UTF-8 or latin1 to Apple MacRoman.
|
||||
*/
|
||||
char_u *from;
|
||||
size_t fromlen;
|
||||
|
||||
if (ip->bw_restlen > 0) {
|
||||
/* Need to concatenate the remainder of the previous call and
|
||||
* the bytes of the current call. Use the end of the
|
||||
* conversion buffer for this. */
|
||||
fromlen = len + ip->bw_restlen;
|
||||
from = ip->bw_conv_buf + ip->bw_conv_buflen - fromlen;
|
||||
memmove(from, ip->bw_rest, (size_t)ip->bw_restlen);
|
||||
memmove(from + ip->bw_restlen, buf, (size_t)len);
|
||||
} else {
|
||||
from = buf;
|
||||
fromlen = len;
|
||||
}
|
||||
|
||||
if (enc2macroman(from, fromlen,
|
||||
ip->bw_conv_buf, &len, ip->bw_conv_buflen,
|
||||
ip->bw_rest, &ip->bw_restlen) == FAIL) {
|
||||
ip->bw_conv_error = TRUE;
|
||||
return FAIL;
|
||||
}
|
||||
buf = ip->bw_conv_buf;
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef USE_ICONV
|
||||
if (ip->bw_iconv_fd != (iconv_t)-1) {
|
||||
const char *from;
|
||||
|
@ -3931,28 +3931,6 @@ char_u * string_convert_ext(vimconv_T *vcp, char_u *ptr,
|
||||
*lenp = (size_t)(d - retval);
|
||||
break;
|
||||
|
||||
# ifdef MACOS_CONVERT
|
||||
case CONV_MAC_LATIN1:
|
||||
retval = mac_string_convert(ptr, len, lenp, vcp->vc_fail,
|
||||
'm', 'l', unconvlenp);
|
||||
break;
|
||||
|
||||
case CONV_LATIN1_MAC:
|
||||
retval = mac_string_convert(ptr, len, lenp, vcp->vc_fail,
|
||||
'l', 'm', unconvlenp);
|
||||
break;
|
||||
|
||||
case CONV_MAC_UTF8:
|
||||
retval = mac_string_convert(ptr, len, lenp, vcp->vc_fail,
|
||||
'm', 'u', unconvlenp);
|
||||
break;
|
||||
|
||||
case CONV_UTF8_MAC:
|
||||
retval = mac_string_convert(ptr, len, lenp, vcp->vc_fail,
|
||||
'u', 'm', unconvlenp);
|
||||
break;
|
||||
# endif
|
||||
|
||||
# ifdef USE_ICONV
|
||||
case CONV_ICONV: /* conversion with output_conv.vc_fd */
|
||||
retval = iconv_string(vcp, ptr, len, unconvlenp, lenp);
|
||||
|
@ -2059,12 +2059,6 @@ void set_init_1(void)
|
||||
/* Parse default for 'fillchars'. */
|
||||
(void)set_chars_option(&p_fcs);
|
||||
|
||||
|
||||
# ifdef MACOS_CONVERT
|
||||
/* Moved to os_mac_conv.c to avoid dependency problems. */
|
||||
mac_lang_init();
|
||||
# endif
|
||||
|
||||
/* enc_locale() will try to find the encoding of the current locale. */
|
||||
p = enc_locale();
|
||||
if (p != NULL) {
|
||||
|
@ -415,10 +415,6 @@ void mch_exit(int r)
|
||||
out_flush();
|
||||
ml_close_all(TRUE); /* remove all memfiles */
|
||||
|
||||
#ifdef MACOS_CONVERT
|
||||
mac_conv_cleanup();
|
||||
#endif
|
||||
|
||||
event_teardown();
|
||||
|
||||
#ifdef EXITFREE
|
||||
|
@ -578,16 +578,6 @@ unix_expandpath (
|
||||
if (*path_end != NUL)
|
||||
backslash_halve(buf + len + 1);
|
||||
if (os_file_exists(buf)) { /* add existing file */
|
||||
#ifdef MACOS_CONVERT
|
||||
size_t precomp_len = STRLEN(buf)+1;
|
||||
char_u *precomp_buf =
|
||||
mac_precompose_path(buf, precomp_len, &precomp_len);
|
||||
|
||||
if (precomp_buf) {
|
||||
memmove(buf, precomp_buf, precomp_len);
|
||||
free(precomp_buf);
|
||||
}
|
||||
#endif
|
||||
addfile(gap, buf, flags);
|
||||
}
|
||||
}
|
||||
|
@ -161,10 +161,6 @@ void term_init(void)
|
||||
setbuf(stdout, NULL);
|
||||
|
||||
out_flush();
|
||||
|
||||
#ifdef MACOS_CONVERT
|
||||
mac_conv_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user