| summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/knowledge')
| -rw-r--r-- | src/knowledge/knowledge.c | 12 | ||||
| -rw-r--r-- | src/knowledge/knowledge.h | 5 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/knowledge/knowledge.c b/src/knowledge/knowledge.c index c9bfc2a..5ce6917 100644 --- a/src/knowledge/knowledge.c +++ b/src/knowledge/knowledge.c @@ -56,3 +56,15 @@ void ZoO_knowledge_unlock_access { pthread_mutex_unlock(&(k->mutex)); } + +void ZoO_knowledge_get_word +( + const struct ZoO_knowledge k [const static 1], + const ZoO_index word_ref, + const ZoO_char * word [const restrict static 1], + ZoO_index word_length [const restrict static 1] +) +{ + *word = k->words[word_ref].word; + *word_length = k->words[word_ref].word_length; +} diff --git a/src/knowledge/knowledge.h b/src/knowledge/knowledge.h index 7f1bb42..e97d84e 100644 --- a/src/knowledge/knowledge.h +++ b/src/knowledge/knowledge.h @@ -61,13 +61,12 @@ int ZoO_knowledge_learn_markov_sequence const struct ZoO_pipe io [const restrict static 1] ); -int ZoO_knowledge_get_word +void ZoO_knowledge_get_word ( const struct ZoO_knowledge k [const static 1], const ZoO_index word_ref, const ZoO_char * word [const restrict static 1], - ZoO_index word_size [const restrict static 1], - const struct ZoO_pipe io [const restrict static 1] + ZoO_index word_length [const restrict static 1] ); /* |


