Mercurial > hg > sidinfo
diff sidinfo.c @ 226:c32015f4969e
Rename PSIDHeader struct to SIDLibPSIDHeader to conform with the SIDLib
prefix used otherwise. Add new function sidlib_read_sid_file_alloc()
which allocates the PSID header struct, instead of sidlib_read_sid_file()
which just reads into the given struct.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 03 Jan 2020 10:38:18 +0200 |
parents | 15a51252b73a |
children | 2b3d5d49086d |
line wrap: on
line diff
--- a/sidinfo.c Tue Dec 31 05:20:17 2019 +0200 +++ b/sidinfo.c Fri Jan 03 10:38:18 2020 +0200 @@ -854,7 +854,9 @@ } -static void siPrintPSIDInfoLine(FILE *outFile, BOOL *shown, const PSFStackItem *item, const char *d_str, const int d_int, const BOOL useConv) +static void siPrintPSIDInfoLine(FILE *outFile, BOOL *shown, + const PSFStackItem *item, const char *d_str, + const int d_int, const BOOL useConv) { const PSFOption *opt = &optPSOptions[item->cmd]; char *fmt, *str, *tmp; @@ -905,7 +907,8 @@ #define PRI(d_int) siPrintPSIDInfoLine(outFile, shown, item, NULL, d_int, FALSE) -static void siPrintPSIDInformationField(FILE *outFile, const char *filename, const PSIDHeader *psid, BOOL *shown, const PSFStackItem *item) +static void siPrintPSIDInformationField(FILE *outFile, const char *filename, + const SIDLibPSIDHeader *psid, BOOL *shown, const PSFStackItem *item) { const PSFOption *opt = &optPSOptions[item->cmd]; char tmp[128]; @@ -1013,7 +1016,7 @@ BOOL siHandleSIDFile(const char *filename) { - PSIDHeader *psid = NULL; + SIDLibPSIDHeader *psid = NULL; th_ioctx *inFile = NULL; FILE *outFile; BOOL shown = FALSE; @@ -1031,7 +1034,7 @@ th_io_set_handlers(inFile, siError, NULL); // Read PSID data - if (!sidlib_read_sid_file(inFile, &psid, setSLDBNewFormat)) + if (!sidlib_read_sid_file_alloc(inFile, &psid, setSLDBNewFormat)) goto error; // Get songlength information, if any