File: dict_radix.h

package info (click to toggle)
hspell 1.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,556 kB
  • sloc: ansic: 2,808; perl: 1,989; makefile: 209; sh: 109; awk: 15
file content (24 lines) | stat: -rw-r--r-- 815 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Copyright (C) 2003 Nadav Har'El and Dan Kenigsberg */

#ifndef INCLUDED_RADIX_H
#define INCLUDED_RADIX_H

/* The following structure is opaque for the user - its fields can only
   be accessed by calling functions, and it can only be instantiated as
   a pointer (by calling new_dict_radix).
   This is object-oriented programming in C :)
*/
struct dict_radix;

struct dict_radix *new_dict_radix(void);
void delete_dict_radix(struct dict_radix *dict);
int allocate_nodes(struct dict_radix *dict, int nsmall, int nmedium, int nfull);

int read_dict(struct dict_radix *dict, const char *dir);
void print_tree(struct dict_radix *dict);
void print_sizes(struct dict_radix *dict);
void print_stats(struct dict_radix *dict);

int lookup(const struct dict_radix *dict, const char *word);

#endif /* INCLUDED_RADIX_H */