From 41b2c29a6c516ea6027c7ca6b14351d51cdf7643 Mon Sep 17 00:00:00 2001 From: Burt P Date: Tue, 29 May 2018 17:38:04 -0500 Subject: vendor.c: add some data fields and cleanup * Initialize strings to empty in `read_from_vendor_ids()` * vendor.ids format reader clears all fields at `name` * Added `name_short`, and `url_support` fields * `vendor_cleanup()` function that frees `vendor_list` * `vendor_match()` returns the whole `Vendor` data structure Signed-off-by: Burt P --- includes/vendor.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/vendor.h b/includes/vendor.h index 021f4e78..9fe1f995 100644 --- a/includes/vendor.h +++ b/includes/vendor.h @@ -24,11 +24,16 @@ struct _Vendor { char *match_string; int match_case; /* 0 = ignore case, 1 = match case */ char *name; + char *name_short; char *url; + char *url_support; }; -void vendor_init(void); +void vendor_init(void); +void vendor_cleanup(void); +const Vendor *vendor_match(const gchar *id_str, ...); /* end list of strings with NULL */ const gchar *vendor_get_name(const gchar *id_str); const gchar *vendor_get_url(const gchar *id_str); +void vendor_free(Vendor *v); #endif /* __VENDOR_H__ */ -- cgit v1.2.3