diff options
Diffstat (limited to 'spo256/speak.h')
-rw-r--r-- | spo256/speak.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/spo256/speak.h b/spo256/speak.h new file mode 100644 index 0000000..07b9875 --- /dev/null +++ b/spo256/speak.h @@ -0,0 +1,48 @@ +/* + * Master header for spo server. + * $Id$ + * Copyright (c) 1997 by Tycho Softworks. + * For conditions of distribution and use see license. + * + * Abstract: + * Define internal hash index system to quickly find text for + * substitutions. The spo-256 is driven by substitution tables + * which provide alternate spellings to adjust mis-pronounced + * speech. + */ + +typedef enum +{ + P_END, /* Finish line off, send SPO-end mark */ + P_LINE, /* Send nl because we have a empty line */ + P_SENTANCE, /* Pause at end of sentance (nl) */ + P_WORD /* Inter-word delay (spaces) */ +} PAUSE; + +#define KEYSIZE 791 /* Size of internal hash database keyrange */ + +typedef struct _idx +{ + struct _idx *word_link; /* hash link chain */ + char *word_key; /* initial word & hash key */ + char *word_spo; /* substitute spelling */ +} IDX; + +extern int spo; +extern IDX **widx, **aidx; +extern char *mask; +extern FILE *io; +extern bool echo, spell, lit; + +void abbrev(char *str); +int getspo(CONFIG *cfg); +void getidx(CONFIG *cfg); +char *find(IDX **table, char *str); +void client(char *hostname, ushort port); + +void spo_init(void); +void spo_cmd(char *str); +void spo_word(char *str); +void spo_pause(PAUSE); +void spo_begquote(void); +void spo_endquote(void); |