1 #if defined(STACK_SIZE) && (STACK_SIZE < 65536)
2 # define BYTEMEM_SIZE 10000L
3 #endif
4 
5 #ifndef BYTEMEM_SIZE
6 # define BYTEMEM_SIZE 45000L
7 #endif
8 
9 int bytestart[5000 + 1];
10 unsigned char modtext[400 + 1];
11 unsigned char bytemem[2][BYTEMEM_SIZE + 1];
12 
13 long
modlookup(int l)14 modlookup (int l)
15 {
16   signed char c;
17   long j;
18   long k;
19   signed char w;
20   long p;
21   while (p != 0)
22     {
23       while ((k < bytestart[p + 2]) && (j <= l) && (modtext[j] == bytemem[w][k]))
24 	{
25 	  k = k + 1;
26 	  j = j + 1;
27 	}
28       if (k == bytestart[p + 2])
29 	if (j > l)
30 	  c = 1;
31 	else c = 4;
32       else if (j > l)
33 	c = 3;
34       else if (modtext[j] < bytemem[w][k])
35 	c = 0;
36       else c = 2;
37     }
38 }
39