Mercurial > vim
diff src/highlight.c @ 27032:18cafa092e8d v8.2.4045
patch 8.2.4045: some global functions are only used in one file
Commit: https://github.com/vim/vim/commit/782b43d89473dac00e3a8e02224a8330b88dbfef
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sat Jan 8 18:43:40 2022 +0000
patch 8.2.4045: some global functions are only used in one file
Problem: Some global functions are only used in one file.
Solution: Make the functions static. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/9492)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 08 Jan 2022 19:45:03 +0100 |
parents | 268f6a3511df |
children | c1d1639b52dd |
line wrap: on
line diff
--- a/src/highlight.c +++ b/src/highlight.c @@ -460,6 +460,21 @@ init_highlight( #endif } +#if defined(FEAT_EVAL) && (defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)) +/* + * Load a default color list. Intended to support legacy color names but allows + * the user to override the color values. Only loaded once. + */ + static void +load_default_colors_lists() +{ + // Lacking a default color list isn't the end of the world but it is likely + // an inconvenience so users should know when it is missing. + if (source_runtime((char_u *)"colors/lists/default.vim", DIP_ALL) != OK) + msg("failed to load colors/lists/default.vim"); +} +#endif + /* * Load color file "name". * Return OK for success, FAIL for failure. @@ -2272,7 +2287,7 @@ hex_digit(int c) return 0x1ffffff; } - guicolor_T + static guicolor_T decode_hex_color(char_u *hex) { guicolor_T color; @@ -2294,7 +2309,7 @@ decode_hex_color(char_u *hex) // such name exists in the color table. The convention is to use lowercase for // all keys in the v:colornames dictionary. The value can be either a string in // the form #rrggbb or a number, either of which is converted to a guicolor_T. - guicolor_T + static guicolor_T colorname2rgb(char_u *name) { dict_T *colornames_table = get_vim_var_dict(VV_COLORNAMES); @@ -2335,18 +2350,6 @@ colorname2rgb(char_u *name) return INVALCOLOR; } -/* - * Load a default color list. Intended to support legacy color names but allows - * the user to override the color values. Only loaded once. - */ - void -load_default_colors_lists() -{ - // Lacking a default color list isn't the end of the world but it is likely - // an inconvenience so users should know when it is missing. - if (source_runtime((char_u *)"colors/lists/default.vim", DIP_ALL) != OK) - msg("failed to load colors/lists/default.vim"); -} #endif guicolor_T