sort provider list on "name"
commitba44b876ad572f2861114a0ba01124c6611a9da8
authorJim Meyering <meyering@redhat.com>
Tue, 18 Jan 2011 12:05:20 +0000 (18 13:05 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 8 Feb 2011 11:14:01 +0000 (8 12:14 +0100)
treec6269d1073ba65368bb2003884c45ce0bd6fcb94
parent33dea68259d6ea08253163373f4c36400f6535ca
sort provider list on "name"

* rest.c: Sort provider list output on name:
(struct plist): Define.
(prov_get, prov_name_compare): New functions.
(prov_list_generator): Rather than emitting provider XML/JSON
in arbitrary (hash-traversal) order, first gather an array of
provider_t* pointers, sort them, and *then* emit listing.
* t/init.cfg (emit_provider_list_prefix): New helper.
(emit_provider_list_suffix): Likewise.
(emit_trivial_provider_list): Renamed from emit_provider.
(emit_provider): Emit output for a single provider.
I.e., do not emit prefix and suffix.
* t/basic: s/emit_provider/emit_trivial_provider_list/
* t/provider: Compare full output with expected output,
rather than just grepping for a summary.
This is feasible, now that the provider list is sorted.
rest.c
t/basic
t/init.cfg
t/provider