Rewrote hitdump to use a parser and Shutdown_M

This commit is contained in:
Fatbag 2012-12-26 09:51:32 -06:00
parent 6dddbd2efa
commit 5488883991
8 changed files with 311 additions and 323 deletions

View file

@ -29,11 +29,12 @@ static IFFFile IFFFileInfo;
static int iffcreated = 0;
static void Shutdown_M(const char * Message){
fprintf(stderr, "iffexport: error: %s.", Message);
fprintf(stderr, "iffexport: error: %s.\n", Message);
if(iffcreated)
iff_delete(&IFFFileInfo);
free(IFFData);
fclose(hFile);
if(hFile)
fclose(hFile);
exit(EXIT_FAILURE);
}

View file

@ -39,10 +39,11 @@ static uint8_t * UTKData = NULL;
static uint8_t * WaveData = NULL;
static void Shutdown_M(const char * Message){
fprintf(stderr, "utkdecode: error: %s.", Message);
fprintf(stderr, "utkdecode: error: %s.\n", Message);
free(WaveData);
free(UTKData);
fclose(hFile);
if(hFile)
fclose(hFile);
exit(EXIT_FAILURE);
}

View file

@ -39,10 +39,11 @@ static uint8_t * XAData = NULL;
static uint8_t * WaveData = NULL;
static void Shutdown_M(const char * Message){
fprintf(stderr, "xadecode: error: %s.", Message);
fprintf(stderr, "xadecode: error: %s.\n", Message);
free(WaveData);
free(XAData);
fclose(hFile);
if(hFile)
fclose(hFile);
exit(EXIT_FAILURE);
}