1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-25 16:16:15 +02:00
wernermisc/qpkg/id.h
Werner Almesberger 64c70e77f4 qpkg: use "val" field of jrb nodes instead of keeping one in "struct id"
- id.h (struct id), id.c (make_id): remove field "value"
- gobble.c (compact_pkg, gobble_buf), prereq.c (list_all_packages,
  list_one_package, find_prereq): use id->jrb->val instead of id->value
2010-11-19 22:02:42 -03:00

32 lines
601 B
C

#ifndef ID_H
#define ID_H
#include <sys/types.h>
#include "jrb.h"
struct id;
struct tree {
int (*comp)(const void *a, const void *b);
struct jrb *root;
};
struct id {
struct jrb *jrb;
const char *s;
size_t len;
};
int comp_id(const void *a, const void *b);
struct tree *make_tree(int (*comp)(const void *a, const void *b));
struct id *make_id(struct tree *tree, const char *s, size_t len);
const struct id *find_id(const struct tree *tree, const char *s, size_t len);
const struct id *first_id(const struct tree *tree);
const struct id *next_id(const struct id *id);
#endif /* !ID_H */