Annotation of researchv10no/games/boggle/comp.c, revision 1.1.1.1

1.1       root        1: #include <stdio.h>
                      2: #define MAX ' '
                      3: 
                      4: char new[MAX], old[MAX];
                      5: 
                      6: main ()
                      7: {
                      8:        register int i, j;
                      9:        old[0] = '\0';
                     10:        while (fgets(&new[0], MAX, stdin) != NULL) {
                     11:                for (i=0; i<MAX && old[i]==new[i]; i++);
                     12:                if (i >= MAX) {
                     13:                        fprintf(stderr, "long word\n");
                     14:                        exit(1);
                     15:                }
                     16:                putc(i, stdout);
                     17:                for (j=0; (old[j]=new[j]) != '\n'; j++);
                     18:                old[j] = '\0';
                     19:                fputs(&old[i], stdout);
                     20:        }
                     21: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.