spellcheck.h revision 1.1.1.1.4.2 1 1.1.1.1.4.2 christos /* Find near-matches for strings and identifiers.
2 1.1.1.1.4.2 christos Copyright (C) 2015-2016 Free Software Foundation, Inc.
3 1.1.1.1.4.2 christos
4 1.1.1.1.4.2 christos This file is part of GCC.
5 1.1.1.1.4.2 christos
6 1.1.1.1.4.2 christos GCC is free software; you can redistribute it and/or modify it under
7 1.1.1.1.4.2 christos the terms of the GNU General Public License as published by the Free
8 1.1.1.1.4.2 christos Software Foundation; either version 3, or (at your option) any later
9 1.1.1.1.4.2 christos version.
10 1.1.1.1.4.2 christos
11 1.1.1.1.4.2 christos GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 1.1.1.1.4.2 christos WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 1.1.1.1.4.2 christos FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 1.1.1.1.4.2 christos for more details.
15 1.1.1.1.4.2 christos
16 1.1.1.1.4.2 christos You should have received a copy of the GNU General Public License
17 1.1.1.1.4.2 christos along with GCC; see the file COPYING3. If not see
18 1.1.1.1.4.2 christos <http://www.gnu.org/licenses/>. */
19 1.1.1.1.4.2 christos
20 1.1.1.1.4.2 christos #ifndef GCC_SPELLCHECK_H
21 1.1.1.1.4.2 christos #define GCC_SPELLCHECK_H
22 1.1.1.1.4.2 christos
23 1.1.1.1.4.2 christos typedef unsigned int edit_distance_t;
24 1.1.1.1.4.2 christos const edit_distance_t MAX_EDIT_DISTANCE = UINT_MAX;
25 1.1.1.1.4.2 christos
26 1.1.1.1.4.2 christos /* spellcheck.c */
27 1.1.1.1.4.2 christos extern edit_distance_t
28 1.1.1.1.4.2 christos levenshtein_distance (const char *s, int len_s,
29 1.1.1.1.4.2 christos const char *t, int len_t);
30 1.1.1.1.4.2 christos
31 1.1.1.1.4.2 christos extern edit_distance_t
32 1.1.1.1.4.2 christos levenshtein_distance (const char *s, const char *t);
33 1.1.1.1.4.2 christos
34 1.1.1.1.4.2 christos extern const char *
35 1.1.1.1.4.2 christos find_closest_string (const char *target,
36 1.1.1.1.4.2 christos const auto_vec<const char *> *candidates);
37 1.1.1.1.4.2 christos
38 1.1.1.1.4.2 christos /* spellcheck-tree.c */
39 1.1.1.1.4.2 christos
40 1.1.1.1.4.2 christos extern edit_distance_t
41 1.1.1.1.4.2 christos levenshtein_distance (tree ident_s, tree ident_t);
42 1.1.1.1.4.2 christos
43 1.1.1.1.4.2 christos extern tree
44 1.1.1.1.4.2 christos find_closest_identifier (tree target, const auto_vec<tree> *candidates);
45 1.1.1.1.4.2 christos
46 1.1.1.1.4.2 christos #endif /* GCC_SPELLCHECK_H */
47