aboutsummaryrefslogtreecommitdiffstats
path: root/spo256/speak.h
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2025-01-14 16:06:02 -0600
committerWilliam Harrington <kb0iic@berzerkula.org>2025-01-14 16:06:02 -0600
commit0cc9b20c15460213e488bf5e70963b941482f628 (patch)
treebb0143245583ec846630f39bfa2258dba640ccd7 /spo256/speak.h
parent0e084ade5069756d487b5c948c48b777e37c00c9 (diff)
Add source.
Diffstat (limited to 'spo256/speak.h')
-rw-r--r--spo256/speak.h48
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);