Mercurial > vim
comparison src/quickfix.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 | 98c35d312987 |
children | 639b8318472c |
comparison
equal
deleted
inserted
replaced
15542:5baedae7ca7a | 15543:dd725a8ab112 |
---|---|
3147 i = msg_scroll; | 3147 i = msg_scroll; |
3148 if (curbuf == old_curbuf && curwin->w_cursor.lnum == old_lnum) | 3148 if (curbuf == old_curbuf && curwin->w_cursor.lnum == old_lnum) |
3149 msg_scroll = TRUE; | 3149 msg_scroll = TRUE; |
3150 else if (!msg_scrolled && shortmess(SHM_OVERALL)) | 3150 else if (!msg_scrolled && shortmess(SHM_OVERALL)) |
3151 msg_scroll = FALSE; | 3151 msg_scroll = FALSE; |
3152 msg_attr_keep(IObuff, 0, TRUE); | 3152 msg_attr_keep((char *)IObuff, 0, TRUE); |
3153 msg_scroll = i; | 3153 msg_scroll = i; |
3154 } | 3154 } |
3155 | 3155 |
3156 /* | 3156 /* |
3157 * Find a usable window for opening a file from the quickfix/location list. If | 3157 * Find a usable window for opening a file from the quickfix/location list. If |
3420 | 3420 |
3421 msg_putchar('\n'); | 3421 msg_putchar('\n'); |
3422 msg_outtrans_attr(IObuff, cursel ? HL_ATTR(HLF_QFL) : qfFileAttr); | 3422 msg_outtrans_attr(IObuff, cursel ? HL_ATTR(HLF_QFL) : qfFileAttr); |
3423 | 3423 |
3424 if (qfp->qf_lnum != 0) | 3424 if (qfp->qf_lnum != 0) |
3425 msg_puts_attr((char_u *)":", qfSepAttr); | 3425 msg_puts_attr(":", qfSepAttr); |
3426 if (qfp->qf_lnum == 0) | 3426 if (qfp->qf_lnum == 0) |
3427 IObuff[0] = NUL; | 3427 IObuff[0] = NUL; |
3428 else if (qfp->qf_col == 0) | 3428 else if (qfp->qf_col == 0) |
3429 sprintf((char *)IObuff, "%ld", qfp->qf_lnum); | 3429 sprintf((char *)IObuff, "%ld", qfp->qf_lnum); |
3430 else | 3430 else |
3431 sprintf((char *)IObuff, "%ld col %d", | 3431 sprintf((char *)IObuff, "%ld col %d", |
3432 qfp->qf_lnum, qfp->qf_col); | 3432 qfp->qf_lnum, qfp->qf_col); |
3433 sprintf((char *)IObuff + STRLEN(IObuff), "%s", | 3433 sprintf((char *)IObuff + STRLEN(IObuff), "%s", |
3434 (char *)qf_types(qfp->qf_type, qfp->qf_nr)); | 3434 (char *)qf_types(qfp->qf_type, qfp->qf_nr)); |
3435 msg_puts_attr(IObuff, qfLineAttr); | 3435 msg_puts_attr((char *)IObuff, qfLineAttr); |
3436 msg_puts_attr((char_u *)":", qfSepAttr); | 3436 msg_puts_attr(":", qfSepAttr); |
3437 if (qfp->qf_pattern != NULL) | 3437 if (qfp->qf_pattern != NULL) |
3438 { | 3438 { |
3439 qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE); | 3439 qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE); |
3440 msg_puts(IObuff); | 3440 msg_puts((char *)IObuff); |
3441 msg_puts_attr((char_u *)":", qfSepAttr); | 3441 msg_puts_attr(":", qfSepAttr); |
3442 } | 3442 } |
3443 msg_puts((char_u *)" "); | 3443 msg_puts(" "); |
3444 | 3444 |
3445 // Remove newlines and leading whitespace from the text. For an | 3445 // Remove newlines and leading whitespace from the text. For an |
3446 // unrecognized line keep the indent, the compiler may mark a word | 3446 // unrecognized line keep the indent, the compiler may mark a word |
3447 // with ^^^^. | 3447 // with ^^^^. |
3448 qf_fmt_text((fname != NULL || qfp->qf_lnum != 0) | 3448 qf_fmt_text((fname != NULL || qfp->qf_lnum != 0) |
3599 buf[34] = NUL; | 3599 buf[34] = NUL; |
3600 } | 3600 } |
3601 vim_strcat(buf, (char_u *)title, IOSIZE); | 3601 vim_strcat(buf, (char_u *)title, IOSIZE); |
3602 } | 3602 } |
3603 trunc_string(buf, buf, Columns - 1, IOSIZE); | 3603 trunc_string(buf, buf, Columns - 1, IOSIZE); |
3604 msg(buf); | 3604 msg((char *)buf); |
3605 } | 3605 } |
3606 | 3606 |
3607 /* | 3607 /* |
3608 * ":colder [count]": Up in the quickfix stack. | 3608 * ":colder [count]": Up in the quickfix stack. |
3609 * ":cnewer [count]": Down in the quickfix stack. | 3609 * ":cnewer [count]": Down in the quickfix stack. |
3665 int i; | 3665 int i; |
3666 | 3666 |
3667 if (is_loclist_cmd(eap->cmdidx)) | 3667 if (is_loclist_cmd(eap->cmdidx)) |
3668 qi = GET_LOC_LIST(curwin); | 3668 qi = GET_LOC_LIST(curwin); |
3669 if (qf_stack_empty(qi)) | 3669 if (qf_stack_empty(qi)) |
3670 MSG(_("No entries")); | 3670 msg(_("No entries")); |
3671 else | 3671 else |
3672 for (i = 0; i < qi->qf_listcount; ++i) | 3672 for (i = 0; i < qi->qf_listcount; ++i) |
3673 qf_msg(qi, i, i == qi->qf_curlist ? "> " : " "); | 3673 qf_msg(qi, i, i == qi->qf_curlist ? "> " : " "); |
3674 } | 3674 } |
3675 | 3675 |
4651 // else than the :make command that was typed (in which case the cursor is | 4651 // else than the :make command that was typed (in which case the cursor is |
4652 // in column 0). | 4652 // in column 0). |
4653 if (msg_col == 0) | 4653 if (msg_col == 0) |
4654 msg_didout = FALSE; | 4654 msg_didout = FALSE; |
4655 msg_start(); | 4655 msg_start(); |
4656 MSG_PUTS(":!"); | 4656 msg_puts(":!"); |
4657 msg_outtrans(cmd); // show what we are doing | 4657 msg_outtrans(cmd); // show what we are doing |
4658 | 4658 |
4659 return cmd; | 4659 return cmd; |
4660 } | 4660 } |
4661 | 4661 |