diff options
author | Dave Beckett <dave@dajobe.org> | 2010-03-26 20:51:36 -0700 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2010-03-26 20:51:36 -0700 |
commit | 8500b6feb708351dc289d7c27ed4443fe79f2e18 (patch) | |
tree | 57d41da80fbf8bc990d2361d417a11f147d729d9 /utils | |
parent | b6326974332fc30298ae7b851a3306ad811219b1 (diff) | |
download | raptor-8500b6feb708351dc289d7c27ed4443fe79f2e18.tar.gz |
Syntax description replaces serializer enumeration and get desc methods.
(raptor_world_get_serializer_description): Renamed from
raptor_world_enumerate_serializers and now just takes single int
param.
(raptor_serializer_get_description): Added
Updated all serializers to register static descriptions of names,
mime types, label, uris.
Updated rapper utility to use raptor_serializer_get_description() for
listing serializers.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/rapper.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/utils/rapper.c b/utils/rapper.c index ef107ece..f39d059a 100644 --- a/utils/rapper.c +++ b/utils/rapper.c @@ -559,13 +559,11 @@ main(int argc, char *argv[]) program, optarg); fprintf(stderr, "Valid arguments are:\n"); for(i = 0; 1; i++) { - const char *help_name; - const char *help_label; - if(raptor_world_enumerate_serializers(world, i, - &help_name, &help_label, - NULL, NULL)) + const raptor_syntax_description* sd; + sd = raptor_world_get_serializer_description(world, i); + if(!sd) break; - fprintf(stderr, " %-14s for %s\n", help_name, help_label); + fprintf(stderr, " %-14s for %s\n", sd->names[0], sd->label); } usage = 1; break; @@ -701,12 +699,11 @@ main(int argc, char *argv[]) puts(HELP_TEXT("o FORMAT", "output FORMAT", "Set the output format/serializer to one of:")); for(i = 0; 1; i++) { - const char *help_name; - const char *help_label; - if(raptor_world_enumerate_serializers(world, i, &help_name, &help_label, - NULL, NULL)) + const raptor_syntax_description* sd; + sd = raptor_world_get_parser_description(world, i); + if(!sd) break; - printf(" %-14s %s", help_name, help_label); + printf(" %-14s %s", sd->names[0], sd->label); if(!i) puts(" (default)"); else |