Mercurial > vim
comparison src/option.c @ 15543:dd725a8ab112 v8.1.0779
patch 8.1.0779: argument for message functions is inconsistent
commit https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 19 17:43:09 2019 +0100
patch 8.1.0779: argument for message functions is inconsistent
Problem: Argument for message functions is inconsistent.
Solution: Make first argument to msg() "char *".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 19 Jan 2019 17:45:07 +0100 |
parents | bc17a9d37810 |
children | d89c5b339c2a |
comparison
equal
deleted
inserted
replaced
15542:5baedae7ca7a | 15543:dd725a8ab112 |
---|---|
8883 if (STRCMP(p_enc, "utf-8") != 0) | 8883 if (STRCMP(p_enc, "utf-8") != 0) |
8884 { | 8884 { |
8885 static char *w_arabic = N_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'"); | 8885 static char *w_arabic = N_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'"); |
8886 | 8886 |
8887 msg_source(HL_ATTR(HLF_W)); | 8887 msg_source(HL_ATTR(HLF_W)); |
8888 MSG_ATTR(_(w_arabic), HL_ATTR(HLF_W)); | 8888 msg_attr(_(w_arabic), HL_ATTR(HLF_W)); |
8889 #ifdef FEAT_EVAL | 8889 #ifdef FEAT_EVAL |
8890 set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_arabic), -1); | 8890 set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_arabic), -1); |
8891 #endif | 8891 #endif |
8892 } | 8892 } |
8893 | 8893 |
10150 if (items == NULL) | 10150 if (items == NULL) |
10151 return; | 10151 return; |
10152 | 10152 |
10153 /* Highlight title */ | 10153 /* Highlight title */ |
10154 if (all == 2) | 10154 if (all == 2) |
10155 MSG_PUTS_TITLE(_("\n--- Terminal codes ---")); | 10155 msg_puts_title(_("\n--- Terminal codes ---")); |
10156 else if (opt_flags & OPT_GLOBAL) | 10156 else if (opt_flags & OPT_GLOBAL) |
10157 MSG_PUTS_TITLE(_("\n--- Global option values ---")); | 10157 msg_puts_title(_("\n--- Global option values ---")); |
10158 else if (opt_flags & OPT_LOCAL) | 10158 else if (opt_flags & OPT_LOCAL) |
10159 MSG_PUTS_TITLE(_("\n--- Local option values ---")); | 10159 msg_puts_title(_("\n--- Local option values ---")); |
10160 else | 10160 else |
10161 MSG_PUTS_TITLE(_("\n--- Options ---")); | 10161 msg_puts_title(_("\n--- Options ---")); |
10162 | 10162 |
10163 /* | 10163 /* |
10164 * do the loop two times: | 10164 * do the loop two times: |
10165 * 1. display the short items | 10165 * 1. display the short items |
10166 * 2. display the long items (only strings and numbers) | 10166 * 2. display the long items (only strings and numbers) |
10274 varp = get_varp_scope(p, opt_flags); | 10274 varp = get_varp_scope(p, opt_flags); |
10275 | 10275 |
10276 /* for 'modified' we also need to check if 'ff' or 'fenc' changed. */ | 10276 /* for 'modified' we also need to check if 'ff' or 'fenc' changed. */ |
10277 if ((p->flags & P_BOOL) && ((int *)varp == &curbuf->b_changed | 10277 if ((p->flags & P_BOOL) && ((int *)varp == &curbuf->b_changed |
10278 ? !curbufIsChanged() : !*(int *)varp)) | 10278 ? !curbufIsChanged() : !*(int *)varp)) |
10279 MSG_PUTS("no"); | 10279 msg_puts("no"); |
10280 else if ((p->flags & P_BOOL) && *(int *)varp < 0) | 10280 else if ((p->flags & P_BOOL) && *(int *)varp < 0) |
10281 MSG_PUTS("--"); | 10281 msg_puts("--"); |
10282 else | 10282 else |
10283 MSG_PUTS(" "); | 10283 msg_puts(" "); |
10284 MSG_PUTS(p->fullname); | 10284 msg_puts(p->fullname); |
10285 if (!(p->flags & P_BOOL)) | 10285 if (!(p->flags & P_BOOL)) |
10286 { | 10286 { |
10287 msg_putchar('='); | 10287 msg_putchar('='); |
10288 /* put value string in NameBuff */ | 10288 /* put value string in NameBuff */ |
10289 option_value2string(p, opt_flags); | 10289 option_value2string(p, opt_flags); |