From 33beeade29f74dc1040bd8ce91cf3acbec2f71f3 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 9 Nov 2011 10:33:04 +0100 Subject: [PATCH] add isl_ctx_parse_options Signed-off-by: Sven Verdoolaege --- include/isl/ctx.h | 1 + isl_ctx.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/isl/ctx.h b/include/isl/ctx.h index d507066d..71555771 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 21108bfb..43544caf 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); +} -- 2.11.4.GIT