mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
initial commit: wip
This commit is contained in:
commit
8bf8a398b9
30 changed files with 2921 additions and 0 deletions
23
tag.h
Normal file
23
tag.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
struct tag {
|
||||
void *private;
|
||||
|
||||
void (*destroy)(struct tag *tag);
|
||||
const char *(*name)(const struct tag *tag);
|
||||
const char *(*value)(const struct tag *tag);
|
||||
};
|
||||
|
||||
struct tag_set {
|
||||
struct tag **tags;
|
||||
size_t count;
|
||||
};
|
||||
|
||||
struct tag *tag_new_int(const char *name, long value);
|
||||
struct tag *tag_new_float(const char *name, double value);
|
||||
struct tag *tag_new_string(const char *name, const char *value);
|
||||
|
||||
const struct tag *tag_for_name(const struct tag_set *set, const char *name);
|
||||
void tag_set_destroy(struct tag_set *set);
|
Loading…
Add table
Add a link
Reference in a new issue