static int process_list(int size, SFInfo *sf, FILE *fd) { SFChunk chunk; /* read the following id string */ READID(chunk.id, fd); size -= 4; switch (chunkid(chunk.id)) { case INFO_ID: return process_info(size, sf, fd); case SDTA_ID: return process_sdta(size, sf, fd); case PDTA_ID: return process_pdta(size, sf, fd); default: fprintf(stderr, "*** illegal id in level 1: %4.4s\n", chunk.id); FSKIP(size, fd); /* skip it */ return 0; } }
int Instruments::process_list(int size, SFInfo *sf, struct timidity_file *fd) { SFChunk chunk; /* read the following id string */ READID(chunk.id, fd); size -= 4; ctl_cmsg(CMSG_INFO, VERB_DEBUG, "%c%c%c%c:", chunk.id[0], chunk.id[1], chunk.id[2], chunk.id[3]); switch (chunkid(chunk.id)) { case INFO_ID: return process_info(size, sf, fd); case SDTA_ID: return process_sdta(size, sf, fd); case PDTA_ID: return process_pdta(size, sf, fd); default: ctl_cmsg(CMSG_WARNING, VERB_NORMAL, "%s: *** illegal id in level 1: %4.4s", fd->filename.c_str(), chunk.id); FSKIP(size, fd); /* skip it */ return 0; } }