1 --- grub-0.95/stage2/graphics.c.xpmjunk 2005-01-04 17:01:35.492804523 -0500
2 +++ grub-0.95/stage2/graphics.c 2005-01-04 17:02:52.722495885 -0500
7 +/* Open the file, and search for a valid XPM header. Return 1 if one is found,
8 + * leaving the current position as the start of the next line. Else,
11 +int xpm_open(const char *s) {
12 + char buf, prev, target[]="/* XPM */\n";
21 + if (grub_read(&buf, 1) != 1) {
25 + if ((pos == 0 && prev == '\n') || pos > 0) {
26 + if (buf == target[pos])
32 + } while (target[pos]);
36 /* Read in the splashscreen image and set the palette up appropriately.
37 * Format of splashscreen is an xpm (can be gzipped) with 16 colors and
40 unsigned char c, base, mask, *s1, *s2, *s4, *s8;
41 unsigned i, len, idx, colors, x, y, width, height;
48 - if (!grub_read((char*)&buf, 10) || grub_memcmp(buf, "/* XPM */\n", 10)) {
54 while (grub_read(&c, 1)) {