Index: trunk/include/mpcdec/config_types.h.in
===================================================================
--- trunk/include/musepack/config_types.h.in	(revision 1)
+++ trunk/include/mpcdec/config_types.h.in	(revision 3)
@@ -36,9 +36,8 @@
 #define __MUSEPACK_CONFIG_TYPES_H__
 
-typedef unsigned char BOOL;
+typedef unsigned char mpc_bool_t;
 #define TRUE  1
 #define FALSE 0
 
-/* these are filled in by configure */
 typedef @SIZE16@ mpc_int16_t;
 typedef @USIZE16@ mpc_uint16_t;
Index: trunk/include/mpcdec/config_win32.h
===================================================================
--- trunk/include/mpcdec/config_win32.h	(revision 3)
+++ trunk/include/mpcdec/config_win32.h	(revision 3)
@@ -0,0 +1,48 @@
+/*
+  Copyright (c) 2005, The Musepack Development Team
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are
+  met:
+
+  * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the following
+  disclaimer in the documentation and/or other materials provided
+  with the distribution.
+
+  * Neither the name of the The Musepack Development Team nor the
+  names of its contributors may be used to endorse or promote
+  products derived from this software without specific prior
+  written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef __MUSEPACK_CONFIG_WIN32_H__
+#define __MUSEPACK_CONFIG_WIN32_H__
+
+typedef unsigned char mpc_bool_t;
+#define TRUE  1
+#define FALSE 0
+
+typedef __int16          mpc_int16_t;
+typedef unsigned __int16 mpc_uint16_t;
+typedef __int32          mpc_int32_t;
+typedef unsigned __int32 mpc_uint32_t;
+typedef __int64          mpc_int64_t;
+
+#endif // __MUSEPACK_CONFIG_WIN32_H__
Index: trunk/include/mpcdec/decoder.h
===================================================================
--- trunk/include/musepack/decoder.h	(revision 1)
+++ trunk/include/mpcdec/decoder.h	(revision 3)
@@ -35,12 +35,12 @@
 /// \file decoder.h
 
-#ifndef _musepack_decoder_h_
-#define _musepack_decoder_h_
+#ifndef _mpcdec_decoder_h_
+#define _mpcdec_decoder_h_
 
-#include "musepack/huffman.h"
-#include "musepack/math.h"
-#include "musepack/musepack.h"
-#include "musepack/reader.h"
-#include "musepack/streaminfo.h"
+#include "huffman.h"
+#include "math.h"
+#include "mpcdec.h"
+#include "reader.h"
+#include "streaminfo.h"
 
 enum {
Index: trunk/include/mpcdec/huffman.h
===================================================================
--- trunk/include/musepack/huffman.h	(revision 1)
+++ trunk/include/mpcdec/huffman.h	(revision 3)
@@ -36,9 +36,14 @@
 /// Data structures and functions for huffman coding.
 
-#ifndef _musepack_huffman_h_
-#define _musepack_huffman_h_
+#ifndef _mpcdec_huffman_h_
+#define _mpcdec_huffman_h_
 
-#include "musepack/config_types.h"
-#include "musepack/decoder.h"
+#ifndef WIN32
+#include "mpcdec/config_types.h"
+#else
+#include "mpcdec/config_win32.h"
+#endif
+
+#include "decoder.h"
 
 struct mpc_decoder_t; // forward declare to break circular dependencies
@@ -73,3 +78,3 @@
 void mpc_decoder_init_huffman_sv7_tables(struct mpc_decoder_t *d);
 
-#endif // _musepack_huffman_h_
+#endif // _mpcdec_huffman_h_
Index: trunk/include/mpcdec/internal.h
===================================================================
--- trunk/include/musepack/internal.h	(revision 1)
+++ trunk/include/mpcdec/internal.h	(revision 3)
@@ -33,9 +33,10 @@
 */
 
-/// \file musepack_internal.h
-/// Definitions and structures used only internally by the libmusepack.
+/// \file internal.h
+/// Definitions and structures used only internally by the libmpcdec.
 
-#ifndef _musepack_internal_h
-#define _musepack_internal_h
+#ifndef _mpcdec_internal_h
+#define _mpcdec_internal_h
+
 
 enum {
@@ -44,5 +45,5 @@
 
 /// Big/little endian 32 bit byte swapping routine.
-static inline
+static __inline
 mpc_uint32_t swap32(mpc_uint32_t val) {
     const unsigned char* src = (const unsigned char*)&val;
@@ -59,8 +60,8 @@
 
 /// helper functions used by multiple files
-mpc_uint32_t random_int(mpc_decoder *d); // in synth_filter.c
+mpc_uint32_t mpc_random_int(mpc_decoder *d); // in synth_filter.c
 void mpc_decoder_initialisiere_quantisierungstabellen(mpc_decoder *d, double scale_factor);
 void mpc_decoder_synthese_filter_float(mpc_decoder *d, MPC_SAMPLE_FORMAT* OutData);
 
-#endif // _musepack_internal_h
+#endif // _mpcdec_internal_h
 
Index: trunk/include/mpcdec/math.h
===================================================================
--- trunk/include/musepack/math.h	(revision 1)
+++ trunk/include/mpcdec/math.h	(revision 3)
@@ -33,9 +33,9 @@
 */
 
-/// \file mpc_math.h
-/// Libmusepack internal math routines.  
+/// \file math.h
+/// Libmpcdec internal math routines.  
 
-#ifndef _musepack_math_h_
-#define _musepack_math_h_
+#ifndef _mpcdec_math_h_
+#define _mpcdec_math_h_
 
 //#define MPC_FIXED_POINT
@@ -141,4 +141,4 @@
 #endif
 
-#endif // _musepack_math_h_
+#endif // _mpcdec_math_h_
 
Index: trunk/include/mpcdec/reader.h
===================================================================
--- trunk/include/musepack/reader.h	(revision 1)
+++ trunk/include/mpcdec/reader.h	(revision 3)
@@ -35,6 +35,6 @@
 /// \file reader.h
 
-#ifndef _musepack_reader_h_
-#define _musepack_reader_h_
+#ifndef _mpcdec_reader_h_
+#define _mpcdec_reader_h_
 
 /// \brief Stream reader interface structure.
@@ -48,5 +48,5 @@
 
     /// Seeks to byte position offset.
-	BOOL (*seek)(void *t, mpc_int32_t offset);
+	mpc_bool_t (*seek)(void *t, mpc_int32_t offset);
 
     /// Returns the current byte offset in the stream.
@@ -57,17 +57,19 @@
 
     /// True if the stream is a seekable stream.
-	BOOL (*canseek)(void *t);
+	mpc_bool_t (*canseek)(void *t);
 
-    /// Optional field that can be used to identify a particular instance of
+    /// Field that can be used to identify a particular instance of
     /// reader or carry along data associated with that reader.
     void *data;
 
-    // These are used by provided internal standard file-based reader implementation.
-    // You shouldn't touch them.  They're included in the main struct to avoid
-    // malloc/free.
+} mpc_reader;
+
+typedef struct mpc_reader_file_t {
+	mpc_reader reader;
+
     FILE *file;
     long file_size;
-    BOOL is_seekable;
-} mpc_reader;
+    mpc_bool_t is_seekable;
+} mpc_reader_file;
 
 /// Initializes reader with default stdio file reader implementation.  Use
@@ -76,5 +78,5 @@
 /// \param r reader struct to initalize
 /// \param input input stream to attach to the reader
-void mpc_reader_setup_file_reader(mpc_reader *r, FILE *input);
+void mpc_reader_setup_file_reader(mpc_reader_file *r, FILE *input);
 
-#endif // _musepack_reader_h_
+#endif // _mpcdec_reader_h_
Index: trunk/include/mpcdec/requant.h
===================================================================
--- trunk/include/musepack/requant.h	(revision 1)
+++ trunk/include/mpcdec/requant.h	(revision 3)
@@ -36,8 +36,8 @@
 /// Requantization function definitions.
 
-#ifndef _musepack_requant_h
-#define _musepack_requant_h_
+#ifndef _mpcdec_requant_h
+#define _mpcdec_requant_h_
 
-#include "musepack/musepack.h"
+#include "mpcdec.h"
 
 /* C O N S T A N T S */
@@ -49,3 +49,3 @@
 #define Dc      (__Dc + 1)
 
-#endif // _musepack_requant_h_
+#endif // _mpcdec_requant_h_
Index: trunk/include/mpcdec/streaminfo.h
===================================================================
--- trunk/include/musepack/streaminfo.h	(revision 1)
+++ trunk/include/mpcdec/streaminfo.h	(revision 3)
@@ -35,6 +35,6 @@
 /// \file streaminfo.h
 
-#ifndef _musepack_streaminfo_h_
-#define _musepack_streaminfo_h_
+#ifndef _mpcdec_streaminfo_h_
+#define _mpcdec_streaminfo_h_
 
 typedef mpc_int32_t mpc_streaminfo_off_t;
@@ -84,3 +84,3 @@
 } mpc_streaminfo;
 
-#endif // _musepack_streaminfo_h_
+#endif // _mpcdec_streaminfo_h_
