From 0cc9b20c15460213e488bf5e70963b941482f628 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Tue, 14 Jan 2025 16:06:02 -0600 Subject: Add source. --- spo256/word.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 spo256/word.c (limited to 'spo256/word.c') diff --git a/spo256/word.c b/spo256/word.c new file mode 100644 index 0000000..2150837 --- /dev/null +++ b/spo256/word.c @@ -0,0 +1,38 @@ +/* + + Word base pronounciation rules and special cases. +*/ + +#include +#include +#include +#include +#include "speak.h" + +void word(char *str) +{ + char *p; + + /* Internet x@y as "x at y" */ + + if(NULL != (p = strchr(str, '@'))) + { + *(p++) = 0; + word(str); + word("at"); + word(p); + return; + } + + /* Check for x.y.z as "x dot y dot z" */ + + while(NULL != (p = strchr(str, '.'))) + { + *(p++) = 0; + spo_word(str); + spo_word("dot"); + str = p; + } + + spo_word(str); +} -- cgit v1.2.3-54-g00ecf