diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-12 13:51:44 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-12 13:51:44 +0000 |
commit | 514d6fa1ec60563318c67806334c3b8d97c95b02 (patch) | |
tree | 9cef972ede33ea4639442b467753720f49f650ab /cmd-set-option.c | |
parent | f3404ee9229ae3acab973b93ca7a20eddd593c7f (diff) | |
download | rtmux-514d6fa1ec60563318c67806334c3b8d97c95b02.tar.gz rtmux-514d6fa1ec60563318c67806334c3b8d97c95b02.tar.bz2 rtmux-514d6fa1ec60563318c67806334c3b8d97c95b02.zip |
Accept colours as strings.
Diffstat (limited to 'cmd-set-option.c')
-rw-r--r-- | cmd-set-option.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd-set-option.c b/cmd-set-option.c index a3a12fb8..4c776ab9 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -1,4 +1,4 @@ -/* $Id: cmd-set-option.c,v 1.6 2007-10-12 12:11:40 nicm Exp $ */ +/* $Id: cmd-set-option.c,v 1.7 2007-10-12 13:51:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -139,7 +139,8 @@ cmd_set_option_exec(void *ptr, unused struct cmd_ctx *ctx) ctx->error(ctx, "invalid value"); return; } - if (errstr != NULL || number > 7) { + number = screen_stringcolour(data->value); + if (number > 8) { ctx->error(ctx, "bad colour: %s", data->value); return; } @@ -157,7 +158,8 @@ cmd_set_option_exec(void *ptr, unused struct cmd_ctx *ctx) ctx->error(ctx, "invalid value"); return; } - if (errstr != NULL || number > 7) { + number = screen_stringcolour(data->value); + if (number > 8) { ctx->error(ctx, "bad colour: %s", data->value); return; } |