mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-25 20:16:14 -05:00
Add trimwhitespace(), keyval sorting and alloc to misc functions
- features required by the LastFM module
This commit is contained in:
10
src/misc.h
10
src/misc.h
@@ -12,6 +12,7 @@ struct onekeyval {
|
||||
char *value;
|
||||
|
||||
struct onekeyval *next;
|
||||
struct onekeyval *sort;
|
||||
};
|
||||
|
||||
struct keyval {
|
||||
@@ -40,6 +41,9 @@ safe_hextou64(const char *str, uint64_t *val);
|
||||
|
||||
|
||||
/* Key/value functions */
|
||||
struct keyval *
|
||||
keyval_alloc(void);
|
||||
|
||||
int
|
||||
keyval_add(struct keyval *kv, const char *name, const char *value);
|
||||
|
||||
@@ -55,6 +59,9 @@ keyval_get(struct keyval *kv, const char *name);
|
||||
void
|
||||
keyval_clear(struct keyval *kv);
|
||||
|
||||
void
|
||||
keyval_sort(struct keyval *kv);
|
||||
|
||||
|
||||
char *
|
||||
m_realpath(const char *pathname);
|
||||
@@ -62,6 +69,9 @@ m_realpath(const char *pathname);
|
||||
char *
|
||||
unicode_fixup_string(char *str);
|
||||
|
||||
char *
|
||||
trimwhitespace(const char *str);
|
||||
|
||||
uint32_t
|
||||
djb_hash(void *data, size_t len);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user