
/* various other code is omitted */

static uint32 littleendian[8] = {
  50462976, 117835012, 185207048, 252579084,
  319951120, 387323156, 454695192, 522067228
} ;
#define end ((unsigned char *) littleendian)

#define data ((unsigned char *) s->in)
#define outdata ((unsigned char *) s->out)

static void surfpcs_addlc(s,x,n)
	/* modified from Dan's surfpcs_add by skipping ' ' & '\t' and */
	/* case-independence */
surfpcs *s;
unsigned char *x;
unsigned int n;
{
  register unsigned char ch;
  int i;
  while (n--) {
    ch = *x++;
    if (ch == ' ' || ch == '\t') continue;
    if (ch >= 'A' && ch <= 'Z')
      data[end[s->todo++]] = ch - 'A' + 'a';
    else
      data[end[s->todo++]] = ch; /* This line is the one that confuses me */
    if (s->todo == 32) {
      s->todo = 0;
      if (!++s->in[8])
        if (!++s->in[9])
          if (!++s->in[10])
            ++s->in[11];
      surf(s->out,s->in,s->seed);
      for (i = 0;i < 8;++i)
	s->sum[i] += s->out[i];
    }
  }
}



/*
 end[s->todo++] is an element of littleendian[].  The elements of this
 array are very large numbers.  I don't understand why data[end[...]]
 doesn't cause a segfault, or anyway how it could be doing anything
 useful.

 I ran the code through the preprocessor to make sure there was
 nothing strange going on in the preprocessor.  There did not appear
 to be anything strange.  The preprocessor output was:

      ((unsigned char *) s->in)[((unsigned char *) littleendian)[s->todo++]] = ch;

*/

