Index: mppenc/branches/r2d/libmpcenc/bitstream.c
===================================================================
--- mppenc/branches/r2d/libmpcenc/bitstream.c	(revision 64)
+++ mppenc/branches/r2d/libmpcenc/bitstream.c	(revision 65)
@@ -125,5 +125,5 @@
 
 
-void WriteBits (mpc_encoder * e, const mpc_uint32_t input, const unsigned int bits )
+void WriteBits (mpc_encoder_t * e, const mpc_uint32_t input, const unsigned int bits )
 {
     e->BufferedBits += bits;
@@ -147,5 +147,5 @@
 // Bits in the original stream have to be 0, maximum X bits allowed to be set in input
 // Actual bitstream must have already written ptr[0] and ptr[1]
-void WriteBitsAt (mpc_encoder * e, const mpc_uint32_t input, const unsigned int bits, BitstreamPos const pos )
+void WriteBitsAt (mpc_encoder_t * e, const mpc_uint32_t input, const unsigned int bits, BitstreamPos const pos )
 {
     mpc_uint32_t*     ptr    = pos.ptr;
@@ -171,5 +171,5 @@
 
 
-void GetBitstreamPos (mpc_encoder * e, BitstreamPos* const pos )
+void GetBitstreamPos (mpc_encoder_t * e, BitstreamPos* const pos )
 {
     pos -> ptr = e->Buffer + e->Zaehler;
Index: mppenc/branches/r2d/libmpcenc/encode_sv7.c
===================================================================
--- mppenc/branches/r2d/libmpcenc/encode_sv7.c	(revision 64)
+++ mppenc/branches/r2d/libmpcenc/encode_sv7.c	(revision 65)
@@ -110,5 +110,5 @@
 
 void
-FinishBitstream ( mpc_encoder* e )
+FinishBitstream ( mpc_encoder_t* e )
 {
     e->Buffer [e->Zaehler++] = e->dword;         // Assigning the "last" word
@@ -169,5 +169,5 @@
 // formatting and writing SV7-bitstream for one frame
 void
-WriteBitstream_SV7 ( mpc_encoder* e,
+WriteBitstream_SV7 ( mpc_encoder_t* e,
 					 const int               MaxBand,
                      const SubbandQuantTyp*  Q )
Index: mppenc/branches/r2d/libmpcenc/libmpcenc.h
===================================================================
--- mppenc/branches/r2d/libmpcenc/libmpcenc.h	(revision 64)
+++ mppenc/branches/r2d/libmpcenc/libmpcenc.h	(revision 65)
@@ -60,5 +60,5 @@
 // TODO : match with mpc_decoder_t
 // FIXME : add init code
-typedef struct mpc_encoder_t {
+typedef struct {
 	mpc_uint32_t	Buffer [BUFFER_FULL];    // Buffer for bitstream-file
 	mpc_uint32_t	dword; //         =  0;      // 32-bit-Word for Bitstream-I/O
@@ -69,4 +69,4 @@
 	unsigned int  MS_Channelmode;
 	unsigned int  Overflows; //       = 0;      // number of internal (filterbank) clippings
-} mpc_encoder;
+} mpc_encoder_t;
 
Index: mppenc/branches/r2d/libmpcenc/minimax.h
===================================================================
--- mppenc/branches/r2d/libmpcenc/minimax.h	(revision 64)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef MPP_MINIMAX_H
-#define MPP_MINIMAX_H
-
-#if   defined __GNUC__  &&  defined __cplusplus
-
-# define maxi(A,B)  ( (A) >? (B) )
-# define mini(A,B)  ( (A) <? (B) )
-# define maxd(A,B)  ( (A) >? (B) )
-# define mind(A,B)  ( (A) <? (B) )
-# define maxf(A,B)  ( (A) >? (B) )
-# define minf(A,B)  ( (A) <? (B) )
-
-# define absi(A)    abs   (A)
-# define absf(A)    fabsf (A)
-# define absd(A)    fabs  (A)
-
-#elif defined __GNUC__
-
-# define maxi(A,B)  ( (A) > (B)  ?  (A)  :  (B) )
-# define mini(A,B)  ( (A) < (B)  ?  (A)  :  (B) )
-# define maxd(A,B)  ( (A) > (B)  ?  (A)  :  (B) )
-# define mind(A,B)  ( (A) < (B)  ?  (A)  :  (B) )
-# define maxf(A,B)  ( (A) > (B)  ?  (A)  :  (B) )
-# define minf(A,B)  ( (A) < (B)  ?  (A)  :  (B) )
-
-# define absi(A)    abs   (A)
-# define absf(A)    fabsf (A)
-# define absd(A)    fabs  (A)
-
-#else
-
-# define maxi(A,B)  ( (A) >  (B)  ?  (A)  :  (B) )
-# define mini(A,B)  ( (A) <  (B)  ?  (A)  :  (B) )
-# define maxd(A,B)  ( (A) >  (B)  ?  (A)  :  (B) )
-# define mind(A,B)  ( (A) <  (B)  ?  (A)  :  (B) )
-# define maxf(A,B)  ( (A) >  (B)  ?  (A)  :  (B) )
-# define minf(A,B)  ( (A) <  (B)  ?  (A)  :  (B) )
-
-# define absi(A)    ( (A) >= 0    ?  (A)  : -(A) )
-# define absf(A)    ( (A) >= 0.f  ?  (A)  : -(A) )
-# define absd(A)    ( (A) >= 0.   ?  (A)  : -(A) )
-
-#endif /* GNUC && C++ */
-
-#endif /* MPP_MINIMAX_H */
Index: mppenc/branches/r2d/libmpcenc/quant.c
===================================================================
--- mppenc/branches/r2d/libmpcenc/quant.c	(revision 64)
+++ mppenc/branches/r2d/libmpcenc/quant.c	(revision 65)
@@ -18,7 +18,8 @@
  */
 
+#include <math.h>
+
 #include "libmpcenc.h"
-
-#include <math.h>
+#include "minimax.h"
 
 /* V A R I A B L E S */
Index: mppenc/branches/r2d/libmpcenc/tools.c
===================================================================
--- mppenc/branches/r2d/libmpcenc/tools.c	(revision 64)
+++ mppenc/branches/r2d/libmpcenc/tools.c	(revision 65)
@@ -34,4 +34,7 @@
 
 #include "libmpcenc.h"
+
+// READ    returns -1 or 0 on error/EOF, otherwise > 0
+#define READ(fp,ptr,len)       fread  (ptr, 1, len, fp)
 
 #if defined HAVE_INCOMPLETE_READ  &&  FILEIO != 1
