File:  [Tom Morton FrontierVM] / frontvm / as68k / dict.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:57:15 2018 UTC (8 years, 3 months ago) by root
Branches: frontvm, MAIN
CVS tags: frontvm3-20060623, frontvm3-20060613, frontvm2-20061120, frontvm-20040517, HEAD
Tom Morton


#ifndef __DICT_H
#define __DICT_H

typedef struct Dict Dict;

struct Node {
	struct Node *parent;
	struct Node *child[2];
	char balance; /* +ve for right */
	char *key;
	void *obj;
};

struct Dict {
	struct Node *root;
	int len;
};

void dict_init (struct Dict *tree);
void dict_free (struct Dict *tree);
struct Node *dict_get (struct Dict *tree, const char *key);
void dict_remove (struct Dict *tree, const char *key);
int dict_set (struct Dict *tree, const char *key, void *obj);

#endif /* __DICT_H */


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.