summaryrefslogtreecommitdiff
path: root/plugins/dumb/dumb-kode54/src/core/duhtag.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dumb/dumb-kode54/src/core/duhtag.c')
-rw-r--r--plugins/dumb/dumb-kode54/src/core/duhtag.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/plugins/dumb/dumb-kode54/src/core/duhtag.c b/plugins/dumb/dumb-kode54/src/core/duhtag.c
new file mode 100644
index 00000000..77061094
--- /dev/null
+++ b/plugins/dumb/dumb-kode54/src/core/duhtag.c
@@ -0,0 +1,38 @@
+/* _______ ____ __ ___ ___
+ * \ _ \ \ / \ / \ \ / / ' ' '
+ * | | \ \ | | || | \/ | . .
+ * | | | | | | || ||\ /| |
+ * | | | | | | || || \/ | | ' ' '
+ * | | | | | | || || | | . .
+ * | |_/ / \ \__// || | |
+ * /_______/ynamic \____/niversal /__\ /____\usic /| . . ibliotheque
+ * / \
+ * / . \
+ * duhtag.c - Function to return the tags stored / / \ \
+ * in a DUH struct (typically author | < / \_
+ * information). | \/ /\ /
+ * \_ / > /
+ * By entheh. | \ / /
+ * | ' /
+ * \__/
+ */
+
+#include <string.h>
+
+#include "dumb.h"
+#include "internal/dumb.h"
+
+
+
+const char *duh_get_tag(DUH *duh, const char *key)
+{
+ int i;
+ ASSERT(key);
+ if (!duh || !duh->tag) return NULL;
+
+ for (i = 0; i < duh->n_tags; i++)
+ if (strcmp(key, duh->tag[i][0]) == 0)
+ return duh->tag[i][1];
+
+ return NULL;
+}