Mercurial > vim
comparison src/version.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 | 0e39325d5ea1 |
children | a0a1bd12e48c |
comparison
equal
deleted
inserted
replaced
15542:5baedae7ca7a | 15543:dd725a8ab112 |
---|---|
790 }; | 790 }; |
791 | 791 |
792 static int included_patches[] = | 792 static int included_patches[] = |
793 { /* Add new patch number below this line */ | 793 { /* Add new patch number below this line */ |
794 /**/ | 794 /**/ |
795 779, | |
796 /**/ | |
795 778, | 797 778, |
796 /**/ | 798 /**/ |
797 777, | 799 777, |
798 /**/ | 800 /**/ |
799 776, | 801 776, |
2419 && *s != '\n') | 2421 && *s != '\n') |
2420 msg_putchar('\n'); | 2422 msg_putchar('\n'); |
2421 if (!got_int) | 2423 if (!got_int) |
2422 { | 2424 { |
2423 if (wrap) | 2425 if (wrap) |
2424 MSG_PUTS("["); | 2426 msg_puts("["); |
2425 MSG_PUTS(s); | 2427 msg_puts((char *)s); |
2426 if (wrap) | 2428 if (wrap) |
2427 MSG_PUTS("]"); | 2429 msg_puts("]"); |
2428 } | 2430 } |
2429 } | 2431 } |
2430 | 2432 |
2431 static void | 2433 static void |
2432 version_msg(char *s) | 2434 version_msg(char *s) |
2500 | 2502 |
2501 if (idx == current) | 2503 if (idx == current) |
2502 msg_putchar('['); | 2504 msg_putchar('['); |
2503 #ifdef FEAT_SYN_HL | 2505 #ifdef FEAT_SYN_HL |
2504 if (use_highlight && items[idx][0] == '-') | 2506 if (use_highlight && items[idx][0] == '-') |
2505 msg_puts_attr(items[idx], HL_ATTR(HLF_W)); | 2507 msg_puts_attr((char *)items[idx], HL_ATTR(HLF_W)); |
2506 else | 2508 else |
2507 #endif | 2509 #endif |
2508 msg_puts(items[idx]); | 2510 msg_puts((char *)items[idx]); |
2509 if (idx == current) | 2511 if (idx == current) |
2510 msg_putchar(']'); | 2512 msg_putchar(']'); |
2511 if (last_col) | 2513 if (last_col) |
2512 { | 2514 { |
2513 if (msg_col > 0) | 2515 if (msg_col > 0) |
2537 /* | 2539 /* |
2538 * When adding features here, don't forget to update the list of | 2540 * When adding features here, don't forget to update the list of |
2539 * internal variables in eval.c! | 2541 * internal variables in eval.c! |
2540 */ | 2542 */ |
2541 init_longVersion(); | 2543 init_longVersion(); |
2542 MSG(longVersion); | 2544 msg(longVersion); |
2543 #ifdef WIN3264 | 2545 #ifdef WIN3264 |
2544 # ifdef FEAT_GUI_W32 | 2546 # ifdef FEAT_GUI_W32 |
2545 # ifdef _WIN64 | 2547 # ifdef _WIN64 |
2546 MSG_PUTS(_("\nMS-Windows 64-bit GUI version")); | 2548 msg_puts(_("\nMS-Windows 64-bit GUI version")); |
2547 # else | 2549 # else |
2548 MSG_PUTS(_("\nMS-Windows 32-bit GUI version")); | 2550 msg_puts(_("\nMS-Windows 32-bit GUI version")); |
2549 # endif | 2551 # endif |
2550 # ifdef FEAT_OLE | 2552 # ifdef FEAT_OLE |
2551 MSG_PUTS(_(" with OLE support")); | 2553 msg_puts(_(" with OLE support")); |
2552 # endif | 2554 # endif |
2553 # else | 2555 # else |
2554 # ifdef _WIN64 | 2556 # ifdef _WIN64 |
2555 MSG_PUTS(_("\nMS-Windows 64-bit console version")); | 2557 msg_puts(_("\nMS-Windows 64-bit console version")); |
2556 # else | 2558 # else |
2557 MSG_PUTS(_("\nMS-Windows 32-bit console version")); | 2559 msg_puts(_("\nMS-Windows 32-bit console version")); |
2558 # endif | 2560 # endif |
2559 # endif | 2561 # endif |
2560 #endif | 2562 #endif |
2561 #if defined(MACOS_X) | 2563 #if defined(MACOS_X) |
2562 # if defined(MACOS_X_DARWIN) | 2564 # if defined(MACOS_X_DARWIN) |
2563 MSG_PUTS(_("\nmacOS version")); | 2565 msg_puts(_("\nmacOS version")); |
2564 # else | 2566 # else |
2565 MSG_PUTS(_("\nmacOS version w/o darwin feat.")); | 2567 msg_puts(_("\nmacOS version w/o darwin feat.")); |
2566 # endif | 2568 # endif |
2567 #endif | 2569 #endif |
2568 | 2570 |
2569 #ifdef VMS | 2571 #ifdef VMS |
2570 MSG_PUTS(_("\nOpenVMS version")); | 2572 msg_puts(_("\nOpenVMS version")); |
2571 # ifdef HAVE_PATHDEF | 2573 # ifdef HAVE_PATHDEF |
2572 if (*compiled_arch != NUL) | 2574 if (*compiled_arch != NUL) |
2573 { | 2575 { |
2574 MSG_PUTS(" - "); | 2576 msg_puts(" - "); |
2575 MSG_PUTS(compiled_arch); | 2577 msg_puts((char *)compiled_arch); |
2576 } | 2578 } |
2577 # endif | 2579 # endif |
2578 | 2580 |
2579 #endif | 2581 #endif |
2580 | 2582 |
2581 /* Print the list of patch numbers if there is at least one. */ | 2583 /* Print the list of patch numbers if there is at least one. */ |
2582 /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */ | 2584 /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */ |
2583 if (included_patches[0] != 0) | 2585 if (included_patches[0] != 0) |
2584 { | 2586 { |
2585 MSG_PUTS(_("\nIncluded patches: ")); | 2587 msg_puts(_("\nIncluded patches: ")); |
2586 first = -1; | 2588 first = -1; |
2587 /* find last one */ | 2589 /* find last one */ |
2588 for (i = 0; included_patches[i] != 0; ++i) | 2590 for (i = 0; included_patches[i] != 0; ++i) |
2589 ; | 2591 ; |
2590 while (--i >= 0) | 2592 while (--i >= 0) |
2591 { | 2593 { |
2592 if (first < 0) | 2594 if (first < 0) |
2593 first = included_patches[i]; | 2595 first = included_patches[i]; |
2594 if (i == 0 || included_patches[i - 1] != included_patches[i] + 1) | 2596 if (i == 0 || included_patches[i - 1] != included_patches[i] + 1) |
2595 { | 2597 { |
2596 MSG_PUTS(s); | 2598 msg_puts(s); |
2597 s = ", "; | 2599 s = ", "; |
2598 msg_outnum((long)first); | 2600 msg_outnum((long)first); |
2599 if (first != included_patches[i]) | 2601 if (first != included_patches[i]) |
2600 { | 2602 { |
2601 MSG_PUTS("-"); | 2603 msg_puts("-"); |
2602 msg_outnum((long)included_patches[i]); | 2604 msg_outnum((long)included_patches[i]); |
2603 } | 2605 } |
2604 first = -1; | 2606 first = -1; |
2605 } | 2607 } |
2606 } | 2608 } |
2607 } | 2609 } |
2608 | 2610 |
2609 /* Print the list of extra patch descriptions if there is at least one. */ | 2611 /* Print the list of extra patch descriptions if there is at least one. */ |
2610 if (extra_patches[0] != NULL) | 2612 if (extra_patches[0] != NULL) |
2611 { | 2613 { |
2612 MSG_PUTS(_("\nExtra patches: ")); | 2614 msg_puts(_("\nExtra patches: ")); |
2613 s = ""; | 2615 s = ""; |
2614 for (i = 0; extra_patches[i] != NULL; ++i) | 2616 for (i = 0; extra_patches[i] != NULL; ++i) |
2615 { | 2617 { |
2616 MSG_PUTS(s); | 2618 msg_puts(s); |
2617 s = ", "; | 2619 s = ", "; |
2618 MSG_PUTS(extra_patches[i]); | 2620 msg_puts(extra_patches[i]); |
2619 } | 2621 } |
2620 } | 2622 } |
2621 | 2623 |
2622 #ifdef MODIFIED_BY | 2624 #ifdef MODIFIED_BY |
2623 MSG_PUTS("\n"); | 2625 msg_puts("\n"); |
2624 MSG_PUTS(_("Modified by ")); | 2626 msg_puts(_("Modified by ")); |
2625 MSG_PUTS(MODIFIED_BY); | 2627 msg_puts(MODIFIED_BY); |
2626 #endif | 2628 #endif |
2627 | 2629 |
2628 #ifdef HAVE_PATHDEF | 2630 #ifdef HAVE_PATHDEF |
2629 if (*compiled_user != NUL || *compiled_sys != NUL) | 2631 if (*compiled_user != NUL || *compiled_sys != NUL) |
2630 { | 2632 { |
2631 MSG_PUTS(_("\nCompiled ")); | 2633 msg_puts(_("\nCompiled ")); |
2632 if (*compiled_user != NUL) | 2634 if (*compiled_user != NUL) |
2633 { | 2635 { |
2634 MSG_PUTS(_("by ")); | 2636 msg_puts(_("by ")); |
2635 MSG_PUTS(compiled_user); | 2637 msg_puts((char *)compiled_user); |
2636 } | 2638 } |
2637 if (*compiled_sys != NUL) | 2639 if (*compiled_sys != NUL) |
2638 { | 2640 { |
2639 MSG_PUTS("@"); | 2641 msg_puts("@"); |
2640 MSG_PUTS(compiled_sys); | 2642 msg_puts((char *)compiled_sys); |
2641 } | 2643 } |
2642 } | 2644 } |
2643 #endif | 2645 #endif |
2644 | 2646 |
2645 #ifdef FEAT_HUGE | 2647 #ifdef FEAT_HUGE |
2646 MSG_PUTS(_("\nHuge version ")); | 2648 msg_puts(_("\nHuge version ")); |
2647 #else | 2649 #else |
2648 # ifdef FEAT_BIG | 2650 # ifdef FEAT_BIG |
2649 MSG_PUTS(_("\nBig version ")); | 2651 msg_puts(_("\nBig version ")); |
2650 # else | 2652 # else |
2651 # ifdef FEAT_NORMAL | 2653 # ifdef FEAT_NORMAL |
2652 MSG_PUTS(_("\nNormal version ")); | 2654 msg_puts(_("\nNormal version ")); |
2653 # else | 2655 # else |
2654 # ifdef FEAT_SMALL | 2656 # ifdef FEAT_SMALL |
2655 MSG_PUTS(_("\nSmall version ")); | 2657 msg_puts(_("\nSmall version ")); |
2656 # else | 2658 # else |
2657 MSG_PUTS(_("\nTiny version ")); | 2659 msg_puts(_("\nTiny version ")); |
2658 # endif | 2660 # endif |
2659 # endif | 2661 # endif |
2660 # endif | 2662 # endif |
2661 #endif | 2663 #endif |
2662 #ifndef FEAT_GUI | 2664 #ifndef FEAT_GUI |
2663 MSG_PUTS(_("without GUI.")); | 2665 msg_puts(_("without GUI.")); |
2664 #else | 2666 #else |
2665 # ifdef FEAT_GUI_GTK | 2667 # ifdef FEAT_GUI_GTK |
2666 # ifdef USE_GTK3 | 2668 # ifdef USE_GTK3 |
2667 MSG_PUTS(_("with GTK3 GUI.")); | 2669 msg_puts(_("with GTK3 GUI.")); |
2668 # else | 2670 # else |
2669 # ifdef FEAT_GUI_GNOME | 2671 # ifdef FEAT_GUI_GNOME |
2670 MSG_PUTS(_("with GTK2-GNOME GUI.")); | 2672 msg_puts(_("with GTK2-GNOME GUI.")); |
2671 # else | 2673 # else |
2672 MSG_PUTS(_("with GTK2 GUI.")); | 2674 msg_puts(_("with GTK2 GUI.")); |
2673 # endif | 2675 # endif |
2674 # endif | 2676 # endif |
2675 # else | 2677 # else |
2676 # ifdef FEAT_GUI_MOTIF | 2678 # ifdef FEAT_GUI_MOTIF |
2677 MSG_PUTS(_("with X11-Motif GUI.")); | 2679 msg_puts(_("with X11-Motif GUI.")); |
2678 # else | 2680 # else |
2679 # ifdef FEAT_GUI_ATHENA | 2681 # ifdef FEAT_GUI_ATHENA |
2680 # ifdef FEAT_GUI_NEXTAW | 2682 # ifdef FEAT_GUI_NEXTAW |
2681 MSG_PUTS(_("with X11-neXtaw GUI.")); | 2683 msg_puts(_("with X11-neXtaw GUI.")); |
2682 # else | 2684 # else |
2683 MSG_PUTS(_("with X11-Athena GUI.")); | 2685 msg_puts(_("with X11-Athena GUI.")); |
2684 # endif | 2686 # endif |
2685 # else | 2687 # else |
2686 # ifdef FEAT_GUI_PHOTON | 2688 # ifdef FEAT_GUI_PHOTON |
2687 MSG_PUTS(_("with Photon GUI.")); | 2689 msg_puts(_("with Photon GUI.")); |
2688 # else | 2690 # else |
2689 # if defined(MSWIN) | 2691 # if defined(MSWIN) |
2690 MSG_PUTS(_("with GUI.")); | 2692 msg_puts(_("with GUI.")); |
2691 # else | 2693 # else |
2692 # if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON | 2694 # if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON |
2693 MSG_PUTS(_("with Carbon GUI.")); | 2695 msg_puts(_("with Carbon GUI.")); |
2694 # else | 2696 # else |
2695 # if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX | 2697 # if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX |
2696 MSG_PUTS(_("with Cocoa GUI.")); | 2698 msg_puts(_("with Cocoa GUI.")); |
2697 # else | 2699 # else |
2698 # endif | 2700 # endif |
2699 # endif | 2701 # endif |
2700 # endif | 2702 # endif |
2701 # endif | 2703 # endif |