Mercurial > vim
comparison src/search.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 | 55ccc2d353bd |
children | d89c5b339c2a |
comparison
equal
deleted
inserted
replaced
15542:5baedae7ca7a | 15543:dd725a8ab112 |
---|---|
5057 if (!got_int) /* don't display if 'q' | 5057 if (!got_int) /* don't display if 'q' |
5058 typed at "--more--" | 5058 typed at "--more--" |
5059 message */ | 5059 message */ |
5060 { | 5060 { |
5061 msg_home_replace_hl(new_fname); | 5061 msg_home_replace_hl(new_fname); |
5062 MSG_PUTS(_(" (includes previously listed match)")); | 5062 msg_puts(_(" (includes previously listed match)")); |
5063 prev_fname = NULL; | 5063 prev_fname = NULL; |
5064 } | 5064 } |
5065 } | 5065 } |
5066 VIM_CLEAR(new_fname); | 5066 VIM_CLEAR(new_fname); |
5067 already_searched = TRUE; | 5067 already_searched = TRUE; |
5076 if (did_show) | 5076 if (did_show) |
5077 msg_putchar('\n'); /* cursor below last one */ | 5077 msg_putchar('\n'); /* cursor below last one */ |
5078 else | 5078 else |
5079 { | 5079 { |
5080 gotocmdline(TRUE); /* cursor at status line */ | 5080 gotocmdline(TRUE); /* cursor at status line */ |
5081 MSG_PUTS_TITLE(_("--- Included files ")); | 5081 msg_puts_title(_("--- Included files ")); |
5082 if (action != ACTION_SHOW_ALL) | 5082 if (action != ACTION_SHOW_ALL) |
5083 MSG_PUTS_TITLE(_("not found ")); | 5083 msg_puts_title(_("not found ")); |
5084 MSG_PUTS_TITLE(_("in path ---\n")); | 5084 msg_puts_title(_("in path ---\n")); |
5085 } | 5085 } |
5086 did_show = TRUE; | 5086 did_show = TRUE; |
5087 while (depth_displayed < depth && !got_int) | 5087 while (depth_displayed < depth && !got_int) |
5088 { | 5088 { |
5089 ++depth_displayed; | 5089 ++depth_displayed; |
5090 for (i = 0; i < depth_displayed; i++) | 5090 for (i = 0; i < depth_displayed; i++) |
5091 MSG_PUTS(" "); | 5091 msg_puts(" "); |
5092 msg_home_replace(files[depth_displayed].name); | 5092 msg_home_replace(files[depth_displayed].name); |
5093 MSG_PUTS(" -->\n"); | 5093 msg_puts(" -->\n"); |
5094 } | 5094 } |
5095 if (!got_int) /* don't display if 'q' typed | 5095 if (!got_int) /* don't display if 'q' typed |
5096 for "--more--" message */ | 5096 for "--more--" message */ |
5097 { | 5097 { |
5098 for (i = 0; i <= depth_displayed; i++) | 5098 for (i = 0; i <= depth_displayed; i++) |
5099 MSG_PUTS(" "); | 5099 msg_puts(" "); |
5100 if (new_fname != NULL) | 5100 if (new_fname != NULL) |
5101 { | 5101 { |
5102 /* using "new_fname" is more reliable, e.g., when | 5102 /* using "new_fname" is more reliable, e.g., when |
5103 * 'includeexpr' is set. */ | 5103 * 'includeexpr' is set. */ |
5104 msg_outtrans_attr(new_fname, HL_ATTR(HLF_D)); | 5104 msg_outtrans_attr(new_fname, HL_ATTR(HLF_D)); |
5152 } | 5152 } |
5153 | 5153 |
5154 if (new_fname == NULL && action == ACTION_SHOW_ALL) | 5154 if (new_fname == NULL && action == ACTION_SHOW_ALL) |
5155 { | 5155 { |
5156 if (already_searched) | 5156 if (already_searched) |
5157 MSG_PUTS(_(" (Already listed)")); | 5157 msg_puts(_(" (Already listed)")); |
5158 else | 5158 else |
5159 MSG_PUTS(_(" NOT FOUND")); | 5159 msg_puts(_(" NOT FOUND")); |
5160 } | 5160 } |
5161 } | 5161 } |
5162 out_flush(); /* output each line directly */ | 5162 out_flush(); /* output each line directly */ |
5163 } | 5163 } |
5164 | 5164 |
5210 { | 5210 { |
5211 msg_hist_off = TRUE; /* reset in msg_trunc_attr() */ | 5211 msg_hist_off = TRUE; /* reset in msg_trunc_attr() */ |
5212 vim_snprintf((char*)IObuff, IOSIZE, | 5212 vim_snprintf((char*)IObuff, IOSIZE, |
5213 _("Scanning included file: %s"), | 5213 _("Scanning included file: %s"), |
5214 (char *)new_fname); | 5214 (char *)new_fname); |
5215 msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R)); | 5215 msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R)); |
5216 } | 5216 } |
5217 else | 5217 else |
5218 #endif | 5218 #endif |
5219 if (p_verbose >= 5) | 5219 if (p_verbose >= 5) |
5220 { | 5220 { |
5591 if (type == CHECK_PATH) | 5591 if (type == CHECK_PATH) |
5592 { | 5592 { |
5593 if (!did_show) | 5593 if (!did_show) |
5594 { | 5594 { |
5595 if (action != ACTION_SHOW_ALL) | 5595 if (action != ACTION_SHOW_ALL) |
5596 MSG(_("All included files were found")); | 5596 msg(_("All included files were found")); |
5597 else | 5597 else |
5598 MSG(_("No included files")); | 5598 msg(_("No included files")); |
5599 } | 5599 } |
5600 } | 5600 } |
5601 else if (!found | 5601 else if (!found |
5602 #ifdef FEAT_INS_EXPAND | 5602 #ifdef FEAT_INS_EXPAND |
5603 && action != ACTION_EXPAND | 5603 && action != ACTION_EXPAND |
5656 *(p + 1) = NUL; | 5656 *(p + 1) = NUL; |
5657 } | 5657 } |
5658 if (action == ACTION_SHOW_ALL) | 5658 if (action == ACTION_SHOW_ALL) |
5659 { | 5659 { |
5660 sprintf((char *)IObuff, "%3ld: ", count); /* show match nr */ | 5660 sprintf((char *)IObuff, "%3ld: ", count); /* show match nr */ |
5661 msg_puts(IObuff); | 5661 msg_puts((char *)IObuff); |
5662 sprintf((char *)IObuff, "%4ld", *lnum); /* show line nr */ | 5662 sprintf((char *)IObuff, "%4ld", *lnum); /* show line nr */ |
5663 /* Highlight line numbers */ | 5663 /* Highlight line numbers */ |
5664 msg_puts_attr(IObuff, HL_ATTR(HLF_N)); | 5664 msg_puts_attr((char *)IObuff, HL_ATTR(HLF_N)); |
5665 MSG_PUTS(" "); | 5665 msg_puts(" "); |
5666 } | 5666 } |
5667 msg_prt_line(line, FALSE); | 5667 msg_prt_line(line, FALSE); |
5668 out_flush(); /* show one line at a time */ | 5668 out_flush(); /* show one line at a time */ |
5669 | 5669 |
5670 /* Definition continues until line that doesn't end with '\' */ | 5670 /* Definition continues until line that doesn't end with '\' */ |