Hi Bram, 2017-1-22(Sun) 6:50:40 UTC+9 Bram Moolenaar: > Patch 8.0.0211 (after 8.0.0210) > Problem: Build fails if the multi-byte feature is disabled. > Solution: Change #ifdef around ins_char_bytes. > Files: src/misc1.c > > > *** ../vim-8.0.0210/src/misc1.c 2017-01-12 21:44:45.142171836 +0100 > --- src/misc1.c 2017-01-21 21:47:16.948216111 +0100 > *************** > *** 2177,2192 **** > void > ins_char(int c) > { > - #if defined(FEAT_MBYTE) || defined(PROTO) > char_u buf[MB_MAXBYTES + 1]; > ! int n; > > n = (*mb_char2bytes)(c, buf); > > /* When "c" is 0x100, 0x200, etc. we don't want to insert a NUL byte. > * Happens for CTRL-Vu9900. */ > if (buf[0] == 0) > buf[0] = '\n'; > > ins_char_bytes(buf, n); > } > --- 2177,2195 ---- > void > ins_char(int c) > { > char_u buf[MB_MAXBYTES + 1]; > ! int n = 1; > > + #if defined(FEAT_MBYTE) || defined(PROTO) > n = (*mb_char2bytes)(c, buf); > > /* When "c" is 0x100, 0x200, etc. we don't want to insert a NUL byte. > * Happens for CTRL-Vu9900. */ > if (buf[0] == 0) > buf[0] = '\n'; > + #else > + buf[0] = c; > + #endif [...]
I think `defined(PROTO)` is unnecessary for `#if ~ #endif` which is completed within the function. An attached small patch fixes this. -- Best regards, Hirohito Higashi (a.k.a. h_east) -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
diff --git a/src/misc1.c b/src/misc1.c index 046e2f0..cc5d5e6 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -2180,7 +2180,7 @@ ins_char(int c) char_u buf[MB_MAXBYTES + 1]; int n = 1; -#if defined(FEAT_MBYTE) || defined(PROTO) +#ifdef FEAT_MBYTE n = (*mb_char2bytes)(c, buf); /* When "c" is 0x100, 0x200, etc. we don't want to insert a NUL byte.