diff sidlib.h @ 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 4bec78f45188
children 2b3d5d49086d
line wrap: on
line diff
--- a/sidlib.h	Tue Dec 31 05:20:17 2019 +0200
+++ b/sidlib.h	Fri Jan 03 10:38:18 2020 +0200
@@ -94,15 +94,17 @@
     th_md5hash_t hash;   // Songlength database hash
 
     SIDLibSLDBNode *lengths; // Songlength information node pointer
+    BOOL allocated; // TRUE if structure has been allocated
 
-} PSIDHeader;
+} SIDLibPSIDHeader;
 
 
 //
 // Functions
 //
-BOOL             sidlib_read_sid_file(th_ioctx *ctx, PSIDHeader **ppsid, const BOOL newSLDB);
-void             sidlib_free_sid_file(PSIDHeader *psid);
+int              sidlib_read_sid_file(th_ioctx *ctx, SIDLibPSIDHeader *psid, const BOOL newSLDB);
+int              sidlib_read_sid_file_alloc(th_ioctx *ctx, SIDLibPSIDHeader **ppsid, const BOOL newSLDB);
+void             sidlib_free_sid_file(SIDLibPSIDHeader *psid);
 
 const char *     sidlib_get_sid_clock_str(const int flags);
 const char *     sidlib_get_sid_model_str(const int flags);