aboutsummaryrefslogtreecommitdiff
path: root/style.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-01-15 22:01:11 +0000
committerThomas Adam <thomas@xteddy.org>2017-01-15 22:01:11 +0000
commitc9fcb76651cd6685ad33b845bcd0a21771964d37 (patch)
treeca1d2d48cb016473c7bb0d31367faa0a00c107a9 /style.c
parent4f077fe62c4768d479f22f2a46a91f2154eccb01 (diff)
parent30548461439f02ed8327f96748035685a1a26ace (diff)
downloadrtmux-c9fcb76651cd6685ad33b845bcd0a21771964d37.tar.gz
rtmux-c9fcb76651cd6685ad33b845bcd0a21771964d37.tar.bz2
rtmux-c9fcb76651cd6685ad33b845bcd0a21771964d37.zip
Merge branch 'obsd-master'
Diffstat (limited to 'style.c')
-rw-r--r--style.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/style.c b/style.c
index 26bb75a9..cec1b894 100644
--- a/style.c
+++ b/style.c
@@ -129,55 +129,6 @@ style_tostring(struct grid_cell *gc)
return (s);
}
-/* Synchronize new -style option with the old one. */
-void
-style_update_new(struct options *oo, const char *name, const char *newname)
-{
- int value;
- struct grid_cell *gc;
- struct options_entry *o;
-
- /* It's a colour or attribute, but with no -style equivalent. */
- if (newname == NULL)
- return;
-
- o = options_find1(oo, newname);
- if (o == NULL)
- o = options_set_style(oo, newname, 0, "default");
- gc = &o->style;
-
- o = options_find1(oo, name);
- if (o == NULL)
- o = options_set_number(oo, name, 8);
- value = o->num;
-
- if (strstr(name, "-bg") != NULL)
- gc->bg = value;
- else if (strstr(name, "-fg") != NULL)
- gc->fg = value;
- else if (strstr(name, "-attr") != NULL)
- gc->attr = value;
-}
-
-/* Synchronize all the old options with the new -style one. */
-void
-style_update_old(struct options *oo, const char *name, struct grid_cell *gc)
-{
- char newname[128];
- int size;
-
- size = strrchr(name, '-') - name;
-
- xsnprintf(newname, sizeof newname, "%.*s-bg", size, name);
- options_set_number(oo, newname, gc->bg);
-
- xsnprintf(newname, sizeof newname, "%.*s-fg", size, name);
- options_set_number(oo, newname, gc->fg);
-
- xsnprintf(newname, sizeof newname, "%.*s-attr", size, name);
- options_set_number(oo, newname, gc->attr);
-}
-
/* Apply a style. */
void
style_apply(struct grid_cell *gc, struct options *oo, const char *name)