4
/* convert a savegame file from the alpha version to the beta version */
9
unsigned char s[10000];
10
memset(p, 0xff, sizeof(p));
11
fread(p, 32, 1, stdin);
13
len = fread(s, 1, 10000, stdin);
15
memcpy(p+28, p+12, 4); /* stored move */
17
p[23] = 1; /* assume it's finished */
18
p[27] = s[7]; /* level */
19
memcpy(p+48, p+12, 4); /* bookmark where started */
24
fwrite(p, 1, 64, stdout);
25
fwrite(s, 1, len, stdout);