From: Sven Verdoolaege Date: Wed, 9 Nov 2011 09:33:04 +0000 (+0100) Subject: add isl_ctx_parse_options X-Git-Tag: isl-0.09~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33beeade29f74dc1040bd8ce91cf3acbec2f71f3;p=platform%2Fupstream%2Fisl.git add isl_ctx_parse_options Signed-off-by: Sven Verdoolaege --- diff --git a/include/isl/ctx.h b/include/isl/ctx.h index d507066..7155577 100644 --- a/include/isl/ctx.h +++ b/include/isl/ctx.h @@ -142,6 +142,7 @@ struct isl_options *isl_ctx_options(isl_ctx *ctx); isl_ctx *isl_ctx_alloc_with_options(struct isl_arg *arg, __isl_take void *opt); isl_ctx *isl_ctx_alloc(void); void *isl_ctx_peek_options(isl_ctx *ctx, struct isl_arg *arg); +int isl_ctx_parse_options(isl_ctx *ctx, int argc, char **argv, unsigned flags); void isl_ctx_ref(struct isl_ctx *ctx); void isl_ctx_deref(struct isl_ctx *ctx); void isl_ctx_free(isl_ctx *ctx); diff --git a/isl_ctx.c b/isl_ctx.c index 21108bf..43544ca 100644 --- a/isl_ctx.c +++ b/isl_ctx.c @@ -184,3 +184,10 @@ int isl_ctx_aborted(isl_ctx *ctx) { return ctx ? ctx->abort : -1; } + +int isl_ctx_parse_options(isl_ctx *ctx, int argc, char **argv, unsigned flags) +{ + if (!ctx) + return -1; + return isl_arg_parse(ctx->user_arg, argc, argv, ctx->user_opt, flags); +}