diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-24 15:54:21 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-24 15:54:21 +0100 |
commit | fc3abf47fbe1e426f2b676c316c81ee9ff607075 (patch) | |
tree | 87b9be7b053e71ee6ec750f7c0f0387e9287d4c0 /src/if_xcmdsrv.c | |
parent | 135059724f140ceac889c9f8136bd1bf5c41d49d (diff) | |
download | vim-git-fc3abf47fbe1e426f2b676c316c81ee9ff607075.tar.gz |
patch 8.1.0806: too many #ifdefsv8.1.0806
Problem: Too many #ifdefs.
Solution: Graduate FEAT_MBYTE, part 2.
Diffstat (limited to 'src/if_xcmdsrv.c')
-rw-r--r-- | src/if_xcmdsrv.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/if_xcmdsrv.c b/src/if_xcmdsrv.c index 3439f9d12..430548eb3 100644 --- a/src/if_xcmdsrv.c +++ b/src/if_xcmdsrv.c @@ -440,20 +440,11 @@ serverSendToVim( * comm window in the communication window. * Length must be computed exactly! */ -#ifdef FEAT_MBYTE length = STRLEN(name) + STRLEN(p_enc) + STRLEN(cmd) + 14; -#else - length = STRLEN(name) + STRLEN(cmd) + 10; -#endif property = (char_u *)alloc((unsigned)length + 30); -#ifdef FEAT_MBYTE sprintf((char *)property, "%c%c%c-n %s%c-E %s%c-s %s", 0, asExpr ? 'c' : 'k', 0, name, 0, p_enc, 0, cmd); -#else - sprintf((char *)property, "%c%c%c-n %s%c-s %s", - 0, asExpr ? 'c' : 'k', 0, name, 0, cmd); -#endif if (name == loosename) vim_free(loosename); /* Add a back reference to our comm window */ @@ -758,20 +749,11 @@ serverSendReply(char_u *name, char_u *str) if (!WindowValid(dpy, win)) return -1; -#ifdef FEAT_MBYTE length = STRLEN(p_enc) + STRLEN(str) + 14; -#else - length = STRLEN(str) + 10; -#endif if ((property = (char_u *)alloc((unsigned)length + 30)) != NULL) { -#ifdef FEAT_MBYTE sprintf((char *)property, "%cn%c-E %s%c-n %s%c-w %x", 0, 0, p_enc, 0, str, 0, (unsigned int)commWindow); -#else - sprintf((char *)property, "%cn%c-n %s%c-w %x", - 0, 0, str, 0, (unsigned int)commWindow); -#endif /* Add length of what "%x" resulted in. */ length += STRLEN(property + length); res = AppendPropCarefully(dpy, win, commProperty, property, length + 1); @@ -1334,17 +1316,10 @@ server_parse_message( /* Initialize the result property. */ ga_init2(&reply, 1, 100); -#ifdef FEAT_MBYTE (void)ga_grow(&reply, 50 + STRLEN(p_enc)); sprintf(reply.ga_data, "%cr%c-E %s%c-s %s%c-r ", 0, 0, p_enc, 0, serial, 0); reply.ga_len = 14 + STRLEN(p_enc) + STRLEN(serial); -#else - (void)ga_grow(&reply, 50); - sprintf(reply.ga_data, "%cr%c-s %s%c-r ", - 0, 0, serial, 0); - reply.ga_len = 10 + STRLEN(serial); -#endif /* Evaluate the expression and return the result. */ if (res != NULL) |