X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cat.c;h=631314205923f2c71a0975dfa3dcbbb2d31780db;hb=63fb8a7f484648c3caa25351c8c94ac2395ec563;hp=f278e9c5af460d1b9bb942c2164d6e6ec0c3ef3a;hpb=f3c292bf31fbb13ce50a8877ee71910897276a24;p=platform%2Fupstream%2Fisl.git diff --git a/cat.c b/cat.c index f278e9c..6313142 100644 --- a/cat.c +++ b/cat.c @@ -2,6 +2,7 @@ #include #include #include +#include struct isl_arg_choice cat_format[] = { {"isl", ISL_FORMAT_ISL}, @@ -17,14 +18,13 @@ struct cat_options { unsigned format; }; -struct isl_arg cat_options_arg[] = { -ISL_ARG_CHILD(struct cat_options, isl, "isl", isl_options_arg, "isl options") +ISL_ARGS_START(struct cat_options, cat_options_args) +ISL_ARG_CHILD(struct cat_options, isl, "isl", &isl_options_args, "isl options") ISL_ARG_CHOICE(struct cat_options, format, 0, "format", \ cat_format, ISL_FORMAT_ISL, "output format") -ISL_ARG_END -}; +ISL_ARGS_END -ISL_ARG_DEF(cat_options, struct cat_options, cat_options_arg) +ISL_ARG_DEF(cat_options, struct cat_options, cat_options_args) int main(int argc, char **argv) { @@ -38,7 +38,7 @@ int main(int argc, char **argv) assert(options); argc = cat_options_parse(options, argc, argv, ISL_ARG_ALL); - ctx = isl_ctx_alloc_with_options(cat_options_arg, options); + ctx = isl_ctx_alloc_with_options(&cat_options_args, options); s = isl_stream_new_file(ctx, stdin); obj = isl_stream_read_obj(s);