char_u * transchar(int c) { int i; i = 0; if (IS_SPECIAL(c)) /* special key code, display as ~@ char */ { transchar_buf[0] = '~'; transchar_buf[1] = '@'; i = 2; c = K_SECOND(c); } if ((!chartab_initialized && ( #ifdef EBCDIC (c >= 64 && c < 255) #else (c >= ' ' && c <= '~') #endif #ifdef FEAT_FKMAP || (p_altkeymap && F_ischar(c)) #endif )) || (c < 256 && vim_isprintc_strict(c))) { /* printable character */ transchar_buf[i] = c; transchar_buf[i + 1] = NUL; } else transchar_nonprint(transchar_buf + i, c); return transchar_buf; }
/// Translates a character /// /// @param c /// /// @return translated character. char_u* transchar(int c) { int i = 0; if (IS_SPECIAL(c)) { // special key code, display as ~@ char transchar_buf[0] = '~'; transchar_buf[1] = '@'; i = 2; c = K_SECOND(c); } if ((!chartab_initialized && (((c >= ' ') && (c <= '~')) || F_ischar(c))) || ((c < 256) && vim_isprintc_strict(c))) { // printable character transchar_buf[i] = c; transchar_buf[i + 1] = NUL; } else { transchar_nonprint(transchar_buf + i, c); } return transchar_buf; }