comparison src/syntax.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
3311 #endif 3311 #endif
3312 #ifdef FEAT_RELTIME 3312 #ifdef FEAT_RELTIME
3313 if (timed_out && !syn_win->w_s->b_syn_slow) 3313 if (timed_out && !syn_win->w_s->b_syn_slow)
3314 { 3314 {
3315 syn_win->w_s->b_syn_slow = TRUE; 3315 syn_win->w_s->b_syn_slow = TRUE;
3316 MSG(_("'redrawtime' exceeded, syntax highlighting disabled")); 3316 msg(_("'redrawtime' exceeded, syntax highlighting disabled"));
3317 } 3317 }
3318 #endif 3318 #endif
3319 3319
3320 if (r > 0) 3320 if (r > 0)
3321 { 3321 {
3433 3433
3434 next = skiptowhite(arg); 3434 next = skiptowhite(arg);
3435 if (*arg == NUL) 3435 if (*arg == NUL)
3436 { 3436 {
3437 if (curwin->w_s->b_syn_conceal) 3437 if (curwin->w_s->b_syn_conceal)
3438 MSG(_("syntax conceal on")); 3438 msg(_("syntax conceal on"));
3439 else 3439 else
3440 MSG(_("syntax conceal off")); 3440 msg(_("syntax conceal off"));
3441 } 3441 }
3442 else if (STRNICMP(arg, "on", 2) == 0 && next - arg == 2) 3442 else if (STRNICMP(arg, "on", 2) == 0 && next - arg == 2)
3443 curwin->w_s->b_syn_conceal = TRUE; 3443 curwin->w_s->b_syn_conceal = TRUE;
3444 else if (STRNICMP(arg, "off", 3) == 0 && next - arg == 3) 3444 else if (STRNICMP(arg, "off", 3) == 0 && next - arg == 3)
3445 curwin->w_s->b_syn_conceal = FALSE; 3445 curwin->w_s->b_syn_conceal = FALSE;
3463 3463
3464 next = skiptowhite(arg); 3464 next = skiptowhite(arg);
3465 if (*arg == NUL) 3465 if (*arg == NUL)
3466 { 3466 {
3467 if (curwin->w_s->b_syn_ic) 3467 if (curwin->w_s->b_syn_ic)
3468 MSG(_("syntax case ignore")); 3468 msg(_("syntax case ignore"));
3469 else 3469 else
3470 MSG(_("syntax case match")); 3470 msg(_("syntax case match"));
3471 } 3471 }
3472 else if (STRNICMP(arg, "match", 5) == 0 && next - arg == 5) 3472 else if (STRNICMP(arg, "match", 5) == 0 && next - arg == 5)
3473 curwin->w_s->b_syn_ic = FALSE; 3473 curwin->w_s->b_syn_ic = FALSE;
3474 else if (STRNICMP(arg, "ignore", 6) == 0 && next - arg == 6) 3474 else if (STRNICMP(arg, "ignore", 6) == 0 && next - arg == 6)
3475 curwin->w_s->b_syn_ic = TRUE; 3475 curwin->w_s->b_syn_ic = TRUE;
3492 3492
3493 next = skiptowhite(arg); 3493 next = skiptowhite(arg);
3494 if (*arg == NUL) 3494 if (*arg == NUL)
3495 { 3495 {
3496 if (curwin->w_s->b_syn_spell == SYNSPL_TOP) 3496 if (curwin->w_s->b_syn_spell == SYNSPL_TOP)
3497 MSG(_("syntax spell toplevel")); 3497 msg(_("syntax spell toplevel"));
3498 else if (curwin->w_s->b_syn_spell == SYNSPL_NOTOP) 3498 else if (curwin->w_s->b_syn_spell == SYNSPL_NOTOP)
3499 MSG(_("syntax spell notoplevel")); 3499 msg(_("syntax spell notoplevel"));
3500 else 3500 else
3501 MSG(_("syntax spell default")); 3501 msg(_("syntax spell default"));
3502 } 3502 }
3503 else if (STRNICMP(arg, "toplevel", 8) == 0 && next - arg == 8) 3503 else if (STRNICMP(arg, "toplevel", 8) == 0 && next - arg == 8)
3504 curwin->w_s->b_syn_spell = SYNSPL_TOP; 3504 curwin->w_s->b_syn_spell = SYNSPL_TOP;
3505 else if (STRNICMP(arg, "notoplevel", 10) == 0 && next - arg == 10) 3505 else if (STRNICMP(arg, "notoplevel", 10) == 0 && next - arg == 10)
3506 curwin->w_s->b_syn_spell = SYNSPL_NOTOP; 3506 curwin->w_s->b_syn_spell = SYNSPL_NOTOP;
3530 return; 3530 return;
3531 3531
3532 arg = skipwhite(arg); 3532 arg = skipwhite(arg);
3533 if (*arg == NUL) 3533 if (*arg == NUL)
3534 { 3534 {
3535 MSG_PUTS("\n"); 3535 msg_puts("\n");
3536 if (curwin->w_s->b_syn_isk != empty_option) 3536 if (curwin->w_s->b_syn_isk != empty_option)
3537 { 3537 {
3538 MSG_PUTS(_("syntax iskeyword ")); 3538 msg_puts(_("syntax iskeyword "));
3539 msg_outtrans(curwin->w_s->b_syn_isk); 3539 msg_outtrans(curwin->w_s->b_syn_isk);
3540 } 3540 }
3541 else 3541 else
3542 msg_outtrans((char_u *)_("syntax iskeyword not set")); 3542 msg_outtrans((char_u *)_("syntax iskeyword not set"));
3543 } 3543 }
3907 if (eap->skip) 3907 if (eap->skip)
3908 return; 3908 return;
3909 3909
3910 if (!syntax_present(curwin)) 3910 if (!syntax_present(curwin))
3911 { 3911 {
3912 MSG(_(msg_no_items)); 3912 msg(_(msg_no_items));
3913 return; 3913 return;
3914 } 3914 }
3915 3915
3916 if (syncing) 3916 if (syncing)
3917 { 3917 {
3918 if (curwin->w_s->b_syn_sync_flags & SF_CCOMMENT) 3918 if (curwin->w_s->b_syn_sync_flags & SF_CCOMMENT)
3919 { 3919 {
3920 MSG_PUTS(_("syncing on C-style comments")); 3920 msg_puts(_("syncing on C-style comments"));
3921 syn_lines_msg(); 3921 syn_lines_msg();
3922 syn_match_msg(); 3922 syn_match_msg();
3923 return; 3923 return;
3924 } 3924 }
3925 else if (!(curwin->w_s->b_syn_sync_flags & SF_MATCH)) 3925 else if (!(curwin->w_s->b_syn_sync_flags & SF_MATCH))
3926 { 3926 {
3927 if (curwin->w_s->b_syn_sync_minlines == 0) 3927 if (curwin->w_s->b_syn_sync_minlines == 0)
3928 MSG_PUTS(_("no syncing")); 3928 msg_puts(_("no syncing"));
3929 else 3929 else
3930 { 3930 {
3931 MSG_PUTS(_("syncing starts ")); 3931 msg_puts(_("syncing starts "));
3932 msg_outnum(curwin->w_s->b_syn_sync_minlines); 3932 msg_outnum(curwin->w_s->b_syn_sync_minlines);
3933 MSG_PUTS(_(" lines before top line")); 3933 msg_puts(_(" lines before top line"));
3934 syn_match_msg(); 3934 syn_match_msg();
3935 } 3935 }
3936 return; 3936 return;
3937 } 3937 }
3938 MSG_PUTS_TITLE(_("\n--- Syntax sync items ---")); 3938 msg_puts_title(_("\n--- Syntax sync items ---"));
3939 if (curwin->w_s->b_syn_sync_minlines > 0 3939 if (curwin->w_s->b_syn_sync_minlines > 0
3940 || curwin->w_s->b_syn_sync_maxlines > 0 3940 || curwin->w_s->b_syn_sync_maxlines > 0
3941 || curwin->w_s->b_syn_sync_linebreaks > 0) 3941 || curwin->w_s->b_syn_sync_linebreaks > 0)
3942 { 3942 {
3943 MSG_PUTS(_("\nsyncing on items")); 3943 msg_puts(_("\nsyncing on items"));
3944 syn_lines_msg(); 3944 syn_lines_msg();
3945 syn_match_msg(); 3945 syn_match_msg();
3946 } 3946 }
3947 } 3947 }
3948 else 3948 else
3949 MSG_PUTS_TITLE(_("\n--- Syntax items ---")); 3949 msg_puts_title(_("\n--- Syntax items ---"));
3950 if (ends_excmd(*arg)) 3950 if (ends_excmd(*arg))
3951 { 3951 {
3952 /* 3952 /*
3953 * No argument: List all group IDs and all syntax clusters. 3953 * No argument: List all group IDs and all syntax clusters.
3954 */ 3954 */
3991 syn_lines_msg(void) 3991 syn_lines_msg(void)
3992 { 3992 {
3993 if (curwin->w_s->b_syn_sync_maxlines > 0 3993 if (curwin->w_s->b_syn_sync_maxlines > 0
3994 || curwin->w_s->b_syn_sync_minlines > 0) 3994 || curwin->w_s->b_syn_sync_minlines > 0)
3995 { 3995 {
3996 MSG_PUTS("; "); 3996 msg_puts("; ");
3997 if (curwin->w_s->b_syn_sync_minlines > 0) 3997 if (curwin->w_s->b_syn_sync_minlines > 0)
3998 { 3998 {
3999 MSG_PUTS(_("minimal ")); 3999 msg_puts(_("minimal "));
4000 msg_outnum(curwin->w_s->b_syn_sync_minlines); 4000 msg_outnum(curwin->w_s->b_syn_sync_minlines);
4001 if (curwin->w_s->b_syn_sync_maxlines) 4001 if (curwin->w_s->b_syn_sync_maxlines)
4002 MSG_PUTS(", "); 4002 msg_puts(", ");
4003 } 4003 }
4004 if (curwin->w_s->b_syn_sync_maxlines > 0) 4004 if (curwin->w_s->b_syn_sync_maxlines > 0)
4005 { 4005 {
4006 MSG_PUTS(_("maximal ")); 4006 msg_puts(_("maximal "));
4007 msg_outnum(curwin->w_s->b_syn_sync_maxlines); 4007 msg_outnum(curwin->w_s->b_syn_sync_maxlines);
4008 } 4008 }
4009 MSG_PUTS(_(" lines before top line")); 4009 msg_puts(_(" lines before top line"));
4010 } 4010 }
4011 } 4011 }
4012 4012
4013 static void 4013 static void
4014 syn_match_msg(void) 4014 syn_match_msg(void)
4015 { 4015 {
4016 if (curwin->w_s->b_syn_sync_linebreaks > 0) 4016 if (curwin->w_s->b_syn_sync_linebreaks > 0)
4017 { 4017 {
4018 MSG_PUTS(_("; match ")); 4018 msg_puts(_("; match "));
4019 msg_outnum(curwin->w_s->b_syn_sync_linebreaks); 4019 msg_outnum(curwin->w_s->b_syn_sync_linebreaks);
4020 MSG_PUTS(_(" line breaks")); 4020 msg_puts(_(" line breaks"));
4021 } 4021 }
4022 } 4022 }
4023 4023
4024 static int last_matchgroup; 4024 static int last_matchgroup;
4025 4025
4120 syn_list_flags(namelist2, spp->sp_flags, attr); 4120 syn_list_flags(namelist2, spp->sp_flags, attr);
4121 } 4121 }
4122 if (spp->sp_flags & (HL_SYNC_HERE|HL_SYNC_THERE)) 4122 if (spp->sp_flags & (HL_SYNC_HERE|HL_SYNC_THERE))
4123 { 4123 {
4124 if (spp->sp_flags & HL_SYNC_HERE) 4124 if (spp->sp_flags & HL_SYNC_HERE)
4125 msg_puts_attr((char_u *)"grouphere", attr); 4125 msg_puts_attr("grouphere", attr);
4126 else 4126 else
4127 msg_puts_attr((char_u *)"groupthere", attr); 4127 msg_puts_attr("groupthere", attr);
4128 msg_putchar(' '); 4128 msg_putchar(' ');
4129 if (spp->sp_sync_idx >= 0) 4129 if (spp->sp_sync_idx >= 0)
4130 msg_outtrans(HL_TABLE()[SYN_ITEMS(curwin->w_s) 4130 msg_outtrans(HL_TABLE()[SYN_ITEMS(curwin->w_s)
4131 [spp->sp_sync_idx].sp_syn.id - 1].sg_name); 4131 [spp->sp_sync_idx].sp_syn.id - 1].sg_name);
4132 else 4132 else
4133 MSG_PUTS("NONE"); 4133 msg_puts("NONE");
4134 msg_putchar(' '); 4134 msg_putchar(' ');
4135 } 4135 }
4136 } 4136 }
4137 4137
4138 /* list the link, if there is one */ 4138 /* list the link, if there is one */
4139 if (HL_TABLE()[id - 1].sg_link && (did_header || link_only) && !got_int) 4139 if (HL_TABLE()[id - 1].sg_link && (did_header || link_only) && !got_int)
4140 { 4140 {
4141 (void)syn_list_header(did_header, 999, id); 4141 (void)syn_list_header(did_header, 999, id);
4142 msg_puts_attr((char_u *)"links to", attr); 4142 msg_puts_attr("links to", attr);
4143 msg_putchar(' '); 4143 msg_putchar(' ');
4144 msg_outtrans(HL_TABLE()[HL_TABLE()[id - 1].sg_link - 1].sg_name); 4144 msg_outtrans(HL_TABLE()[HL_TABLE()[id - 1].sg_link - 1].sg_name);
4145 } 4145 }
4146 } 4146 }
4147 4147
4151 int i; 4151 int i;
4152 4152
4153 for (i = 0; nlist[i].flag != 0; ++i) 4153 for (i = 0; nlist[i].flag != 0; ++i)
4154 if (flags & nlist[i].flag) 4154 if (flags & nlist[i].flag)
4155 { 4155 {
4156 msg_puts_attr((char_u *)nlist[i].name, attr); 4156 msg_puts_attr(nlist[i].name, attr);
4157 msg_putchar(' '); 4157 msg_putchar(' ');
4158 } 4158 }
4159 } 4159 }
4160 4160
4161 /* 4161 /*
4181 put_id_list((char_u *)"cluster", SYN_CLSTR(curwin->w_s)[id].scl_list, 4181 put_id_list((char_u *)"cluster", SYN_CLSTR(curwin->w_s)[id].scl_list,
4182 HL_ATTR(HLF_D)); 4182 HL_ATTR(HLF_D));
4183 } 4183 }
4184 else 4184 else
4185 { 4185 {
4186 msg_puts_attr((char_u *)"cluster", HL_ATTR(HLF_D)); 4186 msg_puts_attr("cluster", HL_ATTR(HLF_D));
4187 msg_puts((char_u *)"=NONE"); 4187 msg_puts("=NONE");
4188 } 4188 }
4189 } 4189 }
4190 4190
4191 static void 4191 static void
4192 put_id_list(char_u *name, short *list, int attr) 4192 put_id_list(char_u *name, short *list, int attr)
4193 { 4193 {
4194 short *p; 4194 short *p;
4195 4195
4196 msg_puts_attr(name, attr); 4196 msg_puts_attr((char *)name, attr);
4197 msg_putchar('='); 4197 msg_putchar('=');
4198 for (p = list; *p; ++p) 4198 for (p = list; *p; ++p)
4199 { 4199 {
4200 if (*p >= SYNID_ALLBUT && *p < SYNID_TOP) 4200 if (*p >= SYNID_ALLBUT && *p < SYNID_TOP)
4201 { 4201 {
4202 if (p[1]) 4202 if (p[1])
4203 MSG_PUTS("ALLBUT"); 4203 msg_puts("ALLBUT");
4204 else 4204 else
4205 MSG_PUTS("ALL"); 4205 msg_puts("ALL");
4206 } 4206 }
4207 else if (*p >= SYNID_TOP && *p < SYNID_CONTAINED) 4207 else if (*p >= SYNID_TOP && *p < SYNID_CONTAINED)
4208 { 4208 {
4209 MSG_PUTS("TOP"); 4209 msg_puts("TOP");
4210 } 4210 }
4211 else if (*p >= SYNID_CONTAINED && *p < SYNID_CLUSTER) 4211 else if (*p >= SYNID_CONTAINED && *p < SYNID_CLUSTER)
4212 { 4212 {
4213 MSG_PUTS("CONTAINED"); 4213 msg_puts("CONTAINED");
4214 } 4214 }
4215 else if (*p >= SYNID_CLUSTER) 4215 else if (*p >= SYNID_CLUSTER)
4216 { 4216 {
4217 short scl_id = *p - SYNID_CLUSTER; 4217 short scl_id = *p - SYNID_CLUSTER;
4218 4218
4242 4242
4243 /* May have to write "matchgroup=group" */ 4243 /* May have to write "matchgroup=group" */
4244 if (last_matchgroup != spp->sp_syn_match_id) 4244 if (last_matchgroup != spp->sp_syn_match_id)
4245 { 4245 {
4246 last_matchgroup = spp->sp_syn_match_id; 4246 last_matchgroup = spp->sp_syn_match_id;
4247 msg_puts_attr((char_u *)"matchgroup", attr); 4247 msg_puts_attr("matchgroup", attr);
4248 msg_putchar('='); 4248 msg_putchar('=');
4249 if (last_matchgroup == 0) 4249 if (last_matchgroup == 0)
4250 msg_outtrans((char_u *)"NONE"); 4250 msg_outtrans((char_u *)"NONE");
4251 else 4251 else
4252 msg_outtrans(HL_TABLE()[last_matchgroup - 1].sg_name); 4252 msg_outtrans(HL_TABLE()[last_matchgroup - 1].sg_name);
4253 msg_putchar(' '); 4253 msg_putchar(' ');
4254 } 4254 }
4255 4255
4256 /* output the name of the pattern and an '=' or ' ' */ 4256 /* output the name of the pattern and an '=' or ' ' */
4257 msg_puts_attr((char_u *)s, attr); 4257 msg_puts_attr(s, attr);
4258 msg_putchar(c); 4258 msg_putchar(c);
4259 4259
4260 /* output the pattern, in between a char that is not in the pattern */ 4260 /* output the pattern, in between a char that is not in the pattern */
4261 for (i = 0; vim_strchr(spp->sp_pattern, sepchars[i]) != NULL; ) 4261 for (i = 0; vim_strchr(spp->sp_pattern, sepchars[i]) != NULL; )
4262 if (sepchars[++i] == NUL) 4262 if (sepchars[++i] == NUL)
4275 mask = (1 << i); 4275 mask = (1 << i);
4276 if (spp->sp_off_flags & (mask + (mask << SPO_COUNT))) 4276 if (spp->sp_off_flags & (mask + (mask << SPO_COUNT)))
4277 { 4277 {
4278 if (!first) 4278 if (!first)
4279 msg_putchar(','); /* separate with commas */ 4279 msg_putchar(','); /* separate with commas */
4280 msg_puts((char_u *)spo_name_tab[i]); 4280 msg_puts(spo_name_tab[i]);
4281 n = spp->sp_offsets[i]; 4281 n = spp->sp_offsets[i];
4282 if (i != SPO_LC_OFF) 4282 if (i != SPO_LC_OFF)
4283 { 4283 {
4284 if (spp->sp_off_flags & mask) 4284 if (spp->sp_off_flags & mask)
4285 msg_putchar('s'); 4285 msg_putchar('s');
4352 prev_skipempty = 0; 4352 prev_skipempty = 0;
4353 } 4353 }
4354 did_header = TRUE; 4354 did_header = TRUE;
4355 if (prev_contained != (kp->flags & HL_CONTAINED)) 4355 if (prev_contained != (kp->flags & HL_CONTAINED))
4356 { 4356 {
4357 msg_puts_attr((char_u *)"contained", attr); 4357 msg_puts_attr("contained", attr);
4358 msg_putchar(' '); 4358 msg_putchar(' ');
4359 prev_contained = (kp->flags & HL_CONTAINED); 4359 prev_contained = (kp->flags & HL_CONTAINED);
4360 } 4360 }
4361 if (kp->k_syn.cont_in_list != prev_cont_in_list) 4361 if (kp->k_syn.cont_in_list != prev_cont_in_list)
4362 { 4362 {
4370 put_id_list((char_u *)"nextgroup", kp->next_list, attr); 4370 put_id_list((char_u *)"nextgroup", kp->next_list, attr);
4371 msg_putchar(' '); 4371 msg_putchar(' ');
4372 prev_next_list = kp->next_list; 4372 prev_next_list = kp->next_list;
4373 if (kp->flags & HL_SKIPNL) 4373 if (kp->flags & HL_SKIPNL)
4374 { 4374 {
4375 msg_puts_attr((char_u *)"skipnl", attr); 4375 msg_puts_attr("skipnl", attr);
4376 msg_putchar(' '); 4376 msg_putchar(' ');
4377 prev_skipnl = (kp->flags & HL_SKIPNL); 4377 prev_skipnl = (kp->flags & HL_SKIPNL);
4378 } 4378 }
4379 if (kp->flags & HL_SKIPWHITE) 4379 if (kp->flags & HL_SKIPWHITE)
4380 { 4380 {
4381 msg_puts_attr((char_u *)"skipwhite", attr); 4381 msg_puts_attr("skipwhite", attr);
4382 msg_putchar(' '); 4382 msg_putchar(' ');
4383 prev_skipwhite = (kp->flags & HL_SKIPWHITE); 4383 prev_skipwhite = (kp->flags & HL_SKIPWHITE);
4384 } 4384 }
4385 if (kp->flags & HL_SKIPEMPTY) 4385 if (kp->flags & HL_SKIPEMPTY)
4386 { 4386 {
4387 msg_puts_attr((char_u *)"skipempty", attr); 4387 msg_puts_attr("skipempty", attr);
4388 msg_putchar(' '); 4388 msg_putchar(' ');
4389 prev_skipempty = (kp->flags & HL_SKIPEMPTY); 4389 prev_skipempty = (kp->flags & HL_SKIPEMPTY);
4390 } 4390 }
4391 } 4391 }
4392 msg_outtrans(kp->keyword); 4392 msg_outtrans(kp->keyword);
6669 int idx; 6669 int idx;
6670 synpat_T *spp; 6670 synpat_T *spp;
6671 6671
6672 if (!syntax_present(curwin)) 6672 if (!syntax_present(curwin))
6673 { 6673 {
6674 MSG(_(msg_no_items)); 6674 msg(_(msg_no_items));
6675 return; 6675 return;
6676 } 6676 }
6677 for (idx = 0; idx < curwin->w_s->b_syn_patterns.ga_len; ++idx) 6677 for (idx = 0; idx < curwin->w_s->b_syn_patterns.ga_len; ++idx)
6678 { 6678 {
6679 spp = &(SYN_ITEMS(curwin->w_s)[idx]); 6679 spp = &(SYN_ITEMS(curwin->w_s)[idx]);
6740 garray_T ga; 6740 garray_T ga;
6741 time_entry_T *p; 6741 time_entry_T *p;
6742 6742
6743 if (!syntax_present(curwin)) 6743 if (!syntax_present(curwin))
6744 { 6744 {
6745 MSG(_(msg_no_items)); 6745 msg(_(msg_no_items));
6746 return; 6746 return;
6747 } 6747 }
6748 6748
6749 ga_init2(&ga, sizeof(time_entry_T), 50); 6749 ga_init2(&ga, sizeof(time_entry_T), 50);
6750 profile_zero(&total_total); 6750 profile_zero(&total_total);
6775 * pointer to qsort(). */ 6775 * pointer to qsort(). */
6776 if (ga.ga_len > 1) 6776 if (ga.ga_len > 1)
6777 qsort(ga.ga_data, (size_t)ga.ga_len, sizeof(time_entry_T), 6777 qsort(ga.ga_data, (size_t)ga.ga_len, sizeof(time_entry_T),
6778 syn_compare_syntime); 6778 syn_compare_syntime);
6779 6779
6780 MSG_PUTS_TITLE(_(" TOTAL COUNT MATCH SLOWEST AVERAGE NAME PATTERN")); 6780 msg_puts_title(_(" TOTAL COUNT MATCH SLOWEST AVERAGE NAME PATTERN"));
6781 MSG_PUTS("\n"); 6781 msg_puts("\n");
6782 for (idx = 0; idx < ga.ga_len && !got_int; ++idx) 6782 for (idx = 0; idx < ga.ga_len && !got_int; ++idx)
6783 { 6783 {
6784 p = ((time_entry_T *)ga.ga_data) + idx; 6784 p = ((time_entry_T *)ga.ga_data) + idx;
6785 6785
6786 MSG_PUTS(profile_msg(&p->total)); 6786 msg_puts(profile_msg(&p->total));
6787 MSG_PUTS(" "); /* make sure there is always a separating space */ 6787 msg_puts(" "); /* make sure there is always a separating space */
6788 msg_advance(13); 6788 msg_advance(13);
6789 msg_outnum(p->count); 6789 msg_outnum(p->count);
6790 MSG_PUTS(" "); 6790 msg_puts(" ");
6791 msg_advance(20); 6791 msg_advance(20);
6792 msg_outnum(p->match); 6792 msg_outnum(p->match);
6793 MSG_PUTS(" "); 6793 msg_puts(" ");
6794 msg_advance(26); 6794 msg_advance(26);
6795 MSG_PUTS(profile_msg(&p->slowest)); 6795 msg_puts(profile_msg(&p->slowest));
6796 MSG_PUTS(" "); 6796 msg_puts(" ");
6797 msg_advance(38); 6797 msg_advance(38);
6798 # ifdef FEAT_FLOAT 6798 # ifdef FEAT_FLOAT
6799 MSG_PUTS(profile_msg(&p->average)); 6799 msg_puts(profile_msg(&p->average));
6800 MSG_PUTS(" "); 6800 msg_puts(" ");
6801 # endif 6801 # endif
6802 msg_advance(50); 6802 msg_advance(50);
6803 msg_outtrans(HL_TABLE()[p->id - 1].sg_name); 6803 msg_outtrans(HL_TABLE()[p->id - 1].sg_name);
6804 MSG_PUTS(" "); 6804 msg_puts(" ");
6805 6805
6806 msg_advance(69); 6806 msg_advance(69);
6807 if (Columns < 80) 6807 if (Columns < 80)
6808 len = 20; /* will wrap anyway */ 6808 len = 20; /* will wrap anyway */
6809 else 6809 else
6810 len = Columns - 70; 6810 len = Columns - 70;
6811 if (len > (int)STRLEN(p->pattern)) 6811 if (len > (int)STRLEN(p->pattern))
6812 len = (int)STRLEN(p->pattern); 6812 len = (int)STRLEN(p->pattern);
6813 msg_outtrans_len(p->pattern, len); 6813 msg_outtrans_len(p->pattern, len);
6814 MSG_PUTS("\n"); 6814 msg_puts("\n");
6815 } 6815 }
6816 ga_clear(&ga); 6816 ga_clear(&ga);
6817 if (!got_int) 6817 if (!got_int)
6818 { 6818 {
6819 MSG_PUTS("\n"); 6819 msg_puts("\n");
6820 MSG_PUTS(profile_msg(&total_total)); 6820 msg_puts(profile_msg(&total_total));
6821 msg_advance(13); 6821 msg_advance(13);
6822 msg_outnum(total_count); 6822 msg_outnum(total_count);
6823 MSG_PUTS("\n"); 6823 msg_puts("\n");
6824 } 6824 }
6825 } 6825 }
6826 #endif 6826 #endif
6827 6827
6828 #endif /* FEAT_SYN_HL */ 6828 #endif /* FEAT_SYN_HL */
9225 9225
9226 if (sgp->sg_link && !got_int) 9226 if (sgp->sg_link && !got_int)
9227 { 9227 {
9228 (void)syn_list_header(didh, 9999, id); 9228 (void)syn_list_header(didh, 9999, id);
9229 didh = TRUE; 9229 didh = TRUE;
9230 msg_puts_attr((char_u *)"links to", HL_ATTR(HLF_D)); 9230 msg_puts_attr("links to", HL_ATTR(HLF_D));
9231 msg_putchar(' '); 9231 msg_putchar(' ');
9232 msg_outtrans(HL_TABLE()[HL_TABLE()[id - 1].sg_link - 1].sg_name); 9232 msg_outtrans(HL_TABLE()[HL_TABLE()[id - 1].sg_link - 1].sg_name);
9233 } 9233 }
9234 9234
9235 if (!didh) 9235 if (!didh)
9282 didh = TRUE; 9282 didh = TRUE;
9283 if (!got_int) 9283 if (!got_int)
9284 { 9284 {
9285 if (*name != NUL) 9285 if (*name != NUL)
9286 { 9286 {
9287 MSG_PUTS_ATTR(name, HL_ATTR(HLF_D)); 9287 msg_puts_attr(name, HL_ATTR(HLF_D));
9288 MSG_PUTS_ATTR("=", HL_ATTR(HLF_D)); 9288 msg_puts_attr("=", HL_ATTR(HLF_D));
9289 } 9289 }
9290 msg_outtrans(ts); 9290 msg_outtrans(ts);
9291 } 9291 }
9292 } 9292 }
9293 return didh; 9293 return didh;
9482 msg_advance(endcol); 9482 msg_advance(endcol);
9483 9483
9484 /* Show "xxx" with the attributes. */ 9484 /* Show "xxx" with the attributes. */
9485 if (!did_header) 9485 if (!did_header)
9486 { 9486 {
9487 msg_puts_attr((char_u *)"xxx", syn_id2attr(id)); 9487 msg_puts_attr("xxx", syn_id2attr(id));
9488 msg_putchar(' '); 9488 msg_putchar(' ');
9489 } 9489 }
9490 9490
9491 return newline; 9491 return newline;
9492 } 9492 }
9723 else if (!ASCII_ISALNUM(*p) && *p != '_') 9723 else if (!ASCII_ISALNUM(*p) && *p != '_')
9724 { 9724 {
9725 /* This is an error, but since there previously was no check only 9725 /* This is an error, but since there previously was no check only
9726 * give a warning. */ 9726 * give a warning. */
9727 msg_source(HL_ATTR(HLF_W)); 9727 msg_source(HL_ATTR(HLF_W));
9728 MSG(_("W18: Invalid character in group name")); 9728 msg(_("W18: Invalid character in group name"));
9729 break; 9729 break;
9730 } 9730 }
9731 } 9731 }
9732 9732
9733 /* 9733 /*
10262 } 10262 }
10263 10263
10264 static void 10264 static void
10265 highlight_list_two(int cnt, int attr) 10265 highlight_list_two(int cnt, int attr)
10266 { 10266 {
10267 msg_puts_attr((char_u *)&("N \bI \b! \b"[cnt / 11]), attr); 10267 msg_puts_attr(&("N \bI \b! \b"[cnt / 11]), attr);
10268 msg_clr_eos(); 10268 msg_clr_eos();
10269 out_flush(); 10269 out_flush();
10270 ui_delay(cnt == 99 ? 40L : (long)cnt * 50L, FALSE); 10270 ui_delay(cnt == 99 ? 40L : (long)cnt * 50L, FALSE);
10271 } 10271 }
10272 10272