Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

dictionary.h File Reference

Dictionary data structure with binary search. More...

#include <stdlib.h>

Include dependency graph for dictionary.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  dict_pair
 A dictionary entry, coupling a key to its value. More...

struct  dictionary
 The dictionary itself. More...


Functions

void * dict_lookup (const dictionary *dict, const char *key)
 Look up an entry in a dictionary and return the associated value.


Detailed Description

Dictionary data structure with binary search.

This data structure can associate a string with a void*. You will have to cast elements back to the right type after retrieving them.

Definition in file dictionary.h.


Function Documentation

void* dict_lookup const dictionary   dict,
const char *    key
 

Look up an entry in a dictionary and return the associated value.

Parameters:
dict  Pointer to the dictionary.
key  The key to look up.
Returns:
Pointer to the value associated with key, or NULL if key was not found in the dictionary.

Definition at line 33 of file dictionary.c.


Generated on Sun Feb 16 23:39:59 2003 for FreeLCD by doxygen1.2.18