Enchant: enchant-2.6.5/src/pwl.h Source File

Enchant Generic spell checking library

pwl.h
1 /* enchant
2 * Copyright (C) 2003 Dom Lachowicz
3 * Copyright (C) 2016-2023 Reuben Thomas
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along along with this program; if not, see
17 * <https://www.gnu.org/licenses/>.
18 *
19 * In addition, as a special exception, the copyright holders
20 * give permission to link the code of this program with
21 * non-LGPL Spelling Provider libraries (eg: a MSFT Office
22 * spell checker backend) and distribute linked combinations including
23 * the two. You must obey the GNU Lesser General Public License in all
24 * respects for all of the code used other than said providers. If you modify
25 * this file, you may extend this exception to your version of the
26 * file, but you are not obligated to do so. If you do not wish to
27 * do so, delete this exception statement from your version.
28 */
29
30 #ifndef PWL_H
31 #define PWL_H
32
33 #include "enchant.h"
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 typedef struct str_enchant_pwl EnchantPWL;
40
41 /* Create and initialise a new, empty PWL */
42 EnchantPWL* enchant_pwl_init(void);
43 EnchantPWL* enchant_pwl_init_with_file(const char * file);
44
45 void enchant_pwl_add(EnchantPWL * me, const char *const word, ssize_t len);
46 void enchant_pwl_remove(EnchantPWL * me, const char *const word, ssize_t len);
47 int enchant_pwl_check(EnchantPWL * me, const char *const word, ssize_t len);
48 void enchant_pwl_free(EnchantPWL* me);
49
50 #ifdef __cplusplus
51 }
52 #endif
53
54 #endif /* PWL_H */
str_enchant_pwl
Definition: pwl.c:56