#define s037 "12.65, 16 May 2015"
#include "adv1.h"
#ifdef v003
#ifndef CONSOLE
#define CONSOLE
#endif
#ifndef NO_READLINE
#define NO_READLINE
#endif
#ifndef NO_SLOW
#define NO_SLOW
#endif
#ifndef SWAP
#define SWAP 32
#endif
#endif
#if defined(v003)||defined(WIN32)||defined(_WIN32)||defined(__WIN32)||defined (_WIN32_)||defined(__WIN32__)
#define d030 1
#define k029 0
#define s038 0
#else
#if defined(__MACH__)
#define d030 0
#define k029 1
#define s038 1
#else
#if defined(__unix__) || defined(__linux__)
#define d030 0
#define k029 1
#define s038 0
#endif
#endif
#endif
#ifdef d000
#ifndef b025
#define b025
#endif
#include "x032.h"
#define fopen q031
#endif 
#if defined(v035)
#ifndef b025
#define b025
#endif
#endif 
#ifdef b025
#ifndef NO_READLINE
#define NO_READLINE
#endif
#ifndef CONSOLE
#define CONSOLE
#endif
#endif 
#if defined(__unix__) || defined(__linux__)
#if !defined(HAVE_UNISTD_H) && !defined(n035)
#define HAVE_UNISTD_H
#endif 
#endif 
#ifdef v036
#undef v036
#endif 
#ifdef u038
#undef u038
#if defined(MEMORY)
#undef MEMORY
#endif
#if defined(SWAP)
#undef SWAP
#endif
#if defined(FILE)
#undef FILE
#endif
#if defined(k005)
#undef k005
#endif
#define k005 0
#endif 
#ifdef MEMORY
#undef MEMORY
#if defined(SWAP)
#undef SWAP
#endif
#if defined(FILE)
#undef FILE
#endif
#if defined(k005)
#undef k005
#endif
#define k005 1
#endif 
#if defined(SWAP)
#if !(SWAP >= 16 && SWAP <= 128)
#undef SWAP
#endif
#if defined(FILE)
#undef FILE
#endif
#if defined(k005)
#undef k005
#endif
#define k005 2
#endif 
#ifdef FILE
#undef FILE
#if defined(k005)
#undef k005
#endif
#define k005 3
#endif 
#ifdef k005
#if k005 == 0
#define u038
#endif
#if k005 == 1
#define MEMORY
#endif
#if k005 == 2 && !defined(SWAP)
#define SWAP 32
#endif
#if k005 == 3
#define q032
#endif
#endif 
#ifdef SWAP
#if SWAP < 16
#undef SWAP
#define SWAP 16
#endif 
#if SWAP > 128
#undef SWAP
#define SWAP 128
#endif 
#endif 
#ifndef u038
#define v036
#endif
#if d030
#define f032 "HOMEPATH"
#define r033 "\r\n"
#define z031 '/'
#define y034 '\\'
#else 
#define f032 "HOME"
#define r033 "\n"
#define z031 '-'
#define y034 '/'
#endif 
#include <stdio.h>
#include <time.h>
#include <ctype.h>
#include <stdarg.h>
#include <errno.h>
#if defined(HAVE_CONFIG_H)
#include "config.h"
#if defined (HAVE_STRING_H)
#include <string.h>
#else 
#if defined(HAVE_STRINGS_H)
#include <strings.h>
#endif 
#endif 
#if defined(HAVE_STDLIB_H)
#include <stdlib.h>
#endif 
#if defined (HAVE_SYS_STAT_H)
#include <sys/stat.h>
#endif 
#if defined (HAVE_SYS_TYPES_H)
#include <sys/types.h>
#endif 
#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#else 
#if d030 && !defined(v003)
#define unlink _unlink
#else 
int unlink(char *); 
#endif 
#endif 
#else 
#include <string.h>
#include <stdlib.h>
#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#else
#if d030 && !defined(v003)
#define unlink _unlink
#else 
int unlink(char *); 
#endif 
#endif
#include <sys/types.h>
#include <sys/stat.h>
#endif 
#define n036 \
"HTTP/1.0 200 OK\n" \
"Host: localhost\n" \
"Server: A-code/1.1\n" \
"Cache-Control: no-store\n" \
"Content-Type: text/html\n" \
"Content-Length: "
int h027 = 0; 
#include <sys/types.h>
#include <sys/stat.h>
#define z032 "rb"
#define s039 "wb"
#define v037 "ab+"
#ifdef __STDC__
void z033 (char *); void z034 (char *, int); extern int j033 (int, char
*); 
#else
void z033(); void z034(); extern int j033(); 
#endif
#ifdef CONSOLE
#ifdef l049
#undef l049
#endif
#else
#define l049
#endif
#ifndef NO_READLINE
#include "readline/readline.h"
#include "readline/history.h"
char *b026; char *l050; 
#endif 
#include "adv0.h"
FILE *y035; FILE *b027; FILE *v038 = NULL; char n037 [160]; FILE *v039 =
NULL; char *a040 = NULL; char *y036 = NULL; 
#ifndef v036
#include "adv6.h"
#endif 
void m032 (int); int q004; jmp_buf r004; 
#ifdef v036
char *c041 = NULL; 
#endif 
char x033; 
#define f033 (x005 * sizeof (int))
#define x034 f033
#define l051 ((j001 + 1) * sizeof (int))
#define c042 (x034 + l051)
#define t031 (j000 * (j001 - s004 + 1) * sizeof (short))
#define d031 (c042 + t031)
#define j034 (m004 * (h009 - k003 + 1) * sizeof (short))
#define k030 (d031 + j034)
#define e039 (n004 * (s005 - y003 + 1) * sizeof (short))
#define i029 (n004 * (i005 - y003 + 1) * sizeof (short))
#define a041 (k030 + e039)
char o030 [a041]; int *t009 = (int *)o030; int *q003 = (int *)(o030 + x034);
short *v001 = (short *)(o030 + c042); short *c003 = (short *)(o030 + d031);
short *l007 = (short *)(o030 + k030); 
#ifdef j035
char t032 [sizeof (o030)]; int l052 [l051]; unsigned char *k031 = NULL;
unsigned char *u039 = NULL; unsigned char *v040; int y037 = 0; 
#ifdef x035
int i030 = -2; 
#else
int i030 = 0; 
#endif 
#endif
char *y038; char *z035; char *f034 = NULL; int l053; char u040 [161] = "\n";
char g028 [161] = "\n"; char m033 [161]; char j036 [161]; int i031, l054;
int o031; int h028 [5]; int *x036 = &h028[0]; int *t033 = &h028 [1]; int
*b028 = &h028 [2]; int *d032 = &h028 [3]; int *d033 = &h028 [4]; char n038[160];
#define h029 20
char n039 [5 * h029]; char *n040 = n039; char *y039 = n039 + h029; char
z036 [h029]; char *g029 = n039 + 2 * h029; char *j037 = n039 + 3 * h029;
char *j038 = n039 + 4 * h029; char a042 [h029]; 
#if y000 >= 11
#define e040 -1
char i032 [h029]; char y040 [h029]; char o032 [h029]; 
#if defined(l008) && defined(g030)
int z037; int v041 [100]; 
#endif 
#endif 
int v042; int t034 = 0; int b029 = 1; 
#ifdef w002
int j039 = 0; 
#endif
#if y000 == 10
int e041 = 1; 
#else
int e041 = 0; 
#endif
int a004 = 1; int j040; char v043[2]; 
#if defined(PAUSE) || d030
int v044 = 1; 
#else
int v044 = 0; 
#endif
#ifdef l049
#include <fcntl.h>
char *r034; int v045 = 0; 
#endif
int o033 = 0; char u041 [160]; char y041 [80]; char *u042; 
#include "adv3.h"
#include "adv4.h"
#include "adv2.h"
#include "adv5.h"
#ifdef l009
int h030; 
#endif 
#ifdef MEMORY
unsigned char e007 [s007]; 
#endif 
#ifdef SWAP
#define h031 1024
unsigned char e007 [SWAP * h031]; int h032 [SWAP]; int w045 [SWAP]; int
g031 [SWAP]; 
#endif 
#if d030
char g032 [160]; 
#endif 
char *e042 [100]; char s040 [100]; short s041; int h033 = 24; int z038 =
80; int c043 = 1; int h034; int n041; int l055; int g033; 
#ifdef i033
int g034; int b030; 
#endif 
char *j041; int q033 = 4096; char *g035; short *v046; int m034 = 1; char
*d034; int o034 = 0; int h035; int s042 = 0; 
#ifndef NO_SLOW
#if d030
#ifdef __STDC__
extern void y002 (int); 
#else 
extern void y002(); 
#endif
#define usleep(X) y002(X)
#else 
#if ! defined(HAVE_UNISTD_H)
void usleep(int); 
#endif
#endif 
#endif 
int i034 = 0; int h036; char l056 [80]; int t035; int q034; int v047 = 0;
#ifdef i000
int r035 = 0; 
#endif 
char *y042; 
#define d035(X) { char *v048 = X; while (*v048) o001(*v048++); }
#define q035(X) fputs(X, stdout); if (v038) fputs(X,v038);
#define w046(X,Y) printf(X,Y); if (v038) fprintf(v038,X,Y);
#define c044(X) if (v038) fprintf(v038,"ERROR: %d",X)
#define o035(X,Y) for (a043=(char *)X,l057=1; \
(unsigned int)l057<=(unsigned int)Y;l057++,a043++) \
{f035+=(*a043+l057)*(((int)(*a043)+l057)<<4)+Y; \
f035&=07777777777L;} 
#define l058 "Restoring game in progress...\n\n"
#ifndef b025
#define s043 0
#define n042 1
#define u043 2
#define w047 3
#define a044 4
#define l059 5
#define e043 6
#define x037 7
#define z039 8
#define h037 9
#define l060 10
#define JUSTIFY 11
#define MARGIN 12
#define g036 13
#define a045 14
#define x038 15
#define o036 16
#define n043 17
#define q036 18
char *g037[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; 
#define j042 "&nbsp;&nbsp;<input type=\"submit\" name=\"Submit\", value=\"Submit\">"
int g038 = 100; 
#endif 
#if !defined(NOVARARGS) && defined(__STDC__)
int h008 (int u003, ...) { va_list g039; int o037; va_start (g039, u003);
o037 = u003; while (o037 >= 0) { if (j003 (o037)) { va_end (g039); return
(1); } o037 = va_arg (g039, int); } va_end (g039); return (0); } int f004
(int u003, ...) { va_list g039; int o037; va_start (g039, u003); o037 =
u003; while (o037 >= 0) { if (!j003 (o037)) { va_end (g039); return (0);
} o037 = va_arg (g039, int); } va_end (g039); return (1); } 
#else 
#ifdef __STDC__
int h008 (int d036,int w004,int k001,int f002,int e002,int y043,int k032,int
i035, int q037,int n044,int u044,int v049,int z040,int m035,int i036,int
w048) 
#else
int h008 (d036,w004,k001,f002,e002,y043,k032,i035,q037,n044,u044,v049,z040,m035,i036,w048)
int d036,w004,k001,f002,e002,y043,k032,i035,q037,n044,u044,v049,z040,m035,i036,w048;
#endif
{ if (d036 == -1) return (0); if (j003 (d036)) return (1); if (w004 == -1)
return (0); if (j003 (w004)) return (1); if (k001 == -1) return (0); if
(j003 (k001)) return (1); if (f002 == -1) return (0); if (j003 (f002)) return
(1); if (e002 == -1) return (0); if (j003 (e002)) return (1); if (y043 ==
-1) return (0); if (j003 (y043)) return (1); if (k032 == -1) return (0);
if (j003 (k032)) return (1); if (i035 == -1) return (0); if (j003 (i035))
return (1); if (q037 == -1) return (0); if (j003 (q037)) return (1); if
(n044 == -1) return (0); if (j003 (n044)) return (1); if (u044 == -1) return
(0); if (j003 (u044)) return (1); if (v049 == -1) return (0); if (j003 (v049))
return (1); if (z040 == -1) return (0); if (j003 (z040)) return (1); if
(m035 == -1) return (0); if (j003 (m035)) return (1); if (i036 == -1) return
(0); if (j003 (i036)) return (1); if (w048 == -1) return (0); if (j003 (w048))
return (1); return (0); } 
#ifdef __STDC__
int f004 (int d036,int w004,int k001,int f002,int e002,int y043,int k032,int
i035, int q037,int n044,int u044,int v049,int z040,int m035,int i036,int
w048) 
#else
int f004 (d036,w004,k001,f002,e002,y043,k032,i035,q037,n044,u044,v049,z040,m035,i036,w048)
int d036,w004,k001,f002,e002,y043,k032,i035,q037,n044,u044,v049,z040,m035,i036,w048;
#endif
{ if (d036 == -1) return (1); if (!j003 (d036)) return (0); if (w004 ==
-1) return (1); if (!j003 (w004)) return (0); if (k001 == -1) return (1);
if (!j003 (k001)) return (0); if (f002 == -1) return (1); if (!j003 (f002))
return (0); if (e002 == -1) return (1); if (!j003 (e002)) return (0); if
(y043 == -1) return (1); if (!j003 (y043)) return (0); if (k032 == -1) return
(1); if (!j003 (k032)) return (0); if (i035 == -1) return (1); if (!j003
(i035)) return (0); if (q037 == -1) return (1); if (!j003 (q037)) return
(0); if (n044 == -1) return (1); if (!j003 (n044)) return (0); if (u044
== -1) return (1); if (!j003 (u044)) return (0); if (v049 == -1) return
(1); if (!j003 (v049)) return (0); if (z040 == -1) return (1); if (!j003
(z040)) return (0); if (m035 == -1) return (1); if (!j003 (m035)) return
(0); if (i036 == -1) return (1); if (!j003 (i036)) return (0); if (w048
== -1) return (1); if (!j003 (w048)) return (0); return (1); } 
#endif 
#ifdef __STDC__
int x002 (int h007) 
#else
int x002 (h007) int h007; 
#endif
{ v042 = (((v042 << 10) + v042) / 13) & 32767; return (v042 % h007); } 
#ifdef __STDC__
int m001 (int h007) 
#else
int m001 (h007) int h007; 
#endif
{ int k033; k033 = (((v042 << 10) + (int) time (NULL)) / 13) & 32767; return
(k033 % h007); } 
#if y000 >= 11
#define k034 -1
#define h038 1
#define o038 1
#define i037 3
#define g040 4
#define w049 4096
#define w050 *((unsigned short *)(q038 + 2))
short *w051 (short *q038) { if (q038 == NULL) { if ((q038 = (short *)malloc(w049
* sizeof(short))) == NULL) return (NULL); *q038 = 3; *(q038 + 1) = 0; w050
= w049; } else { if ((q038 = (short *)realloc (q038, (*(q038 + 2) + w049)
* sizeof(short))) == NULL) return (NULL); w050 += w049; } return (q038);
} 
#ifdef DEBUG
void t036 (short *q038, char *e007) { short *g041; printf ("Show: %s, free: %hd, root: %hd\n",
e007, *q038, *(q038 + 1)); g041 = q038 + 3; while (g041 < q038 + *q038)
{ fprintf (stderr, "Offset %d: Up %hd, L %hd, R %hd, B %hd, T: %s\n", g041
- q038, *(g041 + h038), *(g041 + h038 + k034), *(g041 + h038 + o038), *(g041
+ i037), (char *)(g041 + g040)); g041 += g040 + 1 + strlen ((char *) (g041
+ g040)) / 2; } } 
#endif 
void m036 (char *k035, int o039, short *y044) { char *a043 = (char *) (y044
+ g040); while (o039--) *a043++ = tolower (*k035++); *a043 = '\0'; } int
t037 (char *u002, char *v050) { int m037, z041; while (*u002) { z041 = tolower
((unsigned char) *u002++); if (!isalpha (z041)) return (*v050 ? -1 : 0);
m037 = (unsigned char) *v050++; if (z041 != m037) return (z041 > m037 ?
1 : -1); } return (0); } void t038 (short *q038, int a046, int h039, int
i038) { int n045 = *(q038 + a046 + h038); int b031 = *(q038 + h039 + h038
- i038); *(q038 + a046 + h038 + i038) = *(q038 + h039 + h038 - i038); *(q038
+ h039 + h038 - i038) = a046; *(q038 + a046 + i037) -= *(q038 + h039 + i037);
*(q038 + h039 + i037) = -(*(q038 + a046 + i037)); if (n045 > 0) *(q038 +
n045 + h038 + (*(q038 + n045 + h038 + k034) == a046 ? k034 : o038)) = h039;
else *(q038 + 1) = h039; *(q038 + h039 + h038) = n045; *(q038 + a046 + h038)
= h039; if (b031) *(q038 + b031 + h038) = a046; } void d037 (short *q038,
int a046, int h039, int i038) { int n045 = *(q038 + a046 + h038); int b031
= *(q038 + h039 + h038 - i038); *(q038 + h039 + h038 - i038) = *(q038 +
b031 + h038 + i038); if (*(q038 + b031 + h038 + i038)) *(q038 + *(q038 +
b031 + h038 + i038) + h038) = h039; *(q038 + a046 + h038 + i038) = *(q038
+ b031 + h038 - i038); if (*(q038 + b031 + h038 - i038)) *(q038 + *(q038
+ b031 + h038 - i038) + h038) = a046; *(q038 + b031 + h038 + i038) = h039;
*(q038 + b031 + h038 - i038) = a046; if (*(q038 + b031 + i037) == *(q038
+ h039 + i037)) *(q038 + h039 + i037) *= -1; else *(q038 + h039 + i037)
= 0; if (*(q038 + b031 + i037) == *(q038 + a046 + i037)) *(q038 + a046 +
i037) *= -1; else *(q038 + a046 + i037) = 0; *(q038 + b031 + i037) = 0;
*(q038 + h039 + h038) = b031; *(q038 + a046 + h038) = b031; *(q038 + b031
+ h038) = n045; if (n045 > 0) *(q038 + n045 + h038 + (*(q038 + n045 + h038
+ k034) == a046 ? k034 : o038)) = b031; else *(q038 + 1) = b031; } short
*o040 (short *q038, char *u002, int o039) { int a046 = 0; int h039 = *(q038
+ 1); int i038; short *y044; int q039 = g040 + 1 + o039 / 2; if (*(q038
+ 1) > 0) { while (h039 > 0) { if ((i038 = t037 (u002, (char *)(q038 + h039
+ g040))) == 0) return (q038); a046 = h039; h039 = *(q038 + h039 + h038
+ i038); } } if (*q038 + q039 > w050 && (w050 > 65535L - q039 || (q038 =
w051 (q038)) == NULL)) return (NULL); y044 = q038 + (h039 = *q038); *(y044
+ h038) = a046; *(y044 + h038 + k034) = *(y044 + h038 + o038) = 0; *(y044
+ i037) = 0; m036 (u002, o039, y044); *q038 += q039; if (a046) { *(q038
+ a046 + h038 + i038) = h039; while (1) { i038 = *(q038 + a046 + h038 +
k034) == h039 ? k034 : o038; if (*(q038 + a046 + i037) == i038) { if (*(q038
+ h039 + i037) == -i038) d037 (q038, a046, h039, i038); else t038 (q038,
a046, h039, i038); break; } if ((*(q038 + a046 + i037) += i038) == 0) break;
h039 = a046; a046 = *(q038 + a046 + h038); if (a046 == 0) break; } } else
*(q038 + 1) = h039; return (q038); } int o041 (short *q038, char *u002)
{ int k036; int i038; if ((k036 = *(q038 + 1)) == 0) return (0); while (k036)
{ if ((i038 = t037 (u002, (char *)(q038 + k036 + g040))) == 0) return (k036);
k036 = *(q038 + k036 + h038 + i038); } return (0); } 
#ifdef __STDC__
void a047 (void) 
#else
void a047 () 
#endif
{ char *z042 = j041; char *t039; while (1) { while (*z042 && ! isalpha (*z042))
z042++; if (*z042 == '\0') break; t039 = z042 + 1; while (*t039 && isalpha
(*t039)) t039++; if (t039 - z042 > 4 && *(t039 - 3) != 'i' && *(t039 - 2)
!= 'n' && *(t039 - 1) != 'g') o040 (v046, z042, t039 - z042); if (*t039
== '\0') break; z042 = t039 + 1; } return; } 
#endif 
#define o042 100
#if defined(PLAIN) && (defined(MEMORY) || defined(u038))
#define j043(X) e007[X]
#else 
#ifdef __STDC__
char j043 (int b032) 
#else
char j043 (b032) int b032; 
#endif
{ 
#ifndef PLAIN
int l061; 
#endif 
#if defined(MEMORY) || defined (u038)
l061 = (b032 >> 4) & 127; if (l061 == 0) l061 = b032 & 127; if (l061 ==
0) l061 = 'X'; l061 = (17 * l061 + 13) & 127; return (l061 ^ e007 [b032]
^ l056 [b032 % t035]); 
#endif 
#ifdef SWAP
int g042; unsigned char *r036; int j044; int b033; void x039 (); j044 =
0; r036 = e007; for (g042 = 0; g042 < SWAP; g042++) { if (b032 >= h032 [g042]
&& b032 < w045 [g042]) goto w052; r036 += h031; } for (g042 = 0; g042 <
SWAP; g042++) { if (w045 [g042] == 0) goto m038; if (g031 [j044] > g031
[g042]) j044 = g042; } g042 = j044; m038: l055++; r036 = e007 + h031 * g042;
b033 = (b032 / h031) * h031 ; if (fseek (y035, b033, 0)) x039 (); h032 [g042]
= b033; w045 [g042] = fread (r036, sizeof (char), h031, y035) + b033; 
#ifdef i033
fprintf (stderr, "Wanted %6d.  Buffer %3d: from %dK.\n", b032, g042, b033
/ h031); 
#endif 
if (h032 [g042] > w045 [g042]) x039 (); w052: g031 [g042] = g033; 
#ifdef PLAIN
return (*(r036 + b032 - h032 [g042])); 
#else 
l061 = (b032 >> 4) & 127; if (l061 == 0) l061 = b032 & 127; if (l061 ==
0) l061 = 'X'; l061 = (17 * l061 + 13) & 127; return (*(r036 + b032 - h032
[g042]) ^ l061 ^ l056 [b032 % t035]); 
#endif 
#endif 
#ifdef q032
void x039 (); static int l062 = -1; char w053; if (l062 != b032) { l055++;
if (fseek (y035, b032, 0)) x039 (); l062 = b032; } w053 = fgetc (y035);
l062++; 
#ifdef PLAIN
return (w053); 
#else 
l061 = (b032 >> 4) & 127; if (l061 == 0) l061 = b032 & 127; if (l061 ==
0) l061 = 'X'; l061 = (17 * l061 + 13) & 127; return (w053 ^ l061 ^ l056
[b032 % t035]); 
#endif 
#endif 
} 
#if defined(SWAP) || defined(q032)
#ifdef __STDC__
void x039 (void) 
#else
void x039 () 
#endif
{ d035 ("\n \nUnable to retrieve required data! Sorry...\n"); m032 (1);
fclose (y035); if (v038) fclose (v038); exit (0); } 
#endif 
#endif 
#ifdef __STDC__
void c002 (int u002, int z002, int s001, int h040) 
#else
void c002 (u002, z002, s001, h040) int u002; int z002; int s001; int h040;
#endif
{ int g042; int i039; static int j045 = 0; if (u002 == 0) { j045 = 0; return;
} if (z002 == 0) z002 = u002; if (s001 >0 && s000 (z002, s001) == 0) return;
if (j045++ > 0) { o001 (','); o001 (' '); } g042 = (h040 == 0) ? u002 :
h040; n041 = a039 [g042]; i039 = j043 (n041); if (i039 == '!') i039 = j043
(++n041); while (i039 != '\0') { o001 (i039); i039 = j043 (++n041); } }
#ifdef __STDC__
int g043 (char *g041) 
#else
int g043 (g041) int e044; char *g041; 
#endif
{ static int l063 = 0; char n046 [160]; if (o033) return (0); if (!g041
|| v039) { l063 = 0; return (0); } while (*g041 && *g041 != '\n') g041++;
if (*g041 == '\n' && ++l063 >= h033 - (j040 ? 1 : 2)) { if (strcmp(g041
+ 1, "? ") == 0) return (0); memset (n046, ' ', 20); strcpy (n046 + c043,
"[More?] "); q035 (n046); fgets (n046, sizeof (n046) - 1, v039 ? v039 :
stdin); if (v038) fprintf (v038, "\nREPLY: %s", n046); l063 = 1; if (*n046
== 'n' || *n046 == 'N' || *n046 == 'q' || *n046 == 'Q') { memset (n046,
' ', c043); strcpy (n046 + c043, "OK.\n"); if (!j040) strcat (n046, "\n");
q035 (n046); 
#ifdef NO_READLINE
strcpy (n046 + c043, "? "); q035 (n046); 
#else
memset (b026, ' ', c043); strcpy (b026 + c043, "? "); 
#endif 
return (1); } } return (0); } char *m039 (int o039) { char *v048; if ((v048
= (char *) malloc (o039)) == NULL) { fprintf (stderr, "Failed to allocate a %d character memory chunk!\n",
o039); exit (1); } return (v048); } char *z043 (char *s044, int t040) {
char *v048; if ((v048 = (char *) realloc (s044, t040)) == NULL) { fprintf
(stderr, "Failed to extend a memory chunk to %d character!\n", t040); exit
(1); } return (v048); } void q040 (char c) { int h041 = z035 - f034; if
(h041 + 2 >= l053) { l053 += 4096; f034 = z043 (f034, l053); z035 = f034
+ h041; } *z035++ = c; *z035 = '\0'; } void h042 (char *string) { int o039
= strlen (string); int h041 = z035 - f034; if (h041 + o039 + 1 >= l053)
{ l053 += 4096; f034 = z043 (f034, l053); z035 = f034 + h041; } strcpy (z035,
string); z035 += o039; } void b034 (char *a043) { 
#ifdef NO_SLOW
fputs (a043, stdout); fflush (stdout); 
#else
if (s042) { while (*a043) { usleep (s042); putchar (*a043++); fflush (stdout);
} } else { fputs (a043, stdout); fflush (stdout); } 
#endif 
} void i040 (char c, char i041) { FILE *w054 = (i041 == 'L' ? v038 : stdout);
if (c == e001) c = ' '; 
#ifndef NO_READLINE
if (i041 == 'L') fputc (c, w054); else { *l050++ = c; *l050 = '\0'; if (c
== '\n') { if (*b026) b034 (b026); l050 = b026; *l050 = '\0'; } } 
#else
if (s042 && i041 != 'L') { usleep (s042); fputc (c, w054); fflush (stdout);
} else fputc (c, w054); 
#endif 
} char *x040 (char *g041, int t041) { if (*g041 == i000) { if (!t041) while
(*g041 && *g041 != f000) g041++; else q040 ('<'); } else if (!t041) q040
(*g041); else if (*g041 == '>' || *g041 == '<') h042 (*g041 == '<' ? "&lt;"
: "&gt;"); else if (*g041 == f000) q040 ('>'); else { if (*g041 == ' ' &&
*(g041 + 1) == ' ' && t041) h042 ("&nbsp;"); q040(*g041); } return (g041);
} char *x041 (char *g041, int t041) { char *k037; while (1) { g041++; while
(*g041 == ' ') g041++; k037 = g041; while (* g041 && *g041 != '\n' && *g041
!= w001) g041++; if (!t041) { int l = (h034 - (g041 - k037)) / 2 - 2; if
(l < 0) l = 0 ; while (l--) h042 (t041 ? "&nbsp;" : " "); } while (k037
< g041) { if (*k037 == e001) h042 (t041 ? "&nbsp;" : " "); else x040 (k037,
t041); k037++; } if (*g041 != '\n') break; h042 (t041 ? "<br>\n" : "\n");
} return (g041); } char *z044 (char *g041, int t041) { int r037 = 4096;
int v051 = 0; int i; int type = *g041++; char *k037 = g041; int a048; char
*q041; while (1) { q041 = k037; while (*k037 == ' ') k037++; if (k037 -
q041 < r037) r037 = k037 - q041; while (*k037 != '\n' && *k037 != w001)
k037++; if (k037 - q041 > v051) v051 = (k037 - q041); k037++; if (!*k037
|| *k037 == w001) break; } a048 = (h034 - v051 + r037) / 2 - 2; if (a048
< 0) a048 = 0; while (1) { if (*g041 == w001) break; for (i = 0; i < r037;
i++) g041++; if (!t041) for (i = 0; i < a048; i++) q040 (' '); while (*g041
!= '\n' && *g041 != w001) { if (*g041 == e001) h042 (t041 ? "&nbsp;" : " ");
else g041 = x040 (g041, t041); g041++; } if (*g041 != w001) h042 (t041 &&
type != b000 ? "<br>\n" : "\n"); else break; g041++; } if (!t041) q040 ('\n');
return (*g041 == w001 ? g041 + 1 : g041); } void t042 (int t007, int t041)
{ char *g041 = j041; char *q041 = d034; int o043 = (q041 > j041 && *(q041
- 1) != '\n'); int type; int e045 = 0; 
#ifdef b025
z035 = f034 + 1; *f034 = ' '; 
#else
z035 = f034 + h027 + (t041 ? 1 : 0); 
#endif 
while (*g041 == '\n') g041++; if (o043 && t041) { q041--; if (*q041 == ' '
|| *q041 == e001) q041--; } while (g041 < q041) { switch (*g041) { case
'\n': if (e045) { e045 = 0; break; } if (!t041) { if (j040 < 2 || *(z035
- 1) != '\n') q040 ('\n'); } if (*(g041 + 1) == '\n') { if (t041) h042 (j040
> 1 ? "<br>\n" : "<br>&nbsp;<br>\n"); else if (j040 < 2) q040 ('\n'); while
(*(g041 + 1) == '\n') g041++; } else if (t041 && *(g041 + 1)) h042 ("<br>\n");
break; case e001: if (t041) h042 ("&nbsp;"); else 
#ifdef b025
q040 (' '); 
#else
q040 (*g041); 
#endif
break; case b000: case w000: case x000: if (t041) { if (*g041 != x000) h042
("<table align=center width=automatic><tr><td>\n"); else h042("<div align=center>\n");
if (*g041 == b000) h042 ("<pre>"); } type = *g041; if (type == x000) g041
= x041 (g041, t041); else g041 = z044 (g041, t041); if (t041) { if (type
== b000) h042 ("</pre>"); if (type != x000) h042 ("</td></tr></table>\n");
else h042 ("</div>\n"); h042 ("</center>\n"); if ((type == x000 || j040
> 1) && *g041) { if (*(g041 + 1) == '\n') g041++; if (j040 > 1 && *(g041
+ 1) == '\n') g041++; } } break; case h000: e045 = 1; break; case w001:
break; default: g041 = x040 (g041, t041); break; } if (*g041 == '\0') break;
g041++; if (*g041 == '\0') break; } if (t041) { char s045; if (o043) { char
c = *g041; h042 (t007 == 0 ? "<span id=\"prompt\">" : "<span class=\"query\">");
q040 (c); h042 ("</span>"); if (!j040) h042 ("<br>&nbsp;<br>"); } else {
if (!j040 && q041 > j041) h042("<br>&nbsp;<br>"); h042 ("<span id=\"prompt\"></span>");
}; if (q034) s045 = 'f'; 
#ifdef x042
else if (o043) { if (t009 [x042] == 10) s045 = 'm'; else if (t009 [x042]
== 15) s045 = 's'; else if (t009 [x042] == 44) s045 = 'r'; else s045 = 'q';
} 
#else
else if (o043) s045 = 'q'; 
#endif 
else if (o033 == 'b' && j040) s045 = 'c'; else s045 = 't'; *(f034 + h027)
= s045; } else if (o043) { char *m040 = d034 - 1; if (*(z035 - 1) == e001
&& !a004) *(z035 - 1) = ' '; else if (m040 >= j041 && *m040 != ' ' && *m040
!= e001) q040 (' '); } else if (!q034) { if (!j040) q040('\n'); h042 ("? ");
} } void b035 (char *g041, char t) { char *k037 = g041; int o039 = 0; int
l057 = 0; int f036; int r038; int o044; int l003; int u045; static int g044
= 0; while (*k037) { if (*k037++ == ' ') l057++; o039++; } if (l057 == 0)
{ while (*g041) i040 (*g041++, t); return; } f036 = h034 - o039; r038 =
1 + f036 / l057; o044 = f036 % l057; if (g044) { l003 = 0; u045 = o044;
} else { l003 = l057 - o044; u045 = l057; } g044 = 1 - g044; l057 = 0; while
(*g041) { if (*g041 != ' ') i040 (*g041, t); else { int i; for (i = 0; i
< r038; i++) i040 (' ', t); if (l057 >= l003 && l057 < u045) i040 (' ',
t); l057++; } g041++; } } void q042 (char t) { char *g041 = f034 + h027;
char *k037 = g041; char *q041; char c; int i; int l064 = o033 ? 80 : h034;
int z045 = o033 ? 0 : c043; while (1) { k037 = g041; q041 = NULL; while
(k037 - g041 <= l064) { if (*k037 == '\0' || *k037 == '\n') { q041 = k037;
break; } if (*k037 == ' ' || *k037 == '-') q041 = k037; k037++; } 
#ifndef NO_READLINE
l050 = b026; *l050 = '\0'; 
#endif 
if (*k037 == '\n' || *k037 == '\0') { for (i = 0; i < z045; i++) i040 (' ',
t); while (g041 < k037) i040 (*g041++, t); if (*k037 == '\0') break; i040
(*g041++, t); if (*(g041 - 1) == '\n' && t != 'L' && g043 (g041)) break;
continue; } if (!q041) q041 = k037; if (*q041) q041++; c = *q041; *q041
= '\0'; k037 = q041; while (*(k037 - 1) == ' ') k037--; if (k037 < q041)
*k037 = '\0'; if (*g041 != '\n') for (i = 0; i < z045; i++) i040 (' ', t);
if (e041) b035 (g041, t); else while (*g041) { i040 (*g041++, t); if (*(g041
- 1) == '\n' && t != 'L' && g043 (g041)) break; } if (c && *(q041 - 1) !=
'\n') i040 ('\n', t); if (!c) break; if (k037 < q041) *k037 = ' '; *q041
= c; g041 = q041; if (t != 'L' && g043 (g041)) break; } } void m032 (int
t007) { 
#ifdef l049
int u003 = 0; 
#endif
if (!f034) { 
#ifdef l049
u003 = 1; 
#endif
f034 = m039 (4096); l053 = 4096; } 
#ifdef l049
if (u003) { if (o033 == 'b') { v044 = 0; h027 = sizeof (n036) + 8; x004
(g037 [s043], atoi (g037 [o036])); } else puts (""); } 
#endif 
if (d034 > j041) { char *m040 = d034 - 1; char f037 = '\0'; while ((*m040
== ' ' || *m040 == e001 || *m040 == '\n') && m040 > j041) { if (!f037) f037
= *m040; m040--; } if (f037) { *(++m040) = f037; d034 = m040 + 1; *d034
= '\0'; } } if (v038 || !o033) t042 (t007, 0); if (v038) { q042 ('L'); 
#ifndef NO_READLINE
if (v038 && o033) fprintf(v038, b026); 
#endif 
} if (!o033) q042 ('C'); else { t042 (t007, a004); 
#ifndef b025
#ifndef NO_READLINE
l050 = b026; *b026 = '\0'; 
#endif 
#ifdef l049
if (o033 == 'b') i003 (f034); else 
#endif 
{ fputs (f034, stdout); fflush (stdout); } 
#endif 
} d034 = j041; *d034 = '\0'; o034 = 0; } 
#define v052 128
#define i042 64
#if defined(s006) || y000 >= 11
#define i043 32
#endif
#ifdef x008
#define d038 16
#else
#define d038 0
#endif
#define t043 8
#define g045 4
#define d039 2
#define l065 1
#ifdef q000
#ifdef __STDC__
void g046 (int e005, int t002, int u001) 
#else
void g046 (e005, t002, u001) int e005; int t002; int u001; 
#endif
{ int q043; int type; if (t002 &= 14) t002 = 8; type = j043 (e005++); q043
= j043 (e005++) << 8; q043 |= (j043 (e005) & 255); if (type == 0) t002 =
v052; else if (type == 1) t002 = v052; else if (type == 3) { t002 = d039
| v052; u001 = 0; } if (q043 == e009 || q043 == j002) { char *a043 = (q043
== e009) ? n040 : y039; while (*a043) o001 (*a043++); } else { if (type
< 2) u001 = 0; t001 (t002, q043, u001); } n041 = e005; } 
#endif 
#ifdef __STDC__
void t001 (int t002, int z002, int u001) 
#else
void t001 (t002, z002, u001) int t002; int z002; int u001; 
#endif
{ int g042; int a048; int m041; int x043; int m042; int q044; int o045;
#if y000 == 1
int g047 = 0; 
#endif 
int e046; 
#if defined(s006) || y000 >= 11
int t044; 
#endif 
int y045; int d040; int i044; int b036; 
#ifdef q000
int j046 = t002; 
#endif 
char z046 [h029]; int s046; int f038; char *h043; char i039; if (d034 ==
NULL) d034 = j041; g033++; o045 = t002 & i042; 
#if defined(s006) || y000 >= 11
t044 = t002 & i043; 
#endif
x043 = t002 & t043; q044 = t002 & g045; m042 = t002 & d039; m041 = t002
& l065; e046 = t002 & v052; if (m042) { int h044 = t009 [z002]; 
#if y000 >= 11
if ((z002 != e009 && z002 != j002 && z002 != c005) || (h044 != w007 && h044
!= q009 && h044 != t045 && h044 != i045 && h044 != m043)) 
#else
#if y000 == 1
if ((z002 != e009 && z002 != j002 && z002 != c005) || h044 != w007) 
#else
if ((z002 != e009 && z002 != j002 && z002 != c005) || (h044 != w007 && h044
!= q009)) 
#endif
#endif 
z002 = h044; else e046 = 1; } b036 = u001; if (q044 && ((u001 != e009 &&
u001 != j002 && u001 != c005) || m041)) u001 = t009 [u001]; if (z002 > h009
|| e046) { if (e046 && (z002 == e009 || z002 == j002)) { if (z002 == e009)
h043 = n040; else if (z002 == j002) h043 = y039; else h043 = z036; while
(*h043 != '\0') o001 (*h043++); return; } n041 = a039 [z002]; } 
#if h009 > k003
else if (z002 >= k003) { 
#if y000 == 1
if (s000 (f008, g003) || (s000 (z002, n005) && s000 (f008, b004) && !s000
(f008, x008))) n041 = y033 [z002]; else 
#else 
#if defined(g003) && defined(x008) && defined(n005)
if (s000 (f008, g003) || (!s000 (f008, x008) && s000 (z002, n005))) n041
= y033 [z002]; else 
#endif 
#endif 
n041 = j032 [z002]; } 
#endif 
#if j001 > s004
else if (z002 >= s004) { 
#if defined(s006) && y000 == 10
if (s000 (f008, s006)) n041 = n034 [z002]; else 
#endif
#if y000 >= 11 || defined(s006)
if (t044) n041 = n034 [z002]; else 
#endif
if (q003 [z002] == q005) { 
#if y000 == 1
g047 = 1; 
#endif 
n041 = y033 [z002]; } else n041 = j032 [z002]; } 
#endif 
if ((i039 = j043 (n041)) == '\0') goto n047; 
#define r039 1
#define y046 2
#define u046 4
#define m044 8
#define e047 16
if (z002 >= d005) { int z047 = 2 * (z002 - d005); d040 = u001; if (m031
[z047] == r039) { d040 = m031 [z047 + 1]; if (d040 <= 1) d040 = 0; else
{ d040 = x002 (d040 - 1); if (d040 >= t009[z002]) d040++; } t009[z002] =
d040; } else if (m031 [z047] == y046) { d040 = t009 [z002]; if (t009 [z002]
< m031 [z047 + 1] - 1) t009[z002]++; } else if (m031 [z047] == u046) { d040
= t009 [z002]; if (t009 [z002] < m031 [z047 + 1] - 1) t009[z002]++; else
t009 [z002] = 0; } else if (m031 [z047] == m044) d040 = t009 [z002]; else
if (m031 [z047] == e047) d040 = t009 [t009 [z002]]; 
#if y000 == 1 
else if (u001 == j002 && t009 [j002] < w007) 
#else
else if (u001 == j002 && t009 [j002] >= 0) 
#endif 
d040 = t009 [t009 [u001]]; } if (!x043) u001 = (z002 <= h009) ? t009 [z002]
: z002; while (i039 != '\0') { 
#ifdef q000
if (i039 == q000) { g046 (n041 + 1, j046, u001); i039 = j043 (++n041); continue;
} 
#endif 
#ifdef w002
if (i039 == w003) { j039 ^= 1; goto y047; } 
#endif 
if (i039 == k000) { y045 = j043 (++n041); f038 = n041 + 2 * y045 -1; i044
= (z002 >= d005) ? d040 : u001; 
#if y000 == 1
if (g047) i044 = (i044 == 1 || y045 == 1) ? 0 : 1; if (i044 <= 0 || (i044
== 1 && z002 >= d005)) 
#else 
#if y000 >= 11
if (i044 >= y045 && z002 >= d005 && m031[2 * (z002 - d005)] == u046) i044
%= y045; 
#endif
if (i044 <= 0) 
#endif 
n041 = f038 + 1; else { 
#if y000 == 1
n041 = n041 - 1 + 2 * ((i044 > y045) ? y045 - 1 : i044 - 1); if (z002 <
d005) n041 += 2; 
#else 
n041 = n041 - 1 + 2 * ((i044 >= y045) ? y045 - 1 : i044); 
#endif 
a048 = j043 (n041 + 1); if (a048 < 0) a048 += 256; n041 = f038 + 256 * j043
(n041) + a048 + 1; } a048 = j043 (f038 + 1); if (a048 < 0) a048 += 256;
f038 = f038 + 256 * j043 (f038) + a048 + 1; i039 = j043 (n041); } else if
(i039 == r000) { i039 = j043 (n041 = f038++); if (i039 == r000) goto y047;
} 
#if y000 >= 11
else if (i039 == u000 || i039 == z001) { if (m034) m034 = 2; if (m041 ||
i039 == z001) 
#else
else if (i039 == u000) { if (m041) 
#endif
{ sprintf (z046, "%d", u001); h043 = z046 - 1; while (*(++h043) != '\0')
o001 (*h043); goto y047; } 
#if y000 >= 11
else if (u001 == e009 || u001 == j002 || u001 == c005) { if (u001 == e009)
h043 = n040; else if (u001 == j002) h043 = y039; else h043 = z036; while
(*h043 != '\0') o001 (*h043++); goto y047; } else if (u001 == e040) { h043
= i032; while (*h043 != '\0') o001 (*h043++); goto y047; } 
#else 
else if (u001 == e009 || u001 == j002) { h043 = (u001 == e009 ? n040 : y039);
while (*h043 != '\0') o001 (*h043++); goto y047; } 
#endif 
else { g042 = (q044 && b036 <= h009) ? b036 : u001; s046 = n041; g033++;
n041 = a039 [g042]; i039 = j043 (n041); if (i039 == '!') i039 = j043 (++n041);
while (i039 != '\0') { o001 (i039); i039 = j043 (++n041); } n041 = s046;
} } else o001 (i039); y047: i039 = j043 (++n041); } n047: if (o045) longjmp
(r004, 1); return; } 
#ifdef __STDC__
void o001 (char f003) 
#else
void o001 (f003) char f003; 
#endif
{ if (!j041) { j041 = m039 (q033); d034 = j041; } if (o034 == q033 - 8)
{ q033 += 1024; j041 = z043 (j041, q033); d034 = j041 + o034; } 
#ifdef k038
#ifdef i000
if (f003 == i000) { r035 = 1; if (o033) { *d034++ = '<'; o034++; } return;
} else if (r035) { if (f003 == f000) { r035 = 0; if (o033) { o034++; *d034++
= '>'; } return; } } if (r035 && !o033) return; 
#endif 
#endif 
if (f003 == '\n') { v047++; if (v047 > 2) return; } 
#ifdef w001
else if (f003 && f003 != w001 && v047) 
#else
else if (f003 && v047) 
#endif 
v047 = 0; 
#if y000 >= 11
if (isalpha (f003)) { if (m034 == 2) f003 = toupper (f003); m034 = 0; }
else if (isdigit (f003)) m034 = 0; else if (strchr (".!?", f003)) m034 =
1; 
#endif 
o034++; *d034 = f003; 
#ifdef w002
if (t009 [w002] || j039) z033 (d034); 
#endif 
d034++; *d034 = '\0'; return; } 
#ifdef j035
#ifdef __STDC__
void o046 (void) 
#else
void o046 (); 
#endif
{ char *g041; char *z035; unsigned int l057; int n048 = 0; if (t009 [e009]
<= w007 || t009 [j002] <= w007 || 
#ifdef x042
t009 [x042] > 1 || o033 == 'y' || 
#endif
t009 [e009] == j035 || t009 [e009] == j047) return; if (u039 > v040) u039
= v040; if (k031 == NULL) { if ((k031 = (unsigned char *)malloc(8192)) ==
NULL) { printf ("GLITCH: Unable to allocate diffs array!\n"); return; }
else { y037 = 8192; memset (k031, '\0', 4); v040 = u039 = k031 + 4; } }
else { for (l057 = 0, z035 = t032, g041 = o030; l057 < sizeof (o030); l057++,
z035++, g041++) { if (*z035 != *g041 && ! ((l057 >= e009*sizeof(int) &&
l057 < (e009 + 1)*sizeof(int)) || (l057 >= j002*sizeof(int) && l057 < (j002
+ 1)*sizeof(int)) || (l057 >= f008*sizeof(int) && l057 < (f008 + 1)*sizeof(int))))
{ if (u039 - k031 + 8 >= y037) { int c045 = u039 - k031; if ((k031 = (unsigned
char *)realloc(k031, y037 + 8192)) == NULL) { printf ("GLITCH: Unable to re-allocate diffs array!\n");
return; } y037 += 8192; u039 = k031 + c045; } if (l057 || o033 < 'x') {
*u039++ = l057 / 256; *u039++ = l057 % 256; *u039++ = *z035; *u039++ = *g041;
n048 = 1; } } } if (n048) { for (l057 = 0; l057 < 4; l057++) *u039++ = '\0';
v040 = u039; } } memcpy (t032, o030, sizeof (o030)); } 
#endif 
#ifdef __STDC__
void d041 (void) 
#else
void d041 () 
#endif
{ if (v039) fclose (v039); if (v038) { int l057; fprintf (v038, "\nINTERACT\n");
for (l057 = 0; l057 < 39; l057++) fprintf (v038, "*-"); fprintf (v038, "*\n");
fclose (v038); v038 = NULL; } 
#if y000 >= 11
if (v046) free (v046); v046 = NULL; 
#endif
} 
#ifdef __STDC__
void z048 (char *k039, int j048) 
#else
void z048 (k039, j048) char *k039; int j048; 
#endif
{ char *a043; 
#ifndef NO_READLINE
if (!*b026) { memset (b026, ' ', 20); strcpy (b026 + c043, "? "); } 
#endif
#ifdef w002
j039 = 0; 
#endif
#ifdef x042
if (o034 > 3 && t009 [x042] == 0 && !i034 && o033 != 'b') 
#else 
if (o034 > 3 && !i034 && !q034) 
#endif 
{ FILE *s047; char k040[64]; i001 (998, &t009 [0]); sprintf (k040, "%s.adl",
y041); if ((s047 = fopen(k040, s039)) != NULL) { char *a043 = j041; int
o039 = strlen (l058); while (*a043 == '\n') a043++; if (strncmp (a043, l058,
o039) == 0) a043 += o039; fwrite(a043, 1, o034 - (a043 - j041), s047); fclose
(s047); } } 
#ifdef NO_READLINE
if (!*j041 && !q034) d035 (j040 ? "? " : "\n? "); 
#endif 
if (o033 != 'b' && o033 != 'y' && *j041) { m032 (0); g043 (NULL); } 
#if y000 >= 11
m034 = 1; 
#endif 
*k039 = '\0'; 
#ifdef x042
#ifdef q045
r001 ('s', x042, q045); 
#endif
if (o033 == 'x' || o033 == 'z') { i001 (998, &t009 [0]); 
#if y000 >= 11
if (v046) free (v046); v046 = NULL; 
#endif 
#ifdef b025
longjmp (r004, 2); 
#else
exit (t009 [x042]); 
#endif 
} if (o033 == 'y') { strncpy (k039, u041, j048 - 1); o033 = 'z'; if (v038)
fprintf (v038,"\nREPLY: %s\n", k039); return; } 
#endif
i034 = 0; if (v039) { char a049 [256]; char l066 [256]; while (1) { 
#ifndef NO_READLINE
if (!o033) { printf (b026); *b026 = '\0'; } 
#endif 
if (fgets (a049, j048, v039) == NULL || strncmp (a049, "INTERACT", 8) ==
0) { fclose (v039); v039 = NULL; break; } a043 = a049 + strlen (a049); while
(*(a043 - 1) == '\n' || *(a043 - 1) == '\r') a043--; *a043 = '\0'; *l066
= '\0'; if (strncmp (a049, "REPLY:", 6) == 0) { strncpy (k039, a049 + 6,
j048); if (!o033) printf ("%s%s%s\n", l066, k039, j040 ? "" : "\n"); else
{ char b037; while (d034 > j041 && (*(d034 - 1) == ' ' || *(d034 - 1) ==
e001)) d034--; if (*(d034 - 1) == '\n') { if (! j040) d034 += sprintf (d034,
"%cbr /%c", i000, f000); b037 = '?'; } else b037 = *(--d034); d034 += sprintf
(d034, "%cspan class=\"query\"%c%c %s%c/span%c", i000, f000, b037, a049
+ 7, i000, f000); d034 += sprintf (d034, "%c/div%c%c%cdiv id=\"chunk\" name=\"chunk\"%c",
i000, f000, j040 ? ' ' : '\n', i000, f000); } break; } else { int o039 =
strlen (a049); if (o039 > 0) { strcpy (l066, a049); if (*(l066 + o039 -
1) != ' ') strcat (l066, " "); } } } } 
#ifdef l049
if (v039 == NULL && o033 == 'b') { m032 (0); (void) u004 (k039, g038); }
#endif 
if (v039 == NULL && o033 != 'b' && (!q034 || v044)) 
#ifdef NO_READLINE
fgets (k039, j048, stdin); 
#else
{ char *c046; if (o033) fgets (k039, j048, stdin); else { b034 (b026); putchar
('\r'); c046 = readline (b026); if (!j040) putchar ('\n'); if (c046) { memcpy
(k039, c046, j048); add_history (c046); free (c046); *(k039 + j048 - 1)
= 0; } else *k039 = 0; } } if (v038 && o033 != 'b') { fputs (b026, v038);
fflush (v038); } 
#endif 
#ifdef x042
if (o033 == 'x') o033 = 'z'; 
#endif
*(k039 + j048 - 1) = '\0'; *(k039 + j048 - 2) = '\n'; a043 = k039; while
(*a043) { if (strchr ("\"\'", *a043)) *a043 = ' '; a043++; } if (v038) fprintf
(v038,"\nREPLY: %s\n", k039); 
#ifndef NO_READLINE
*b026 = '\0'; 
#endif
} 
#ifdef __STDC__
void d042 (char *g048, int j049) 
#else
void d042 (g048, j049) char *g048; int j049; 
#endif
{ int m045; if (j043 (j049) == '!') j049++; for (m045 = 1; m045 <= 20; m045++)
if ((*g048++ = j043 (j049++)) == '\0') return; } 
#ifdef __STDC__
void u007 (int b038, int q043) 
#else
void u007 (b038, q043) int b038; int q043; 
#endif
{ int u002; if (a039[q043]) { d042 (b038 == 1 ? n040 : y039, a039 [q043]);
return; } for (u002 = 0; u002 < i007; u002++) { if (s008 [u002] == q043)
{ d042 (b038 == 1 ? n040 : y039, z006 [u002]); return; } } strcpy (b038
== 1 ? n040 : y039, "*GLITCH*"); return; } 
#ifdef __STDC__
void z003 (int t002, int i002, int type) 
#else
void z003 (t002, i002, type) int t002; int i002; int type; 
#endif
{ int g042; int v053; 
#ifdef l008
int u003; 
#endif 
if (t002 == 0 && t009 [f008] != 1) return; v053 = -1; 
#ifdef l008
u003 = (t002 == 2) ? q004 + 1 : s004; if (u003 > j001) goto z049; for (g042
= u003; g042 <= j001; g042++) { 
#if y000 >= 11 && defined (g030)
if (z037 > 0) { int i, j; j = 0; for (i = 0; i < z037; i++) if (g042 ==
v041 [i]) { v041 [i] = v041 [z037 - 1]; z037--; j = 1; break; } if (j) continue;
} 
#endif 
#else 
for (g042 = s004; g042 <= j001; g042++) { 
#endif 
#ifdef f009
if ((q003 [g042] == i002 || (i002 != q005 && s000 (g042, f009) && q003 [g042]
+ 1 == i002)) && 
#else
if (q003 [g042] == i002 && 
#endif
(type < 0 || s000 (g042, type))) { if (v053 >= 0) { 
#if y000 > 1
t009 [j002] = q009; 
#else
t009 [j002] = w007; 
#endif
return; } v053 = g042; if (t002) break; } } if (v053 >= 0) { t009 [j002]
= v053; d042 (y039, a039 [v053]); 
#ifdef w002
if (t009 [w002] || j039) { char *o047 = y039; while (*o047) z033 (o047++);
} 
#endif 
y039 [19] = '\0'; t009 [f008] = 2; 
#ifdef l067
t009 [l067] = v053; 
#endif
#ifdef l008
if (t002 > 0) q004 = v053; if (t002 == 1) { h035 = i002; h036 = type; }
#endif 
return; } 
#ifdef l008
z049: if (t002 > 0) q004 = 0; 
#endif 
t009 [j002] = 0; return; } 
#if y000 >= 11
#ifdef z050
#ifdef __STDC__
void i046 (int a050, int e048) 
#else
void i046 (a050, e048) int a050; int e048; 
#endif
{ char j050; strncpy (i032, e042 [s041], h029); 
#ifdef w002
if (t009 [w002]) z034 (i032, h029); 
#endif
t001 (t043, z050, e040); d042 (i032, a050); j050 = *(i032 + e048); *(i032
+ e048) = '\0'; t001 (t043, z050, e040); *(i032 + e048) = j050; if ((unsigned
int)e048 >= strlen (i032)) t009 [z050]++; else t001 (t043, z050, e040);
t001 (0, z050, 0); *i032 = '\0'; d035("\n\n"); } 
#endif
#ifdef __STDC__
void b039 (int *type, int *q043, int *o048, int b038, int z051) 
#else
void b039 (type, q043, o048, b038, z051) int *type; int *q043; int *o048;
int b038; int z051; 
#endif
#else 
#ifdef __STDC__
void b039 (int *type, int *q043, int *o048, int b038) 
#else
void b039 (type, q043, o048, b038) int *type; int *q043; int *o048; int
b038; 
#endif
#endif
{ int o049, z052, b040; 
#if y000 > 1
int u047; int y048; 
#endif 
#if y000 >= 11
int l068; int d043; int a050; int e048; 
#endif
int s048; char *o047; int w055; char v054 [h029]; *type = -1; strncpy (v054,
b038 == 0 ? g029 : e042 [s041], h029); 
#ifdef w002
if (t009 [w002]) z034 (v054, h029); 
#endif 
if (*v054 == '\0') { *type = m005; goto t046; } o049 = -1; b040 = i007 +
1; while (b040 > o049 + 1) { g033++; z052 = (o049 + b040) / 2; if (j043
(s048 = v005 [z052]) == '!') s048++; o047 = v054; while (j043 (s048) ==
*o047) if (*o047 != '\0') { o047++; s048++; } else break; if (j043 (s048)
< *o047 && *o047 != '\0') o049 = z052; else b040 = z052; } *q043 = w007;
o049++; b040 = i007; 
#if y000 > 1
u047 = w007; 
#endif 
while (o049 < b040) { o047 = v054; if (j043 (s048 = v005 [o049]) == '!')
#if y000 == 1
s048++; 
#else
{ s048++; y048 = 1; } else y048 = 0; 
#endif 
w055 = s048; while (*o047 == j043 (w055)) { if (*o047 == '\0') break; else
{ w055++; o047++; } } if (*o047 != '\0') break; 
#if y000 > 1
if (!y048 || (y048 && j043 (w055) == '\0')) 
#else
if (j043 (w055) == '\0' || w055 - s048 >= 5) 
#endif
{ *type = e011 [o049]; *q043 = s008 [o049]; *o048 = z006 [o049]; if (j043
(w055) == '\0') 
#if y000 == 1
{ if (w055 - s048 <= 2) { o047 = v054; while (++o049 < b040) if (*q043 ==
s008 [o049] && *o047 == j043 (v005 [o049])) *o048 = z006 [o049]; } goto
t046; } 
#else 
goto t046; if (u047 != w007 && *q043 != u047) 
#if y000 >= 11
{ 
#define j051(X) (b038 == 1 ? X > j001 : (X <= j001 && \
(q003 [X] == q005 || q003 [X] == t009 [c004])))
int w056 = j051 (u047); int x044 = j051 (*q043); if ((x044 && w056) || (!x044
&& !w056)) { *q043 = q009; goto t046; } if (!x044 && w056) { *q043 = u047;
*o048 = d043; *type = l068; o049++; continue; } if (x044 && !w056) { u047
= *q043; if (j043 (s048) == '\0') break; } } d043 = *o048; l068 = *type;
#endif 
u047 = *q043; 
#endif 
if (j043 (s048) == '\0') break; } o049++; } 
#if y000 >= 11
if (*q043 == w007 && b029 > 0) { char *o050 = NULL; int c047 = 0; u047 =
-1; for (o049 = 0; o049 < i007; o049++) { if (j043 (s048 = v005 [o049])
== '!') continue; o047 = v054; while (*o047 == j043 (s048)) { o047++; s048++;
} if (*o047 == '\0' && j043 (s048 + 1) == 0 && e011 [o049] != m005) { if
(u047 >= 0 && s008 [u047] != s008 [o049]) {u047 = t045; break;} u047 = o049;
a050 = v005 [o049]; e048 = s048 - a050; continue; } o050 = o047; c047 =
s048; if (*o047 == j043 (s048 + 1) && *(o047 + 1) == j043 (s048)) { s048
+= 2; o047 += 2; while (*o047 && *o047 == j043 (s048)) {o047++; s048++;}
if (*o047 == '\0' && j043 (s048) == '\0' && e011 [o049] != m005) { if (u047
>= 0 && s008 [u047] != s008 [o049]) {u047 = t045; break;} u047 = o049; a050
= v005 [o049]; e048 = s048 - a050; continue; } o047 = o050; s048 = c047;
} if (*(o047 + 1) == j043 (s048 + 1)) { o047++; s048++; while (*o047 &&
*o047 == j043 (s048)) {o047++; s048++;} if (*o047 == '\0' && j043 (s048)
== '\0' && e011 [o049] != m005) { if (u047 >= 0 && s008 [u047] != s008 [o049])
{u047 = t045; break;} u047 = o049; a050 = v005 [o049]; e048 = s048 - a050;
continue; } o047 = o050; s048 = c047; } if (*o047 == j043 (s048 + 1)) {
s048++; while (*o047 && *o047 == j043 (s048)) {o047++; s048++;} if (*o047
== '\0' && j043 (s048) == '\0' && e011 [o049] != m005) { if (u047 >= 0 &&
s008 [u047] != s008 [o049]) {u047 = t045; break;} u047 = o049; a050 = v005
[o049]; e048 = s048 - a050; continue; } o047 = o050; s048 = c047; } if (*(o047
+ 1) == j043 (s048) || *(o047 + 1) == '\0') { o047++; while (*o047 && *o047
== j043 (s048)) {o047++; s048++;} if (*o047 == '\0' && j043 (s048) == '\0'
&& e011 [o049] != m005) { if (u047 >= 0 && s008 [u047] != s008 [o049]) {u047
= t045; break;} u047 = o049; a050 = v005 [o049]; e048 = s048 - a050; continue;
} } } if (u047 == t045) *q043 = t045; else if (u047 >= 0) { 
#ifdef z050
*type = e011 [u047]; *q043 = s008 [u047]; *o048 = z006 [u047]; if (z051)
i046 (a050, e048); 
#else
*q043 = w007; 
#endif
} } 
#endif 
t046: 
#if y000 >= 11
if (b038 > 1 && (*q043 == w007 || *q043 == t045) && o041 (v046, e042 [s041]))
t009 [j002] = i045; 
#endif 
if (b038 == 1) o047 = n040; else if (b038 == 2) o047 = y039; else o047 =
z036; if (*q043 <= w007) { strncpy (o047, e042 [s041], h029); if (b038 <=
2 && strlen (e042 [s041]) > 16) strcpy (j036, e042[s041]); } else { d042
(o047, *o048); 
#ifdef w002
if (t009 [w002] || j039) { char *h043 = o047; while (*h043) z033 (h043++);
} 
#endif 
} 
#if defined(i047) && defined(b041) 
if ((*q043 > i047 && *q043 < b041) && s040 [s041 + 1] == ' ') s040 [s041
+ 1] = ';'; 
#endif
return; } 
#ifdef __STDC__
void d044 (void) 
#else
void d044 () 
#endif
{ char *a043, *d034; char d045; for (a043 = u040; *a043; a043++) *a043 =
tolower (*a043); a043 = d034 = u040; while (*a043 == ' ' || *a043 == ','
|| *a043 == ';' || (*a043 == '.' && *(a043 + 1) != '.' && *(a043 + 1) !=
'/' && *(a043 + 1) != '\\')) a043++; while (*a043) { if (*a043 == '.' &&
(*(a043 + 1) == '.' || *(a043 + 1) == '/' || *(a043 + 1) == '\\')) { *d034++
= *a043++; continue; } while (*a043 && *a043 != ' ' && *a043 != ',' && *a043
!= ';' && *a043 != '.' && *a043 != '\n') *d034++ = *a043++; d045 = ' ';
while (*a043 == ' ' || *a043 == ',' || *a043 == ';' || *a043 == '\n' ||
(*a043 == '.' && *(a043 + 1) != '.' && *(a043 + 1) != '/' && *(a043 + 1)
!= '\\')) { if (*a043 == '.') *a043 = ';'; if (d045 == ' ' || *a043 == '\n')
d045 = *a043; else if ((d045 == ' ' || d045 == ',') && (*a043 == ';' ||
*a043 == '\n')) d045 = *a043; a043++; } if (*a043) *d034++ = d045; } if
(d045 != '\n') *d034++ = '\n'; *d034++ = '\0'; *d034 = '\0'; s041 = 0; a043
= u040; while (*a043) { if (*a043 == '\n') break; e042 [s041] = a043; while
(*a043 && *a043 != ' ' && *a043 != ',' && *a043 != ';' && *a043 != '\n')
a043++; s040 [s041 + 1] = *a043; *a043++ = '\0'; if (strcmp (e042 [s041],
a003) == 0) s040 [s041] = t009 [f008] < 90 ? ',' : ' '; else if (strcmp
(e042 [s041], u005) == 0) s040 [s041] = ';'; else s041++; } e042 [s041]
= NULL; s040 [s041] = '\n'; s041 = 0; t009 [e009] = -1; t009 [j002] = -1;
t009 [f008] = 0; return; } 
#ifdef __STDC__
void t008 (int g000) 
#else
void t008 (g000) int g000; 
#endif
{ int type; int q043; int o048; int c048 = 0; if (g000 == -1) goto v055;
#if y000 >= 11
if (t009[f008] == -1 && t009 [c005] == -1) { printf ("\nSorry... This game does not support command line restore.\n\n");
exit (1); } 
#endif 
if (t009 [f008] < 90 || t009 [f008] >= x005) b029 = 1; else if (t009 [f008]
== 99) b029 = 0; else b029 = -1; 
#if y000 >= 11
#if defined (l008) && defined (g030)
if (q004 == 0) z037 = 0; 
#endif
*i032 = '\0'; 
#endif
*n001 (e009) = -1; *n001 (j002) = -1; 
#ifdef l008
if (q004) { z003 (2, h035, h036); if (s040 [s041] == ',') i031 = t009 [e009];
if (q004) return; } else { i031 = t009 [e009]; l054 = t009 [j002]; } 
#else 
i031 = t009 [e009]; l054 = t009 [j002]; 
#endif 
#ifdef q007
if (s000 ((f008), (q007))) { o031 = i031; strncpy (g029, n040, 20); } 
#if defined(x042) && y000 >= 11
else if (o033 > 'b' && *g029 && o031 == 0) b039 (&type, &o031, &o048, 0,
0); 
#endif
else { o031 = 0; *g029 = '\0'; } r001 ('c', (f008), (q007)); 
#endif 
c048 = (s041 != 0 && e042 [s041] && s040 [s041] == ','); if (s040 [s041]
== ';') { t009 [e009] = -1; t009 [j002] = -1; o001 ('\n'); } 
#ifdef q045
r001 ('c', x042, q045); 
#endif
s049: 
#ifdef j035
if (t009 [c049] >= 0) o046 (); else if (k031 && u039 > k031) v040 = u039
= k031; 
#endif 
if (e042 [s041] == NULL) { if (m033 [0] != '\0' && m033 [0] != '\n') strncpy
(g028, m033, 160); u040 [0] = '\0'; while (u040 [0] == '\0' || u040 [0]
== '\n') { 
#ifdef l009
h030 = 0; 
#endif 
#ifdef i033
fprintf (stderr, "(Locates: %d (+%d), faults %d (+%d))\n", g033, g033 -
b030, l055, l055 - g034); b030 = g033; g034 = l055; 
#endif 
g043 (NULL); if (g000) t001 (0, g000, 0); if (! d034) d034 = j041; z048
(u040, 160); strncpy (m033, u040, 160); 
#ifdef x042
if (t009 [x042] && (*u040 == '\n' || *u040 == '\0')) { t009 [f008] = 0;
t009 [e009] = -1; t009 [j002] = -1; return; } 
#endif 
} g043 (NULL); d044 (); } v055: if (e042[s041] == NULL) goto s049; 
#if y000 >= 11
*y040 = '\0'; *i032 = '\0'; b039 (&type, &q043, &o048, s040 [s041] == ','
? 2 : 1, 1); strncpy (y040, e042 [s041], h029 - 1); 
#else
b039 (&type, &q043, &o048, s040 [s041] == ',' ? 2 : 1); 
#endif
s041++; if (type == m005) { if (e042 [s041] == NULL) goto s049; if (s040
[s041] == ' ' || s040 [s041] == ',') goto v055; } 
#ifdef q007
if ((s000 (f008, q007) && q043 <= h009) || c048) { t009 [e009] = i031; t009
[j002] = q043; t009 [f008] = 2; goto f039; } 
#endif 
t009 [e009] = q043; t009 [f008] = 1; s050: 
#if y000 >= 11
*o032 = '\0'; 
#endif
if (s040 [s041] == ' ' && e042 [s041]) { 
#if defined(q008) && defined(k004)
int g049 = b029; if (b029 == 1) b029 = (t009 [e009] < q008 || t009 [e009]
> k004); 
#endif
#if defined(b003) && defined (e010)
if (t009 [e009] > b003 && t009 [e009] < e010) { s040 [s041] = ';'; goto
f039; } 
#endif
#if y000 >= 11
#ifdef a007
if (t009 [e009] == a007) { int i = s041; strcpy (n038, e042 [i]); while
(e042 [i] && (s040[i + 1] == ' ' || s040[i + 1] == ',')) { strcat (n038,
" "); strcat (n038, e042 [i + 1]); if (s040 [i + 1] == ' ') s040 [i + 1]
= ','; i++; } } 
#endif 
*i032 = '\0'; b039 (&type, &q043, &o048, 2, 1); strncpy (o032, e042 [s041],
h029 - 1); 
#else
b039 (&type, &q043, &o048, 2); 
#endif
#if defined(q008) && defined(k004)
b029 = g049; 
#endif
s041++; if (type == m005) goto s050; t009 [j002] = q043; t009 [f008] = 2;
} 
#if defined(q007) || (defined(b003) && defined(e010))
f039: 
#endif
if (t009 [f008] == 1 && o031) { if ((o031 > j001 && t009 [e009] < j001)
|| (o031 < j001 && t009 [e009] > j001)) { t009 [f008] = 2; t009 [j002] =
o031; strncpy (y039, g029, 20); } o031 = 0; *g029 = '\0'; } 
#ifdef l009
if ((t009 [e009] == l009 || t009 [j002] == l009) && s041 > h030) { if (d003[l009]
!= d003[0]) (*d003[l009])(); } if (t009 [e009] == l009 || t009 [j002] ==
l009) { if (e042 [h030] == NULL) goto s049; if (h030 >= s041) goto v055;
h030 = s041; s041 -= t009 [f008] + 1; while (s041 > 0 && s040 [s041] !=
';') s041--;; if (s041 < 0) { if (*g028 == '\n') goto s049; strncpy (u040,
g028, 160); strncpy (m033, g028, 160); d044 (); } goto v055; } 
#endif 
#if defined(q008) && defined(k004)
if (t009 [f008] == 2 && t009 [j002] >= q008 && t009 [j002] <= k004 && (t009
[e009] < q008 || t009 [e009] > k004)) { i001 (29, &t009[0]); if (t009 [j002]
>= w007) { t009 [f008] = 1; t009 [j002] = -1; } } 
#endif
if ( t009 [e009] == w007 || t009 [j002] == w007 
#if y000 > 1
|| t009 [e009] == q009 || t009 [j002] == q009 
#endif
#if y000 >= 11
|| t009 [e009] == t045 || t009 [j002] == t045 
#endif
) e042 [s041] = NULL; 
#if y000 < 11
else if (t009 [f008] == 2 && t009 [j002] <= i005 && t009 [j002] >= y003
&& (t009[e009] > i005 || t009[e009] < y003)) 
#else 
else if (t009 [f008] == 2 && t009 [j002] != i045 && t009 [j002] <= i005
&& t009 [j002] >= y003 && (t009[e009] > i005 || t009[e009] < y003)) 
#endif 
{ int q046; q046 = t009 [e009]; t009 [e009] = t009 [j002]; t009 [j002] =
q046; strncpy (a042, n040, 20); strncpy (n040, y039, 20); strncpy (y039,
a042, 20); } n040 [19] = '\0'; y039 [19] = '\0'; 
#ifdef w003
if (t009[w002]) { z034 (n040, h029); z034 (y039, h029); } 
#endif
if (s040 [s041] == ' ') { 
#if y000 >= 11 && defined(l008) && defined (g030)
if (e042 [s041]) { b039 (&type, &q043, &o048, 3, 0); if (q043 == g030) {
s041++; while (q043 >= 0 && (s040 [s041] == ' ' || s040 [s041] == ','))
{ if (strcmp (e042 [s041], a003) != 0) { b039 (&type, &q043, &o048, 3, 1);
if (q043 <= w007) break; else if (q043 > j001) { q043 = m043; break; } else
{ d042 (z036, o048); v041 [z037++] = q043; } } s041++; } t009 [c005] = -1;
if (q043 <= w007) return; } } 
#endif 
if (e042 [s041] && strcmp (e042 [s041], a003) == 0 && s040 [s041] == ' ')
s040 [++s041] = ','; else if (s040[s041] != ';') { 
#if y000 >= 11
if (t009 [f008] > 1 && (s040 [s041] == ' ' || s040 [s041] == ',')) t009
[f008] = m043; if (e042 [s041]) while (s040 [++s041] == ' '); } } 
#ifdef l009
if (t009 [e009] == -l009 && t009 [f008] > 1) { t009 [e009] = l009; t009
[f008] = m043; } 
#endif 
if (t009 [f008] == m043 || t009 [e009] > f008 || t009 [j002] > f008) e042
[s041 + 1] = NULL; 
#else 
while (s040 [++s041] == ' '); } } 
#endif 
if (t009 [f008] == 1) t009 [j002] = -1; 
#if y000 >= 11
else if (t009 [f008] == m043) { t009 [j002] = -1; } 
#endif
return; } 
#ifdef __STDC__
int c000 (int g000) 
#else
int c000 (g000) int g000; 
#endif
{ char n046 [10]; char *t047; int x045 = -1; if (g000 >= 0) t001 (0, g000,
0); else g043 (NULL); while (x045 < 0) { i034 = 1; z048 (n046, 10); g043
(NULL); 
#ifdef w002
if (t009 [w002]) z034 (n046, 10); 
#endif 
t047 = n046; while (*t047 == ' ') t047++; if (*t047 == '\0' || *t047 ==
'\n') x045 = 1; else if (*t047 == 'y' || *t047 == 'Y') x045 = 1; else if
(*t047 == 'n' || *t047 == 'N') x045 = 0; else if (*t047 == 'q' || *t047
== 'Q') x045 = 0; if (x045 < -1) { d035 ("(OK, smartass... I'll assume you mean YES - so there!)\n \n");
x045 = 1; } if (x045 >= 0) break; d035 ( "Eh? Do me a favour and answer yes or no!\nWhich will it be? ");
x045--; } return x045; } 
#ifdef __STDC__
void o051 (char *j052, char *y049) 
#else
void o051 (j052, y049) char *j052; char *y049; 
#endif
{ char *a043; strcpy (y049, j052); a043 = y049; while (*a043) { if (*a043
== '\n') { *a043 = '\0'; break; } 
#if v003
if (*a043 == '.') *a043 = '_'; 
#endif 
a043++; } 
#ifdef v003
*(y049 + 8) = '\0'; 
#else 
*(y049 + 16) = '\0'; 
#endif 
if (strcmp (y049 + strlen (y049) - 4, ".adv") != 0) strcat (y049, ".adv");
return; } 
#ifdef __STDC__
int s051 (FILE *d046) 
#else
int s051 (d046) FILE *d046; 
#endif
{ int y050 = 0; int d047 = 0; int j053 = 0; int r040 = 0; char *b042 = d004;
char e049 = fgetc (d046); while (1) { if (*b042 == '\0' && e049 == '\n')
return (0); if (! isalnum (e049) && ! isalnum(*b042)) break; if (e049 !=
*b042) return (1); b042++; e049 = fgetc (d046); } while (*b042 && ! isdigit
(*b042)) b042++; while (e049 != '\n' && ! isdigit (e049)) e049 = fgetc (d046);
if (e049 == '\n' && *b042 == '\0') return (0); while (isdigit (*b042) ||
*b042 == '.') { if (*b042 == '.') { y050 = d047; d047 = 0; } else d047 =
10 * d047 + *b042 - '0'; b042++; } while (isdigit (e049) || e049 == '.')
{ if (e049 == '.') { j053 = r040; r040 = 0; } else r040 = 10 * r040 + e049
- '0'; e049 = fgetc (d046); } if (y050 != j053) return (1); if (d047 < r040)
return (1); while (e049 != '\n') e049 = fgetc (d046); return (0); } 
#ifdef __STDC__
int a002 (int t002) 
#else
int a002 (t002) int t002; 
#endif
{ 
#ifdef x042
FILE *l069 = NULL; 
#endif 
static char *k041 = NULL; static char *b043 = NULL; char *i048; 
#ifdef x042
char *b044 = (char *)(t002 < 2 ? ".M.adv" : ".T.adv"); int f040 = 1; 
#endif 
if (t002 < 0) { 
#ifdef x042
if (o033 > 'b') { if ((l069 = fopen (b044, z032)) != NULL) { fclose (l069);
f040 = 0; } return (f040); } 
#endif 
return (k041 ? 0 : 1); } i048 = t002 < 2 ? k041 : b043; if (t002 == 0 ||
t002 == 2) { if (i048 == NULL) { i048 = (char *) malloc (a041); if (i048
== NULL) return (1); if (t002 == 0) k041 = i048; else b043 = i048; } memcpy
(i048, o030, a041); 
#ifdef x042
if (o033 > 'b') { if ((l069 = fopen (b044, s039)) != NULL && fwrite (k041,
1, a041, l069) == a041) f040 = 0; if (l069) fclose (l069); return (f040);
} 
#endif
return (0); } else { 
#ifdef x042
if (o033 > 'b') { if ((i048 = (char *) malloc (a041)) != NULL && (l069 =
fopen (b044, z032)) != NULL && (fread (i048, 1, a041, l069)) == a041) f040
= 0; if (l069) fclose (l069); if (f040) return (1); } else if (i048 == NULL)
return (1); 
#else
if (i048 == NULL) return (1); 
#endif 
memcpy (o030, i048, a041); return (0); } } 
#if y000 > 11
int r041 (int a048) { int c050 = -1; if ((b027 = fopen (l070, z032)) !=
NULL) { if (a048 < 0) c050 = 1; else if (fseek (b027, (long) a048, SEEK_SET)
== 0) c050 = fgetc (b027); fclose (b027); } return (c050); } int v056 (int
a048, char o037) { int c050 = 1; if ((b027 = fopen (l070, v037)) != NULL)
{ int o039; fseek (b027, 0L, SEEK_END); o039 = ftell (b027); if (o039 >
a048) fseek (b027, (long) a048, SEEK_SET); else { a048 -= o039; while (a048--)
fputc ('\0', b027); } fputc (o037, b027); fclose (b027); } return (c050);
} 
#endif 
#ifdef __STDC__
int i001 (int t002, int *f001) 
#else
int i001 (t002, f001) int t002; int *f001; 
#endif
{ static char y049 [168]; char j052 [168]; FILE *e050; int o037, val1, i049;
#if y000 >= 10
int o052; 
#endif 
char i050 [12]; static int q047 = sizeof (time_t); int f035; int g050; char
*a043; int l057; int o053, f041, a051, o054, w057; static int j054; static
long m046; void n049 (); void q048 (); switch (t002) { case 1: case 2: o037
= t009 [j002]; 
#ifndef x042
l071: 
#endif
if (o037 != -1) { if (*j036 && strncmp (j036, y039, 16) == 0) strcpy (j052,
j036); else strcpy (j052, y039); } else 
#ifdef x042
{ printf ("*** Glitch! No save/restore name specified!\n"); *f001 = 3; return
(0); } case 999: case 997: if (t002 > 2) { strncpy (y039, u042, h029 - 1);
o051 (u042, y049); } else o051 (j052, y049); 
#else 
case 999: if (t002 == 999) strncpy (j052, u042, h029 - 1); else if (o037
== -1) { if (t002 == 1) { d035 ("\nName to save game under: "); } else {
#if y000 >= 11
int l057 = -1; l057 = j033 (0, j052); if (l057 == 0) { if (o033 >= 'x')
{ d035("You have no saved games to restore.\n") longjmp (r004, 1); } d035
( "Can't see any saved games here, but you may know of some elsewhere.\n")
} else if (l057 == 1) { t009 [j002] = strlen(j052); goto t048; } else {
d035 ("You have the following saved games: ") if (o033 < 'x') j033 (1, NULL);
} 
#endif 
d035 ("\nName of saved game to restore: "); } z048 (j052, 16); g043 (NULL);
#ifdef w002
if (t009 [w002]) z034 (j052, 16); 
#endif 
if (j052 [0] == '\0' || j052 [0] == '\n') { d035 ("\nChanged your mind, eh?  Fine by me...\n");
*f001 = 3; return (0); } } 
#if y000 >= 11
t048: 
#endif 
o051 (j052, y049); 
#endif 
if ((e050 = fopen (y049, z032)) != NULL) { if (t002 == 2 || t002 == 999
|| t002 == 997) goto z053; fclose (e050); d035 ("\nThere's already a game dumped under that name.\n");
#ifdef x042
*f001 = 2; return (0); 
#else 
d035 ("Do you really mean to overwrite it? "); if (!c000 (-1)) { o037 =
-1; goto l071; } d035 ("\nAs you wish...\n"); 
#endif 
} else if (o033 > 'x' && (t002 == 999 || t002 == 997)) { if (t002 == 999)
return (0); d035 ("Oops! We seem to have lost your current game session!\n");
d035 ("\nSorry about that!\n"); c044(errno); m032(1); exit (255); } if (t002
== 2) { *f001 = 1; return (0); } case 998: if (t002 == 998) { o051 (u042,
y049); 
#ifdef x042
if (t009 [x042] == 0 && o033 > 'b') t009 [x042] = 1; *d033 = t009 [x042];
#endif 
} else { if (t002 != 1) return (0); } if ((e050 = fopen (y049, s039)) ==
NULL) { *f001 = 1; return (1); } time ((time_t *) &i050[0]); fprintf (e050,
"%s\n", d004); o037 = s004; fwrite (&o037, sizeof (int), 1, e050); o037
= j001; fwrite (&o037, sizeof (int), 1, e050); o037 = h009; fwrite (&o037,
sizeof (int), 1, e050); o037 = i005; fwrite (&o037, sizeof (int), 1, e050);
o037 = s005; fwrite (&o037, sizeof (int), 1, e050); o037 = x005; fwrite
(&o037, sizeof (int), 1, e050); *t009 = -1; f035 = 0; o035(i050, sizeof(time_t))
o035(o030, f033) o035(o030 + x034, l051) o035(o030 + c042, t031) o035(o030
+ d031, j034) o035(o030 + k030, e039) 
#ifdef x042
if (o033 > 'b' && t002 == 998) { o035(n039, sizeof(n039)); o035(h028, sizeof(h028));
} 
#endif 
fwrite (&f035, sizeof (int), 1, e050); fwrite (i050, 1, sizeof(time_t),
e050); fwrite (o030, 1, a041, e050); if (o033 > 'b' && t002 == 998) { fwrite
(n039, sizeof (char), sizeof (n039), e050); fwrite (h028, sizeof (char),
sizeof (h028), e050); fwrite (&t034, sizeof (int), 1, e050); 
#if y000 >=11
fwrite (v046, sizeof (short), *v046 - 1, e050); 
#endif
fwrite (g028, sizeof (char), sizeof (g028), e050); fwrite (j036, sizeof
(char), sizeof (j036), e050); } *f001 = (ferror (e050)) ? 1 : 0; fclose
(e050); 
#ifdef j035
if (t009 [c049] >= 0 && k031 && k031 < u039) { strcpy (y049 + strlen(y049)
- 3, "adh"); if (((k031 && u039 > k031 + 4) || (o033 > 'b' && t009 [x042]
<= 1)) && (e050 = fopen (y049, s039))) { int o039 = u039 - k031; fwrite
(&o039, 1, sizeof (int), e050); fwrite (k031, 1, u039 - k031, e050); o035(k031,
o039); fwrite (&f035, 1, sizeof (f035), e050); o039 = v040 - k031; fwrite
(&o039, 1, sizeof (int), e050); fclose (e050); } } 
#endif 
return (*f001); z053: *f001 = 0; 
#ifdef x042
if (o033 == 'x') { if (v038) fprintf (v038, "\nREPLY: restore %s\n", y049);
*t033 = 2; *d032 = t009 [j002]; strncpy (j038, y039, 20); } 
#endif
if (s051 (e050) != 0) { *f001 = 4; return (0); } val1 = 0; i049 = 0; fread
(&o037, sizeof (int), 1, e050); 
#ifdef DEBUG
printf ("FOBJ: image %3d, expected %3d\n", o037, s004); 
#endif 
if (o037 != s004) val1++; fread (&o053, sizeof (int), 1, e050); 
#ifdef DEBUG
printf ("LOBJ: image %3d, expected %3d\n", o053, j001); 
#endif 
if (o053 > j001) val1++; else if (o053 < j001) i049++; fread (&f041, sizeof
(int), 1, e050); 
#ifdef DEBUG
printf ("LLOC: image %3d, expected %3d\n", f041, h009); 
#endif 
if (f041 > h009) val1++; else if (f041 < h009) i049++; fread (&a051, sizeof
(int), 1, e050); 
#ifdef DEBUG
printf ("LVERB: image %3d, expected %3d\n", a051, i005); 
#endif 
if (a051 > i005) val1++; else if (a051 < i005) i049++; fread (&o054, sizeof
(int), 1, e050); 
#ifdef DEBUG
printf ("LVAR: image %3d, expected %3d\n", o054, s005); 
#endif 
if (o054 > s005) val1++; else if (o054 < s005) i049++; fread (&w057, sizeof
(int), 1, e050); 
#ifdef DEBUG
printf ("LTEXT: image %3d, expected %3d\n", w057, x005); 
#endif 
if (w057 > x005) val1++; else if (w057 < x005) i049++; if (val1) { *f001
= 2; fclose (e050); return (0); } g050 = 0; if (o033 < 'x') { *f001 = a002
(2); if (*f001 != 0) return (0); } if (g035 == NULL) { g035 = (char *) malloc
(a041); if (g035 == NULL) return (0); } 
#ifdef DEBUG
puts ("Reading image..."); 
#endif
fread (&g050, sizeof (int), 1, e050); 
#ifdef DEBUG
w046("CHKSAV %d\n", g050) 
#endif
fread (i050, 1, sizeof (i050), e050); if (*((int *)(i050 + 4)) == -1) q047
= 4; else if (*((int *)(i050 + 8)) == -1) q047 = 8; else q047 = sizeof(time_t);
fseek (e050, q047 - 12L, SEEK_CUR); { int e051 = w057 * sizeof (int); int
w058 = (o053 + 1) * sizeof (int); int f042 = e051 + w058; int q049 = j000
* (o053 - s004 + 1) * sizeof (short); int i051 = f042 + q049; int i052 =
m004 * (f041 - o053) * sizeof (short); int a052 = i051 + i052; int j055
= n004 * (o054 - f041) * sizeof (short); int r042 = a052 + j055; fread (g035,
1, r042, e050); } 
#if defined(x042)
if (o033 > 'b' && t002 == 999) { fread (n039, sizeof (char), sizeof (n039),
e050); fread (h028, sizeof (char), sizeof (h028), e050); fread (&t034, sizeof
(int), 1, e050); 
#if y000 >= 11
if (! ferror (e050)) { fread (v046, sizeof (short), 2, e050); if (ferror
(e050)) { *v046 = 3; *(v046 + 1) = 0; } else fread (v046 + 2, sizeof (short),
*v046 - 3, e050); } 
#endif
if (! ferror (e050)) { fread (g028, sizeof (char), sizeof (g028), e050);
} *j036 = '\0'; if (! ferror (e050)) { fread (j036, sizeof (char), sizeof
(j036), e050); } clearerr (e050); } 
#endif 
if (ferror (e050)) { *f001 = 2; return (0); } 
#ifdef DEBUG
puts ("Checking image..."); 
#endif
fclose (e050); f035 = 0; { int e051 = w057 * sizeof (int); int w058 = (o053
+ 1) * sizeof (int); int f042 = e051 + w058; int q049 = j000 * (o053 - s004
+ 1) * sizeof (short); int i051 = f042 + q049; int i052 = m004 * (f041 -
o053) * sizeof (short); int a052 = i051 + i052; int j055 = n004 * (o054
- f041) * sizeof (short); int t049 = n004 * (a051 - f041) * sizeof (short);
o035(i050, q047); o035(g035, e051) o035(g035 + e051, w058) o035(g035 + f042,
q049) o035(g035 + i051, i052) o035(g035 + a052, j055) 
#ifdef x042
if (o033 > 'b' && t002 == 999) { o035(n039, sizeof(n039)); o035(h028, sizeof(h028));
} 
#endif 
if (g050 != f035) { *f001 = 2; return (0); } if (q047 == sizeof(m046)) memcpy
(&m046, i050, q047); else m046 = 1; memset (o030, '\0', a041); memcpy (t009,
g035, (o053 + 1) * sizeof (int)); memcpy (t009 + k003, g035 + (o053 + 1)
* sizeof (int), (f041 - o053) * sizeof (int)); memcpy (t009 + y003, g035
+ (f041 + 1) * sizeof (int), (a051 - f041) * sizeof (int)); memcpy (t009
+ f007, g035 + (a051 + 1) * sizeof (int), (o054 - a051 - 1) * sizeof (int));
memcpy (t009 + d005, g035 + o054 * sizeof (int), (w057 - o054) * sizeof
(int)); memcpy (q003, g035 + e051, w058); memcpy (v001, g035 + f042, q049);
memcpy (c003, g035 + i051, i052); memcpy (l007, g035 + a052, t049); memcpy
((char *)l007 + i029, g035 + a052 + t049, j055 - t049); } 
#ifdef x042
if (t002 == 997) t009 [x042] = 2; 
#endif
#ifdef j035
if (t009 [c049] >= 0) { strcpy (y049 + strlen(y049) - 3, "adh"); if ((e050
= fopen (y049, z032))) { int o039 = 0; int n050 = 0; unsigned char *d; if
(k031) v040 = u039 = k031 + 4; if (i049 == 0) fread (&o039, 1, sizeof (int),
e050); if (o039 > 0) { n050 = 8192 * ((o039 + 8191) / 8192); d = (unsigned
char *)malloc(n050); fread (d, 1, o039, e050); fread (&g050, 1, sizeof (g050),
e050); o035(d, o039); if (f035 == g050) { if (k031) free (k031); k031 =
d; y037 = n050; u039 = k031 + o039; memcpy (t032, o030, sizeof(o030)); fread
(&o039, 1, sizeof (int), e050); v040 = k031 + o039; } else free(d); } fclose
(e050); } } 
#endif 
*f001 = (t002 == 999) ? 999 : 0; return (0); case 3: 
#ifdef x042
o051 (y039, y049); 
#endif 
*f001 = unlink (y049); if (*f001) { printf ("Failed: %s - error code: %d<br>\n",
y049, *f001); system ("pwd"); } strcpy (y049 + strlen(y049) - 3, "adh");
unlink (y049); return (0); case 4: case 5: *f001 = 0; return (0); case 6:
#if y000 < 10
d035("Open at all times.\n"); 
#else
j054 = *f001; 
#endif
return (0); case 7: 
#if y000 < 10
j054 = *f001; 
#else
*f001 = j054; 
#endif
return (0); case 8: 
#if y000 < 10
*f001 = j054; 
#else
time ((time_t *) &o052); *f001 = 1 + (o052 - m046) / 60; 
#endif
return (0); case 9: 
#if y000 < 10
*f001 = 0; 
#else
t009 [e009] = *f001; u007 (1, *f001); 
#endif
return (0); case 10: t009 [j002] = *f001; u007 (2, *f001); return (0); case
11: t009 [j002] = t009 [e009]; strncpy (y039, n040, 20); t009 [f008] = 2;
return (0); case 12: *f001 = (e042[s041] == NULL); return (0); 
#if y000 > 10
case 14: *f001 = r041 (*f001); return (0); case 15: case 16: v056 (*f001,
t002 == 15 ? 1 : 0); return (0); 
#endif 
case 19: o037 = *f001; e041 = o037 < 2 ? o037 : 1 - e041; *f001 = e041;
return (0); case 20: o037 = atoi (y039); *f001 = 0; if (o037 == 0) return
(0); if (o037 < 16) o037 = 16; if (o037 > 1024) o037 = 1024; *f001 = o037;
z038 = o037; if (z038 - 2 * c043 < 16) c043 = (z038 - 16) / 2; if (c043
< 0) c043 = 0; h034 = z038 - 2 * c043; 
#ifndef NO_READLINE
if (!o033 && !s042) { int a048 = l050 - b026; b026 = z043(b026, 2 * h034
+ 1); l050 = b026 + a048; } 
#endif 
return (0); case 21: o037 = atoi (y039); *f001 = 0; if (o037 <0) o037 =
0; if (o037 > 9) o037 = 9; if (z038 - o037 - o037 < 16) o037 = (z038 - 16)
/ 2; if (o037 < 0) o037 = 0; *f001 = o037; c043 = o037; h034 = z038 - o037
- o037; 
#ifndef NO_READLINE
if (!o033 && !s042) { int a048 = l050 - b026; b026 = z043(b026, 2 * h034
+ 1); l050 = b026 + a048; } 
#endif 
return (0); case 22: o037 = atoi (y039); if (o037 < 4) { *f001 = 0; return
(0); } if (o037 > 1024) o037 = 1024; *f001 = o037; h033 = o037; return (0);
case 23: *x036 = *f001; *t033 = t009 [f008]; *b028 = t009 [e009]; strncpy
(j037, n040, 20); if (*t033 == 2) { *d032 = t009 [j002]; strncpy (j038,
y039, 20); } else { *d032 = -1; *j038 = '\0'; } return (0); case 24: *f001
= *x036; t009 [f008] = *t033; t009 [e009] = *b028; t009 [j002] = *d032;
strncpy (n040, j037, 20); strncpy (y039, j038, 20); return (0); case 27:
*f001 = 1; if (*n038) { d035("\nOk - \"") d035(n038) d035("\"\n") *n038
= '\0'; } return (0); case 28: *f001 = a002 (3); return (0); case 29: *f001
= 0; if (t009 [f008] > 1) { o037 = t009 [e009]; t009 [e009] = t009 [j002];
t009 [j002] = o037; for (l057 = 0; l057 < n004; l057++) { o037 = l007 [e009
- y003 + l057]; l007 [e009 - y003 + l057] = l007 [j002 - y003 + l057]; l007
[j002 - y003 + l057] = o037; } strcpy (a042, n040); strcpy (n040, y039);
strcpy (y039, a042); } return (0); case 32: 
#if y000 >= 11 && defined (l008) && defined (g030)
if (z037 == 0) { *f001 = 0; return (0); } for (l057 = 0; l057 < z037; l057++)
{ if (*f001 == v041 [l057]) { *f001 = 1; return (0); } } 
#endif 
*f001 = 0; return (0); case 33: 
#if y000 >= 11
*f001 = a002 (-1); 
#else
*f001 = 0; 
#endif
return (0); case 34: 
#if y000 >= 11
*f001 = j033 (*f001, y039); t009 [j002] = strlen (y039); 
#else
*f001 = 0; 
#endif
return (0); default: w046 ("\n \nGLITCH! Bad special code: %d\n", t002);
return (1); } } 
#ifdef v036
#ifdef __STDC__
void c051 (char *q050) 
#else
void c051 (q050) char *q050; 
#endif
{ FILE *v057; char m047; int o037 = 0; int e052 = 0; int d048 = 0; if ((v057
= fopen (q050, s039)) == NULL) return; while (fgetc (y035) != '{') if (feof
(y035)) return; while (1) { m047 = fgetc (y035); if (feof (y035)) return;
if (isdigit (m047)) { if (d048 == 0) d048 = 1; o037 = 10 * o037 + m047 -
'0'; } else if (m047 == '-' && d048 == 0) d048 = -1; else if (d048) { if
(d048 == -1) o037 = - o037; fputc (o037 & 255, v057); d048 = 0; o037 = 0;
e052++; } if (m047 == '}') break; } fclose (v057); if (e052 != s007) return;
printf ("\nText database %s created.\n\n", z005); exit (0); } 
#ifdef __STDC__
FILE *c052 (char *l072, char *v058, int k042) 
#else
FILE *c052 (l072, v058, k042) char *l072; char *v058; int k042; 
#endif
{ FILE *n051; char *u039; int o039; o039 = strlen (v058) + 1; if (l072 &&
*l072) o039 += strlen (l072) + 1; if ((u039 = (char *) malloc (o039)) ==
NULL) { fprintf (stderr, "Unable to allocate db name buffer!\n"); exit (1);
} if (l072 && *l072) { strcpy (u039, l072); if (k042) { char *a043 = strrchr
(u039, y034); o039 = a043 ? a043 - u039 : 0; } else o039 = strlen (u039);
} else o039 = 0; if (o039) sprintf (u039 + o039, "%c%s", y034, v058); else
strcpy (u039, v058); n051 = fopen (u039, z032); free (u039); return (n051);
} 
#endif 
#if d030
#define j056 "acode"
#else
#define j056 ".acode"
#endif 
#ifdef v003
#define g051 "acode.cfg"
#else
#define g051 "acode.conf"
#endif 
#ifndef b025
void z054 (int g042, char *t009) { if (*(g037 + g042) == NULL) { *(g037
+ g042) = (char *) malloc (strlen (t009) + 1); if (*t009 == '\\') t009++;
else if (*t009 == '\'') { char *y051 = t009 + strlen(t009) - 1; if (*y051
== '\'') *y051 = '\0'; t009++; } strcpy (*(g037 + g042), t009); } } 
#endif 
void x046 (char *r043, char **j057) { int i; char *a043 = r043; int s052;
int q051; *j057 = NULL; *(j057 + 1) = NULL; *(j057 + 2) = NULL; for (i =
0; i < 3; i++) { s052 = 0; q051 = 0; while (*a043 == ' ' || *a043 == '\t')
a043++; if (*a043 == '\0' || *a043 == '\n') break; if (*a043 == '#' && q051
== 0 && s052 == 0) break; if (*a043 == '\\' || *a043 == '\'' || *a043 ==
'"') { if (*a043 == '\\') q051 = 1; else s052 = *a043; a043++; } *(j057
+ i) = a043; if (*a043 == '#' && (s052 || q051)) a043++; q051 = 0; while
(1) { if (*a043 == '\t') *a043 = ' '; if (*a043 == ' ' && q051 == 0 && s052
== 0) break; if (*a043 == '\0' || *a043 == '\n') break; if (*a043 == '#'
&& q051 == 0 && s052 == 0) break; if (*a043 == s052) break; a043++; } *a043++
= '\0'; } } char *q052 (char *o055, int y052) { char *a043 = o055; if (a043
== NULL) return (NULL); while (*a043) { if (y052 == 'L' && *a043 >= 'A'
&& *a043 <= 'Z') *a043 += 'a' - 'A'; else if (y052 == 'U' && *a043 >= 'a'
&& *a043 <= 'z') *a043 += 'A' - 'a'; a043++; } return (o055); } 
#ifndef b025
void h045 (int type, int z055, char *z042, int g052, int *o037) { char s044
[16]; int o052; if (g037 [z055] != NULL) return; if ((type == 'p' && atoi
(z042) > 0) || (type == 'n' && atoi (z042) >= 0)) { o052= atoi (z042); if
(g052 > 0 && o052 > g052) o052 = g052; if (g052 < 0 && o052 < -g052) o052
= -g052; if (o037) *o037 = o052; sprintf (s044, "%d", o052); z054 (z055,
s044); } else if (type == 'b') { if (*z042 == 'T' || *z042 == '1' || *z042
== 'Y' || (*z042 == 'O' && *(z042 + 1) == 'N')) { z054 (z055, "Y"); if (o037)
*o037 = 1; } else if (*z042 == 'F' || *z042 == '0' || *z042 == 'N' || (*z042
== 'O' && *(z042 + 1) == 'F')) { z054 (z055, "N"); if (o037) *o037 = 0;
} } else if (type == 'c') { if (*z042 == 'N' || *z042 == 'F' || *z042 ==
'0') { z054 (z055, "0"); if (o037) *o037 = 0; } else if (*z042 == 'P' ||
*z042 == 'S' || *z042 == '1') { z054 (z055, "1"); if (o037) *o037 = 1; }
else if (*z042 == 'Y' || *z042 == 'T' || *z042 == 'A' || *z042 == '2') {
z054 (z055, "2"); if (o037) *o037 = 2; } else if (*z042 == 'D' || *z042
== '?') { char h046 [2]; if (*o037 < 0) *o037 = 0; if (*o037 > 2) *o037
= 2; *h046 = '0' + *o037; *(h046 + 1) = '\0'; z054 (z055, h046); } } } void
j058 (char *k040) { struct stat x047; char b045[256]; char *x048; int d045
= y034; 
#if d030
d045 = strchr(k040, '/') ? '/' : y034; 
#endif
if (strchr (k040, d045)) { if (stat (k040, &x047) != -1) z054 (s043, k040);
return; } if ((x048 = getenv ("PATH")) != NULL) { char *b046 = x048; char
*m040 = b046; while (1) { while (*m040 && *m040 != ':') m040++; if (m040
- b046 < 255 - strlen (k040)) { strncpy (b045, b046, m040 - b046); 
#if d030
d045 = strchr(b045, '/') ? '/' : y034; 
#endif
*(b045 + (m040 - b046)) = d045; strcpy (b045 + (m040 + 1 - b046), k040);
if (stat (b045, &x047) != -1) { z054 (s043, b045); return; } } if (*m040
== '\0') break; b046 = ++m040; } } } void r044 () { char s053 [256]; char
*n052 [3]; char *a043; FILE *y053 = NULL; 
#ifdef l049
int w059 = 0; char *t050; if (s038) t050 = "/usr/bin/open"; else if (k029)
t050 = "/usr/bin/xdg-open"; else if (d030) t050 = "c:\\windows\\system32\\rundll32.exe url.dll,FileProtocolHandler";
else t050 = "NONE"; 
#endif 
strcpy (s053, y038); if ((a043 = strrchr (s053, y034)) != NULL) { strcpy
(a043 + 1, g051); y053 = fopen (s053, z032); } if (y053 == NULL) { sprintf
(s053, "%s%c%s%c%s", getenv (f032), y034, j056, y034, g051); y053 = fopen
(s053, z032); } if (y053 == NULL) { sprintf (s053, "%s%c%s%c%s", getenv
(f032), y034, j056 + 1, y034, g051); y053 = fopen (s053, z032); } if (y053
== NULL) y053 = fopen (g051, z032); if (y053 == NULL) return; while (fgets
(s053, sizeof(s053) - 1, y053)) { char *z042; *(s053 + strlen(s053) - 1)
= '\0'; x046 (s053, n052); if (*n052 == NULL || *(n052 + 1) == NULL) continue;
q052 (*n052, 'U'); if (strcmp (*n052, "LOG") == 0 || strcmp (*n052, "LOGFILE")
== 0) { int l073 = 0; z042 = *(n052 + 2); a043 = q052 (*(n052 + 1), 'U');
if (g037 [l060] != NULL) continue; if (strcmp (a043, "OFF") == 0 || strcmp
(a043, "NO") == 0 || strcmp (a043, "NONE") == 0) z054 (l060, "N"); if (strcmp
(a043, "APPEND") == 0 || strcmp (a043, "ON") == 0) { z054 (l060, v037);
l073 = 1; } else if (strcmp (a043, "OVERWRITE") == 0 || strcmp (a043, "WRITE")
== 0) { z054 (l060, "w"); l073 = 1; } if (l073) { if (z042 == NULL) sprintf
(n037, "%s.log", u042 + 1); else { struct stat x047; char *r045 = strrchr
(z042, y034); if (stat (z042, &x047) == 0) { if (x047.st_mode & S_IFREG)
strncpy (n037, z042, sizeof (n037)); else if (x047.st_mode & S_IFDIR) sprintf
(n037, "%s%c%s.log", z042, y034, u042 + 1); else *g037[l060] = 'N'; } else
if (r045) { *r045 = '\0'; if (stat (z042, &x047) == 0) { if (x047.st_mode
& S_IFDIR) { *r045 = y034; strncpy (n037, z042, sizeof (n037)); } } else
*g037[l060] = 'N'; } else { strncpy (n037, z042, sizeof (n037)); *(n037
+ sizeof (n037) - 1) = '\0'; } } } } else if (strcmp (*n052, "LAYOUT") ==
0) { if (!*(n052 + 2) || !**(n052 + 2)) continue; z042 = q052 (*(n052 +
2), 'U'); a043 = *(n052 + 1); if (strcmp (a043, "JUSTIFY") == 0) { if (strcmp
(z042, "DEFAULT") == 0 || strcmp (z042, "ANY") == 0) h045 ('b', JUSTIFY,
e041 ? "Y" : "N", 0, NULL); else h045 ('b', JUSTIFY, z042, 0, &e041); }
else if (strcmp (a043, "MARGIN") == 0) h045 ('n', MARGIN, z042, 5, &c043);
else if (strcmp (a043, "WIDTH") == 0) h045 ('p', g036, z042, -30, &z038);
else if (strcmp (a043, "HEIGHT") == 0) h045 ('p', a045, z042, 0, &h033);
h034 = z038 - 2 * c043; } 
#ifdef l049
else if (strcmp (*n052, "BROWSER") == 0) { if (o033 == -1) continue; if
(w059) continue; if (g037 [s043]) continue; a043 = *(n052 + 1); if (strcmp
(a043, "NONE") == 0) { o033 = -1; continue; } if (strcmp(a043, "DEFAULT")
== 0) { w059 = 1; o033 = 'b'; continue; } if ((k029 && !s038 && (strcmp
(*(n052 + 1), "LINUX") == 0)) || (k029 && !s038 && (strcmp (*(n052 + 1),
"UNIX") == 0)) || (s038 && (strcmp (*(n052 + 1), "MACOS") == 0)) || (d030
&& (strcmp (*(n052 + 1), "WINDOWS") == 0))) a043 = *(n052 + 2); else continue;
if (*a043 == '$') { a043 = getenv(a043 + 1); if (!a043) continue; } else
j058 (a043); } else if (strcmp (*n052, "COLOUR") == 0 || strcmp (*n052,
"COLOR") == 0) { a043 = q052 (*(n052 + 1), 'U'); z042 = q052 (*(n052 + 2),
'L'); if (strcmp (a043, "BACKGROUND") == 0 || strcmp (a043, "BG") == 0)
z054 (n042, z042); if (strcmp (a043, "TEXT") == 0 || strcmp (a043, "FG")
== 0) z054 (u043, z042); if (strcmp (a043, "PROMPT") == 0) z054 (w047, z042);
if (strcmp (a043, "SURROUND") == 0) z054 (l059, z042); if (strcmp (a043,
"DEBUG") == 0 || strcmp(a043, "DBG") == 0) z054 (a044, z042); } else if
(strcmp (*n052, "SHOW") == 0) { if (! (n052 + 2) || ! *(n052 + 2)) continue;
a043 = q052 (*(n052 + 1), 'U'); z042 = q052 (*(n052 + 2), 'U'); if (strcmp
(a043, "BORDER") == 0) h045 ('b', x038, z042, 0, NULL); if (strcmp (a043,
"BUTTON") == 0) h045 ('b', e043, z042, 0, NULL); else if (strcmp (a043,
"COMPACT") == 0) h045 ('c', x037, z042, 0, &j040); else if (strcmp (a043,
"HISTORY") == 0 || strcmp (a043, "COMMANDS") == 0) h045 ('p', z039, z042,
2000, NULL); else if (strcmp (a043, "WIDTH") == 0) h045 ('p', h037, z042,
-500, NULL); } else if (strcmp (*n052, "TIMEOUT")) { if (! (n052 + 2) ||
! *(n052 + 2)) continue; a043 = q052 (*(n052 + 1), 'U'); z042 = *(n052 +
2); if (strncmp(a043, "INV", 3) == 0) h045 ('p', o036, z042, -20, NULL);
else if (strncmp(a043, "GRACE", 5) == 0) h045 ('p', q036, z042, -2, NULL);
else if (strncmp(a043, "KEEP", 4) == 0) h045 ('p', n043, z042, -1, NULL);
} 
#endif 
} 
#ifdef l049
if (w059) z054 (s043, t050); else if (g037 [s043] == NULL) { char *a043;
if ((a043 = getenv ("BROWSER")) != NULL) z054 (s043, a043); else z054 (s043,
t050); } if (g037 [n042] == NULL) z054 (n042, "#d0e0ff"); if (g037 [u043]
== NULL) z054 (u043, "black"); if (g037 [w047] == NULL) z054 (w047, "red");
if (g037 [a044] == NULL) z054 (a044, "blue"); if (g037 [l059] == NULL) z054
(l059, "#222222"); if (g037 [x038] == NULL) z054 (x038, "Y"); if (g037 [e043]
== NULL) z054 (e043, "Y"); if (g037 [z039] == NULL || atoi (g037 [z039])
<= 0) z054 (z039, "200"); if (g037 [h037] == NULL || atoi (g037 [h037])
<= 500) z054 (h037, "700"); 
#endif 
if (g037 [x037] == NULL) h045 ('c', x037, v043, 0, &j040); if (g037 [l060]
== NULL) z054 (l060, v037 ); if (g037 [o036] == NULL) z054 (o036, "20");
if (g037 [n043] == NULL) z054 (n043, "2"); if (g037 [q036] == NULL) z054
(q036, "2"); if (g037 [JUSTIFY] == NULL) h045 ('b', JUSTIFY, e041 ? "Y"
: "N", 0, NULL); if (g037 [MARGIN] == NULL) h045 ('p', MARGIN, "1", 1, &c043);
if (g037 [g036] == NULL) h045 ('p', g036, "80", 80, &z038); if (g037 [a045]
== NULL) h045 ('p', a045, "24", 24, &h033); 
#ifndef l049
h034 = z038 - 2 * c043; 
#endif
g038 = atoi (g037 [n043]) + atoi (g037 [q036]); } char *d049 [] = { "##################### Config file for A-code games ####################"r033,
"#"r033, "# Values as initally supplied are the ones the game will default to"r033,
"# in the absence of this file. Where equivalent command line options"r033,
"# exist, they override values specified by this config file."r033, "#"r033,
"#######################################################################"r033,
"#"r033, 
#ifndef v003
#if k029
"# Browsers will be checked for in the order in which they are listed,"r033,
"# until one is located. Browsers can be specified by their full pathname,"r033,
"# or just by the executable name. In the latter case they will be"r033,
"# searched for using the search path as specified by the PATH variable."r033,
"# If a pathname contains spaces, the whole pathname must be quoted."r033,
"#"r033, "   BROWSER $BROWSER              # Environment variables get evaluated"r033,
"#  BROWSER NONE                  # Force console mode."r033, 
#if !s038
"#  BROWSER chromium-browser      # Google's chrome"r033, "#  BROWSER firefox               # Mozilla's browser"r033,
"#  BROWSER konqueror             # KDE native browser"r033, 
#endif 
#else 
"# A specific non-default browser may be specified by its full pathname"r033,
"# as in the blow IE example. If the pathname contains spaces, the whole"r033,
"# pathname must be quoted."r033, "#"r033, "#  BROWSER \"C:\\Program Files\\Internet Explorer\\iexplore.exe\""r033,
#endif 
"   BROWSER DEFAULT               # Use my default browser"r033, "#"r033,
"# Browser display colours can be specified by names or by hex RGB codes;"r033,
"# if an RGB code is is used, it must be prefixed with \\#, e.g. \\#d0e0ff"r033,
"# or quoted, e.g. \"#d0e0ff\". And yes, our American friends can use COLOR,"r033,
"# if they like!"r033, "#"r033, "   COLOUR BACKGROUND  \\#d0e0ff   # Pale blue is the default background"r033,
"   COLOUR TEXT           black   # Default output text colour"r033, "   COLOUR PROMPT           red   # Make prompt lines red"r033,
"   COLOUR SURROUND    \"#222222\"  # Dark grey default for surround"r033,
"#"r033, "# Other things to do with browser display. Game commands can be always"r033,
"# submitted simply by pressing the <ENTER> (or <RETURN>) key, but setting"r033,
"# BUTTON to YES, will also show a submit button for those who must have it."r033,
"# The COMPACT setting allows the settings of None, Some, All and Default."r033,
"# suppressing respectively none, some or all blank lines, or accepting"r033,
"# the game's default. The HISTORY value shows how many commands and"r033,
"# responses the browser display should retain."r033, "#"r033, "   SHOW BORDER   Yes             # Show the command area border"r033,
"   SHOW BUTTON   Yes             # Show the submit button"r033, "   SHOW COMPACT  Default         # Accept whatever the game defaults to"r033,
"   SHOW HISTORY  200             # Show up to 200 last commands and responses"r033,
"   SHOW WIDTH    700             # Set display area width to 700 pixels"r033,
"#"r033, "# The log file section is applicable both to the browser and the console"r033,
"# modes. Log file can be OFF (or NO, or NONE) or WRITE or APPEND, the"r033,
"# last two being optionally followed by name or pathname; this may indicate"r033,
"# either a specific logfile or a directory in which the logfile will be"r033,
"# placed. The default logfile name is <game_name>.log and its default"r033,
"# location is ~/" j056 "/<game_name>. "r033, "#"r033, "   LOGFILE NONE                  # No logfile"r033,
"#"r033, "# If the game claims server or browser not responding, you can try adjusting"r033,
"# upwards the TIMEOUT limits. This really ought not be necessary, but"r033,
"# if the machine is busy, memory short and the js engine inefficient, you"r033,
"# never know..."r033, "#"r033, "   TIMEOUT INVOCATION  30        # Up to 30 seconds to fully invoke browser"r033,
"   TIMEOUT KEEPALIVE    4        # Keep-alive pings every 4 seconds"r033,
"   TIMEOUT GRACETIME    4        # Grace time for delayed pings"r033, "#"r033,
"# Finally for the console mode only, some screen layout requirements."r033,
#endif 
"# For the JUSTIFY attribute, the possible values are Yes, No and Default."r033,
"#"r033, "   LAYOUT JUSTIFY DEFAULT        # Accept game's default"r033,
"   LAYOUT MARGIN        1        # Left and right text margin"r033, "   LAYOUT WIDTH        80        # Console window width in columns"r033,
"   LAYOUT HEIGHT       24        # Console window height in lines"r033,
"#"r033, "############################# End of file #############################"r033,
"" }; void z056 (void) { char **c053 = d049; FILE *y053 = fopen (g051, "wb");
if (!y053) return; while (**c053) fputs (*c053++, y053); fclose (y053);
} 
#endif 
#ifdef __STDC__
int j059 (char *y038) 
#else
int j059 (y038) char *y038; 
#endif
{ 
#ifdef MEMORY
int a053; 
#endif
#ifdef q032
char e007 [100]; 
#endif
int g042; 
#ifdef v036
y035 = c052 (y038, z005, 1); if (y035 == NULL) y035 = c052 (c041, z005,
0); 
#if defined(a054)
if (y035 == NULL) y035 = c052 (a054, z005, 0); 
#endif
#if defined(i053)
if (y035 == NULL) y035 = c052 (i053, z005, 0); 
#endif
if (y035 == NULL) y035 = fopen (z005, z032); if (y035 == NULL) { if ((y035
= fopen ("adv6.h", z032))) c051 (z005); else { printf ("Sorry, can't find the %s data file.\n",
z005); d041 (); return (1); } if ((y035 = fopen (z005, z032)) == NULL) {
printf ("Unable to find or construct the data file %s.\n", z005); return
(1); } } 
#ifdef MEMORY
a053 = fread (e007, sizeof (char), s007+1, y035); clearerr (y035); fclose
(y035); if (a053 != s007) { printf ("Wrong data file length: expected %d, got %d.\n",
s007, a053); return (1); } 
#endif 
#ifdef SWAP
w045 [0] = fread (e007, sizeof (char), h031, y035) - 1; h032 [0] = 0; 
#endif 
#ifdef q032
fread (e007, sizeof (char), sizeof (e007), y035); 
#endif 
#endif 
if (a040 && *a040 && (v039 = fopen (a040, z032)) == NULL) { printf ("Sorry, unable to open command file '%s'!\n",
a040); exit (0); } if (v039) { fgets (u040, sizeof (u040), v039); if (strncmp
(u040, "Wiz: ", 5) == 0) t034 = atol (u040 + 5); else if (strncmp (u040,
d004, strlen (d004)) != 0) { printf ("%s: wrong adventure version!\n", a040);
exit (0); } else t034 = atol (u040 + strlen (d004) + 1); } if (o033 < 'x')
{ struct stat x047; 
#if d030
s054 (g032, sizeof(g032)); 
#endif 
chdir (getenv (f032)); if (chdir (j056) != 0 && chdir(j056 + 1) != 0) {
#if !d030 || defined(v003)
mkdir (j056, 0700); 
#else
mkdir (j056); 
#endif 
chdir (j056); } 
#ifndef b025
if (stat (g051, &x047) != 0) { void z056 (void); z056 (); } if (chdir (y041
+ 1) != 0) { 
#if !d030 || defined(v003)
mkdir (y041 + 1, 0700); 
#else
mkdir (y041 + 1); 
#endif 
chdir (y041 + 1); } r044(); 
#endif 
if (o033 <= 0) { putchar ('\n'); for (g042 = 0; g042 < c043; g042++) putchar
(' '); } w046("A-code kernel %s\n", s037); } if (*n037) { 
#ifdef b025 
if (!v038 && (v038 = fopen (n037, v037)) == NULL) 
#else
if (!v038 && (v038 = fopen (n037, g037[l060])) == NULL) 
#endif 
printf ("(Sorry, unable to open log file...)\n"); else if (o033 <= 'x')
fprintf (v038, "%s: %u\n", d004, t034); } if (!j041) j041 = m039 (q033);
d034 = j041; *d034++ = '\n'; o034 = 1; 
#if y000 >= 11
if (!v046) v046 = w051 (NULL); 
#endif 
x033 = *e007; 
#ifdef PLAIN
strcpy (l056, (char *)e007 + 1); 
#else
t035 = 0; if (*e007) t035 = -1; 
#ifdef i006
else l056 [0] = e007 [1] ^ i006; 
#endif
while (++t035 < 80) if ((l056 [t035] = e007 [t035] ^ e007 [t035 + 1]) ==
'\0') break; 
#endif 
if (strcmp (l056, d004) != 0) { printf ("Version stamp mismatch: '%s' != '%s'!\n",
l056, d004); return (1); } e042 [0] = NULL; 
#if y000 < 12
for (g042 = s004; g042 <= j001; g042++) r001 ('s', g042, m006); for (g042
= k003; g042 <= h009; g042++) r001 ('s', g042, f010); 
#endif
#if y000 == 1 && defined(b004)
r001 ('s', f008, b004); 
#endif
for (g042 = 0; (unsigned int)g042 < sizeof (s008) / sizeof (s008 [0]); g042++)
if (s008 [g042] < 0) { s008 [g042] *= -1; r001 ('s', s008 [g042], o004 +
1); } return (0); } void m048 (void) { char k040 [64]; int o039 =sprintf
(k040, "%s.adv", y041) - 1; unlink (k040); *(k040 + o039) = 'h'; unlink
(k040); *(k040 + o039) = 'l'; unlink (k040); } 
#ifndef b025
int d050(int argc, char **argv) { char *j060; int o037; char c054; char
*u048; int h047 = 0; 
#if y000 == 1
*v043 = 'Y'; 
#else
*v043 = 'N'; 
#endif
*(v043 + 1) = '\0'; while (--argc) { argv++; if (**argv != z031 && **argv
!= '-') { if (! y036) { if (*argv) y036 = *argv; } else if (! *n037) { strncpy
(n037, *argv, sizeof (n037)); *(n037 + sizeof (n037) - 1) = '\0'; } continue;
} j060 = *argv + 1; if (*j060 == '-') j060++; u048 = j060 + 1; if (*u048
== '=') u048++; if (!*u048 && strchr ("Brclso", *j060) && *(argv + 1) &&
**(argv + 1) != '-') { argc--; argv++; u048 = *argv; } c054 = *u048; if
(c054 >= 'A' && c054 <= 'Z') c054 += ('a' - 'A'); if (*j060 == 'j') { if
(c054 == '0' || c054 == 'n') e041 = 0; else if (c054 == '1' || c054 == 'y')
e041 = 1; else e041 = 1 - e041; h045 ('b', JUSTIFY, e041 ? "Y" : "N", 0,
NULL); o033 = -1; continue; } else if (*j060 == 'b') { *v043 = (*v043 ==
'Y' ? 'N' : 'Y'); if (c054 == '0' || c054 == 'n') *v043 = '0'; else if (c054
== '1' || c054 == 'y') *v043 = '1'; else if (c054 == '2' || c054 == 'a')
*v043 = '2'; h045 ('c', x037, v043, 0, &j040); continue; } if (*j060 ==
'p') { if (c054 == '0' || c054 == 'n') v044 = 0; else if (c054 == '1' ||
c054 == 'y') v044 = 1; else v044 = 1 - v044; continue; } else if (*j060
== 'n') h047 = 1; else if (*j060 == 'v') { printf ("%s.\n", d004); 
#if defined(u006)
printf ("Acdc translator version %s.\n", u006); 
#else
puts ("Acdc translator version UNKNOWN"); 
#endif 
printf ("A-code kernel version %s.\n", s037); 
#if defined(k005)
#if k005 == 0
puts ("Text database preloaded into the executable."); 
#endif 
#if k005 == 1
puts ("Text database read into memory on startup."); 
#endif 
#if defined(SWAP)
printf ("Text database paged via %d internal 1KB swap buffers.\n", SWAP);
#endif 
#if k005 == 3
puts ("All text read directly from the text database as required."); 
#endif 
#endif 
exit (0); } 
#ifndef NO_SLOW
else if (*j060 == 'o') { o033 = -1; if (c054) { s042 = (atoi (u048)) / 10;
if (s042 >= 960) s042 = 960; else if (s042 >= 480) s042 = 480; else if (s042
>= 240) s042 = 240; else if (s042 >= 120) s042 = 120; else if (s042 >= 60)
s042 = 60; else if (s042 >= 30) s042 = 30; else s042 = 11; } else s042 =
30; } 
#endif 
else if (*j060 == 'l') { if (c054) strncpy (n037, u048, sizeof(n037)); else
sprintf (n037, "%s.log", u042 + 1); *(n037 + sizeof (n037) - 1) = '\0';
z054 (l060, v037); } 
#ifdef l049
else if (*j060 == 'B') { 
#if d030
o033 = 'b'; if (c054) j058 (u048); 
#else 
if (getenv ("DISPLAY")) { o033 = 'b'; if (c054) j058 (u048); } else fputs
( "\n*** No display available ***\nDefaulting to the console mode.\n\n",
stderr); 
#endif 
} 
#endif 
else if (*j060 == 'C') { if (o033 == 'b') o033 = -1; a004 = 0; } else if
(*j060 == 'h') { printf ("\nUsage: %s [options]\n\nOptions:\n", y038); puts
("    -n                  force a new game (ignore an aborted one)"); puts
("   [-r]<dumpfile>       restore game from dump"); printf ("    -l[<logfile>]       log the game (by default in ~/"
j056 "/%s/)\n", u042 + 1); 
#ifdef l049
puts ("    -C                  Force console (non-browser) display"); puts
("    -B[browser]         Force display through browser (default)"); 
#endif 
puts ("    -b[0|1|all]         invert or specify blank line suppression level");
puts ("    -p[0|1]             invert or specify pausing before exit");
#ifdef v036
puts ("    -d<dbsdir>          specify dbs directory"); 
#endif 
puts ("    -c<cominfile>       replay game from log"); 
#ifdef j035
if (i030 != -2) puts ("    -u{0|1|none}        override default UNDO status");
#endif 
#ifdef l049
#ifndef v003
puts ("\nThese options force console mode display:"); 
#endif 
#endif 
puts ("    -j[0|1]             invert or specify right-justification of text");
puts ("    -s<W>.<H>[.<M>]     set screen size and margin"); 
#ifndef v003
puts ("    -o[<baudrate>]      set output speed for authentic experience\n");
#endif 
puts ("Two information only options:"); puts ("    -v                  print version info and exit");
puts ("    -h                  print this usage summary\n"); exit (0); }
else if (*j060 == 's') { o033 = -1; o037 = strtol (u048, &u048, 10); if
(o037 == 0) o037 = 32767; if (o037 >= 16 && o037 <= 32767) { z038 = o037;
z054 (g036, u048); } if (*u048++) { o037 = strtol (u048, &u048, 10); if
(o037 == 0) o037 = 32767; if (o037 >= 16 && o037 <= 32767) { h033 = o037;
z054 (a045, u048); } if (*u048++) { o037 = strtol (u048, &u048, 10); if
(o037 >= 0 && o037 < (z038 - 16 )/ 2) { c043 = o037; z054 (MARGIN, u048);
} } h034 = z038 - 2 * c043; } } 
#ifdef v036
else if (*j060 == 'd') c041 = u048; 
#endif 
else if (*j060 == 'c') a040 = u048; else if (*j060 == 'r') { if (*u048)
y036 = u048; } 
#ifdef j035
else if (*j060 == 'u' && i030 != -2) { if (c054 == '0' || strcmp (u048,
"off") == 0) i030 = -1; else if (c054 == '2' || c054 == 'n' || strcmp (u048,
"forbid") == 0) i030 = -2; else if (c054 == '1' || strcmp (u048, "on") ==
0) i030 = 1; } 
#endif 
#ifdef x042
else if (*j060 == 'x' || *j060 == 'y') { o033 = *j060; strncpy (u041, u048,
sizeof (u041)); if (*n037 == '\0') { strcpy (n037, u042 + 1); strcat (n037,
".log"); z054 (l060, v037); } } 
#endif 
} return (h047); } 
#endif 
#ifdef b025
#ifdef __STDC__
char *k043 (char *t051) 
#else
char *k043 (t051) char *t051; 
#endif
#else
#ifdef __STDC__
int main (int argc, char **argv) 
#else
int main (argc, argv) int argc; char **argv; 
#endif
#endif 
{ int h047 = 0; if (!j041) { j041 = m039 (q033); d034 = j041; } *j041 =
'\0'; strncpy (y041, a006, sizeof (y041) - 1); *(y041 + sizeof(y041) - 1)
= '\0'; 
#if d030 || v003
*y041 = '_'; 
#else
*y041 = '.'; 
#endif 
u042 = y041; 
#ifdef b025
o033 = 'y'; strncpy (u041, t051, sizeof (u041)); if (strncmp (t051, "_INFO_",
6) == 0) { if (*(t051 + 6) && *(t051 + 6) != 'H') a004 = 0; d035 (v002);
o001 ('|'); d035 (d004); return (j041); } else if (strncmp (t051, "_LIST_",
6) == 0) { d034 = j041; *j041 = '\0'; j033 (-1, ""); return (j041); } else
if (strncmp (t051, "_RESUME_", 6) == 0) { h047 = -1; *u041 = '\0'; } else
if (strncmp (t051, "_LOAD_", 6) == 0) { o033 = 'x'; strcpy (u040, t051 +
6); y036 = u040; } else if (strncmp (t051, "_START_", 7) == 0) { o033 =
'x'; if (*(t051 + 7) && *(t051 + 7) != 'H') a004 = 0; h047 = 1; } y038 =
"."; 
#else 
y038 = *argv; strncpy(y041 + 1, strrchr(*argv, y034) + 1, sizeof(y041) -
1); 
#ifdef l049
#if d030
o033 = 'b'; 
#else 
o033 = getenv("DISPLAY") ? 'b' : 0; 
#endif 
#endif
h047 = d050(argc, argv); 
#endif 
if (z038 == 0) z038 = 32767; if (h033 == 0) h033 = 32767; h034 = z038 -
2 * c043; 
#ifndef NO_READLINE
b026 = m039 (2 * h034 + 1); l050 = b026; *l050 = '\0'; 
#endif 
#ifndef NO_SLOW
if (o033 > 0) s042 = 0; if (s042) 
#if d030
s042 = 1000/s042; 
#else 
s042 = 1000000/s042; 
#endif 
#endif 
if (o033 > 0) c043 = 0; if (t034 == 0) time ((time_t *) &t034); v042 = t034
%= 32768L; x002 (1); if (a040 && !h047) h047 = 1; memset (o030, '\0', sizeof
(o030)); if (j059 (y038) != 0) { printf ("Sorry, unable to set up the world.\n");
return (0); } if (o033 == -1) o033 = 0; t009 [x006] = t009 [c004] = k003;
t009[0] = 0; if (o033 < 'x' && !h047) { if (! y036 || ! *y036) i001(999,
&t009 [0]); } if ((t009[0] == 999 && !a040) || h047 < 0) { FILE *s047; char
k040 [64]; int c; d035 (l058); sprintf (k040, "%s.adl", y041); if ((s047
= fopen (k040, z032)) != NULL) { while ((c = fgetc(s047)) != EOF) o001 (c
& 0377); fclose (s047); } 
#ifdef v035
m032(0); return (f034); 
#else
goto o056; 
#endif 
} 
#ifdef v035
if (h047) t009[f008] = -2; 
#endif 
#ifdef x042
if (o033 == 'x' && y036 && *y036) { u042 = y036; i001 (997, &t009 [0]);
u042 = y041; } else if (o033 == 'y') i001 (999, &t009 [0]); else 
#endif 
{ if (y036 && *y036) { w008 (); t009 [f008] = -1; t009 [c005] = -1; s041
= 1; e042[0] = y036; strncpy (y039, y036, h029); *(y039 + h029 - 1) = '\0';
} else { s041 = 0; e042 [0] = NULL; if (setjmp (r004) == 0) w008 (); } }
o056: 
#ifdef j035
if (i030 == -2) r001 ('s', c049, u049); else if (i030 == 1) r001 ('s', c049,
c055); else if (i030 == -1) { r001 ('s', c049, c055); r001 ('s', c049, n053);
} 
#endif 
#ifdef b025
{ int v059 = setjmp (r004); if (v059 > 1) return (f034); } 
#else
setjmp (r004); 
#endif 
if (q034) { if (v044) { d035 ("(To exit, press ENTER)"); z048 (u040, 160);
putchar('\n'); } else { if (o034 > 0) m032 (1); putchar('\n'); } d041 ();
m048 (); 
#if d030
chdir(g032); 
#endif 
#ifdef b025
*f034 = 'f'; q034 = 0; return (f034); 
#else
free (j041); free (f034); if (g035) free (g035); return (255); 
#endif
} while (1) { v042 = t034; x002 (1); t034 = v042; v042 = t034 ^ 255; n006
(); } } 
#ifdef __STDC__
int g002 (int w004,int k001,int f002) 
#else
int g002 (w004,k001,f002) int w004; int k001; int f002; 
#endif
{ if (w004 > j001) return (0); if (q003 [w004] != q005) return (0); if (k001
< 0) return (1); if (k001 == 0) { if (t009 [w004] == f002) return (1); }
else if (s000 (w004, f002)) return (1); return (0); } 
#ifdef __STDC__
int o000 (int w004,int k001,int f002, int e002) 
#else
int o000 (w004,k001,f002,e002) int w004; int k001; int f002; int e002; 
#endif
{ if (w004 > j001) return (0); if (k001 != -1) { if (k001 == 0) { if (t009
[w004] != f002) return (0); } else if (!(s000 (w004, f002))) return (0);
} if (q003 [w004] == e002) return (1); 
#ifdef f009
if (e002 == q005 || !(s000 (w004, f009))) return (0); if (q003 [w004] +
1 == e002) return (1); 
#endif
return (0); } 
#ifdef __STDC__
int t003 (int w004,int k001,int f002) 
#else
int t003 (w004,k001,f002) int w004; int k001; int f002; 
#endif
{ return (o000 (w004, k001, f002, t009 [c004])); } 
#ifdef __STDC__
int n000 (int w004,int k001,int f002) 
#else
int n000 (w004,k001,f002) int w004; int k001; int f002; 
#endif
{ if (g002 (w004,k001,f002)) return (1); if (t003 (w004,k001,f002)) return
(1); return (0); } 
#if !defined(NOVARARGS) && defined(__STDC__)
void l000 (int c001, int e004, ...) { va_list g039; int c056; int j060;
va_start (g039, e004); if (e004 < 0) goto q053; c056 = 0; while (!c056)
{ if ((j060 = va_arg (g039, int)) < 0) { j060 = -j060; c056 = 1; } if (j003
(j060)) goto q053; } va_end (g039); return; q053: va_end (g039); 
#else 
#ifdef __STDC__
void l000 (int c001,int e004,int h006,int n002,int w005,int o057,int w060,int
f043, int o058,int u050,int y054,int a055,int m049,int b047,int b048,int
o059) 
#else
void l000 (c001,e004,h006,n002,w005,o057,w060,f043,o058,u050,y054,a055,m049,b047,b048,o059)
int c001,e004,h006,n002,w005,o057,w060,f043,o058,u050,y054,a055,m049,b047,b048,o059;
#endif
{ int j060; if (e004 < 0) goto q053; if ((j060 = h006) < 0) j060 = -j060;
if (j003 (j060)) goto q053; else if (h006 < 0) return; if ((j060 = n002)
< 0) j060 = -j060; if (j003 (j060)) goto q053; else if (n002 < 0) return;
if ((j060 = w005) < 0) j060 = -j060; if (j003 (j060)) goto q053; else if
(w005 < 0) return; if ((j060 = o057) < 0) j060 = -j060; if (j003 (j060))
goto q053; else if (o057 < 0) return; if ((j060 = w060) < 0) j060 = -j060;
if (j003 (j060)) goto q053; else if (w060 < 0) return; if ((j060 = f043)
< 0) j060 = -j060; if (j003 (j060)) goto q053; else if (f043 < 0) return;
if ((j060 = o058) < 0) j060 = -j060; if (j003 (j060)) goto q053; else if
(o058 < 0) return; if ((j060 = u050) < 0) j060 = -j060; if (j003 (j060))
goto q053; else if (u050 < 0) return; if ((j060 = y054) < 0) j060 = -j060;
if (j003 (j060)) goto q053; else if (y054 < 0) return; if ((j060 = a055)
< 0) j060 = -j060; if (j003 (j060)) goto q053; else if (a055 < 0) return;
if ((j060 = m049) < 0) j060 = -j060; if (j003 (j060)) goto q053; else if
(m049 < 0) return; if ((j060 = b047) < 0) j060 = -j060; if (j003 (j060))
goto q053; else if (b047 < 0) return; if ((j060 = b048) < 0) j060 = -j060;
if (j003 (j060)) goto q053; else if (b048 < 0) return; if ((j060 = o059)
< 0) j060 = -j060; if (j003 (j060)) goto q053; return; q053: 
#endif 
#if y000 >= 11
if (t009 [x006] != t009 [c004]) { *v046 = 3; *(v046 + 1) = 0; } 
#endif 
t009 [x006] = t009 [c004]; *n001 (x006) = -1; t009 [c004] = c001; *n001
(c004) = -1; 
#if defined (x007) && defined (f008)
r001 ('s', f008, x007); 
#endif 
if (e004 < -2) e004 = -e004; if (e004 > 0) t001 (0, e004, 0); if (e004 !=
-1) longjmp (r004, 1); return; } 
#ifdef __STDC__
void e003 (int w004,int k001) 
#else
void e003 (w004,k001) int w004,k001; 
#endif
{ 
#if defined (q006) && defined (f008)
if (q003 [w004] == q005 || k001 == q005) r001 ('s', f008, q006); 
#endif
q003 [w004] = (k001 <= h009 || k001 == q005) ? k001 : t009 [k001]; return;
} 
#ifdef __STDC__
void h001 (char y001, int l001, char l002, int v000, int *h002, short *l003)
#else
void h001 (y001, l001, l002, v000, h002, l003) int y001, l001, l002, v000;
int *h002; short *l003; 
#endif
{ int o037, n054, b049 = 0; if (l002 == 'e') { o037 = t009 [v000]; n054
= 0; } else if (l002 == 'c') { o037 = v000; n054 = 0; } else if (l002 ==
'v') { o037 = t009 [v000]; if (v000 == e009 || v000 == j002) n054 = -1;
else n054 = l007 [n004 * (v000 - y003)]; } else { o037 = h002 [v000]; n054
= l003 [n004 * v000]; } if (y001 == 'V') { t009 [l001] = o037; b049 = l007
[n004 * (l001 - y003)]; } else if (y001 == 'L') { h002 [l001] = o037; b049
= l003 [n004 * l001]; } else t009 [l001] = o037; if (y001 == 'V') { if (n054
== -1 && b049 != -1) l007 [n004 * (l001 - y003)] = -1; else if (n054 !=
-1 && b049 == -1) l007 [n004 * (l001 - y003)] = 0; } else if (y001 == 'L')
{ if (n054 == -1 && b049 != -1) l003 [n004 * l001] = -1; else if (n054 !=
-1 && b049 == -1) l003 [n004 * l001] = 0; } else if (y001 == 'T') { o037
= m031 [2 * (l001 - d005) + 1]; if (o037 <= t009 [l001]) t009 [l001] = o037
- 1; } } 
#ifdef __STDC__
void t004 (int w004, int k001) 
#else
void t004 (w004, k001) int w004,k001; 
#endif
{ t009 [w004] = k001; *n001 (w004) = -1; a039 [w004] = a039 [k001]; return;
} 
#ifdef __STDC__
void d002 (int w004, int k001) 
#else
void d002 (w004, k001) int w004,k001; 
#endif
{ t009 [w004] = t009 [t009 [k001]]; return; } 
#ifdef __STDC__
void h003 (int w004, int k001) 
#else
void h003 (w004, k001) int w004,k001; 
#endif
{ t009 [t009 [w004]] = (k001 > s005 || k001 < f007) ? k001 : t009 [k001];
return; } 
#ifdef __STDC__
void t005 (int w004, int k001) 
#else
void t005 (w004, k001) int w004,k001; 
#endif
{ t009 [w004] = q003 [(k001 < f007 || k001 > s005) ? k001 : t009 [k001]];
*n001 (w004) = -1; return; } 
#ifdef __STDC__
int a000 (int w004) 
#else
int a000 (w004) int w004; 
#endif
{ if (*n001 (w004) == -1) return t009 [w004]; else return w004; } 
#ifdef __STDC__
int h004 (int w004, int *k001, short *f002) 
#else
int h004 (w004, k001, f002) int w004; int *k001; short *f002; 
#endif
{ if (*(f002 + n004 * w004) == -1) return (*(k001 + w004)); else return
w004; } 
#ifdef __STDC__
void l005 (void) 
#else
void l005 () 
#endif
{ 
#if !defined(MEMORY) && !defined(u038)
fclose (y035); 
#endif 
#ifdef i033
fprintf (stderr, "(Locates: %d (+%d), faults %d (+%d))\n", g033, g033 -
b030, l055, l055 - g034); fprintf (stderr, "(Locate ratio %d%%)\n", (((1000
* l055) / g033) + 5) / 10); 
#endif 
q034 = 1; longjmp (r004, 1); } 
#ifdef __STDC__
short *n001 (int c001) 
#else
short *n001 (c001) int c001; 
#endif
{ short *q054; q054 = NULL; if (c001 <= j001) q054 = &v001 [j000 * (c001
- s004)]; else if (c001 <= h009) q054 = &c003 [m004 * (c001 - k003)]; else
if (c001 <= s005) q054 = &l007 [n004 * (c001 - y003)]; return (q054); }
#ifdef __STDC__
void r001 (char c001, int e004, int h006) 
#else
void r001 (c001, e004, h006) char c001; int e004; int h006; 
#endif
{ short *y055; if (e004 > s005) { printf ( "*** Run-time glitch! Setting flag on a flagless entity %d! ***\n",
e004); return; } 
#if y000 >= 20
if (e004 <= h009) { if (h006 < 3) { printf ( "*** Run-time glitch! Attempting to modify major type of entity %d!\n",
e004); return; } h006 -= 3; } 
#endif
y055 = n001 (e004); while (h006 > 15) { y055++; h006 -= 16; } if (c001 ==
's') *y055 |= 1 << h006; else *y055 &= ~(1 << h006); return; } 
#ifdef __STDC__
void b001 (int h005, char c001, int e004, int h006, int *n002, short *w005)
#else
void b001 (h005, c001, e004, h006, n002, w005) int h005; char c001; int
e004; int h006; int *n002; short *w005; 
#endif
{ short *y055; if (e004 < 0 || e004 >= h005) { printf ( "*** Run-time glitch! Local entity %d >= locals %d! ***\n",
e004, h005); return; } if (*(w005 + n004 * e004) == -1) { e004 = *(n002
+ e004); 
#if y000 >= 20
if (e004 <= h009) { if (h006 < 3) { printf ( "*** Run-time glitch! Attempting to modify major type of entity %d!\n",
e004); return; } h006 -= 3; } 
#endif
y055 = n001 (e004); } else y055 = w005 + n004 * e004; while (h006 > 15)
{ y055++; h006 -= 16; } if (c001 == 's') *y055 |= 1 << h006; else *y055
&= ~(1 << h006); return; } 
#ifdef __STDC__
int s000 (int c001, int e004) 
#else
int s000 (c001, e004) int c001; int e004; 
#endif
{ short *y055; if (c001 > s005) return (0); 
#if y000 >= 10
if (c001 <= i005) { if (e004 == 0) return (c001 <= j001 && c001 >= s004);
else if (e004 == 1) return (c001 <= h009 && c001 >= k003); else if (e004
== 2) return (c001 >= y003); 
#if y000 >= 20
e004 -= 3; 
#endif
} 
#endif
y055 = n001 (c001); if (y055 == NULL) return (0); while (e004 > 15) { y055++;
e004 -= 16; } return (*y055 & 1 << e004); } 
#ifdef __STDC__
int t006 (int c001, int e004, int *h006, short *n002) 
#else
int t006 (c001, e004, h006, n002) int c001; int e004; int *h006; short *n002;
#endif
{ short *y055; if (*(n002 + n004 * c001) == -1) { c001 = *(h006 + c001);
if (c001 <= i005) { if (e004 == 0) return (c001 <= j001 && c001 >= s004);
else if (e004 == 1) return (c001 <= h009 && c001 >= k003); else if (e004
== 2) return (c001 >= y003); 
#if y000 >= 20
e004 -= 3; 
#endif
} y055 = n001 (c001); } else y055 = n002 + n004 * c001; if (y055 == NULL)
return (0); while (e004 > 15) { y055++; e004 -= 16; } return (*y055 & 1
<< e004); } 
#ifdef __STDC__
void e006 (void) 
#else
void e006 () 
#endif
{ q004 = 0; e042 [s041] = NULL; return; } 
#ifdef __STDC__
void z033 (char *z042) 
#else
void z033 (z042) char *z042; 
#endif
{ if ((*z042 >= 'a' && *z042 < 'z') || (*z042 >= 'A' && *z042 < 'Z')) (*z042)++;
else if (*z042 == 'z' || *z042 == 'Z') *z042 -= 25; } 
#ifdef __STDC__
void z034 (char *z042, int v060) 
#else
void z034 (z042, v060) char *z042; int v060; 
#endif
{ char *b046 = z042; while (v060-- && *z042) { if ((*z042 > 'a' && *z042
<= 'z') || (*z042 > 'A' && *z042 <= 'Z')) (*z042)--; else if (*z042 == 'a'
|| *z042 == 'A') *z042 += 25; z042++; } if (v038) fprintf (v038, "TRANSLATION: %s\n",
b046); } 
#ifdef __STDC__
void r002 (int e007, int a001) 
#else
void r002 (e007, a001) int e007; int a001; 
#endif
{ m031 [2 * (e007 - d005)] = e047; t009 [e007] = a001; } 
#ifdef __STDC__
void o002 (int type, int *f001) 
#else
void o002 (type, f001) int type; int *f001; 
#endif
{ time_t c057; struct tm *e042; switch (type) { case 4: case 5: c057 = time
(NULL); e042 = localtime (&c057); *f001 = (type == 4 ? e042 -> tm_hour :
e042 -> tm_min); break; default: w046 ("GLITCH! Bad svar code: %d\n", type);
} return; } 
#ifdef __STDC__
void z004 (void) 
#else
void z004(); 
#endif
{ while (*(d034 - 1) == '\n') d034--; } 
#ifdef __STDC__
void b050 (void) 
#else
void b050(); 
#endif
{ d034 = j041; *d034 = '\0'; o034 = 0; } 
#ifdef __STDC__
void f005 (int f044) 
#else
void f005(f044); int f044; 
#endif
{ if (f044 == e009) strncpy (n040, e042 [s041 - 1], h029); else if (f044
== j002 && t009 [f008] == 2) strncpy (y039, e042 [s041 - 1], h029); else
if (f044 != j002) { w046 ("GLITCH! Bad ARGn indicator: %d\n", f044); } }
#ifdef __STDC__
int s001 (char *type) 
#else
int s001 (type); char *type; 
#endif
{ if (strcmp(type, "cgi") == 0) 
#ifdef b025
return (0); 
#else
return (o033 && o033 != 'b'); 
#endif 
if (strcmp(type, "doall") == 0) return (q004); if (strcmp(type, "html")
== 0) 
#ifdef l049
return (o033 == 'b'); 
#else
return (o033); 
#endif 
w046 ("GLITCH! Bad test type: %s\n", type); return (0); } 
#ifdef __STDC__
void g053 (int q043, int v061) 
#else
void g053 (q043, v061) int q043; int v061; 
#endif
{ int i; fprintf (stderr, " - "); for (i = 0; i < 8 * v061 * sizeof(short);
i++) fprintf (stderr, "%c", s000 (q043, i) ? '1' : '0'); } 
#ifdef __STDC__
void f006 (void) 
#else
void f006 () 
#endif
{ int i; FILE *m050; char s044 [80]; sprintf (s044, "%s.rrefs", y041); m050
= fopen (s044 + 1, z032); for (i = s004; i < x005; i++) { if (m050) { fgets
(s044, sizeof(s044) - 1, m050); *(s044 + strlen(s044) - 1) = '\0'; fprintf
(stderr, "%25s %4d", s044 + 8, i); } else { fprintf (stderr, "%4d", i);
} fprintf (stderr, "%5d", *(t009 + i)); if (i >= s004 && i <= j001) { g053
(i, j000); fprintf (stderr, " @ %4d", *(q003 + i)); } else if (i >= k003
&& i <= h009 ) g053 (i, m004); else if (i >= f007 && i <= s005 ) g053 (i,
n004); fprintf (stderr, "\n"); } if (m050) fclose (m050); } 
#ifdef j035
#ifdef __STDC__
int t052 (int o060) 
#else
int t052 (o060) int o060; 
#endif
{ int i; if (o060 == 0) { memcpy (l052, q003, l051 * sizeof(int)); return
(0); } for (i = 0; i <= j001; i++) { if ((l052[i] == q005 && q003[i] !=
q005) || (l052[i] != q005 && q003[i] == q005)) return (1); } return (0);
} 
#ifdef __STDC__
int d051 (void) 
#else
int d051 () 
#endif
{ char *a; int o037 = 0; r001 ('c', c049, n055); r001 ('c', c049, t053);
r001 ('c', c049, u051); 
#ifdef l008
if (t009 [j002] == l008) o037 = 32767; else if (t009[f008] > 1) 
#else
if (t009[f008] > 1) 
#endif
{ a = y039; while (*a) { if (*a < '0' || *a >'9') { r001 ('s', c049, n055);
return (-1); } o037 = 10 * o037 + *a++ - '0'; } } else o037 = 1; return
(o037); } 
#ifdef __STDC__
void r003 (void) 
#else
void r003 () 
#endif
{ int l057; int k044; if ((l057 = d051 ()) < 0) return; if (y037 == 0 ||
v040 <= k031 + 4) k044 = 0; else { t052 (0); for (k044 = 0; k044 < l057;
k044++) { if (v040 <= k031 + 4) break; v040 -= 4; while (v040 > k031) {
int q054; v040 -= 4; q054 = 256 * (*v040) + *(v040 + 1); if (q054) *(o030
+ q054) = *(v040 + 2); else break; } v040 += 4; } r001 (t052 (1) ? 's' :
'c', c049, u051); } t009 [c049] = k044; 
#ifdef l008
if (t009 [j002] == l008) l057 = k044; 
#endif
r001 (l057 > k044 ? 's' : 'c', c049, t053); t009[x042] = 0; memcpy (t032,
o030, sizeof (o030)); return; } 
#ifdef __STDC__
void x003 (void) 
#else
void x003 () 
#endif
{ int k044; int l057; if ((l057 = d051 ()) < 0) return; if (v040 == u039)
k044 = 0; else { t052 (0); for (k044 = 0; k044 < l057; k044++) { if (v040
> u039) v040 = u039; while (1) { int q054 = 256 * (*v040) + *(v040 + 1);
v040 += 4; if (q054) *(o030 + q054) = *(v040 - 1); else break; } if (v040
== u039) { k044++; break; } } r001 (t052 (1) ? 's' : 'c', c049, u051); }
t009 [c049] = k044; 
#ifdef l008
if (t009 [j002] == l008) l057 = k044; 
#endif
t009[x042] = 0; r001 (l057 > k044 ? 's' : 'c', c049, t053); } 
#endif 
#ifdef __STDC__
void l006 (int v062) 
#else
void l006 (v062) int v062; 
#endif
{ fprintf (stderr, "\n*GLITCH* Called proc offest %d, but game's offset range is 0 to %d!\n",
v062, v004); 
#if y000 >= 11
if (v062 == w007 || v062 == q009 || v062 == t045 || v062 == i045 || v062
== m043) 
#else
#if y000 > 1
if (v062 == w007 || v062 == q009) 
#else
if (v062 == w007) 
#endif
#endif
{ fprintf (stderr, "   Probable cause: "); if (v062 == w007) fprintf (stderr,
"bad word"); 
#if y000 > 1
if (v062 == q009) fprintf (stderr, "ambiguous word"); 
#endif
#if y000 >= 11
if (v062 == t045) fprintf (stderr, "ambiguous typo"); if (v062 == i045)
fprintf (stderr, "mere scenery word"); if (v062 == m043) fprintf (stderr,
"bad syntax"); 
#endif
fprintf (stderr, " in player command not handled by game's code.\n"); }
fprintf (stderr, "\n"); } 
#if y000 >= 11
#ifdef __STDC__
int m002 (char *string) 
#else
int m002 (string) char *string; 
#endif
{ return (strcmp(y040, string) == 0 || strcmp(o032, string) == 0); } 
#endif 
#ifdef l049
char *l074[] = { "<html><head><title>", "=G", "</title>", "<script type=\"text/javascript\"><!--\n",
"=L", 
#ifdef DEBUG
"var debug = 1;\n", 
#endif 
"var state = 'S';\n", "=M", "var interval = 0;\n", "=C", "var rType = 0;\n",
"var turn = 0;\n", "var wake = 0;\n", "var hpos = 0\n", "var hsiz = 0;\n",
"var hcom = [];\n", "var conbot = 0;\n", "var console = 0;\n", "var command = 0;\n",
"var started = 0;\n", "function scrollit()\n", "   { window.scrollTo(0, conbot.offsetTop); }\n",
"function writeit(text)\n", "   { var newDiv = document.createElement('div'); newDiv.id = 'chunk';\n",
"     newDiv.setAttribute('name', 'chunk'); newDiv.innerHTML = text;\n",
"     document.getElementById('console').insertBefore(newDiv, null); scrollit(); }\n",
"   \n", "function zapit()\n", "   { document.getElementById('comform').innerHTML = ''; }\n",
#ifdef DEBUG
"function report(text)\n", "   { writeit('<span class=\"debug\">' + text + '</span><br>'); }\n",
#endif 
"function shutit(text)\n", "{\n", "   window.clearInterval(interval);\n",
"   timeLimit = 0;\n", "   state = 'X';\n", "   zapit();\n", "   writeit(text + '<div align=center class=\"red\">' +\n",
"      '<input class=\"custom-button\" ' +\n", "      'onclick=\"javascript:self.close()\" id=\"shutit\"' +\n",
"      'type=\"button\" value=\"Close this tab/window\" /><br>' +\n", "      '<span class=\"red\">This button will only work if your ' +\n",
"      ' browser<br> is not being paranoid about security.</span></p>' +\n",
"      '</div>');\n", "   document.getElementById('shutit').focus();\n",
"}\n", "function sendit(text)\n", "{\n", 
#ifdef DEBUG
"   if (debug > 0)\n", "      report(\"Sending '\" + text + \"'\");\n",
#endif 
"   var http = null;\n", "   try { http = new XMLHttpRequest(); }\n", "   catch(e) {\n",
"      try { http = new ActiveXObject(\"Msxml2.XMLHTTP\"); }\n", "      catch(e) {\n",
"         try { http = new ActiveXObject(\"Microsoft.XMLHTTP\"); }\n", "         catch(e) {\n",
"            shutit('<h2>Sorry, your browser is not compatible with this game!</h2><br>');\n",
"         }\n      }\n   }\n", "   http.onreadystatechange = function(e)\n",
"      {\n", "         if (http.readyState == 4)\n", "         {\n", "            if (http.status == 200)\n",
"               showit (http.responseText);\n", "            else\n", "               shutit('<h2>Server process not responding!</h2><br>');\n",
"         }\n", "      };\n", "   http.open('GET', '/?status=' + escape(text), true);\n",
"   http.send(null);\n", "}\n", "function init()\n", "{\n", 
#ifdef DEBUG
"   if (debug > 0)\n", "      report('Entering init');\n", 
#endif 
"   conbot = document.getElementById('conbot');\n", "   console = document.getElementById('console');\n",
"   command = document.getElementById('command');\n", "   command.onkeydown = filter;\n",
"   if (document.getElementsByName('chunk').length > 0)\n", "   {\n", "      wake = 1;\n",
"      state = 'R';\n", "   }\n", "   sendit('0x' + state);\n", "   setAlarm(timeLimit);\n",
"   state = 'R';\n", 
#ifdef DEBUG
"   if (debug > 0)\n", "      report('Exiting init');\n", 
#endif 
"}\n", "function filter(event)\n", "{\n", "   var e = event || window.event;\n",
"   var code = (e.charCode || e.keyCode);\n", "   if (code == 38 || code == 63232) \n",
"      code = 1;\n", "   else if (code == 40 || code == 63233)\n", "      code = -1;\n",
"   else \n", "      code = 0;\n", "   \n", "   if (code != 0)\n", "   {\n",
"      hist(code);\n", "      return false;\n", "   }\n", "   return true;\n",
"}\n", "function hist(step)\n", "{\n", "   var h = 2 * hpos;\n", "   hcom[h] = command.value;\n",
"   hpos += step;\n", "   if (hpos < 0) hpos = 0;\n", "   if (hpos > hsiz) hpos = hsiz;\n",
"   h = 2 * hpos;\n", "   if (! hcom[h + 1])\n", "      hcom[h + 1] = hcom[h];\n",
"   command.value = hcom[h];\n", "   return;\n", "}\n", "function checkServer()\n",
"{\n", "   wake++;\n", "   sendit('0x' + wake);\n", "   setAlarm(timeLimit);\n",
"}\n", "function setAlarm(limit)\n", "{\n", 
#ifdef DEBUG
"   if (debug > 0)\n", "      report('Entering setAlarm, state is ' + state + ', limit is ' + timeLimit);\n",
#endif 
"   if (interval)\n", "      window.clearInterval(interval);\n", "   if (limit)\n",
"      interval = window.setInterval(checkServer, limit, 2);\n", 
#ifdef DEBUG
"   if (debug > 0)\n", "      report('Exiting setAlarm, interval is now ' + interval);\n",
#endif 
"}\n", "function showit(text)\n", "{\n", 
#ifdef DEBUG
"   if (debug > 0)\n", "      report('Entering showit');\n", 
#endif 
"   if (text == null || text == '')\n", "   {\n", "      if (state == 'R')\n",
"      {\n", "         writeit(\n", "            '<p><h2>Server process not responding!<br>' +\n",
"            'Please close this window and restart.</h2></p>');\n", "      }\n",
"      window.clearInterval(interval);\n", "      interval = 0;\n", "      state = 'X';\n",
"   }\n", "   else\n", "   {\n", "      var type = text.substr(0, 1);\n",
"      if (type != 'k')\n", "      {\n", "         rType = type;\n", "         writeit(text.substr(1));\n",
"         if (type == 'f')\n", "            shutit('');\n", "         else if (started)\n",
"            document.getElementById('command').focus();\n", "      }\n",
"      setAlarm(timeLimit);\n", "   }\n", 
#ifdef DEBUG
"   if (debug > 0)\n", "      report('Exiting showit');\n", 
#endif 
"}\n", "function doit(start)\n", "{\n", 
#ifdef DEBUG
"   if (debug > 0)\n", "      report('Entering doit');\n", 
#endif 
"   var com = command.value;\n", "   var pars;\n", "   if (interval)\n",
"   {\n", "      window.clearInterval(interval);\n", "      interval = 0;\n",
"   }\n", "   turn++;\n", "   pars = turn + 'x' + com;\n", "   hcom[0] = com;\n",
"   var prompt = document.getElementById('prompt');\n", "   if (prompt)\n",
"   {\n", "      var el = document.createElement('span');\n", "      var tx = (rType == 'q' || rType == 'm' ||\n",
"                rType == 'r' || rType == 's') ?\n", "                   prompt.innerHTML : '?';\n",
"      if (rType == 'c') tx = '<br>?';\n", "      el.className = 'query';\n",
"      el.innerHTML = tx + ' ' + com +\n", "          (rType == 't' ? '<br>&nbsp<br>' : '');\n",
"      prompt.parentNode.replaceChild(el, prompt);\n", "      el = null;\n",
"   }\n", "   if (com)\n", "   {\n", "      var i;\n", "      for (i = 1; i < hcom.length; i += 2)\n",
"      {\n", "         if (hcom[i])\n", "         {\n", "            hcom[i - 1] = hcom[i];\n",
"            hcom[i] = '';\n", "         }\n", "      }\n", "      if (hcom[0] == hcom[2])\n",
"         hcom[0] = '';\n", "      else\n", "      {\n", "         hcom.unshift('');\n",
"         hcom.unshift('');\n", "         hsiz++;\n", "      }\n", "      command.value = '';\n",
"   }\n", "   hpos = 0;\n", "   sendit(pars);\n", "   var kids = document.getElementsByName('chunk');\n",
"   if (kids.length > moveLimit)\n", "   {\n", "      kids[0].parentNode.removeChild(kids[0]);\n",
"      hcom.pop();\n", "      hcom.pop();\n", "      hsiz--;\n", "   }\n",
#ifdef DEBUG
"   if (debug > 0)\n", "      report('Exiting doit');\n", 
#endif 
"}\n", "function startit()\n", "{\n", "   document.getElementById('startit').style.display = 'none';\n",
"   document.getElementById('gameview').style.display = 'block';\n", "   document.getElementById('command').focus();\n",
"   started = 1;\n", "}\n", "--></script><style type=\"text/css\">\n*.query{color:",
"=Q", "}\n*.debug{color:", "=D", "}\n*.red{color:red}\ntd.view{width:",
"=W", "px}\n*,input{color:", "=F", "}\ninput{max-width:", "=T", "px;}\ntd,input{background-color:",
"=B", "}\ninput.command{border: ", "=X", "px inset #666666}\n", "</style></head><body bgcolor=\"",
"=S", "\" text=\"", "=F", "\" onLoad=\"javascript:init();\">\n", "<table align=center border=1 height=100% cellpadding=16>",
"<tr><td class=view style=vertical-align:top>\n", "<form autocomplete=\"off\" method=\"get\" ",
"action=\"javascript:doit(1)\" id=\"inform\">", "<div id=startit>\n", "&nbsp;<br>\n",
"<h2 align=center>Welcome to the A-code browser interface</h2>", "<h3 align=center>",
"=V", "</h3>\n", "<p>This interface is can be used entirely from the keyboard, as long \n",
"as the command input field remains in focus. Commands can be submitted\n",
"by pressing the RETURN key and arrow keys can be used to recall and\n",
"edit previous commands.</p>\n", "<p>The appearance of the game can be customized by modifying the A-code\n",
"configuration file <b>acode.conf</b> &ndash; this can be found in\n", "the A-code directory, called either <b>.acode</b> or <b>acode</b>,\n",
"within your home directory.\n", "There you can also find individual game directories called by the\n",
"game name, which is where saved games and log files are stored by\n", "default.</p>\n",
"<p>The configuration file has ample comments to guide you, should\n", "you decide to make any changes. If by any chance this interface\n",
"does not work for you, you can change the browser specification in\n",
"that file to NONE and then run the game in the console mode from a\n",
"terminal window.\n", "</p><p align=center>&nbsp;<br>\n", "<input value='Play ",
"=G", "' type=button class=query ", "onclick=javascript:startit() style=font-size:x-large></p>\n",
"<p>&nbsp;<br>(In case you are wondering why it is not possible to skip\n",
"this intro page &ndash; it's because it is in fact a cunning workaround\n",
"for a browser mis-feature, no names named. By clicking on the 'Play'\n",
"button you will ensure that the browser behaves itself and gives\n", "keyboard focus to where the interface has requested it to be.)</p>\n",
"</div>\n", "<div id=gameview style=display:none>\n", "<div id=\"console\">\n",
"</div>\n<span id=\"comform\">", "<span class=\"query\">?&nbsp;</span><input class=\"command\" ",
"id=\"command\" size=\"", "=I", "\" ", "maxlength=\"160\" type=\"text\">\n",
"=R", "</span><br></span></div><div id=\"conbot\">", "</div></form></td></tr></table></body></html>\n",
"==" }; void w006(void) { int i = 0; char z057 [32]; char v043 [32]; char
s055 [16]; char r046 [16]; char q055 [32]; 
#
#ifdef DEBUG
printf ("=== Entering %s\n", "send_page"); 
#endif 
sprintf (z057, "var moveLimit = %d;\n", atoi (g037 [z039])); sprintf (v043,
"var compact = %d;\n", j040 ? 1 : 0); sprintf (s055, "%d", atoi (g037 [h037])
- 20); sprintf (r046, "%d", atoi (g037 [h037]) / 10 - (*g037[e043] == 'Y'
? 6 : 0)); 
#ifdef DEBUG
sprintf (q055, "var timeLimit = %d;\n", 10000 * atoi (g037 [n043])); 
#else
sprintf (q055, "var timeLimit = %d;\n", 1000 * atoi (g037 [n043])); 
#endif 
z035 = f034 + h027; while (1) { char *a043 = l074[i++]; if (*a043 == '=')
{ int t002 = *(a043 + 1); if (t002 == '=') break; a043 = NULL; switch (t002)
{ case 'G': a043 = v002; break; case 'Q': a043 = g037[w047]; break; case
'D': a043 = g037[a044]; break; case 'B': a043 = g037[n042]; break; case
'F': a043 = g037[u043]; break; case 'S': a043 = g037[l059]; break; case
'W': a043 = g037[h037]; break; case 'T': a043 = s055; break; case 'I': a043
= r046; break; case 'M': a043 = z057; break; case 'C': a043 = v043; break;
case 'X': a043 = *(g037[x038]) == 'Y' ? "1" : "0"; break; case 'R': if (*(g037
[e043]) == 'Y') a043 = j042; break; case 'L': a043 = q055; break; case 'V':
a043 = d004; break; default: fprintf (stderr, "Bad substitution tag in page.html: ='%c'!",
t002); exit (1); } } if (a043) h042 (a043); } *z035 = '\0'; i003 (f034);
#ifdef DEBUG
printf ("=== Exiting %s\n", "send_page"); 
#endif 
} char *n003 (char *s044) { char l075[10]; char *r045; sprintf (l075, "%d",
strlen (s044 + h027)); r045 = s044 + 7 - strlen (l075); sprintf (r045, "%s%s\n",
n036, l075); *(s044 + h027 - 1) = '\n'; return (r045); } void o003() { char
s056 [sizeof(n036) + 20]; strcpy (s056 + h027, "k"); i003 (s056); } 
#endif

