mirror of
https://github.com/simtactics/niotso.git
synced 2025-07-04 13:47:05 -04:00
Rewrote hitdump to use a parser and Shutdown_M
This commit is contained in:
parent
6dddbd2efa
commit
5488883991
8 changed files with 311 additions and 323 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue