Skip to content

Commit

Permalink
Refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
cilibrar committed Aug 21, 2004
1 parent f44ec6e commit a34781c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/stringtable.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include <stringtable.h>

21 changes: 21 additions & 0 deletions src/stringtable.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#ifndef __STRINGTABLE_H
#define __STRINGTABLE_H

#include <stdio.h>

struct StringTable;

#define ERR_NOSTRING 1
#define ERR_INVALID 2
#define ERR_TABLEFULL 3

typedef void (*StringTableIterator)
(struct StringTable *st, const char *key, void *val, void *udata);
struct StringTable *newStringTable(void);
int putString(struct StringTable *st, const char *key, void *val);
int delString(struct StringTable *st, const char *key);
void *findString(struct StringTable *st, const char *key);
void allStrings(struct StringTable *st, StringTableIterator sti, void *udata);
void freeStringTable(struct StringTable *st);

#endif

0 comments on commit a34781c

Please sign in to comment.