source: subversion/applications/utils/export/osm2pgsql/keyvals.h @ 15118

Last change on this file since 15118 was 14843, checked in by tomhughes, 11 years ago

Initial work on generating a gazetteer database.

File size: 1012 bytes
Line 
1/* Common key-value list processing
2 *
3 * Used as a small general purpose store for
4 * tags, segment lists etc
5 *
6 */
7
8#ifndef KEYVAL_H
9#define KEYVAL_H
10
11struct keyval {
12    char *key;
13    char *value;
14    struct keyval *next;
15    struct keyval *prev;
16};
17
18void initList(struct keyval *head);
19void freeItem(struct keyval *p);
20unsigned int countList(struct keyval *head);
21int listHasData(struct keyval *head);
22char *getItem(struct keyval *head, const char *name);
23struct keyval *firstItem(struct keyval *head);
24struct keyval *nextItem(struct keyval *head, struct keyval *item);
25struct keyval *popItem(struct keyval *head);
26void pushItem(struct keyval *head, struct keyval *item);
27int addItem(struct keyval *head, const char *name, const char *value, int noDupe);
28void resetList(struct keyval *head);
29struct keyval *getMatches(struct keyval *head, const char *name);
30void updateItem(struct keyval *head, const char *name, const char *value);
31void cloneList( struct keyval *target, struct keyval *source );
32#endif
Note: See TracBrowser for help on using the repository browser.