summaryrefslogtreecommitdiff
path: root/support/dktools/dk3kv.h
blob: 373720c5c07a51bd6e9f57c8d7e359ab0b68dcc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
Copyright (C) 2014-2020, Dirk Krause
SPDX-License-Identifier: BSD-3-Clause
*/

/*
	WARNING: This file was generated by the dkct program (see
	http://dktools.sourceforge.net/ for details).
	Changes you make here will be lost if dkct is run again!
	You should modify the original source and run dkct on it.
	Original source: dk3kv.ctr
*/

/**	@file dk3kv.h Header file for the dk3kv module.
*/

#ifndef DK3KV_H_INCLUDED
/** Avoid multiple inclusions. */
#define DK3KV_H_INCLUDED 1


#line 8 "dk3kv.ctr"

#ifdef __cplusplus
extern "C" {
#endif

/**	Compare key value pairs.
	@param	l	Left object.
	@param	r	Right object.
	@param	cr	Comparison criteria (0=object/object, 1=object/string).
	@return	Comparison result
*/
int
dk3kv_compare(void const *l, void const *r, int cr);

/**	Remove key value pair, release memory.
	@param	p	Key value pair to release.
*/
void
dk3kv_delete(dk3_key_value_t *p);

/**	Create new key value pair.
	@param	k	Key.
	@param	v	Value, may be NULL.
	@param	app	Application structure for diagnostics, may be NULL.
	@return	Pointer to new data on success, NULL on error.
*/
dk3_key_value_t *
dk3kv_new_app(dkChar const *k, dkChar const *v, dk3_app_t *app);

#ifdef __cplusplus
}
#endif



#endif