summaryrefslogtreecommitdiff
path: root/includes/vendor.h
diff options
context:
space:
mode:
Diffstat (limited to 'includes/vendor.h')
-rw-r--r--includes/vendor.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/includes/vendor.h b/includes/vendor.h
index 683e7d8a..f7d02998 100644
--- a/includes/vendor.h
+++ b/includes/vendor.h
@@ -18,16 +18,30 @@
#ifndef __VENDOR_H__
#define __VENDOR_H__
+#include "gg_slist.h"
-typedef struct _Vendor Vendor;
-struct _Vendor {
+typedef GSList* vendor_list;
+#define vendor_list_append(vl, v) g_slist_append(vl, (Vendor*)v)
+#define vendor_list_concat(vl, ext) g_slist_concat(vl, ext)
+vendor_list vendor_list_concat_va(int count, vendor_list vl, ...); /* count = -1 for NULL terminated list */
+#define vendor_list_free(vl) g_slist_free(vl)
+#define vendor_list_remove_duplicates(vl) gg_slist_remove_duplicates(vl)
+vendor_list vendor_list_remove_duplicates_deep(vendor_list vl);
+
+typedef struct {
char *match_string;
- int match_case; /* 0 = ignore case, 1 = match case */
+ int match_rule; /* 0 = ignore case, 1 = match case, 2 = exact */
char *name;
char *name_short;
char *url;
char *url_support;
-};
+ char *wikipedia; /* wikipedia page title (assumes en:, otherwise include langauge), usually more informative than the vendor's page */
+ char *note; /* a short stored comment */
+ char *ansi_color;
+
+ unsigned long file_line;
+ unsigned long ms_length;
+} Vendor;
void vendor_init(void);
void vendor_cleanup(void);
@@ -39,4 +53,6 @@ gchar *vendor_get_link(const gchar *id_str);
gchar *vendor_get_link_from_vendor(const Vendor *v);
void vendor_free(Vendor *v);
+vendor_list vendors_match_core(const gchar *str, int limit);
+
#endif /* __VENDOR_H__ */