changeset 103:ff6d1a9a2fde

Move definitions to start of the file.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 15 Feb 2016 04:43:22 +0200
parents 1362f00e4368
children 09ca9d9a8710
files sidlib.c
diffstat 1 files changed, 21 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/sidlib.c	Mon Feb 15 04:43:06 2016 +0200
+++ b/sidlib.c	Mon Feb 15 04:43:22 2016 +0200
@@ -8,6 +8,24 @@
 #include "th_string.h"
 
 
+#define SIDLIB_DB_MAGIC "SIDLibDB"
+#define SIDLIB_DB_VERSION 0x0100
+
+
+typedef struct
+{
+    char magic[8];      // File magic ID
+    uint16_t version;   // Version
+    uint32_t nnodes;    // Number of song nodes
+//  struct {
+//      th_md5hash_t hash;         // Hash for this SID file
+//      uint16_t nlengths;         // Number of song (lengths)
+//      uint16_t length[nlengths]; // Length in seconds
+//  } * nnodes;
+    th_md5hash_t hash;
+} PSIDLibHdr;
+
+
 int si_read_sid_file(th_ioctx *ctx, PSIDHeader *psid)
 {
     th_md5state_t state;
@@ -480,23 +498,9 @@
 }
 
 
-#define SIDLIB_DB_MAGIC "SIDLibDB"
-#define SIDLIB_DB_VERSION 0x0100
-
-typedef struct
-{
-    char magic[8];      // File magic ID
-    uint16_t version;   // Version
-    uint32_t nnodes;    // Number of song nodes
-//  struct {
-//      th_md5hash_t hash;         // Hash for this SID file
-//      uint16_t nlengths;         // Number of song (lengths)
-//      uint16_t length[nlengths]; // Length in seconds
-//  } * nnodes;
-    th_md5hash_t hash;
-} PSIDLibHdr;
-
-
+//
+// Read binary format SLDB
+//
 int si_sldb_read_bin(th_ioctx *ctx, SIDLibSLDB *dbh)
 {
     PSIDLibHdr hdr;