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

Last change on this file since 12445 was 9265, checked in by jonb, 12 years ago

osm2pgsql: Move type definitions to a more appropriate location

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