diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-09-22 13:59:46 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-09-22 13:59:46 +0000 |
commit | 59e65cbda27e49b90aab48d13aa8036303cd6679 (patch) | |
tree | a1c2ee3a3eaac1ced524089e32f1dbfb0fd5c421 /options.c | |
parent | 649b7c132d3a83cc7e67742d38d9e74c5cfae9ac (diff) | |
download | rtmux-59e65cbda27e49b90aab48d13aa8036303cd6679.tar.gz rtmux-59e65cbda27e49b90aab48d13aa8036303cd6679.tar.bz2 rtmux-59e65cbda27e49b90aab48d13aa8036303cd6679.zip |
Sync OpenBSD patchset 340:
Use option print function for info messages as well.
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: options.c,v 1.7 2009-09-22 13:49:13 tcunha Exp $ */ +/* $Id: options.c,v 1.8 2009-09-22 13:59:46 tcunha 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 |