diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-03-16 17:23:31 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-03-16 17:23:31 +0100 |
commit | 8820b48654b62472821d9b155fe03ab7ac13a05c (patch) | |
tree | 7783a4068aee8368661722d5171d33a4d410d6bb | |
parent | 40ebc0afda8d8e478d2090133ed6a3cd3d8da3ec (diff) |
patch 8.0.0466: still macros that should be all-capsv8.0.0466
Problem: There are still a few macros that should be all-caps.
Solution: Make a few more macros all-caps.
-rw-r--r-- | src/buffer.c | 2 | ||||
-rw-r--r-- | src/edit.c | 12 | ||||
-rw-r--r-- | src/ex_cmds.c | 6 | ||||
-rw-r--r-- | src/ex_cmds2.c | 4 | ||||
-rw-r--r-- | src/ex_docmd.c | 4 | ||||
-rw-r--r-- | src/ex_getln.c | 10 | ||||
-rw-r--r-- | src/farsi.c | 4 | ||||
-rw-r--r-- | src/fileio.c | 14 | ||||
-rw-r--r-- | src/getchar.c | 6 | ||||
-rw-r--r-- | src/gui_beval.c | 2 | ||||
-rw-r--r-- | src/hardcopy.c | 2 | ||||
-rw-r--r-- | src/if_cscope.c | 20 | ||||
-rw-r--r-- | src/if_xcmdsrv.c | 2 | ||||
-rw-r--r-- | src/mark.c | 6 | ||||
-rw-r--r-- | src/memline.c | 2 | ||||
-rw-r--r-- | src/menu.c | 4 | ||||
-rw-r--r-- | src/message.c | 40 | ||||
-rw-r--r-- | src/misc1.c | 10 | ||||
-rw-r--r-- | src/normal.c | 2 | ||||
-rw-r--r-- | src/ops.c | 2 | ||||
-rw-r--r-- | src/option.c | 4 | ||||
-rw-r--r-- | src/quickfix.c | 4 | ||||
-rw-r--r-- | src/screen.c | 150 | ||||
-rw-r--r-- | src/search.c | 8 | ||||
-rw-r--r-- | src/syntax.c | 16 | ||||
-rw-r--r-- | src/tag.c | 14 | ||||
-rw-r--r-- | src/term.c | 10 | ||||
-rw-r--r-- | src/term.h | 138 | ||||
-rw-r--r-- | src/ui.c | 4 | ||||
-rw-r--r-- | src/undo.c | 2 | ||||
-rw-r--r-- | src/userfunc.c | 2 | ||||
-rw-r--r-- | src/version.c | 4 | ||||
-rw-r--r-- | src/vim.h | 13 |
33 files changed, 259 insertions, 264 deletions
diff --git a/src/buffer.c b/src/buffer.c index ca3be14a93..83d74a3795 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -6021,7 +6021,7 @@ sign_list_placed(buf_T *rbuf) if (buf->b_signlist != NULL) { vim_snprintf(lbuf, BUFSIZ, _("Signs for %s:"), buf->b_fname); - MSG_PUTS_ATTR(lbuf, hl_attr(HLF_D)); + MSG_PUTS_ATTR(lbuf, HL_ATTR(HLF_D)); msg_putchar('\n'); } for (p = buf->b_signlist; p != NULL && !got_int; p = p->next) diff --git a/src/edit.c b/src/edit.c index 35fa23b7d9..cdde11e408 100644 --- a/src/edit.c +++ b/src/edit.c @@ -1771,7 +1771,7 @@ edit_putchar(int c, int highlight) update_topline(); /* just in case w_topline isn't valid */ validate_cursor(); if (highlight) - attr = hl_attr(HLF_8); + attr = HL_ATTR(HLF_8); else attr = 0; pc_row = W_WINROW(curwin) + curwin->w_wrow; @@ -2256,7 +2256,7 @@ has_compl_option(int dict_opt) edit_submode = NULL; msg_attr(dict_opt ? (char_u *)_("'dictionary' option is empty") : (char_u *)_("'thesaurus' option is empty"), - hl_attr(HLF_E)); + HL_ATTR(HLF_E)); if (emsg_silent == 0) { vim_beep(BO_COMPL); @@ -3252,7 +3252,7 @@ ins_compl_files( { vim_snprintf((char *)IObuff, IOSIZE, _("Scanning dictionary: %s"), (char *)files[i]); - (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R)); + (void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R)); } if (fp != NULL) @@ -4344,7 +4344,7 @@ ins_compl_get_exp(pos_T *ini) : ins_buf->b_sfname == NULL ? ins_buf->b_fname : ins_buf->b_sfname); - (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R)); + (void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R)); } else if (*e_cpt == NUL) break; @@ -4374,7 +4374,7 @@ ins_compl_get_exp(pos_T *ini) { type = CTRL_X_TAGS; vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags.")); - (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R)); + (void)msg_trunc_attr(IObuff, TRUE, HL_ATTR(HLF_R)); } else type = -1; @@ -5693,7 +5693,7 @@ ins_complete(int c, int enable_pum) if (!p_smd) msg_attr(edit_submode_extra, edit_submode_highl < HLF_COUNT - ? hl_attr(edit_submode_highl) : 0); + ? HL_ATTR(edit_submode_highl) : 0); } else msg_clr_cmdline(); /* necessary for "noshowmode" */ diff --git a/src/ex_cmds.c b/src/ex_cmds.c index df35f52da8..0c4dffbc66 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -2889,7 +2889,7 @@ print_line_no_prefix( { vim_snprintf((char *)numbuf, sizeof(numbuf), "%*ld ", number_width(curwin), (long)lnum); - msg_puts_attr(numbuf, hl_attr(HLF_N)); /* Highlight line nrs */ + msg_puts_attr(numbuf, HL_ATTR(HLF_N)); /* Highlight line nrs */ } msg_prt_line(ml_get(lnum), list); } @@ -5379,7 +5379,7 @@ do_sub(exarg_T *eap) msg_no_more = TRUE; /* write message same highlighting as for * wait_return */ - smsg_attr(hl_attr(HLF_R), + smsg_attr(HL_ATTR(HLF_R), (char_u *)_("replace with %s (y/n/a/q/l/^E/^Y)?"), sub); msg_no_more = FALSE; msg_scroll = i; @@ -8284,7 +8284,7 @@ ex_smile(exarg_T *eap UNUSED) else for (n = *p++; n > 0; --n) if (*p == 'o' || *p == '$') - msg_putchar_attr(*p, hl_attr(HLF_L)); + msg_putchar_attr(*p, HL_ATTR(HLF_L)); else msg_putchar(*p); msg_clr_eos(); diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 1b5d45d2a8..36ee57e8ec 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -2230,7 +2230,7 @@ buf_write_all(buf_T *buf, int forceit) #ifdef FEAT_AUTOCMD if (curbuf != old_curbuf) { - msg_source(hl_attr(HLF_W)); + msg_source(HL_ATTR(HLF_W)); MSG(_("Warning: Entered other buffer unexpectedly (check autocommands)")); } #endif @@ -4733,7 +4733,7 @@ get_one_sourceline(struct source_cookie *sp) { if (!sp->error) { - msg_source(hl_attr(HLF_W)); + msg_source(HL_ATTR(HLF_W)); EMSG(_("W15: Warning: Wrong line separator, ^M may be missing")); } sp->error = TRUE; diff --git a/src/ex_docmd.c b/src/ex_docmd.c index c270dc8970..96e2b3f5f3 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -6032,7 +6032,7 @@ uc_list(char_u *name, size_t name_len) msg_putchar(gap != &ucmds ? 'b' : ' '); msg_putchar(' '); - msg_outtrans_attr(cmd->uc_name, hl_attr(HLF_D)); + msg_outtrans_attr(cmd->uc_name, HL_ATTR(HLF_D)); len = (int)STRLEN(cmd->uc_name) + 4; do { @@ -8480,7 +8480,7 @@ ex_tabs(exarg_T *eap UNUSED) { msg_putchar('\n'); vim_snprintf((char *)IObuff, IOSIZE, _("Tab page %d"), tabcount++); - msg_outtrans_attr(IObuff, hl_attr(HLF_T)); + msg_outtrans_attr(IObuff, HL_ATTR(HLF_T)); out_flush(); /* output one line at a time */ ui_breakcheck(); diff --git a/src/ex_getln.c b/src/ex_getln.c index 2dd8aa18e9..e96f5b8991 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4178,14 +4178,14 @@ showmatches(expand_T *xp, int wildmenu UNUSED) lines = (num_files + columns - 1) / columns; } - attr = hl_attr(HLF_D); /* find out highlighting for directories */ + attr = HL_ATTR(HLF_D); /* find out highlighting for directories */ if (xp->xp_context == EXPAND_TAGS_LISTFILES) { - MSG_PUTS_ATTR(_("tagname"), hl_attr(HLF_T)); + MSG_PUTS_ATTR(_("tagname"), HL_ATTR(HLF_T)); msg_clr_eos(); msg_advance(maxlen - 3); - MSG_PUTS_ATTR(_(" kind file\n"), hl_attr(HLF_T)); + MSG_PUTS_ATTR(_(" kind file\n"), HL_ATTR(HLF_T)); } /* list the files line by line */ @@ -4196,12 +4196,12 @@ showmatches(expand_T *xp, int wildmenu UNUSED) { if (xp->xp_context == EXPAND_TAGS_LISTFILES) { - msg_outtrans_attr(files_found[k], hl_attr(HLF_D)); + msg_outtrans_attr(files_found[k], HL_ATTR(HLF_D)); p = files_found[k] + STRLEN(files_found[k]) + 1; msg_advance(maxlen + 1); msg_puts(p); msg_advance(maxlen + 3); - msg_puts_long_attr(p + 2, hl_attr(HLF_D)); + msg_puts_long_attr(p + 2, HL_ATTR(HLF_D)); break; } for (j = maxlen - lastlen; --j >= 0; ) diff --git a/src/farsi.c b/src/farsi.c index cc414d6178..bac15109ec 100644 --- a/src/farsi.c +++ b/src/farsi.c @@ -1719,7 +1719,7 @@ conv_to_pvim(void) /* Assume the screen has been messed up: clear it and redraw. */ redraw_later(CLEAR); - MSG_ATTR(farsi_text_1, hl_attr(HLF_S)); + MSG_ATTR(farsi_text_1, HL_ATTR(HLF_S)); } /* @@ -1747,7 +1747,7 @@ conv_to_pstd(void) /* Assume the screen has been messed up: clear it and redraw. */ redraw_later(CLEAR); - MSG_ATTR(farsi_text_2, hl_attr(HLF_S)); + MSG_ATTR(farsi_text_2, HL_ATTR(HLF_S)); } /* diff --git a/src/fileio.c b/src/fileio.c index 00393cf7c5..32b2059f0e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5044,7 +5044,7 @@ nofail: { int numlen = errnum != NULL ? (int)STRLEN(errnum) : 0; - attr = hl_attr(HLF_E); /* set highlight for error messages */ + attr = HL_ATTR(HLF_E); /* set highlight for error messages */ msg_add_fname(buf, #ifndef UNIX sfname @@ -5300,7 +5300,7 @@ check_mtime(buf_T *buf, stat_T *st) msg_silent = 0; /* must give this prompt */ /* don't use emsg() here, don't want to flush the buffers */ MSG_ATTR(_("WARNING: The file has been changed since reading it!!!"), - hl_attr(HLF_E)); + HL_ATTR(HLF_E)); if (ask_yesno((char_u *)_("Do you really want to write to it"), TRUE) == 'n') return FAIL; @@ -7011,10 +7011,10 @@ buf_check_timestamp( # endif { msg_start(); - msg_puts_attr(tbuf, hl_attr(HLF_E) + MSG_HIST); + msg_puts_attr(tbuf, HL_ATTR(HLF_E) + MSG_HIST); if (*mesg2 != NUL) msg_puts_attr((char_u *)mesg2, - hl_attr(HLF_W) + MSG_HIST); + HL_ATTR(HLF_W) + MSG_HIST); msg_clr_eos(); (void)msg_end(); if (emsg_silent == 0) @@ -7840,12 +7840,12 @@ show_autocmd(AutoPat *ap, event_T event) if (ap->group != AUGROUP_DEFAULT) { if (AUGROUP_NAME(ap->group) == NULL) - msg_puts_attr(get_deleted_augroup(), hl_attr(HLF_E)); + msg_puts_attr(get_deleted_augroup(), HL_ATTR(HLF_E)); else - msg_puts_attr(AUGROUP_NAME(ap->group), hl_attr(HLF_T)); + msg_puts_attr(AUGROUP_NAME(ap->group), HL_ATTR(HLF_T)); msg_puts((char_u *)" "); } - msg_puts_attr(event_nr2name(event), hl_attr(HLF_T)); + msg_puts_attr(event_nr2name(event), HL_ATTR(HLF_T)); last_event = event; last_group = ap->group; msg_putchar('\n'); diff --git a/src/getchar.c b/src/getchar.c index ef3eb51568..011648d64c 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -4022,9 +4022,9 @@ showmap( } while (len < 12); if (mp->m_noremap == REMAP_NONE) - msg_puts_attr((char_u *)"*", hl_attr(HLF_8)); + msg_puts_attr((char_u *)"*", HL_ATTR(HLF_8)); else if (mp->m_noremap == REMAP_SCRIPT) - msg_puts_attr((char_u *)"&", hl_attr(HLF_8)); + msg_puts_attr((char_u *)"&", HL_ATTR(HLF_8)); else msg_putchar(' '); @@ -4036,7 +4036,7 @@ showmap( /* Use FALSE below if we only want things like <Up> to show up as such on * the rhs, and not M-x etc, TRUE gets both -- webb */ if (*mp->m_str == NUL) - msg_puts_attr((char_u *)"<Nop>", hl_attr(HLF_8)); + msg_puts_attr((char_u *)"<Nop>", HL_ATTR(HLF_8)); else { /* Remove escaping of CSI, because "m_str" is in a format to be used diff --git a/src/gui_beval.c b/src/gui_beval.c index c06e75a094..818a50b2dc 100644 --- a/src/gui_beval.c +++ b/src/gui_beval.c @@ -1054,7 +1054,7 @@ set_printable_label_text(GtkLabel *label, char_u *text) #endif /* Look up the RGB values of the SpecialKey foreground color. */ - aep = syn_gui_attr2entry(hl_attr(HLF_8)); + aep = syn_gui_attr2entry(HL_ATTR(HLF_8)); pixel = (aep != NULL) ? aep->ae_u.gui.fg_color : INVALCOLOR; if (pixel != INVALCOLOR) # if GTK_CHECK_VERSION(3,0,0) diff --git a/src/hardcopy.c b/src/hardcopy.c index 449bfbd25c..4a0910d8c4 100644 --- a/src/hardcopy.c +++ b/src/hardcopy.c @@ -569,7 +569,7 @@ prt_header( prt_message(char_u *s) { screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns, ' ', ' ', 0); - screen_puts(s, (int)Rows - 1, 0, hl_attr(HLF_R)); + screen_puts(s, (int)Rows - 1, 0, HL_ATTR(HLF_R)); out_flush(); } diff --git a/src/if_cscope.c b/src/if_cscope.c index 7a533230f3..683251ca71 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -615,7 +615,7 @@ staterr: if (p_csverbose) { msg_clr_eos(); - (void)smsg_attr(hl_attr(HLF_R), + (void)smsg_attr(HL_ATTR(HLF_R), (char_u *)_("Added cscope database %s"), csinfo[i].fname); } @@ -1612,7 +1612,7 @@ cs_kill_execute( if (p_csverbose) { msg_clr_eos(); - (void)smsg_attr(hl_attr(HLF_R) | MSG_HIST, + (void)smsg_attr(HL_ATTR(HLF_R) | MSG_HIST, (char_u *)_("cscope connection %s closed"), cname); } cs_release_csp(i, TRUE); @@ -2020,14 +2020,14 @@ cs_print_tags_priv(char **matches, char **cntxts, int num_matches) { bufsize = newsize; (void)sprintf(buf, cstag_msg, ptag); - MSG_PUTS_ATTR(buf, hl_attr(HLF_T)); + MSG_PUTS_ATTR(buf, HL_ATTR(HLF_T)); } vim_free(tbuf); - MSG_PUTS_ATTR(_("\n # line"), hl_attr(HLF_T)); /* strlen is 7 */ + MSG_PUTS_ATTR(_("\n # line"), HL_ATTR(HLF_T)); /* strlen is 7 */ msg_advance(msg_col + 2); - MSG_PUTS_ATTR(_("filename / context / line\n"), hl_attr(HLF_T)); + MSG_PUTS_ATTR(_("filename / context / line\n"), HL_ATTR(HLF_T)); num = 1; for (i = 0; i < num_matches; i++) @@ -2071,9 +2071,9 @@ cs_print_tags_priv(char **matches, char **cntxts, int num_matches) { /* csfmt_str = "%4d %6s "; */ (void)sprintf(buf, csfmt_str, num, lno); - MSG_PUTS_ATTR(buf, hl_attr(HLF_CM)); + MSG_PUTS_ATTR(buf, HL_ATTR(HLF_CM)); } - MSG_PUTS_LONG_ATTR(cs_pathcomponents(fname), hl_attr(HLF_CM)); + MSG_PUTS_LONG_ATTR(cs_pathcomponents(fname), HL_ATTR(HLF_CM)); /* compute the required space for the context */ if (cntxts[idx] != NULL) @@ -2399,7 +2399,7 @@ cs_reset(exarg_T *eap UNUSED) * "Added cscope database..." */ sprintf(buf, " (#%d)", i); - MSG_PUTS_ATTR(buf, hl_attr(HLF_R)); + MSG_PUTS_ATTR(buf, HL_ATTR(HLF_R)); } } vim_free(dblist[i]); @@ -2411,7 +2411,7 @@ cs_reset(exarg_T *eap UNUSED) vim_free(fllist); if (p_csverbose) - MSG_ATTR(_("All cscope databases reset"), hl_attr(HLF_R) | MSG_HIST); + MSG_ATTR(_("All cscope databases reset"), HL_ATTR(HLF_R) | MSG_HIST); return CSCOPE_SUCCESS; } /* cs_reset */ @@ -2497,7 +2497,7 @@ cs_show(exarg_T *eap UNUSED) { MSG_PUTS_ATTR( _(" # pid database name prepend path\n"), - hl_attr(HLF_T)); + HL_ATTR(HLF_T)); for (i = 0; i < csinfo_size; i++) { if (csinfo[i].fname == NULL) diff --git a/src/if_xcmdsrv.c b/src/if_xcmdsrv.c index 6ef23353e4..fa91c3e8c1 100644 --- a/src/if_xcmdsrv.c +++ b/src/if_xcmdsrv.c @@ -231,7 +231,7 @@ serverRegisterName( if (res < -1 || i >= 1000) { MSG_ATTR(_("Unable to register a command server name"), - hl_attr(HLF_W)); + HL_ATTR(HLF_W)); return FAIL; } if (p == NULL) diff --git a/src/mark.c b/src/mark.c index 0d21305bcf..d93dfac23f 100644 --- a/src/mark.c +++ b/src/mark.c @@ -794,7 +794,7 @@ show_one_mark( } if (name != NULL) { - msg_outtrans_attr(name, current ? hl_attr(HLF_D) : 0); + msg_outtrans_attr(name, current ? HL_ATTR(HLF_D) : 0); if (mustfree) vim_free(name); } @@ -926,7 +926,7 @@ ex_jumps(exarg_T *eap UNUSED) msg_outtrans(IObuff); msg_outtrans_attr(name, curwin->w_jumplist[i].fmark.fnum == curbuf->b_fnum - ? hl_attr(HLF_D) : 0); + ? HL_ATTR(HLF_D) : 0); vim_free(name); ui_breakcheck(); } @@ -973,7 +973,7 @@ ex_changes(exarg_T *eap UNUSED) name = mark_line(&curbuf->b_changelist[i], 17); if (name == NULL) break; - msg_outtrans_attr(name, hl_attr(HLF_D)); + msg_outtrans_attr(name, HL_ATTR(HLF_D)); vim_free(name); ui_breakcheck(); } diff --git a/src/memline.c b/src/memline.c index 723bcd4bc5..458b545db9 100644 --- a/src/memline.c +++ b/src/memline.c @@ -1136,7 +1136,7 @@ ml_recover(void) recoverymode = TRUE; called_from_main = (curbuf->b_ml.ml_mfp == NULL); - attr = hl_attr(HLF_E); + attr = HL_ATTR(HLF_E); /* * If the file name ends in ".s[uvw][a-z]" we assume this is the swap file. diff --git a/src/menu.c b/src/menu.c index 07cf57ec4c..343a1b8ec5 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1132,7 +1132,7 @@ show_menus_recursive(vimmenu_T *menu, int modes, int depth) MSG_PUTS(" "); } /* Same highlighting as for directories!? */ - msg_outtrans_attr(menu->name, hl_attr(HLF_D)); + msg_outtrans_attr(menu->name, HL_ATTR(HLF_D)); } if (menu != NULL && menu->children == NULL) @@ -1162,7 +1162,7 @@ show_menus_recursive(vimmenu_T *menu, int modes, int depth) msg_putchar(' '); MSG_PUTS(" "); if (*menu->strings[bit] == NUL) - msg_puts_attr((char_u *)"<Nop>", hl_attr(HLF_8)); + msg_puts_attr((char_u *)"<Nop>", HL_ATTR(HLF_8)); else msg_outtrans_special(menu->strings[bit], FALSE); } diff --git a/src/message.c b/src/message.c index 5379b5b2e3..2f8b2fe2f8 100644 --- a/src/message.c +++ b/src/message.c @@ -503,7 +503,7 @@ msg_source(int attr) p = get_emsg_lnum(); if (p != NULL) { - msg_attr(p, hl_attr(HLF_N)); + msg_attr(p, HL_ATTR(HLF_N)); vim_free(p); last_sourcing_lnum = sourcing_lnum; /* only once for each line */ } @@ -690,7 +690,7 @@ emsg(char_u *s) emsg_on_display = TRUE; /* remember there is an error message */ ++msg_scroll; /* don't overwrite a previous message */ - attr = hl_attr(HLF_E); /* set highlight mode for error messages */ + attr = HL_ATTR(HLF_E); /* set highlight mode for error messages */ if (msg_scrolled != 0) need_wait_return = TRUE; /* needed in case emsg() is called after * wait_return has reset need_wait_return @@ -985,7 +985,7 @@ ex_messages(exarg_T *eap) if (s != NULL && *s != NUL) msg_attr((char_u *) _("Messages maintainer: Bram Moolenaar <Bram@vim.org>"), - hl_attr(HLF_T)); + HL_ATTR(HLF_T)); } /* Display what was not skipped. */ @@ -1280,7 +1280,7 @@ hit_return_msg(void) if (got_int) MSG_PUTS(_("Interrupt: ")); - MSG_PUTS_ATTR(_("Press ENTER or type command to continue"), hl_attr(HLF_R)); + MSG_PUTS_ATTR(_("Press ENTER or type command to continue"), HL_ATTR(HLF_R)); if (!msg_use_printf()) msg_clr_eos(); p_more = save_p_more; @@ -1431,7 +1431,7 @@ msg_home_replace(char_u *fname) void msg_home_replace_hl(char_u *fname) { - msg_home_replace_attr(fname, hl_attr(HLF_D)); + msg_home_replace_attr(fname, HL_ATTR(HLF_D)); } #endif @@ -1544,7 +1544,7 @@ msg_outtrans_len_attr(char_u *msgstr, int len, int attr) msg_puts_attr_len(plain_start, (int)(str - plain_start), attr); plain_start = str + mb_l; - msg_puts_attr(transchar(c), attr == 0 ? hl_attr(HLF_8) : attr); + msg_puts_attr(transchar(c), attr == 0 ? HL_ATTR(HLF_8) : attr); retval += char2cells(c); } len -= mb_l - 1; @@ -1562,7 +1562,7 @@ msg_outtrans_len_attr(char_u *msgstr, int len, int attr) msg_puts_attr_len(plain_start, (int)(str - plain_start), attr); plain_start = str + 1; - msg_puts_attr(s, attr == 0 ? hl_attr(HLF_8) : attr); + msg_puts_attr(s, attr == 0 ? HL_ATTR(HLF_8) : attr); retval += (int)STRLEN(s); } else @@ -1623,7 +1623,7 @@ msg_outtrans_special( int attr; int len; - attr = hl_attr(HLF_8); + attr = HL_ATTR(HLF_8); while (*str != NUL) { /* Leading and trailing spaces need to be displayed in <> form. */ @@ -1846,13 +1846,13 @@ msg_prt_line(char_u *s, int list) { c = lcs_tab1; c_extra = lcs_tab2; - attr = hl_attr(HLF_8); + attr = HL_ATTR(HLF_8); } } else if (c == 160 && list && lcs_nbsp != NUL) { c = lcs_nbsp; - attr = hl_attr(HLF_8); + attr = HL_ATTR(HLF_8); } else if (c == NUL && list && lcs_eol != NUL) { @@ -1860,7 +1860,7 @@ msg_prt_line(char_u *s, int list) c_extra = NUL; n_extra = 1; c = lcs_eol; - attr = hl_attr(HLF_AT); + attr = HL_ATTR(HLF_AT); --s; } else if (c != NUL && (n = byte2cells(c)) > 1) @@ -1871,17 +1871,17 @@ msg_prt_line(char_u *s, int list) c = *p_extra++; /* Use special coloring to be able to distinguish <hex> from * the same in plain text. */ - attr = hl_attr(HLF_8); + attr = HL_ATTR(HLF_8); } else if (c == ' ' && trail != NULL && s > trail) { c = lcs_trail; - attr = hl_attr(HLF_8); + attr = HL_ATTR(HLF_8); } else if (c == ' ' && list && lcs_space != NUL) { c = lcs_space; - attr = hl_attr(HLF_8); + attr = HL_ATTR(HLF_8); } } @@ -1913,7 +1913,7 @@ screen_puts_mbyte(char_u *s, int l, int attr) msg_col == Columns - 1)) { /* Doesn't fit, print a highlighted '>' to fill it up. */ - msg_screen_putchar('>', hl_attr(HLF_AT)); + msg_screen_putchar('>', HL_ATTR(HLF_AT)); return s; } @@ -1956,7 +1956,7 @@ msg_puts(char_u *s) msg_puts_title( char_u *s) { - msg_puts_attr(s, hl_attr(HLF_T)); + msg_puts_attr(s, HL_ATTR(HLF_T)); } /* @@ -1981,7 +1981,7 @@ msg_puts_long_len_attr(char_u *longstr, int len, int attr) { slen = (room - 3) / 2; msg_outtrans_len_attr(longstr, slen, attr); - msg_puts_attr((char_u *)"...", hl_attr(HLF_8)); + msg_puts_attr((char_u *)"...", HL_ATTR(HLF_8)); } msg_outtrans_len_attr(longstr + len - slen, slen, attr); } @@ -3067,7 +3067,7 @@ msg_moremsg(int full) int attr; char_u *s = (char_u *)_("-- More --"); - attr = hl_attr(HLF_M); + attr = HL_ATTR(HLF_M); screen_puts(s, (int)Rows - 1, 0, attr); if (full) screen_puts((char_u *) @@ -3420,7 +3420,7 @@ give_warning(char_u *message, int hl) vim_free(keep_msg); keep_msg = NULL; if (hl) - keep_msg_attr = hl_attr(HLF_W); + keep_msg_attr = HL_ATTR(HLF_W); else keep_msg_attr = 0; if (msg_attr(message, keep_msg_attr) && msg_scrolled == 0) @@ -3812,7 +3812,7 @@ display_confirm_msg(void) /* avoid that 'q' at the more prompt truncates the message here */ ++confirm_msg_used; if (confirm_msg != NULL) - msg_puts_attr(confirm_msg, hl_attr(HLF_M)); + msg_puts_attr(confirm_msg, HL_ATTR(HLF_M)); --confirm_msg_used; } diff --git a/src/misc1.c b/src/misc1.c index 3379e757d5..951467d94c 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -3265,8 +3265,8 @@ change_warning( msg_start(); if (msg_row == Rows - 1) msg_col = col; - msg_source(hl_attr(HLF_W)); - MSG_PUTS_ATTR(_(w_readonly), hl_attr(HLF_W) | MSG_HIST); + msg_source(HL_ATTR(HLF_W)); + MSG_PUTS_ATTR(_(w_readonly), HL_ATTR(HLF_W) | MSG_HIST); #ifdef FEAT_EVAL set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_readonly), -1); #endif @@ -3319,7 +3319,7 @@ ask_yesno(char_u *str, int direct) while (r != 'y' && r != 'n') { /* same highlighting as for wait_return */ - smsg_attr(hl_attr(HLF_R), (char_u *)"%s (y/n)?", str); + smsg_attr(HL_ATTR(HLF_R), (char_u *)"%s (y/n)?", str); if (direct) r = get_keystroke(); else @@ -3701,8 +3701,8 @@ vim_beep( * function give the user a hint where the beep comes from. */ if (vim_strchr(p_debug, 'e') != NULL) { - msg_source(hl_attr(HLF_W)); - msg_attr((char_u *)_("Beep!"), hl_attr(HLF_W)); + msg_source(HL_ATTR(HLF_W)); + msg_attr((char_u *)_("Beep!"), HL_ATTR(HLF_W)); } } } diff --git a/src/normal.c b/src/normal.c index 6759e8e728..53bda6cc74 100644 --- a/src/normal.c +++ b/src/normal.c @@ -3266,7 +3266,7 @@ check_visual_highlight(void) if (full_screen) { - if (!did_check && hl_attr(HLF_V) == 0) + if (!did_check && HL_ATTR(HLF_V) == 0) MSG(_("Warning: terminal cannot highlight")); did_check = TRUE; } @@ -4112,7 +4112,7 @@ ex_display(exarg_T *eap) if (arg != NULL && *arg == NUL) arg = NULL; - attr = hl_attr(HLF_8); + attr = HL_ATTR(HLF_8); /* Highlight title */ MSG_PUTS_TITLE(_("\n--- Registers ---")); diff --git a/src/option.c b/src/option.c index f78d48d2a2..c404548448 100644 --- a/src/option.c +++ b/src/option.c @@ -8556,8 +8556,8 @@ set_bool_option( { static char *w_arabic = N_("W17: Arabic requires UTF-8, do ':set encoding=utf-8'"); - msg_source(hl_attr(HLF_W)); - MSG_ATTR(_(w_arabic), hl_attr(HLF_W)); + msg_source(HL_ATTR(HLF_W)); + MSG_ATTR(_(w_arabic), HL_ATTR(HLF_W)); #ifdef FEAT_EVAL set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_arabic), -1); #endif diff --git a/src/quickfix.c b/src/quickfix.c index 090b046dd2..dbcd08363c 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -2555,7 +2555,7 @@ qf_list(exarg_T *eap) vim_snprintf((char *)IObuff, IOSIZE, "%2d %s", i, (char *)fname); msg_outtrans_attr(IObuff, i == qi->qf_lists[qi->qf_curlist].qf_index - ? hl_attr(HLF_L) : hl_attr(HLF_D)); + ? HL_ATTR(HLF_L) : HL_ATTR(HLF_D)); if (qfp->qf_lnum == 0) IObuff[0] = NUL; else if (qfp->qf_col == 0) @@ -2565,7 +2565,7 @@ qf_list(exarg_T *eap) qfp->qf_lnum, qfp->qf_col); sprintf((char *)IObuff + STRLEN(IObuff), "%s:", (char *)qf_types(qfp->qf_type, qfp->qf_nr)); - msg_puts_attr(IObuff, hl_attr(HLF_N)); + msg_puts_attr(IObuff, HL_ATTR(HLF_N)); if (qfp->qf_pattern != NULL) { qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE); diff --git a/src/screen.c b/src/screen.c index 206b50fc00..82c5ba57be 100644 --- a/src/screen.c +++ b/src/screen.c @@ -2139,10 +2139,10 @@ win_update(win_T *wp) * Last line isn't finished: Display "@@@" in the last screen line. */ screen_puts_len((char_u *)"@@", 2, scr_row, W_WINCOL(wp), - hl_attr(HLF_AT)); + HL_ATTR(HLF_AT)); screen_fill(scr_row, scr_row + 1, (int)W_WINCOL(wp) + 2, (int)W_ENDCOL(wp), - '@', ' ', hl_attr(HLF_AT)); + '@', ' ', HL_ATTR(HLF_AT)); set_empty_rows(wp, srow); wp->w_botline = lnum; } @@ -2154,7 +2154,7 @@ win_update(win_T *wp) screen_fill(W_WINROW(wp) + wp->w_height - 1, W_WINROW(wp) + wp->w_height, (int)W_ENDCOL(wp) - 3, (int)W_ENDCOL(wp), - '@', '@', hl_attr(HLF_AT)); + '@', '@', HL_ATTR(HLF_AT)); set_empty_rows(wp, srow); wp->w_botline = lnum; } @@ -2282,7 +2282,7 @@ win_draw_end( n = W_WIDTH(wp); screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow, W_ENDCOL(wp) - n, (int)W_ENDCOL(wp), - ' ', ' ', hl_attr(HLF_FC)); + ' ', ' ', HL_ATTR(HLF_FC)); } # endif # ifdef FEAT_SIGNS @@ -2295,16 +2295,16 @@ win_draw_end( nn = W_WIDTH(wp); screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow, W_ENDCOL(wp) - nn, (int)W_ENDCOL(wp) - n, - ' ', ' ', hl_attr(HLF_SC)); + ' ', ' ', HL_ATTR(HLF_SC)); n = nn; } # endif screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow, W_WINCOL(wp), W_ENDCOL(wp) - 1 - FDC_OFF, - c2, c2, hl_attr(hl)); + c2, c2, HL_ATTR(hl)); screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow, W_ENDCOL(wp) - 1 - FDC_OFF, W_ENDCOL(wp) - FDC_OFF, - c1, c2, hl_attr(hl)); + c1, c2, HL_ATTR(hl)); } else #endif @@ -2318,7 +2318,7 @@ win_draw_end( |