aboutsummaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-03-19 00:02:39 +0000
committerThomas Adam <thomas@xteddy.org>2019-03-19 00:02:39 +0000
commit073d4399650b5716806d734d1869c7d52c6f2d61 (patch)
treea0861d425e1776bcc1557cfb8ab89ba9239142b7 /options.c
parentf956c17c09160d7c8ab68502d2d5756ff3d0a557 (diff)
parent0406ec0ec29f6dd7b8ea663f50d766bce5904c78 (diff)
downloadrtmux-073d4399650b5716806d734d1869c7d52c6f2d61.tar.gz
rtmux-073d4399650b5716806d734d1869c7d52c6f2d61.tar.bz2
rtmux-073d4399650b5716806d734d1869c7d52c6f2d61.zip
Merge branch 'obsd-master'
Diffstat (limited to 'options.c')
-rw-r--r--options.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/options.c b/options.c
index 6a7c37d6..369776e3 100644
--- a/options.c
+++ b/options.c
@@ -78,7 +78,6 @@ static struct options_entry *options_add(struct options *, const char *);
((o)->tableentry->type == OPTIONS_TABLE_NUMBER || \
(o)->tableentry->type == OPTIONS_TABLE_KEY || \
(o)->tableentry->type == OPTIONS_TABLE_COLOUR || \
- (o)->tableentry->type == OPTIONS_TABLE_ATTRIBUTES || \
(o)->tableentry->type == OPTIONS_TABLE_FLAG || \
(o)->tableentry->type == OPTIONS_TABLE_CHOICE))
#define OPTIONS_IS_STYLE(o) \
@@ -416,9 +415,6 @@ options_tostring(struct options_entry *o, int idx, int numeric)
case OPTIONS_TABLE_COLOUR:
tmp = colour_tostring(o->number);
break;
- case OPTIONS_TABLE_ATTRIBUTES:
- tmp = attributes_tostring(o->number);
- break;
case OPTIONS_TABLE_FLAG:
if (numeric)
xsnprintf(s, sizeof s, "%lld", o->number);
@@ -708,44 +704,3 @@ options_scope_from_flags(struct args *args, int window,
return (OPTIONS_TABLE_SESSION);
}
}
-
-void
-options_style_update_new(struct options *oo, struct options_entry *o)
-{
- const char *newname = o->tableentry->style;
- struct options_entry *new;
-
- if (newname == NULL)
- return;
- new = options_get_only(oo, newname);
- if (new == NULL)
- new = options_set_style(oo, newname, 0, "default");
-
- if (strstr(o->name, "-bg") != NULL)
- new->style.gc.bg = o->number;
- else if (strstr(o->name, "-fg") != NULL)
- new->style.gc.fg = o->number;
- else if (strstr(o->name, "-attr") != NULL)
- new->style.gc.attr = o->number;
-}
-
-void
-options_style_update_old(struct options *oo, struct options_entry *o)
-{
- char newname[128];
- int size;
-
- size = strrchr(o->name, '-') - o->name;
-
- xsnprintf(newname, sizeof newname, "%.*s-bg", size, o->name);
- if (options_get(oo, newname) != NULL)
- options_set_number(oo, newname, o->style.gc.bg);
-
- xsnprintf(newname, sizeof newname, "%.*s-fg", size, o->name);
- if (options_get(oo, newname) != NULL)
- options_set_number(oo, newname, o->style.gc.fg);
-
- xsnprintf(newname, sizeof newname, "%.*s-attr", size, o->name);
- if (options_get(oo, newname) != NULL)
- options_set_number(oo, newname, o->style.gc.attr);
-}