summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/options.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-09-21 14:56:03 +0000
committernicm <nicm@openbsd.org>2009-09-21 14:56:03 +0000
commit46de3b8a2e4a7fc0ce7f4d321a78aa9faaec9f2f (patch)
tree99b0af7de556cadbb2d9dfce3538bb5cefc741f0 /usr.bin/tmux/options.c
parentMove common code from show-options and show-window-options into a function. (diff)
downloadwireguard-openbsd-46de3b8a2e4a7fc0ce7f4d321a78aa9faaec9f2f.tar.xz
wireguard-openbsd-46de3b8a2e4a7fc0ce7f4d321a78aa9faaec9f2f.zip
Use option print function for info messages as well.
Diffstat (limited to 'usr.bin/tmux/options.c')
-rw-r--r--usr.bin/tmux/options.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/tmux/options.c b/usr.bin/tmux/options.c
index b037a49befc..055745b9edb 100644
--- a/usr.bin/tmux/options.c
+++ b/usr.bin/tmux/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.3 2009/09/21 07:00:09 nicm Exp $ */
+/* $OpenBSD: options.c,v 1.4 2009/09/21 14:56:03 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -98,7 +98,7 @@ options_remove(struct options *oo, const char *name)
xfree(o);
}
-void printflike3
+struct options_entry *printflike3
options_set_string(struct options *oo, const char *name, const char *fmt, ...)
{
struct options_entry *o;
@@ -115,6 +115,7 @@ options_set_string(struct options *oo, const char *name, const char *fmt, ...)
o->type = OPTIONS_STRING;
xvasprintf(&o->str, fmt, ap);
va_end(ap);
+ return (o);
}
char *
@@ -129,7 +130,7 @@ options_get_string(struct options *oo, const char *name)
return (o->str);
}
-void
+struct options_entry *
options_set_number(struct options *oo, const char *name, long long value)
{
struct options_entry *o;
@@ -143,7 +144,7 @@ options_set_number(struct options *oo, const char *name, long long value)
o->type = OPTIONS_NUMBER;
o->num = value;
-
+ return (o);
}
long long