| 74 | } |
| 75 | |
| 76 | void sanity_check() /* make sure we haven't used a braindead compiler */ |
| 77 | { |
| 78 | int x; |
| 79 | |
| 80 | if (sizeof(int)!=4) { printf("Problem: int is not 32-bit\n"); abandon_ship(); } |
| 81 | if (sizeof(short)!=2) { printf("Problem: short is not 16-bit\n"); abandon_ship(); } |
| 82 | if ((sizeof(struct BMPHEAD)!=52)||(sizeof(struct FSH_HDR)!=16)|| |
| 83 | (sizeof(struct BMPDIR)!=8)||(sizeof(struct ENTRYHDR)!=16)) |
| 84 | { printf("Problem: structs are not correctly packed\n"); abandon_ship(); } |
| 85 | x=0; |
| 86 | *((char *)(&x))=1; |
| 87 | if (x!=1) { printf("Problem: incorrect endianness on this architecture\n"); abandon_ship(); } |
| 88 | } |
| 89 | |
| 90 | void mmemcpy(char *dest,char *src,int len) /* LZ-compatible memcopy */ |
| 91 | { |
no test coverage detected