| 48 | static struct cbheader *header = NULL; |
| 49 | |
| 50 | static struct cbfile *getfile(struct cbfile *f) |
| 51 | { |
| 52 | while (1) { |
| 53 | if (f < (struct cbfile *)(0xffffffff - ntohl(header->romsize))) |
| 54 | return NULL; |
| 55 | if (f->magic == 0) |
| 56 | return NULL; |
| 57 | if (f->magic == LARCHIVE_MAGIC) |
| 58 | return f; |
| 59 | f = (struct cbfile *)((u8 *)f + ntohl(header->align)); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | static struct cbfile *firstfile(void) |
| 64 | { |