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.
data/ext/chinwag/dict.h CHANGED
@@ -3,50 +3,102 @@
3
3
 
4
4
  #include "chinwag.h"
5
5
 
6
- // dictionary row utilities
7
- drow_t open_drow();
8
- drow_t add_word_to_drow(drow_t drow, const char* word);
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
- dict_t open_dict();
21
- dict_t open_dict_with_name(const char* name);
22
- dict_t open_dict_with_tokens(const char* const buffer, const char* delimiters);
23
- dict_t open_dict_with_name_and_tokens(const char* name, const char* const buffer, const char* delimiters);
24
- dict_t add_drow_to_dict(dict_t dict, drow_t drow);
25
- dict_t add_drow_to_dict_strict(dict_t dict, drow_t drow, U32 size);
26
- dict_t place_word_in_dict(dict_t dict, const char* word);
27
- dict_t place_words_in_dict(dict_t dict, const char* const* words, U32 s);
28
- dict_t place_word_in_dict_strict(dict_t dict, const char* word);
29
- dict_t place_words_in_dict_strict(dict_t dict, const char* const* words, U32 s);
30
- dict_t bubble_dict(dict_t dict);
31
- dict_t prune_dict(dict_t dict, bool sorted);
32
- dict_t map_dict(dict_t dict, char* (*f)(char*));
33
- dict_t deep_copy_dict(dict_t dict);
34
- bool dict_exclude(dict_t dict, char const* str);
35
- bool dict_include(dict_t dict, char const* str);
36
- bool dict_any_blanks(dict_t dict);
37
- bool dict_valid(dict_t dict, char** error);
38
- bool dict_equal(dict_t dict, dict_t against);
39
- bool dict_not_equal(dict_t dict, dict_t against);
40
- I32 find_drow_of_size_in_dict(dict_t dict, U32 largest);
41
- U32 total_dict(dict_t dict);
42
- U32 dict_largest(dict_t dict);
43
- char* sample_dict(dict_t dict);
44
- char* join_dict(dict_t dict, char const* delimiter);
45
- void puts_dict(dict_t dict);
46
- dict_t close_dict(dict_t dict);
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 validate_dict(dict_t dict, char const* function_name);
50
- dict_t split(const char* buffer, const char* delimiters);
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
@@ -1,5 +1,5 @@
1
- #ifndef __LATIN_G8JBZT1G_H
2
- #define __LATIN_G8JBZT1G_H
1
+ #ifndef __LATIN_CWF03M9G_H
2
+ #define __LATIN_CWF03M9G_H
3
3
 
4
4
  #include "chinwag.h"
5
5