summaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-09-21 14:56:03 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-09-21 14:56:03 +0000
commit6b37b2d79d2fcf3af4d086272facebb0bb9c2df2 (patch)
treed3c8208ddb54fff7fdf3a801c94701deefa8f833 /options.c
parente3c3d746f7e78e5327627bed665a98e72d874774 (diff)
Use option print function for info messages as well.
Diffstat (limited to 'options.c')
-rw-r--r--options.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/options.c b/options.c
index 90d9c88e..6ee4bf1d 100644
--- a/options.c
+++ b/options.c
@@ -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