add isl_ctx_parse_options
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 9 Nov 2011 09:33:04 +0000 (10:33 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 13 Nov 2011 16:49:51 +0000 (17:49 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
include/isl/ctx.h
isl_ctx.c

index d507066..7155577 100644 (file)
@@ -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);
index 21108bf..43544ca 100644 (file)
--- 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);
+}