Logo Search packages:      
Sourcecode: cmus version File versions  Download package

keyval.h

#ifndef KEYVAL_H
#define KEYVAL_H

00004 struct keyval {
      char *key;
      char *val;
};

00009 struct growing_keyvals {
      struct keyval *keyvals;
      int alloc;
      int count;
};

#define GROWING_KEYVALS(name) struct growing_keyvals name = { NULL, 0, 0 }

void keyvals_init(struct growing_keyvals *c, const struct keyval *keyvals);
void keyvals_add(struct growing_keyvals *c, const char *key, char *val);
const char *keyvals_get_val_growing(const struct growing_keyvals *c, const char *key);
void keyvals_terminate(struct growing_keyvals *c);
void keyvals_free(struct keyval *keyvals);
struct keyval *keyvals_dup(const struct keyval *keyvals);
const char *keyvals_get_val(const struct keyval *keyvals, const char *key);

#endif

Generated by  Doxygen 1.6.0   Back to index