From be53d7f298bb81297ff0d186f9ddb585a2e57198 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 18 Jun 2008 20:11:25 +0000 Subject: More Sun OS crap. --- cmd-set-window-option.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'cmd-set-window-option.c') diff --git a/cmd-set-window-option.c b/cmd-set-window-option.c index f762c117..0565d892 100644 --- a/cmd-set-window-option.c +++ b/cmd-set-window-option.c @@ -1,4 +1,4 @@ -/* $Id: cmd-set-window-option.c,v 1.8 2008-06-16 17:35:40 nicm Exp $ */ +/* $Id: cmd-set-window-option.c,v 1.9 2008-06-18 20:11:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -101,7 +101,7 @@ cmd_set_window_option_exec(struct cmd *self, struct cmd_ctx *ctx) struct winlink *wl; struct session *s; const char *errstr; - int number, bool; + int number, flag; u_int i; if (data == NULL) @@ -120,26 +120,26 @@ cmd_set_window_option_exec(struct cmd *self, struct cmd_ctx *ctx) if (data->value != NULL) { number = strtonum(data->value, 0, INT_MAX, &errstr); - bool = -1; + flag = -1; if (number == 1 || strcasecmp(data->value, "on") == 0 || strcasecmp(data->value, "yes") == 0) - bool = 1; + flag = 1; else if (number == 0 || strcasecmp(data->value, "off") == 0 || strcasecmp(data->value, "no") == 0) - bool = 0; + flag = 0; } else - bool = -2; + flag = -2; if (strcmp(data->option, "monitor-activity") == 0) { - if (bool == -1) { + if (flag == -1) { ctx->error(ctx, "bad value: %s", data->value); return; } - if (bool == -2) + if (flag == -2) wl->window->flags ^= WINDOW_MONITOR; else { - if (bool) + if (flag) wl->window->flags |= WINDOW_MONITOR; else wl->window->flags &= ~WINDOW_MONITOR; @@ -159,15 +159,15 @@ cmd_set_window_option_exec(struct cmd *self, struct cmd_ctx *ctx) session_alert_cancel(s, wl); } } else if (strcmp(data->option, "aggressive-resize") == 0) { - if (bool == -1) { + if (flag == -1) { ctx->error(ctx, "bad value: %s", data->value); return; } - if (bool == -2) + if (flag == -2) wl->window->flags ^= WINDOW_AGGRESSIVE; else { - if (bool) + if (flag) wl->window->flags |= WINDOW_AGGRESSIVE; else wl->window->flags &= ~WINDOW_AGGRESSIVE; -- cgit v1.2.3