Mercurial > vim
comparison src/sign.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 | 233e2c585e03 |
children | 62b3805506b3 |
comparison
equal
deleted
inserted
replaced
15542:5baedae7ca7a | 15543:dd725a8ab112 |
---|---|
609 buf_T *buf; | 609 buf_T *buf; |
610 signlist_T *sign; | 610 signlist_T *sign; |
611 char lbuf[MSG_BUF_LEN]; | 611 char lbuf[MSG_BUF_LEN]; |
612 char group[MSG_BUF_LEN]; | 612 char group[MSG_BUF_LEN]; |
613 | 613 |
614 MSG_PUTS_TITLE(_("\n--- Signs ---")); | 614 msg_puts_title(_("\n--- Signs ---")); |
615 msg_putchar('\n'); | 615 msg_putchar('\n'); |
616 if (rbuf == NULL) | 616 if (rbuf == NULL) |
617 buf = firstbuf; | 617 buf = firstbuf; |
618 else | 618 else |
619 buf = rbuf; | 619 buf = rbuf; |
620 while (buf != NULL && !got_int) | 620 while (buf != NULL && !got_int) |
621 { | 621 { |
622 if (buf->b_signlist != NULL) | 622 if (buf->b_signlist != NULL) |
623 { | 623 { |
624 vim_snprintf(lbuf, MSG_BUF_LEN, _("Signs for %s:"), buf->b_fname); | 624 vim_snprintf(lbuf, MSG_BUF_LEN, _("Signs for %s:"), buf->b_fname); |
625 MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D)); | 625 msg_puts_attr(lbuf, HL_ATTR(HLF_D)); |
626 msg_putchar('\n'); | 626 msg_putchar('\n'); |
627 } | 627 } |
628 FOR_ALL_SIGNS_IN_BUF(buf, sign) | 628 FOR_ALL_SIGNS_IN_BUF(buf, sign) |
629 { | 629 { |
630 if (got_int) | 630 if (got_int) |
638 group[0] = '\0'; | 638 group[0] = '\0'; |
639 vim_snprintf(lbuf, MSG_BUF_LEN, | 639 vim_snprintf(lbuf, MSG_BUF_LEN, |
640 _(" line=%ld id=%d%s name=%s priority=%d"), | 640 _(" line=%ld id=%d%s name=%s priority=%d"), |
641 (long)sign->lnum, sign->id, group, | 641 (long)sign->lnum, sign->id, group, |
642 sign_typenr2name(sign->typenr), sign->priority); | 642 sign_typenr2name(sign->typenr), sign->priority); |
643 MSG_PUTS(lbuf); | 643 msg_puts(lbuf); |
644 msg_putchar('\n'); | 644 msg_putchar('\n'); |
645 } | 645 } |
646 if (rbuf != NULL) | 646 if (rbuf != NULL) |
647 break; | 647 break; |
648 buf = buf->b_next; | 648 buf = buf->b_next; |
1638 char_u *p; | 1638 char_u *p; |
1639 | 1639 |
1640 smsg("sign %s", sp->sn_name); | 1640 smsg("sign %s", sp->sn_name); |
1641 if (sp->sn_icon != NULL) | 1641 if (sp->sn_icon != NULL) |
1642 { | 1642 { |
1643 MSG_PUTS(" icon="); | 1643 msg_puts(" icon="); |
1644 msg_outtrans(sp->sn_icon); | 1644 msg_outtrans(sp->sn_icon); |
1645 # ifdef FEAT_SIGN_ICONS | 1645 # ifdef FEAT_SIGN_ICONS |
1646 if (sp->sn_image == NULL) | 1646 if (sp->sn_image == NULL) |
1647 MSG_PUTS(_(" (NOT FOUND)")); | 1647 msg_puts(_(" (NOT FOUND)")); |
1648 # else | 1648 # else |
1649 MSG_PUTS(_(" (not supported)")); | 1649 msg_puts(_(" (not supported)")); |
1650 # endif | 1650 # endif |
1651 } | 1651 } |
1652 if (sp->sn_text != NULL) | 1652 if (sp->sn_text != NULL) |
1653 { | 1653 { |
1654 MSG_PUTS(" text="); | 1654 msg_puts(" text="); |
1655 msg_outtrans(sp->sn_text); | 1655 msg_outtrans(sp->sn_text); |
1656 } | 1656 } |
1657 if (sp->sn_line_hl > 0) | 1657 if (sp->sn_line_hl > 0) |
1658 { | 1658 { |
1659 MSG_PUTS(" linehl="); | 1659 msg_puts(" linehl="); |
1660 p = get_highlight_name_ext(NULL, sp->sn_line_hl - 1, FALSE); | 1660 p = get_highlight_name_ext(NULL, sp->sn_line_hl - 1, FALSE); |
1661 if (p == NULL) | 1661 if (p == NULL) |
1662 MSG_PUTS("NONE"); | 1662 msg_puts("NONE"); |
1663 else | 1663 else |
1664 msg_puts(p); | 1664 msg_puts((char *)p); |
1665 } | 1665 } |
1666 if (sp->sn_text_hl > 0) | 1666 if (sp->sn_text_hl > 0) |
1667 { | 1667 { |
1668 MSG_PUTS(" texthl="); | 1668 msg_puts(" texthl="); |
1669 p = get_highlight_name_ext(NULL, sp->sn_text_hl - 1, FALSE); | 1669 p = get_highlight_name_ext(NULL, sp->sn_text_hl - 1, FALSE); |
1670 if (p == NULL) | 1670 if (p == NULL) |
1671 MSG_PUTS("NONE"); | 1671 msg_puts("NONE"); |
1672 else | 1672 else |
1673 msg_puts(p); | 1673 msg_puts((char *)p); |
1674 } | 1674 } |
1675 } | 1675 } |
1676 | 1676 |
1677 /* | 1677 /* |
1678 * Undefine a sign and free its memory. | 1678 * Undefine a sign and free its memory. |