/* * 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);