comparison src/spell.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 62b3805506b3
comparison
equal deleted inserted replaced
15542:5baedae7ca7a 15543:dd725a8ab112
3373 limit = sps_limit; 3373 limit = sps_limit;
3374 spell_find_suggest(line + curwin->w_cursor.col, badlen, &sug, limit, 3374 spell_find_suggest(line + curwin->w_cursor.col, badlen, &sug, limit,
3375 TRUE, need_cap, TRUE); 3375 TRUE, need_cap, TRUE);
3376 3376
3377 if (sug.su_ga.ga_len == 0) 3377 if (sug.su_ga.ga_len == 0)
3378 MSG(_("Sorry, no suggestions")); 3378 msg(_("Sorry, no suggestions"));
3379 else if (count > 0) 3379 else if (count > 0)
3380 { 3380 {
3381 if (count > sug.su_ga.ga_len) 3381 if (count > sug.su_ga.ga_len)
3382 smsg(_("Sorry, only %ld suggestions"), 3382 smsg(_("Sorry, only %ld suggestions"),
3383 (long)sug.su_ga.ga_len); 3383 (long)sug.su_ga.ga_len);
3407 * untranslated message rightleft. */ 3407 * untranslated message rightleft. */
3408 vim_snprintf((char *)IObuff, IOSIZE, ":ot \"%.*s\" egnahC", 3408 vim_snprintf((char *)IObuff, IOSIZE, ":ot \"%.*s\" egnahC",
3409 sug.su_badlen, sug.su_badptr); 3409 sug.su_badlen, sug.su_badptr);
3410 } 3410 }
3411 #endif 3411 #endif
3412 msg_puts(IObuff); 3412 msg_puts((char *)IObuff);
3413 msg_clr_eos(); 3413 msg_clr_eos();
3414 msg_putchar('\n'); 3414 msg_putchar('\n');
3415 3415
3416 msg_scroll = TRUE; 3416 msg_scroll = TRUE;
3417 for (i = 0; i < sug.su_ga.ga_len; ++i) 3417 for (i = 0; i < sug.su_ga.ga_len; ++i)
3428 vim_snprintf((char *)IObuff, IOSIZE, "%2d", i + 1); 3428 vim_snprintf((char *)IObuff, IOSIZE, "%2d", i + 1);
3429 #ifdef FEAT_RIGHTLEFT 3429 #ifdef FEAT_RIGHTLEFT
3430 if (cmdmsg_rl) 3430 if (cmdmsg_rl)
3431 rl_mirror(IObuff); 3431 rl_mirror(IObuff);
3432 #endif 3432 #endif
3433 msg_puts(IObuff); 3433 msg_puts((char *)IObuff);
3434 3434
3435 vim_snprintf((char *)IObuff, IOSIZE, " \"%s\"", wcopy); 3435 vim_snprintf((char *)IObuff, IOSIZE, " \"%s\"", wcopy);
3436 msg_puts(IObuff); 3436 msg_puts((char *)IObuff);
3437 3437
3438 /* The word may replace more than "su_badlen". */ 3438 /* The word may replace more than "su_badlen". */
3439 if (sug.su_badlen < stp->st_orglen) 3439 if (sug.su_badlen < stp->st_orglen)
3440 { 3440 {
3441 vim_snprintf((char *)IObuff, IOSIZE, _(" < \"%.*s\""), 3441 vim_snprintf((char *)IObuff, IOSIZE, _(" < \"%.*s\""),
3442 stp->st_orglen, sug.su_badptr); 3442 stp->st_orglen, sug.su_badptr);
3443 msg_puts(IObuff); 3443 msg_puts((char *)IObuff);
3444 } 3444 }
3445 3445
3446 if (p_verbose > 0) 3446 if (p_verbose > 0)
3447 { 3447 {
3448 /* Add the score. */ 3448 /* Add the score. */
3457 if (cmdmsg_rl) 3457 if (cmdmsg_rl)
3458 /* Mirror the numbers, but keep the leading space. */ 3458 /* Mirror the numbers, but keep the leading space. */
3459 rl_mirror(IObuff + 1); 3459 rl_mirror(IObuff + 1);
3460 #endif 3460 #endif
3461 msg_advance(30); 3461 msg_advance(30);
3462 msg_puts(IObuff); 3462 msg_puts((char *)IObuff);
3463 } 3463 }
3464 msg_putchar('\n'); 3464 msg_putchar('\n');
3465 } 3465 }
3466 3466
3467 #ifdef FEAT_RIGHTLEFT 3467 #ifdef FEAT_RIGHTLEFT
8456 8456
8457 msg_start(); 8457 msg_start();
8458 for (lpi = 0; lpi < curwin->w_s->b_langp.ga_len && !got_int; ++lpi) 8458 for (lpi = 0; lpi < curwin->w_s->b_langp.ga_len && !got_int; ++lpi)
8459 { 8459 {
8460 lp = LANGP_ENTRY(curwin->w_s->b_langp, lpi); 8460 lp = LANGP_ENTRY(curwin->w_s->b_langp, lpi);
8461 msg_puts((char_u *)"file: "); 8461 msg_puts("file: ");
8462 msg_puts(lp->lp_slang->sl_fname); 8462 msg_puts((char *)lp->lp_slang->sl_fname);
8463 msg_putchar('\n'); 8463 msg_putchar('\n');
8464 p = lp->lp_slang->sl_info; 8464 p = lp->lp_slang->sl_info;
8465 if (p != NULL) 8465 if (p != NULL)
8466 { 8466 {
8467 msg_puts(p); 8467 msg_puts((char *)p);
8468 msg_putchar('\n'); 8468 msg_putchar('\n');
8469 } 8469 }
8470 } 8470 }
8471 msg_end(); 8471 msg_end();
8472 } 8472 }