source: subversion/applications/utils/planet.osm/C/keyvals.h @ 4729

Last change on this file since 4729 was 4691, checked in by jonb, 12 years ago

planet.c: Clone of planet.rb, runs at about 10 times the speed of the ruby script

File size: 835 bytes
RevLine 
[4691]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);
27struct keyval *getMatches(struct keyval *head, const char *name);
28void updateItem(struct keyval *head, const char *name, const char *value);
29
30#endif
Note: See TracBrowser for help on using the repository browser.