From ad284c89a719b4ccac2d00e6363e2455d57d6d51 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Thu, 27 Oct 2005 16:00:19 +0000 Subject: fix --- opts.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'opts.c') diff --git a/opts.c b/opts.c index 4495b80..4a70a03 100644 --- a/opts.c +++ b/opts.c @@ -119,3 +119,12 @@ int opt_get_unsigned(const struct opt *o, unsigned *valp) *valp = val; return 0; } + +char *opt_get_string(const struct opt *o) +{ + if (!o->value || !o->value[0]) { + fprintf(stderr, "Missing value for '%s' option\n", o->optname); + return NULL; + } + return o->value; +} -- cgit v1.2.3