chinwag 0.1.5 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/ext/chinwag/chinwag.c +46 -41
- data/ext/chinwag/chinwag.h +20 -12
- data/ext/chinwag/config.c +6 -6
- data/ext/chinwag/dict.c +211 -107
- data/ext/chinwag/dict.h +93 -41
- data/ext/chinwag/latin.h +2 -2
- data/ext/chinwag/rb_chinwag_ext.c +255 -167
- data/ext/chinwag/seuss.h +2 -2
- data/ext/chinwag/tokenize.c +7 -5
- data/ext/chinwag/tokenize.h +5 -2
- metadata +2 -2
data/ext/chinwag/dict.h
CHANGED
@@ -3,50 +3,102 @@
|
|
3
3
|
|
4
4
|
#include "chinwag.h"
|
5
5
|
|
6
|
-
// dictionary row
|
7
|
-
|
8
|
-
|
9
|
-
drow_t add_word_to_drow_limit(drow_t drow, const char* word, U32 size);
|
10
|
-
drow_t bubble_drow(drow_t drow);
|
11
|
-
bool drow_word_blank(drow_t drow, U32 i);
|
12
|
-
bool drow_word_present(drow_t drow, U32 i);
|
13
|
-
bool drow_exclude(drow_t drow, char const* str);
|
14
|
-
bool drow_include(drow_t drow, char const* str);
|
15
|
-
char* sample_drow(drow_t drow);
|
16
|
-
void puts_drow(drow_t drow);
|
17
|
-
void close_drow(drow_t drow);
|
6
|
+
// exposed dictionary row routines
|
7
|
+
char* cwdrow_sample
|
8
|
+
(cwdrow_t drow);
|
18
9
|
|
19
10
|
// dictionary utilities
|
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
|
-
|
11
|
+
cwdict_t cwdict_open();
|
12
|
+
|
13
|
+
cwdict_t cwdict_open_with_name
|
14
|
+
(const char* name);
|
15
|
+
|
16
|
+
cwdict_t cwdict_open_with_tokens
|
17
|
+
(const char* const buffer, const char* delimiters);
|
18
|
+
|
19
|
+
cwdict_t cwdict_open_with_name_and_tokens
|
20
|
+
(const char* name, const char* const buffer, const char* delimiters);
|
21
|
+
|
22
|
+
cwdict_t cwdict_add_row
|
23
|
+
(cwdict_t dict, cwdrow_t drow);
|
24
|
+
|
25
|
+
cwdict_t cwdict_add_row_strict
|
26
|
+
(cwdict_t dict, cwdrow_t drow, U32 size);
|
27
|
+
|
28
|
+
cwdict_t cwdict_place_word
|
29
|
+
(cwdict_t dict, const char* word);
|
30
|
+
|
31
|
+
cwdict_t cwdict_place_words
|
32
|
+
(cwdict_t dict, const char* const* words, U32 s);
|
33
|
+
|
34
|
+
cwdict_t cwdict_place_word_strict
|
35
|
+
(cwdict_t dict, const char* word);
|
36
|
+
|
37
|
+
cwdict_t cwdict_place_words_strict
|
38
|
+
(cwdict_t dict, const char* const* words, U32 s);
|
39
|
+
|
40
|
+
cwdict_t cwdict_sort
|
41
|
+
(cwdict_t dict);
|
42
|
+
|
43
|
+
cwdict_t cwdict_prune
|
44
|
+
(cwdict_t dict, bool sorted);
|
45
|
+
|
46
|
+
cwdict_t cwdict_clean // aliases cwdict_prune(dict, true)
|
47
|
+
(cwdict_t dict);
|
48
|
+
|
49
|
+
cwdict_t cwdict_map
|
50
|
+
(cwdict_t dict, char* (*f)(char*));
|
51
|
+
|
52
|
+
cwdict_t cwdict_clone
|
53
|
+
(cwdict_t dict);
|
54
|
+
|
55
|
+
cwdict_t cwdict_dup // aliases cwdict_clone
|
56
|
+
(cwdict_t dict);
|
57
|
+
|
58
|
+
bool cwdict_exclude
|
59
|
+
(cwdict_t dict, char const* str);
|
60
|
+
|
61
|
+
bool cwdict_include
|
62
|
+
(cwdict_t dict, char const* str);
|
63
|
+
|
64
|
+
bool cwdict_valid
|
65
|
+
(cwdict_t dict, char** error);
|
66
|
+
|
67
|
+
bool cwdict_equal
|
68
|
+
(cwdict_t dict, cwdict_t against);
|
69
|
+
|
70
|
+
bool cwdict_inequal
|
71
|
+
(cwdict_t dict, cwdict_t against);
|
72
|
+
|
73
|
+
U32 cwdict_length
|
74
|
+
(cwdict_t dict);
|
75
|
+
|
76
|
+
U32 cwdict_size // aliases cwdict_length
|
77
|
+
(cwdict_t dict);
|
78
|
+
|
79
|
+
U32 cwdict_count // aliases cwdict_length
|
80
|
+
(cwdict_t dict);
|
81
|
+
|
82
|
+
U32 cwdict_largest
|
83
|
+
(cwdict_t dict);
|
84
|
+
|
85
|
+
char* cwdict_sample
|
86
|
+
(cwdict_t dict);
|
87
|
+
|
88
|
+
char* cwdict_join
|
89
|
+
(cwdict_t dict, char const* delimiter);
|
90
|
+
|
91
|
+
cwdict_t cwdict_close
|
92
|
+
(cwdict_t dict);
|
47
93
|
|
48
94
|
// secondary utilities
|
49
|
-
void
|
50
|
-
|
95
|
+
void puts_cwdict
|
96
|
+
(cwdict_t dict);
|
97
|
+
|
98
|
+
void validate_cwdict
|
99
|
+
(cwdict_t dict, char const* function_name);
|
100
|
+
|
101
|
+
cwdict_t split_into_cwdict
|
102
|
+
(const char* buffer, const char* delimiters);
|
51
103
|
|
52
104
|
#endif
|
data/ext/chinwag/latin.h
CHANGED