aboutsummaryrefslogtreecommitdiffstats
path: root/spo256/words.c
blob: 19c8d57fd86cae41c9ab170070fe56329c03b683 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*

	Each line of input from the client application is examined and split
	into words, numbers, abbreviations, and special catagories for further
	translation from free-form text to SPO spoken speech.  Generally a
	word is a collection of characters grouped by white-space markers
	(nl, tab, and space).  Special consideration is also given to quoting
	properties.  Additional rules may be applied once words have been
	catagorized.
*/

#include <other/string.h>
#include <other/config.h>
#include <std/string.h>
#include "speak.h"

void	abbrev(char *str)
{
	char	*p;

	if(!lit && !spell)
		p = find(aidx, str);

	if(p)
		spo_word(p);
	else
	{
		p = tail(str);
		*(--p) = 0;
		spo_word(str);
		spo_pause(P_SENTANCE);
	}
}