Debian Codegraph @

modules/template/module.c

raw
1 /* This file is part of GNU Dico.
2 Copyright (C) 2008-2024 Sergey Poznyakoff
3
4 GNU Dico is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option)
7 any later version.
8
9 GNU Dico is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
16
17 #include <config.h>
18 #include <dico.h>
19
20 static int
21 <MODNAME>_init(int argc, char **argv)
22 {
23 /* FIXME */
24 return 1;
25 }
26
27 static dico_handle_t
28 <MODNAME>_init_db(const char *dbname, int argc, char **argv)
29 {
30 /* FIXME */
31 return NULL;
32 }
33
34 static int
35 <MODNAME>_free_db(dico_handle_t hp)
36 {
37 /* FIXME */
38 return 1;
39 }
40
41 static int
42 <MODNAME>_open(dico_handle_t dp)
43 {
44 /* FIXME */
45 return 1;
46 }
47
48 static int
49 <MODNAME>_close(dico_handle_t hp)
50 {
51 /* FIXME */
52 return 1;
53 }
54
55 static char *
56 <MODNAME>_info(dico_handle_t hp)
57 {
58 /* FIXME */
59 return NULL;
60 }
61
62 static char *
63 <MODNAME>_descr(dico_handle_t hp)
64 {
65 /* FIXME */
66 return NULL;
67 }
68
69 int
70 <MODNAME>_lang(dico_handle_t hp, dico_list_t list[2])
71 {
72 /* FIXME */
73 return 1;
74 }
75
76 static dico_result_t
77 <MODNAME>_match(dico_handle_t hp, const dico_strategy_t strat, const char *word)
78 {
79 /* FIXME */
80 return NULL;
81 }
82
83 static dico_result_t
84 <MODNAME>_define(dico_handle_t hp, const char *word)
85 {
86 /* FIXME */
87 return NULL;
88 }
89
90 static int
91 <MODNAME>_output_result (dico_result_t rp, size_t n, dico_stream_t str)
92 {
93 /* FIXME */
94 return 1;
95 }
96
97 static size_t
98 <MODNAME>_result_count (dico_result_t rp)
99 {
100 /* FIXME */
101 return 0;
102 }
103
104 static size_t
105 <MODNAME>_compare_count (dico_result_t rp)
106 {
107 /* FIXME */
108 return 0;
109 }
110
111 static void
112 <MODNAME>_free_result(dico_result_t rp)
113 {
114 /* FIXME */
115 }
116
117 static int
118 <MODNAME>_result_headers(dico_result_t rp, dico_assoc_list_t hdr)
119 {
120 /* FIXME */
121 return 0;
122 }
123
124 static int
125 <MODNAME>_run_test(int argc, char **argv)
126 {
127 /* FIXME */
128 return 1;
129 }
130
131 char *
132 <MODNAME>_db_mime_header(dico_handle_t hp)
133 {
134 /* FIXME */
135 return NULL;
136 }
137
138 struct dico_database_module DICO_EXPORT(<MODNAME>, module) = {
139 .dico_version = DICO_MODULE_VERSION,
140 .dico_capabilities = DICO_CAPA_NONE,
141 .dico_init = <MODNAME>_init,
142 .dico_init_db = <MODNAME>_init_db,
143 .dico_free_db = <MODNAME>_free_db,
144 .dico_open = <MODNAME>_open,
145 .dico_close = <MODNAME>_close,
146 .dico_db_info = <MODNAME>_info,
147 .dico_db_descr = <MODNAME>_descr,
148 .dico_db_lang = <MODNAME>_lang,
149 .dico_match = <MODNAME>_match,
150 .dico_define = <MODNAME>_define,
151 .dico_output_result = <MODNAME>_output_result,
152 .dico_result_count = <MODNAME>_result_count,
153 .dico_compare_count = <MODNAME>_compare_count,
154 .dico_free_result = <MODNAME>_free_result,
155 .dico_result_headers = <MODNAME>_result_headers,
156 .dico_run_test = <MODNAME>_run_test,
157 .dico_db_mime_header = <MODNAME>_db_mime_header
158 };