diff options
| author | Federico Angelilli <code@fedang.net> | 2024-07-12 13:33:28 +0200 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-07-12 13:33:28 +0200 |
| commit | e98943f9eb5cea2921969501e52e8c319323ed4c (patch) | |
| tree | f7879c77e85d4cdea19c53bef2d1ae3dc192c20c /src/util.c | |
| parent | e45c7bc6b41fbcea84ca51d01b8661f93145ce7a (diff) | |
Start working on special sections
Diffstat (limited to 'src/util.c')
| -rw-r--r-- | src/util.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -5,6 +5,18 @@ #include "util.h" +void pair_copy(pair_t *copy, const pair_t *pair) +{ + copy->key = strcopy(pair->key); + copy->value = strcopy(pair->value); +} + +void pair_free(pair_t *pair) +{ + free(pair->key); + free(pair->value); +} + char *color_to_string(color_t *color) { unsigned int r = color->r * 255, |
