summaryrefslogtreecommitdiff
path: root/src/highlight.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2022-01-08 18:43:40 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-08 18:43:40 +0000
commit782b43d89473dac00e3a8e02224a8330b88dbfef (patch)
tree4309b548ce74ff64dccec70435826e602d3b21e8 /src/highlight.c
parent7c24dfddc28776eeff7464982ae5b94e187b6135 (diff)
downloadvim-git-782b43d89473dac00e3a8e02224a8330b88dbfef.tar.gz
patch 8.2.4045: some global functions are only used in one filev8.2.4045
Problem: Some global functions are only used in one file. Solution: Make the functions static. (Yegappan Lakshmanan, closes #9492)
Diffstat (limited to 'src/highlight.c')
-rw-r--r--src/highlight.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/highlight.c b/src/highlight.c
index efbc5b10e..a8af2b18c 100644
--- 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