changeset 2495:1505a1e40090

Use glib types.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 31 Mar 2008 12:57:49 +0300
parents b419d8924c0b
children 42a5c9d5830b
files src/madplug/xing.c src/madplug/xing.h
diffstat 2 files changed, 9 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/madplug/xing.c	Mon Mar 31 12:38:35 2008 +0300
+++ b/src/madplug/xing.c	Mon Mar 31 12:57:49 2008 +0300
@@ -20,7 +20,6 @@
  */
 
 #include <mad.h>
-
 #include "xing.h"
 
 #define XING_MAGIC	(('X' << 24) | ('i' << 16) | ('n' << 8) | 'g')
@@ -44,8 +43,7 @@
  * DESCRIPTION:	parse a Xing VBR header
  */
 int
-xing_parse(struct xing *xing, struct mad_bitptr ptr,
-               unsigned int bitlen)
+xing_parse(struct xing *xing, struct mad_bitptr ptr, guint bitlen)
 {
     if (bitlen < 64 || mad_bit_read(&ptr, 32) != XING_MAGIC)
         goto fail;
@@ -70,14 +68,14 @@
     }
 
     if (xing->flags & XING_TOC) {
-        int i;
+        gint i;
 
         if (bitlen < 800)
             goto fail;
 
         for (i = 0; i < 100; ++i)
             xing->toc[i] = mad_bit_read(&ptr, 8);
-
+        
         bitlen -= 800;
     }
 
--- a/src/madplug/xing.h	Mon Mar 31 12:38:35 2008 +0300
+++ b/src/madplug/xing.h	Mon Mar 31 12:57:49 2008 +0300
@@ -20,15 +20,15 @@
 #ifndef XING_H
 #define XING_H
 
-#include "mad.h"
+#include <glib.h>
 
 struct xing
 {
-    long flags;                 /* valid fields (see below) */
-    unsigned long frames;       /* total number of frames */
-    unsigned long bytes;        /* total number of bytes */
-    unsigned char toc[100];     /* 100-point seek table */
-    long scale;                 /* ?? */
+    guint flags;        /* valid fields (see below) */
+    guint frames;       /* total number of frames */
+    guint bytes;        /* total number of bytes */
+    guchar toc[100];    /* 100-point seek table */
+    gulong scale;       /* ?? */
 };
 
 enum