Index: sources/src/sc_int.h
===================================================================
--- sources/src/sc_int.h	(revision 52)
+++ sources/src/sc_int.h	(revision 59)
@@ -19,4 +19,5 @@
 #include <sc_bv.h>
 #include <cstdlib>
+//#include <stdint.h>
 
 // ----------------------------------------------------------------------------
@@ -37,10 +38,10 @@
 
 
-#define MASK32(W) ((~ (const uint32)0) >> (sizeof (uint32) * 8 - W))
-#define MASK64(W) ((~ (const uint64)0) >> (sizeof (uint64) * 8 - W))
+#define MASK32(W) ((~ (const uint32) 0) >> (sizeof (uint32) * 8 - W))
+#define MASK64(W) ((~ (const uint64) 0) >> (sizeof (uint64) * 8 - W))
 
 template<int W> struct s_int_type { typedef int64 int_type; };
 
-#define DECLAR_INT_TYPE(W) template<> struct s_int_type<W> { typedef smallest_int int_type; } // not declared as in8 because << operator threats like a character
+#define DECLAR_INT_TYPE(W) template<> struct s_int_type<W> { typedef smallest_int int_type; } // not declared as int8 because << operator threats like a character
 DECLAR_INT_TYPE(1);
 DECLAR_INT_TYPE(2);
@@ -54,5 +55,5 @@
 
 #define DECLAR_INT_TYPE(W) template<> struct s_int_type<W> { typedef int16 int_type; }
-DECLAR_INT_TYPE( 9);
+DECLAR_INT_TYPE(9);
 DECLAR_INT_TYPE(10);
 DECLAR_INT_TYPE(11);
@@ -96,15 +97,17 @@
     int64 val;
     sc_int_subref_r(int64 val_, int left_, int right_) {
-        val = val_; left = left_; right = right_;
+        val = val_;
+        left = left_;
+        right = right_;
     }
     
-    inline int64 read () const { return val; }
-    inline const sc_int_subref_r& operator | (const sc_int_subref_r &v) const {
-        print_warning ();
+    inline int64 read() const { return val; }
+    inline const sc_int_subref_r & operator | (const sc_int_subref_r & v) const {
+        print_warning();
         return *this;
     }
 
     private :
-    void print_warning () const;
+    void print_warning() const;
 
 };
@@ -116,5 +119,5 @@
 class sc_int_subref_r;
 
-template< int W /* = SC_INTWIDTH */>
+template < int W /* = SC_INTWIDTH */>
 class sc_int {
 
@@ -123,11 +126,12 @@
     /***********************/
     typedef sc_int<W> this_type;
+    public:
     typedef typename s_int_type<W>::int_type data_type;
-
+    private:
     typedef data_type sc_int_subref;
 
     // internal
     union {
-        val_field<W, (sizeof (data_type) * 8) - W,data_type> vf; /* To compute */
+        val_field<W, (sizeof(data_type) * 8) - W,data_type> vf; /* To compute */
         data_type val;          /* To return an int reference (read function) */
     };
@@ -138,15 +142,15 @@
     /***********************/
     public:
-    sc_int()                  { val = 0; }
-    sc_int (const char * a)   { val = 0; write (std::atoi (a)); }
-    sc_int (unsigned short a) { val = 0; write (a); }
-    sc_int (short a)          { val = 0; write (a); }
-    sc_int (unsigned long a)  { val = 0; write (a); }
-    sc_int (long a)           { val = 0; write (a); }
-    sc_int (unsigned int a)   { val = 0; write (a); }
-    sc_int (int a)            { val = 0; write (a); }
-    sc_int (int64 a)          { val = 0; write (a); }
-    sc_int (uint64 a)         { val = 0; write (a); }
-    sc_int (double a)         { val = 0; write (a); }
+    sc_int()                 { val = 0; }
+    sc_int(const char * a)   { val = 0; write(std::atoi(a)); }
+    sc_int(unsigned short a) { val = 0; write(a); }
+    sc_int(short a)          { val = 0; write(a); }
+    sc_int(unsigned long a)  { val = 0; write(a); }
+    sc_int(long a)           { val = 0; write(a); }
+    sc_int(unsigned int a)   { val = 0; write(a); }
+    sc_int(int a)            { val = 0; write(a); }
+    sc_int(int64 a)        { val = 0; write(a); }
+    sc_int(uint64 a)       { val = 0; write(a); }
+    sc_int(double a)         { val = 0; write(a); }
 
     template <int W2> sc_int (const sc_int<W2> &val_) { val = 0; write (val_.read());}
@@ -155,6 +159,6 @@
      */
 
-    sc_int (const sc_int &val_) { val = val_.val; }
-    sc_int (const sc_int_subref_r & a) { val = 0; write (a); } 
+    sc_int(const sc_int & val_) { val = val_.val; }
+    sc_int(const sc_int_subref_r & a) { val = 0; write(a); } 
     /* the user needs to cast explicitly result of range () method. */
 
@@ -165,8 +169,10 @@
 
     // read/write
-    inline const data_type& read() const { return val; }
-    inline void write(data_type val_)    { vf.valW = val_; }
-    template <int W2> inline void write (const sc_int<W2> val_) { write (val_.read ()); }
-    inline void write (const sc_int_subref_r& s) { write (s.read()); }
+    inline const data_type & read() const { return val; }
+    inline void write(data_type val_) { vf.valW = val_; }
+    template <int W2> void write(const sc_int<W2> val_) { write (val_.read ()); }
+    inline void write(const sc_int_subref_r & s) {
+        write (s.read());
+    }
 
     /***********************/
@@ -176,14 +182,14 @@
     // operators
     inline operator const data_type & () const {
-        return read ();
-    }
-
-    template <typename T> inline sc_int& operator = (const T& val_) {
-        write (val_);
+        return read();
+    }
+
+    template < typename T > inline sc_int & operator = (const T & val_) {
+        write(val_);
         return *this;
     }
 
-    inline sc_int & operator = (const sc_int_subref_r& a) {
-        write (a);
+    inline sc_int & operator = (const sc_int_subref_r & a) {
+        write(a);
         return *this;
     }
@@ -199,8 +205,8 @@
         return sc_dt::to_string (val, W, numrep);
     }
-    const sc_string to_dec() const { return to_string (SC_DEC); }
-    const sc_string to_bin() const { return to_string (SC_BIN); }
-    const sc_string to_oct() const { return to_string (SC_OCT); }
-    const sc_string to_hex() const { return to_string (SC_HEX); }
+    const sc_string to_dec() const { return to_string(SC_DEC); }
+    const sc_string to_bin() const { return to_string(SC_BIN); }
+    const sc_string to_oct() const { return to_string(SC_OCT); }
+    const sc_string to_hex() const { return to_string(SC_HEX); }
 
     // arithmetic
@@ -231,5 +237,6 @@
     template <int W2> 
     inline sc_int<W + W2> operator , (const sc_int<W2> & b) const {
-        sc_int<W + W2> res = read() << W2; res += b.read();
+        sc_int<W + W2> res = read() << W2;
+        res += b.read();
         return res;
     }
@@ -241,16 +248,17 @@
 
     template <int W2>
-    inline sc_int<W2> operator , (const sc_int_subref_r &v) const {
+    inline sc_int<W2> operator , (const sc_int_subref_r & v) const {
         std::cerr << "Warning : \n";
         return sc_int<W2> (v.read());
     }
 
-    inline sc_int_subref range (int left, int right) {
+    inline sc_int_subref range(int left, int right) {
         return (data_type)((data_type) (((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) & val) >> right;
     }
 
-    inline sc_int_subref_r range (int left, int right) const {
-        return sc_int_subref_r (((data_type) (((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) & val) >> right, left, right);
-    }
+    inline sc_int_subref_r range(int left, int right) const {
+        return sc_int_subref_r(((data_type) (((data_type)~(0)) >> (sizeof (data_type) * 8 - left - 1)) & val) >> right, left, right);
+    }
+
 #if 0
     std::cerr << "range(" << left << "," << right << ")\n";
@@ -263,5 +271,5 @@
 };
 
-inline std::ostream & operator << (std::ostream &o, const sc_int_subref_r & s) {
+inline std::ostream & operator << (std::ostream & o, const sc_int_subref_r & s) {
     return o << s.val;
 }
