source: subversion/applications/utils/planetdiff/keyvals.h @ 30195

Last change on this file since 30195 was 2406, checked in by jonb, 12 years ago

planetdiff & planetpatch tool - Allows incremental planet.osm updates using a custom XML diff format

File size: 694 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 *popItem(struct keyval *head);
24void pushItem(struct keyval *head, struct keyval *item);
25int addItem(struct keyval *head, const char *name, const char *value, int noDupe);
26void resetList(struct keyval *head);
27
28#endif
Note: See TracBrowser for help on using the repository browser.