1.1 --- a/razor.c Wed Jun 04 20:53:17 2008 -0400
1.2 +++ b/razor.c Sun Jun 08 17:11:41 2008 -0400
1.3 @@ -63,6 +63,8 @@
1.4 struct razor_package {
1.5 uint name : 24;
1.6 uint flags : 8;
1.7 + uint32_t summary;
1.8 + uint32_t description;
1.9 uint32_t version;
1.10 uint32_t arch;
1.11 struct list_head properties;
1.12 @@ -328,6 +330,15 @@
1.13 }
1.14
1.15 void
1.16 +razor_importer_add_details(struct razor_importer *importer,
1.17 + const char *summary,
1.18 + const char *description)
1.19 +{
1.20 + importer->package->summary = hashtable_tokenize(&importer->table, summary);
1.21 + importer->package->description = hashtable_tokenize(&importer->table, description);
1.22 +}
1.23 +
1.24 +void
1.25 razor_importer_add_property(struct razor_importer *importer,
1.26 const char *name,
1.27 enum razor_version_relation relation,
1.28 @@ -910,6 +921,20 @@
1.29 return p;
1.30 }
1.31
1.32 +const char *
1.33 +razor_package_get_summary(struct razor_set *set, struct razor_package *package)
1.34 +{
1.35 + const char *pool = set->string_pool.data;
1.36 + return &pool[package->summary];
1.37 +}
1.38 +
1.39 +const char *
1.40 +razor_package_get_description(struct razor_set *set, struct razor_package *package)
1.41 +{
1.42 + const char *pool = set->string_pool.data;
1.43 + return &pool[package->description];
1.44 +}
1.45 +
1.46 struct razor_property_iterator {
1.47 struct razor_set *set;
1.48 struct razor_property *property, *end;