// when is eof really set?
#define CHECKED_READ(len,data) \
if (areaRead(data, 1, len, file) != len) { \
- if (len == 1 && areaEof(file)) return 0; \
+ if (len == 1 && areaEof(file)) goto readend; \
R_ERROR_RETURN("areaRead: premature EOF\n"); \
return 1; \
} \
breakswitch:;
}
+readend:
if (PicoAHW & PAHW_MCD)
{
/* after load events */
}
}
+readend:
return 0;
}
exit(1);\r
}\r
*/\r
+ fbdev = open("/dev/fb0", O_RDWR);\r
+ if (fbdev == -1)\r
+ {\r
+ printf("open(\"/dev/fb0\") failed with %i\n", errno);\r
+ exit(1);\r
+ }\r
+\r
ret = ioctl(fbdev, FBIOGET_FSCREENINFO, &fbfix);\r
if (ret == -1)\r
{\r
return;\r
}\r
\r
- fbdev = open("/dev/fb0", O_RDWR);\r
- if (fbdev == -1)\r
- {\r
- printf("open(\"/dev/fb0\") failed with %i\n", errno);\r
- exit(1);\r
- }\r
-\r
screen = mmap(0, SCREEN_MAP_SIZE, PROT_WRITE|PROT_READ, MAP_SHARED, fbdev, 0);\r
if (screen == MAP_FAILED)\r
{\r