From 3405b0c1635843cbb81f042364bfcf238d7dc930 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Thu, 5 May 2016 14:59:28 +0200 Subject: Adds the current code. It's been running for close to a month on one of the IRC channels I frequent and seems to be working fine. One should be aware that, among other missing features, this version does not store permanently what the bot learns. Indeed, I am currently using a file with 431848 lines as its initial knowledge bank, making this particular feature not a high priority one. Also consider the fact that Zero of One converts text to underscore before reading it but will not change its own aliases. This could potentially be a cause for surprises when using uppercase letters in the latter. --- src/tool/strings.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/tool/strings.h (limited to 'src/tool/strings.h') diff --git a/src/tool/strings.h b/src/tool/strings.h new file mode 100644 index 0000000..6e6e211 --- /dev/null +++ b/src/tool/strings.h @@ -0,0 +1,19 @@ +#ifndef _ZoO_TOOL_STRINGS_H_ +#define _ZoO_TOOL_STRINGS_H_ + +#include "strings_types.h" + +void ZoO_strings_initialize (struct ZoO_strings s [const restrict static 1]); + +void ZoO_strings_finalize (struct ZoO_strings s [const restrict static 1]); + +int ZoO_strings_parse +( + struct ZoO_strings s [const static 1], + size_t const input_size, + ZoO_char input [const restrict], + ZoO_index const punctuations_count, + const ZoO_char punctuations [const restrict static punctuations_count] +); + +#endif -- cgit v1.2.3-70-g09d2