aboutsummaryrefslogtreecommitdiff
path: root/tty-term.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-03-18 15:07:51 +0000
committerThomas Adam <thomas@xteddy.org>2019-03-18 15:07:51 +0000
commitacb2413852b98745b69459d0cdd0d9698cb75e2c (patch)
tree6af803240715b8a6bccc328d5eda14f237e44944 /tty-term.c
parentaa2b3472c515dd1e5f57618e17c0c612cfa3c117 (diff)
parentce6be7afd4d10b542f9cce8634d6bdd81754f775 (diff)
downloadrtmux-acb2413852b98745b69459d0cdd0d9698cb75e2c.tar.gz
rtmux-acb2413852b98745b69459d0cdd0d9698cb75e2c.tar.bz2
rtmux-acb2413852b98745b69459d0cdd0d9698cb75e2c.zip
Merge branch 'obsd-master'
Diffstat (limited to 'tty-term.c')
-rw-r--r--tty-term.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/tty-term.c b/tty-term.c
index b43fe06e..def0feec 100644
--- a/tty-term.c
+++ b/tty-term.c
@@ -419,7 +419,8 @@ tty_term_find(char *name, int fd, char **cause)
const struct tty_term_code_entry *ent;
struct tty_code *code;
struct options_entry *o;
- u_int size, i;
+ struct options_array_item *a;
+ u_int i;
int n, error;
const char *s, *acs;
@@ -494,12 +495,12 @@ tty_term_find(char *name, int fd, char **cause)
/* Apply terminal overrides. */
o = options_get_only(global_options, "terminal-overrides");
- if (options_array_size(o, &size) != -1) {
- for (i = 0; i < size; i++) {
- s = options_array_get(o, i);
- if (s != NULL)
- tty_term_override(term, s);
- }
+ a = options_array_first(o);
+ while (a != NULL) {
+ s = options_array_item_value(a);
+ if (s != NULL)
+ tty_term_override(term, s);
+ a = options_array_next(a);
}
/* Delete curses data. */