dkstt.h File Reference

String tables. More...

#include <dk.h>
#include <dktypes.h>

Go to the source code of this file.

Functions

dk_stt_tdkstt_open (dk_stream_t *st)
 Read string table from stream.
void dkstt_close (dk_stt_t *s)
 Close string table release memory.
char * dkstt_find (dk_stt_t *s, char *k, char *d)
 Retrieve string table entry.


Detailed Description

String tables.

This modules provides functions to deal with string tables.


Function Documentation

void dkstt_close ( dk_stt_t s  ) 

Close string table release memory.

Parameters:
s String table to close.

char* dkstt_find ( dk_stt_t s,
char *  k,
char *  d 
)

Retrieve string table entry.

The function returns a pointer to the found string (in memory managed by the string table structure) or d.

Parameters:
s String table.
k Entry name to search for.
d Result to return if the string is not found.
Returns:
Pointer to string or d.

dk_stt_t* dkstt_open ( dk_stream_t st  ) 

Read string table from stream.

Parameters:
st Stream to read string table from.
Returns:
Pointer to new string table on success, NULL on error. On success the function returns a pointer to a string table structure in dynamically allocated memory, use dkstt_close() to release the memory.


Generated on Mon Feb 16 17:12:05 2009 for dklibs by  doxygen 1.5.6