diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-19 23:20:45 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-19 23:20:45 +0000 |
commit | a1db273dc21ba28bbc5b578bd5c20e28a8b1a370 (patch) | |
tree | e031d498ff8c866c0fef5aca0921eb6d99aaf941 /cmd-set-option.c | |
parent | 7cebf4768b90bd004eadcec4eb7ff67d6868183f (diff) | |
download | rtmux-a1db273dc21ba28bbc5b578bd5c20e28a8b1a370.tar.gz rtmux-a1db273dc21ba28bbc5b578bd5c20e28a8b1a370.tar.bz2 rtmux-a1db273dc21ba28bbc5b578bd5c20e28a8b1a370.zip |
display-time option to set message display time.
Diffstat (limited to 'cmd-set-option.c')
-rw-r--r-- | cmd-set-option.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/cmd-set-option.c b/cmd-set-option.c index 1cbd85aa..b4b9ece0 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -1,4 +1,4 @@ -/* $Id: cmd-set-option.c,v 1.32 2008-06-19 22:04:02 nicm Exp $ */ +/* $Id: cmd-set-option.c,v 1.33 2008-06-19 23:20:45 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -236,6 +236,20 @@ cmd_set_option_exec(struct cmd *self, unused struct cmd_ctx *ctx) return; } options_set_number(oo, "history-limit", number); + } else if (strcmp(data->option, "display-time") == 0) { + if (data->value == NULL || number == -1) { + ctx->error(ctx, "invalid value"); + return; + } + if (errstr != NULL) { + ctx->error(ctx, "display-time %s", errstr); + return; + } + if (number > INT_MAX) { + ctx->error(ctx, "display-time too big: %u", number); + return; + } + options_set_number(oo, "display-time", number); } else if (strcmp(data->option, "status-left") == 0) { if (data->value == NULL) { ctx->error(ctx, "invalid value"); |