summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/style.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/style.c')
-rw-r--r--usr.bin/tmux/style.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/usr.bin/tmux/style.c b/usr.bin/tmux/style.c
index 02da7c613b5..36cb44c48ff 100644
--- a/usr.bin/tmux/style.c
+++ b/usr.bin/tmux/style.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: style.c,v 1.25 2020/05/16 14:13:37 nicm Exp $ */
+/* $OpenBSD: style.c,v 1.26 2020/05/16 14:53:23 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -59,6 +59,7 @@ style_parse(struct style *sy, const struct grid_cell *base, const char *in)
return (0);
style_copy(&saved, sy);
+ log_debug("%s: %s", __func__, in);
do {
while (*in != '\0' && strchr(delimiters, *in) != NULL)
in++;
@@ -71,6 +72,7 @@ style_parse(struct style *sy, const struct grid_cell *base, const char *in)
memcpy(tmp, in, end);
tmp[end] = '\0';
+ log_debug("%s: %s", __func__, tmp);
if (strcasecmp(tmp, "default") == 0) {
sy->gc.fg = base->fg;
sy->gc.bg = base->bg;
@@ -285,30 +287,3 @@ style_copy(struct style *dst, struct style *src)
{
memcpy(dst, src, sizeof *dst);
}
-
-/* Check if two styles are (visibly) the same. */
-int
-style_equal(struct style *sy1, struct style *sy2)
-{
- struct grid_cell *gc1 = &sy1->gc;
- struct grid_cell *gc2 = &sy2->gc;
-
- if (gc1->fg != gc2->fg)
- return (0);
- if (gc1->bg != gc2->bg)
- return (0);
- if ((gc1->attr & STYLE_ATTR_MASK) != (gc2->attr & STYLE_ATTR_MASK))
- return (0);
- if (sy1->fill != sy2->fill)
- return (0);
- if (sy1->align != sy2->align)
- return (0);
- return (1);
-}
-
-/* Is this style default? */
-int
-style_is_default(struct style *sy)
-{
- return (style_equal(sy, &style_default));
-}