+char echo = 1; /* echo characters on stdout from stdin */
+char int_tabs = 0; /* interpret tabs -> spaces */
+char *root = "/spider"; /* root of data tree, can be overridden by DXSPIDER_ROOT */
+int timeout = 60; /* default timeout for logins and things */
+int paclen = DEFPACLEN; /* default buffer size for outgoing packets */
+int tabsize = 8; /* default tabsize for text messages */
+char *connsort = "local"; /* the connection variety */
+int state = 0; /* the current state of the connection */
+int laststate = 0; /* the last state we were in */
+char echocancel = 1; /* echo cancelling */
+reft echobase; /* the anti echo queue */
+int maxecho = 5; /* the depth of the anti echo queue */
+int echon; /* no of entries in the anti echo queue */
+
+#define CONNECTED 100
+#define WAITLOGIN 1
+#define WAITPASSWD 2
+#define WAITINPUT 10
+#define DOCHAT 20
+
+myregex_t iscallreg[] = { /* regexes to determine whether this is a reasonable callsign */
+ {
+ "^[A-Z]+[0-9]+[A-Z]+[1-9]?$", 0 /* G1TLH G1TLH1 */
+ },
+ {
+ "^[0-9]+[A-Z]+[0-9]+[A-Z]+[1-9]?$", 0 /* 2E0AAA 2E0AAA1 */
+ },
+ {
+ "^[A-Z]+[0-9]+[A-Z]+-[0-9]$", 0 /* G1TLH-2 */
+ },
+ {
+ "^[0-9]+[A-Z]+[0-9]+[A-Z]+-[0-9]$", 0 /* 2E0AAA-2 */
+ },
+ {
+ "^[A-Z]+[0-9]+[A-Z]+-1[0-5]$", 0 /* G1TLH-11 */
+ },
+ {
+ "^[0-9]+[A-Z]+[0-9]+[A-Z]+-1[0-5]$", 0 /* 2E0AAA-11 */
+ },
+ {
+ 0, 0
+ }
+};
+
+void terminate(int);