summaryrefslogtreecommitdiff
path: root/support/dktools/dk4dbit.c
blob: 3598788868c42462f67f14b62950a61525499a54 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
Copyright (C) 2015-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: dk4dbit.ctr
*/

/**	@file dk4dbit.c The dk4dbit module.
*/


#line 172 "dk4dbit.ctr"

#include "dk4conf.h"

#include "dk4dbit8.h"
#include "dk4dbitw.h"
#include "dk4dbit.h"






#line 183 "dk4dbit.ctr"


int
dk4dbi_text_set(
  dk4_dbi_t	*db,
  const dkChar	*k,
  const dkChar	*v,
  dk4_er_t	*erp
)
{
#if DK4_CHAR_SIZE > 1
  return (dk4dbi_wc_set(db, k, v, erp));
#else
  return (dk4dbi_c8_set(db, k, v, erp));
#endif
}



int
dk4dbi_text_get(
  dk4_dbi_t	*db,
  const dkChar	*k,
  dkChar	*vbuf,
  size_t	 vsz,
  dk4_er_t	*erp
)
{
#if DK4_CHAR_SIZE > 1
  return (dk4dbi_wc_get(db, k, vbuf, vsz, erp));
#else
  return (dk4dbi_c8_get(db, k, vbuf, vsz, erp));
#endif
}



int
dk4dbi_text_del(
  dk4_dbi_t	*db,
  const dkChar	*k,
  dk4_er_t	*erp
)
{
#if DK4_CHAR_SIZE > 1
  return (dk4dbi_wc_del(db, k, erp));
#else
  return (dk4dbi_c8_del(db, k, erp));
#endif
}



int
dk4dbi_text_traverse(
  dk4_dbi_t			*db,
  void				*obj,
  dk4dbi_text_traverse_fct	*fct
)
{
#if DK4_CHAR_SIZE > 1
  return (dk4dbi_wc_traverse(db, obj, fct));
#else
  return (dk4dbi_c8_traverse(db, obj, fct));
#endif
}