Index: sources/src/casc.h
===================================================================
--- sources/src/casc.h	(revision 34)
+++ sources/src/casc.h	(revision 35)
@@ -49,18 +49,18 @@
 {
 #ifdef CONFIG_CHECK_FSM_RULES
-	casc_fsm_step = TRANSITION;
+  casc_fsm_step = TRANSITION;
 #endif
   transition ();
   update     ();
 #ifdef CONFIG_CHECK_FSM_RULES
-	casc_fsm_step = GEN_MOORE;
+  casc_fsm_step = GEN_MOORE;
 #endif
   moore_generation ();
 #ifdef CONFIG_CHECK_FSM_RULES
-	casc_fsm_step = GEN_MEALY;
+  casc_fsm_step = GEN_MEALY;
 #endif
   mealy_generation (); 
 #ifdef CONFIG_CHECK_FSM_RULES
-	casc_fsm_step = STIMULI;
+  casc_fsm_step = STIMULI;
 #endif
 }
Index: sources/src/gen_code.cc
===================================================================
--- sources/src/gen_code.cc	(revision 34)
+++ sources/src/gen_code.cc	(revision 35)
@@ -79,7 +79,8 @@
 ostream& operator << (ostream &o, const SC_ENTRY_FUNC &f)
 {
-	register fct p;
-	p.pmf = f;
-	return o << "0x" << hex << p.integer << "ULL";
+  register fct p;
+  p.integer = 0;
+  p.pmf = f;
+  return o << "0x" << hex << p.integer << "ULL";
 }
 
@@ -242,11 +243,11 @@
   o << "\nextern void mealy_generation (void)\n{\n";
   o << "  register fct p;\n"
-	  << "\n\n  /* fonctions de mealy */\n";
-	ProcessDependencyList::iterator it;
-	for (it = mealy_func_list.begin(); it != mealy_func_list.end(); ++it)
-	{
-		const method_process_t *m = *it;
-	  PrintCall (o, *m);
-	}
+    << "\n\n  /* fonctions de mealy */\n";
+  ProcessDependencyList::iterator it;
+  for (it = mealy_func_list.begin(); it != mealy_func_list.end(); ++it)
+  {
+    const method_process_t *m = *it;
+    PrintCall (o, *m);
+  }
 }
 
@@ -260,10 +261,10 @@
     cerr << "Generating C code for scheduling...\n";
 
-	// open temporary file
-	ofstream o;
+  // open temporary file
+  ofstream o;
   char base_name[PATH_MAX];
-	open_temp (o, base_name);
+  open_temp (o, base_name);
  
-	if (! o.good ()) {
+  if (! o.good ()) {
     perror("scheduling: open file\n");
     exit(-1);
@@ -271,10 +272,10 @@
 
   o << "// generated by " << sc_version () << endl
-		<< "#include <casc.h>\n\n"
-		<< "#include <cstdio>\n\n"
-//		<< "#include <iostream>\n\n"
-		<< "namespace sc_core {\n"
+    << "#include <casc.h>\n\n"
+    << "#include <cstdio>\n\n"
+//  << "#include <iostream>\n\n"
+    << "namespace sc_core {\n"
     << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n"
-		<< " typedef void (*CASC_ENTRY_FUNC)(void *);\n";
+    << " typedef void (*CASC_ENTRY_FUNC)(void *);\n";
   const char *pmf_type = (sizeof (SC_ENTRY_FUNC) == 4)?
                          // G4 pointer-to-member-function style
@@ -286,7 +287,7 @@
     << " integer; SC_ENTRY_FUNC pmf; CASC_ENTRY_FUNC pf; } fct;\n"; 
 	
-	gen_transition (o, transition_func_list);	
-	gen_moore      (o, moore_func_list);	
-	gen_mealy      (o, strongcomponents);
+  gen_transition (o, transition_func_list);	
+  gen_moore      (o, moore_func_list);	
+  gen_mealy      (o, strongcomponents);
 
   o << " \n}\n";
@@ -340,7 +341,7 @@
     << " typedef union { unsigned long long int integer; SC_ENTRY_FUNC pmf; CASC_ENTRY_FUNC pf; } fct;\n"; 
 	
-	gen_transition (o, transition_func_list);	
-	gen_moore      (o, moore_func_list);	
-	gen_mealy      (o, mealy_func_list);
+  gen_transition (o, transition_func_list);	
+  gen_moore      (o, moore_func_list);	
+  gen_mealy      (o, mealy_func_list);
 
   o << "\n}\n";
@@ -567,18 +568,18 @@
 {
 #ifdef CONFIG_CHECK_FSM_RULES
-	casc_fsm_step = TRANSITION;
+  casc_fsm_step = TRANSITION;
 #endif
   call_functions (pf[0]); // transition
   update     ();
 #ifdef CONFIG_CHECK_FSM_RULES
-	casc_fsm_step = GEN_MOORE;
+  casc_fsm_step = GEN_MOORE;
 #endif
   call_functions (pf[1]); // moore generation
 #ifdef CONFIG_CHECK_FSM_RULES
-	casc_fsm_step = GEN_MEALY;
+  casc_fsm_step = GEN_MEALY;
 #endif
   call_functions (pf[2]); // mealy generation
 #ifdef CONFIG_CHECK_FSM_RULES
-	casc_fsm_step = STIMULI;
+  casc_fsm_step = STIMULI;
 #endif
 }
@@ -626,5 +627,5 @@
 {
 #ifdef CONFIG_CHECK_FSM_RULES
-	casc_fsm_step = TRANSITION;
+  casc_fsm_step = TRANSITION;
 #endif
   method_process_list_t::iterator mm;
@@ -636,5 +637,5 @@
   update     ();
 #ifdef CONFIG_CHECK_FSM_RULES
-	casc_fsm_step = GEN_MOORE;
+  casc_fsm_step = GEN_MOORE;
 #endif
   for( mm = func_list[1].begin(); mm != func_list[1].end(); ++mm)
@@ -644,9 +645,9 @@
   }
 #ifdef CONFIG_CHECK_FSM_RULES
-	casc_fsm_step = GEN_MEALY;
+  casc_fsm_step = GEN_MEALY;
 #endif
   quasistatic_mealy_generation ();
 #ifdef CONFIG_CHECK_FSM_RULES
-	casc_fsm_step = STIMULI;
+  casc_fsm_step = STIMULI;
 #endif
 }
Index: sources/src/port_dependency.h
===================================================================
--- sources/src/port_dependency.h	(revision 34)
+++ sources/src/port_dependency.h	(revision 35)
@@ -22,7 +22,7 @@
 // Port Dependency Graph
 struct PortDependency {
-	const method_process_t *method;
-	const sc_port_base     *source;
-	const sc_port_base     *destination;
+  const method_process_t *method;
+  const sc_port_base     *source;
+  const sc_port_base     *destination;
 };
 typedef std::list<PortDependency> PortDependencyGraph;
Index: sources/src/process_dependency.h
===================================================================
--- sources/src/process_dependency.h	(revision 34)
+++ sources/src/process_dependency.h	(revision 35)
@@ -19,7 +19,7 @@
 // Signal Dependency Graph
 struct ProcessDependency {
-	const method_process_t *source;
-	const method_process_t *destination;
-	bool operator < (const ProcessDependency &) const;
+  const method_process_t *source;
+  const method_process_t *destination;
+  bool operator < (const ProcessDependency &) const;
 };
 
Index: sources/src/sc_main.cc
===================================================================
--- sources/src/sc_main.cc	(revision 34)
+++ sources/src/sc_main.cc	(revision 35)
@@ -187,5 +187,5 @@
                  << "modules filename : dump module hierarchy graph into specified dot file (tons of bugs inside)\n"
                  << "nobanner: do not print SystemCASS splash screen\n"
-                 << "nodynamiclink: do not link dynamically scheduling code\n"
+                 << "dynamiclink: dynamically link the scheduling code\n"
                  << "nosim   : run until elaboration stage. Don't simulate\n"
                  << "notrace : disable all tracing functions\n"
@@ -226,4 +226,10 @@
           case 'c' :
             print_schedule = true;
+            continue;
+	  case 'd' :
+            if (strcmp (argv[i]+2, "dynamiclink") == 0)
+              dynamic_link_of_scheduling_code = true;
+	    else
+              check_port_dependencies = true;
             continue;
           case 'e' :
@@ -279,7 +285,4 @@
             scheduling_method = BUCHMANN_SCHEDULING;
             continue;
-          case 'd' :
-            check_port_dependencies = true;
-            continue;
           default :
             break;
Index: sources/src/sc_module.cc
===================================================================
--- sources/src/sc_module.cc	(revision 34)
+++ sources/src/sc_module.cc	(revision 35)
@@ -139,5 +139,5 @@
 {
   name = nm;
-	func = fn; 
+  func = fn; 
   module = &mod;
   dont_initialize = false;
Index: sources/src/sc_module.h
===================================================================
--- sources/src/sc_module.h	(revision 34)
+++ sources/src/sc_module.h	(revision 35)
@@ -14,11 +14,12 @@
 #define __SC_MODULE_H__
 
-#include "sc_module_ext.h"
-
 #include <list>
 #include <set>
 #include <stack>
+
+#include "internal.h"
+
 #include "sc_fwd.h"
-#include "internal.h"
+#include "sc_module_ext.h"
 #include "sc_object.h"
 #include "sc_sensitive.h"
@@ -56,5 +57,5 @@
 public: const char *name; // function name
 #ifdef DUMP_SCHEDULE_STATS
-	long long int number_of_calls;
+  long long int number_of_calls;
 #endif	
 public:
Index: sources/src/sc_port.cc
===================================================================
--- sources/src/sc_port.cc	(revision 34)
+++ sources/src/sc_port.cc	(revision 35)
@@ -138,5 +138,5 @@
 }
 
-static bool check_multiwriting2port_error_message = 1;
+static bool check_multiwriting2port_error_message = true;
 void
 sc_port_base::check_multiwriting2port () const
Index: sources/src/sc_port_ext.h
===================================================================
--- sources/src/sc_port_ext.h	(revision 34)
+++ sources/src/sc_port_ext.h	(revision 35)
@@ -17,13 +17,17 @@
 #include <iostream>
 #include <cstdlib>
-#include "sc_fwd.h"
-#include "sc_nbdefs.h"
-//#include "sc_event_finder.h"
-#include "sc_event.h"
-#include "sc_object.h"
-#include "sc_interface.h"
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "fsm_rules.h"
 #include "internal_ext.h"
 #include "port_dependency_ext.h"
-#include "fsm_rules.h"
+#include "sc_event.h"
+#include "sc_fwd.h"
+#include "sc_interface.h"
+#include "sc_nbdefs.h"
+#include "sc_object.h"
 
 
@@ -45,12 +49,12 @@
 //
 
-	using namespace sc_dt;
+  using namespace sc_dt;
 
 const char *get_name        (const tab_t *pointer);
 
 #define READ_SIGNAL(value_type_,pointer_) \
-	((value_type_&) (*((value_type_*) (pointer_))))
-
-	///////////////////// DEPRECATED
+  ((value_type_&) (*((value_type_*) (pointer_))))
+
+  ///////////////////// DEPRECATED
 // C ANSI-only since it is needed to link with extern "C"
 // this declaration is not in casc.h since the CONFIG_CHECK_FSM_RULES macro
@@ -74,10 +78,10 @@
   typedef sc_port_base                        base_type;
 public:
-	///////////
-	// Internal
-	const sc_module &get_module () const;
-	void             init ();
+  ///////////
+  // Internal
+  const sc_module &get_module () const;
+  void             init ();
   void             check_multiwriting2port () const;
-	///////////		 
+  ///////////     
   
   friend std::ostream& operator << (std::ostream &, const sc_port_base &);
@@ -114,12 +118,12 @@
   typedef sc_signal<data_type>          signal_type;
 
-	///////////
-	// Internal
+  ///////////
+  // Internal
   void init ();
-	/*
-	public: virtual size_t data_size () const
-	{ return sizeof (data_type); }
-	*/
-	///////////
+  /*
+  public: virtual size_t data_size () const
+  { return sizeof (data_type); }
+  */
+  ///////////
 public:
   // constructors
@@ -130,8 +134,8 @@
   explicit sc_in(const base_type& parent_ ): base_type( parent_ ) { init (); }
 
-	/*
+  /*
   // LRM error !
   //static const char *const kind_string; this is a template !
-	*/
+  */
 //  virtual const char *kind () const 
 //  { return "sc_in"; };
@@ -171,6 +175,6 @@
 sc_in<T>::init()
 { 
-	set_kind (sc_in_string);
-	sc_interface::init (sizeof (data_type)); 
+  set_kind (sc_in_string);
+  sc_interface::init (sizeof (data_type)); 
 }
 
@@ -182,13 +186,13 @@
 #ifdef DUMP_READ
   std::cerr << "read " << READ_SIGNAL(const T&, get_pointer())
-	 	<< " on signal " << name () << "\n";
+     << " on signal " << name () << "\n";
 #endif
 #ifdef CONFIG_CHECK_FSM_RULES
-	if (casc_fsm_step == GEN_MOORE) {
-		std::cerr << "FSM rules error : trying to read on input port '" 
-		          << name ()
-			  << "' from " <<  get_step_name () << " function.\n";
-		exit (-1);
-	}		
+  if (casc_fsm_step == GEN_MOORE) {
+    std::cerr << "FSM rules error : trying to read on input port '" 
+              << name ()
+        << "' from " <<  get_step_name () << " function.\n";
+    exit (-1);
+  }    
 #endif
   return READ_SIGNAL(const T, get_pointer());
@@ -212,9 +216,9 @@
 class sc_inout : public sc_port_base
 {
-	///////////
-	// Internal
+  ///////////
+  // Internal
 protected:
   void init ();
-	T val;
+  T val;
 private:
   typedef T                                   data_type;
@@ -223,9 +227,9 @@
   typedef sc_signal<data_type>                signal_type;
 
-	/*
-	public: virtual size_t data_size () const
-	{ return sizeof (data_type); }
-	*/
-	///////////
+  /*
+  public: virtual size_t data_size () const
+  { return sizeof (data_type); }
+  */
+  ///////////
 public:
   // contructeurs
@@ -234,8 +238,8 @@
   explicit sc_inout(const char* name_): base_type(name_) { init (); };
 
-	/*
+  /*
   // LRM error !
   //static const char *const kind_string; this is a template !
-	*/
+  */
   //virtual const char *kind () const 
   //{ return "sc_inout"; };
@@ -273,7 +277,7 @@
 sc_inout<T>::init ()
 {
-	set_pointer ((tab_t*)(void*)&val);
-	sc_object::set_kind    (sc_inout_string);
-	sc_interface::init (sizeof (data_type)); 
+  set_pointer ((tab_t*)(void*)&val);
+  sc_object::set_kind    (sc_inout_string);
+  sc_interface::init (sizeof (data_type)); 
   /*ref*/ val = (0);
   //sc_inout::write (0);
@@ -292,13 +296,13 @@
 #ifdef DUMP_READ
   std::cerr << "read " << READ_SIGNAL(const T, get_pointer()) // val
-	 	<< " on signal " << name () << "\n";
+     << " on signal " << name () << "\n";
 #endif
 #ifdef CONFIG_CHECK_FSM_RULES
-	if (casc_fsm_step == GEN_MOORE) {
-		std::cerr << "FSM rules error : trying to read on input/output port " 
-			<< name () //get_name (get_pointer()) 
-			<< " from " << get_step_name () << " function.\n";
-		exit (-1);
-	}		
+  if (casc_fsm_step == GEN_MOORE) {
+    std::cerr << "FSM rules error : trying to read on input/output port " 
+      << name () //get_name (get_pointer()) 
+      << " from " << get_step_name () << " function.\n";
+    exit (-1);
+  }    
 #endif
 //  return val; 
@@ -317,12 +321,12 @@
 #endif
 #ifdef CONFIG_CHECK_FSM_RULES
-	if ((casc_fsm_step != GEN_MOORE) && ( casc_fsm_step != GEN_MEALY)) {
-		std::cerr << "FSM rules error : trying to write on output port " 
-			<< name () 
-			<< " from an " << get_step_name () << " function.\n";
-		exit (-1);
-	}		
-#endif
-//	T& ref = *(T*)(get_pointer());
+  if ((casc_fsm_step != GEN_MOORE) && ( casc_fsm_step != GEN_MEALY)) {
+    std::cerr << "FSM rules error : trying to write on output port " 
+      << name () 
+      << " from an " << get_step_name () << " function.\n";
+    exit (-1);
+  }    
+#endif
+//  T& ref = *(T*)(get_pointer());
 #if defined(CONFIG_CHECK_MULTIWRITING2PORT)
   check_multiwriting2port ();
@@ -369,8 +373,8 @@
 class sc_out : public sc_inout<T>
 {
-	///////////
-	// Internal
+  ///////////
+  // Internal
   void init ();
-	///////////
+  ///////////
 public:
   // typedefs 
@@ -386,8 +390,8 @@
   sc_out (const char *name_, this_type & parent_);
 
-	/*
+  /*
   // LRM error !
   //static const char *const kind_string; this is a template !
-	*/
+  */
   //virtual const char *kind () const 
   //{ return "sc_out"; };
@@ -404,6 +408,6 @@
   { bind (*this,parent_); }
 
-	//////////////////////
-	// Systemcass specific
+  //////////////////////
+  // Systemcass specific
   void operator () (sc_port_base &o)
   { set_port_dependency (&o, (sc_port_base&)(*this)); }
@@ -412,5 +416,5 @@
   { set_port_dependency (NULL, (sc_port_base&)(*this)); }
 */
-	//////////////////////
+  //////////////////////
 
 
@@ -428,8 +432,8 @@
 {
   sc_inout<T>::init ();
-//	tab_t *t = &(sc_inout<T>::val);
-//	sc_interface::set_pointer (t);
-	sc_object::set_kind (sc_out_string);
-//	sc_interface::init (sizeof (data_type)); 
+//  tab_t *t = &(sc_inout<T>::val);
+//  sc_interface::set_pointer (t);
+  sc_object::set_kind (sc_out_string);
+//  sc_interface::init (sizeof (data_type)); 
 //  /*ref*/ sc_inout<T>::val = 0;
   //sc_inout<T>::write (0); 
Index: sources/src/signal_dependency.h
===================================================================
--- sources/src/signal_dependency.h	(revision 34)
+++ sources/src/signal_dependency.h	(revision 35)
@@ -24,9 +24,9 @@
 // Signal Dependency Graph
 struct SignalDependency {
-	const method_process_t *method;
-	const equi_t           *source;
-	const equi_t           *destination;
-	bool operator < (const SignalDependency &a) const;
-//	friend int operator < (const SignalDependency &a, const SignalDependency &b);
+  const method_process_t *method;
+  const equi_t           *source;
+  const equi_t           *destination;
+  bool operator < (const SignalDependency &a) const;
+//  friend int operator < (const SignalDependency &a, const SignalDependency &b);
 };
 
Index: sources/test_regression/05042006/system.cpp
===================================================================
--- sources/test_regression/05042006/system.cpp	(revision 34)
+++ sources/test_regression/05042006/system.cpp	(revision 35)
@@ -1,17 +1,8 @@
 #include <systemc.h>
-
-#define ASSERT(x) \
-  { errnum++; \
-    if (!(x)) \
-    { \
-    cerr << "ASSERT : " #x "\n"; \
-    exit (errnum); \
-    } \
-  }
 
 using namespace std;
 
 struct test : sc_module {
-	sc_in_clk                       clk;
+  sc_in_clk                       clk;
   sc_in<int>                      i1;
   sc_out<int>                     o1;
@@ -36,5 +27,5 @@
 
   SC_HAS_PROCESS(test);
-	test (sc_module_name n) : sc_module (n),
+  test (sc_module_name n) : sc_module (n),
     clk("clk"),
     i1("i1"), 
@@ -44,17 +35,16 @@
     reg2("reg2")
   {
-		SC_METHOD(trans);
-		sensitive << clk.pos();
+    SC_METHOD(trans);
+    sensitive << clk.pos();
     dont_initialize();
-		SC_METHOD(gen);
-		sensitive << clk.neg();
+    SC_METHOD(gen);
+    sensitive << clk.neg();
     dont_initialize();
-	};
+  };
 };
 
 int sc_main (int argc, char *argv[])
 {
-  int errnum = 0;
-	sc_clock        signal_clk("my_clock",1, 0.5);
+  sc_clock        signal_clk("my_clock",1, 0.5);
   sc_signal<int>     s01("s01");
   sc_signal<int>     s02("s02");
@@ -67,10 +57,10 @@
   test1.o2 (s03);
 
-	// Init & run
-	sc_start (0);
+  // Init & run
+  sc_start (0);
 
   sc_start (10);
 
-	return EXIT_SUCCESS;
+  return EXIT_SUCCESS;
 }
 
Index: sources/test_regression/07122006/system2.cpp
===================================================================
--- sources/test_regression/07122006/system2.cpp	(revision 34)
+++ sources/test_regression/07122006/system2.cpp	(revision 35)
@@ -34,5 +34,5 @@
   sc_signal<int>  reg;
 
-  void transition ();
+  virtual void transition ();
   void gen_moore  ();
   void gen_mealy  ();
@@ -89,4 +89,4 @@
 
   cout << "Test OK.\n";
-	return EXIT_SUCCESS;
+  return EXIT_SUCCESS;
 }
Index: sources/test_regression/16112005/system.cpp
===================================================================
--- sources/test_regression/16112005/system.cpp	(revision 34)
+++ sources/test_regression/16112005/system.cpp	(revision 35)
@@ -1,3 +1,3 @@
-#include "systemc.h"
+#include <systemc.h>
 #include <iostream>
 #include <string>
@@ -20,7 +20,7 @@
   sc_in<int>     i;
   sc_out<int>    o;
-	internal_model (sc_module_name n) : sc_module (n),
+  internal_model (sc_module_name n) : sc_module (n),
     i("i"),
-		o("o")
+    o("o")
   {
   }
@@ -31,10 +31,11 @@
   sc_in<int>     i1, i2, i3;
   sc_out<int>    o1, o2, o3;
-	sc_signal<int> r1, r2;
+  sc_signal<int> r1, r2;
   internal_model internal;
-	model (sc_module_name n) : sc_module (n),
+
+  model (sc_module_name n) : sc_module (n),
     i1("i1"), i2("i2"), i3("i3"),
-		o1("o1"), o2("o2"), o3("o3"),
-		r1("r1"), r2("r2"),
+    o1("o1"), o2("o2"), o3("o3"),
+    r1("r1"), r2("r2"),
     internal ("internal")
   {
Index: sources/test_regression/16122005/system.cpp
===================================================================
--- sources/test_regression/16122005/system.cpp	(revision 34)
+++ sources/test_regression/16122005/system.cpp	(revision 35)
@@ -1,3 +1,3 @@
-#include "systemc.h"
+#include <systemc.h>
 #include <iostream>
 #include <fstream>
Index: sources/test_regression/17032005/Makefile
===================================================================
--- sources/test_regression/17032005/Makefile	(revision 34)
+++ sources/test_regression/17032005/Makefile	(revision 35)
@@ -14,5 +14,5 @@
 
 system-23.vcd : system_systemcass.x
-	./system_systemcass.x system 23
+	./system_systemcass.x --nodynamiclink system 23
 	tail -n +8 system.vcd > system-23.vcd
 	rm system.vcd
Index: sources/test_regression/17032005/system.cpp
===================================================================
--- sources/test_regression/17032005/system.cpp	(revision 34)
+++ sources/test_regression/17032005/system.cpp	(revision 35)
@@ -20,8 +20,8 @@
   sc_in<bool>     clk;
   sc_in<bool>     resetn;
-	sc_signal<sc_uint<6>     > ui6;
-	sc_signal<sc_uint<16>    > ui16;
-	sc_signal<sc_uint<31>    > ui31;
-	sc_signal<sc_uint<32>    > ui32;
+  sc_signal<sc_uint<6>     > ui6;
+  sc_signal<sc_uint<16>    > ui16;
+  sc_signal<sc_uint<31>    > ui31;
+  sc_signal<sc_uint<32>    > ui32;
   sc_signal<sc_uint<64>    > ui64;
   sc_signal<sc_int<6>      > i6;
@@ -45,10 +45,10 @@
       ui31  = 0x100;
       ui32  = 0x211;
-      ui64  = 0xABCF1234;
+      ui64  = 0xABCF1234ULL;
       i6    = 0xF;
       i16   = 0x3F;
       i31   = 0x11112222;
       i32   = 0x43214321;
-      i64   = 0x4444abcd;
+      i64   = 0x4444abcdULL;
 //      bui64 = 0xFFFFFFFF;
 //      bui64b= 0xFFFFFFFF;
@@ -91,6 +91,6 @@
 int sc_main (int argc, char *argv[])
 {
-	int errnum = 1;
-	cout << "Tests ok\n";
+  int errnum = 1;
+  cout << "Tests ok\n";
   sc_clock        clk("clk");
   sc_signal<bool> resetn("resetn");
@@ -100,5 +100,5 @@
   test.resetn (resetn);
   
-	sc_trace_file *tf;
+  sc_trace_file *tf;
 
   if (argc != 3)
@@ -109,5 +109,5 @@
 
   string trace_filename = argv[1];
-	tf = sc_create_vcd_trace_file (trace_filename.c_str());
+  tf = sc_create_vcd_trace_file (trace_filename.c_str());
   sc_trace (tf, test.ui6  , "ui6"  );
   sc_trace (tf, test.ui16 , "ui16" );
@@ -139,6 +139,4 @@
   sc_start (20);
 
-  sc_close_vcd_trace_file (tf);
-
 #if 1
   cout << "0x3f"            << " 0x" << hex << (unsigned int) (sc_uint<6> )test.ui6   << endl;
@@ -148,8 +146,10 @@
 #endif
   cerr << test.ui6.read() << endl;
+
   union t {
     int v1:3;
     int v2;
   };
+
   t t1,t2;
   t1.v1 = 7;
@@ -161,7 +161,8 @@
   ASSERT(test.ui31.read() == 0x100fffff);
   ASSERT(test.ui32.read() == 0x211fffff);
-  long long unsigned int ui64_reference = 0xabcf1234;
+
+  long long unsigned int ui64_reference = 0xabcf1234ULL;
   ui64_reference <<= 20;
-  ui64_reference += 0xfffff;
+  ui64_reference += 0xfffffULL;
 #if 0
   cout << "0xffffffff"      << " 0x" << hex << (int) (sc_int<6>)test.i6    << endl;
@@ -170,14 +171,20 @@
   cout << "0x4444abcdfffff" << " 0x" << hex << (long long signed int) (sc_int<64>)test.i64   << endl;    
 #endif
+
   ASSERT(test.ui64.read() == ui64_reference);
   ASSERT(test.i6.read() == (sc_int<6>)~0);
   ASSERT(test.i31.read() == 0x222fffff);
   ASSERT(test.i32.read() == 0x321fffff)
-  long long signed int i64_reference = 0x4444abcd;
+
+  long long signed int i64_reference = 0x4444abcdULL;
   i64_reference <<= 20;
-  i64_reference += 0xfffff;
+  i64_reference += 0xfffffULL;
   ASSERT(test.i64.read() == i64_reference);
+
 //  cout << "0x4294967315" << " 0x" << hex << test.bui64 << endl;    
   cout << "Test OK.\n";
-	return EXIT_SUCCESS;
+
+  sc_close_vcd_trace_file (tf);
+
+  return EXIT_SUCCESS;
 }
Index: sources/test_regression/25032005/system.cpp
===================================================================
--- sources/test_regression/25032005/system.cpp	(revision 34)
+++ sources/test_regression/25032005/system.cpp	(revision 35)
@@ -4,121 +4,121 @@
 
 using namespace std;
-	
+  
 struct A : sc_module {
-	sc_in_clk                       clk;
-	sc_out<bool>                    o1;
+  sc_in_clk                       clk;
+  sc_out<bool>                    o1;
 
-	void eval () {
+  void eval () {
     o1 = (rand()%2) == 0;
-	}
+  }
 
-	SC_CTOR (A) : clk ("clk"), o1("o1") {
-		SC_METHOD(eval);
-		sensitive << clk.neg();
+  SC_CTOR (A) : clk ("clk"), o1("o1") {
+    SC_METHOD(eval);
+    sensitive << clk.neg();
 #ifdef SYSTEMCASS_SPECIFIC
-//		s1();
+//    s1();
 #endif
-	};
+  };
 };
 
 struct B : sc_module {
-	sc_in_clk                       clk;
-	sc_in<bool>                     i1;
-	sc_in<bool>                     i2;
-	sc_out<bool>                    o1;
-	sc_out<bool>                    o2;
+  sc_in_clk                       clk;
+  sc_in<bool>                     i1;
+  sc_in<bool>                     i2;
+  sc_out<bool>                    o1;
+  sc_out<bool>                    o2;
 
-	void eval1 () {
+  void eval1 () {
     o1 = ~i1;
-	}
-	void eval2 () {
+  }
+  void eval2 () {
     o2 = ~i2;
-	}
+  }
 
-	SC_CTOR (B) : clk ("clk"), i1 ("i1"), o1("o1"), i2 ("i2"), o2 ("o2") {
-		SC_METHOD(eval1);
-		sensitive << clk.neg();
-		sensitive << i1;
+  SC_CTOR (B) : clk ("clk"), i1 ("i1"), o1("o1"), i2 ("i2"), o2 ("o2") {
+    SC_METHOD(eval1);
+    sensitive << clk.neg();
+    sensitive << i1;
 #ifdef SYSTEMCASS_SPECIFIC
-		o1(i1);
+    o1(i1);
 #endif
-		SC_METHOD(eval2);
-		sensitive << clk.neg();
-		sensitive << i2;
+    SC_METHOD(eval2);
+    sensitive << clk.neg();
+    sensitive << i2;
 #ifdef SYSTEMCASS_SPECIFIC
-		o2(i2);
+    o2(i2);
 #endif
-	};
+  };
 };
 
 struct C : sc_module {
-	sc_in_clk                       clk;
-	sc_in<bool>                     i1;
-	sc_in<bool>                     i2;
-	sc_out<bool>                    o1;
+  sc_in_clk                       clk;
+  sc_in<bool>                     i1;
+  sc_in<bool>                     i2;
+  sc_out<bool>                    o1;
 
-	void eval1 () {
+  void eval1 () {
     o1 = i1 ^ i2;
-	}
+  }
 
-	SC_CTOR (C) : clk ("clk"), i1 ("i1"), o1("o1"), i2 ("i2") {
-		SC_METHOD(eval1);
-		sensitive << clk.neg();
-		sensitive << i1 << i2;
+  SC_CTOR (C) : clk ("clk"), i1 ("i1"), o1("o1"), i2 ("i2") {
+    SC_METHOD(eval1);
+    sensitive << clk.neg();
+    sensitive << i1 << i2;
 #ifdef SYSTEMCASS_SPECIFIC
-		o1(i1);
-		o1(i2);
+    o1(i1);
+    o1(i2);
 #endif
-	};
+  };
 };
 
 struct D : sc_module {
-	sc_in_clk                       clk;
-	sc_out<bool>                    o1;
+  sc_in_clk                       clk;
+  sc_out<bool>                    o1;
 
-	void eval () {
+  void eval () {
     o1 = (rand()%2) == 0;
-	}
+  }
 
-	SC_CTOR (D) : clk ("clk"), o1("o1") {
-		SC_METHOD(eval);
-		sensitive << clk.neg();
+  SC_CTOR (D) : clk ("clk"), o1("o1") {
+    SC_METHOD(eval);
+    sensitive << clk.neg();
 #ifdef SYSTEMCASS_SPECIFIC
-//		s1();
+//    s1();
 #endif
-	};
+  };
 };
 
 int sc_main (int argc, char *argv[])
 {
-	sc_clock                     signal_clk("my_clock",1, 0.5);
-	sc_signal<bool>              s1("s1"),s2("s2"),s3("s3"),s4("s4"),s5("s5");
+  sc_clock                     signal_clk("my_clock",1, 0.5);
+  sc_signal<bool>              s1("s1"),s2("s2"),s3("s3"),s4("s4"),s5("s5");
 
-	A      a("a");
-	B      b("b");
-	C      c("c");
-	D      d("d");
-	
-	a.clk         (signal_clk);
-	b.clk         (signal_clk);
-	c.clk         (signal_clk);
-	d.clk         (signal_clk);
-	
-	a.o1          (s1);
-	b.i1          (s1);
-		
-	d.o1          (s2);
-	c.i2          (s2);
+  A      a("a");
+  B      b("b");
+  C      c("c");
+  D      d("d");
+  
+  a.clk         (signal_clk);
+  b.clk         (signal_clk);
+  c.clk         (signal_clk);
+  d.clk         (signal_clk);
+  
+  a.o1          (s1);
+  b.i1          (s1);
+    
+  d.o1          (s2);
+  c.i2          (s2);
 
-	b.o1          (s3);
-	c.i1          (s3);
-	
-	c.o1          (s4);
-	b.i2          (s4);
-	
-	b.o2          (s5);
-	
-	// Init & run
-	sc_initialize ();
+  b.o1          (s3);
+  c.i1          (s3);
+  
+  c.o1          (s4);
+  b.i2          (s4);
+  
+  b.o2          (s5);
+  
+  // Init & run
+  sc_initialize ();
 
   if (argc == 1)
@@ -128,17 +128,17 @@
   }
 
-	chrono_t chrono;
-	chrono.start ();
+  chrono_t chrono;
+  chrono.start ();
 
   sc_start (atoi(argv[1]));
 
-	chrono.stop ();
-	unsigned int t = chrono;
-	cout << "Time elapsed (sec) : " << t << endl;
-	cout << "Cycles done        : " << sc_simulation_time () << endl;
-	cout << "Performance        : " << sc_simulation_time () / t << endl;
-	printf("\nPress <RETURN> to exit simulation.");
-	char buf_ret[2];
-	cin.getline(buf_ret,1);
-	return EXIT_SUCCESS;
+  chrono.stop ();
+  unsigned int t = chrono;
+  cout << "Time elapsed (sec) : " << t << endl;
+  cout << "Cycles done        : " << sc_simulation_time () << endl;
+  cout << "Performance        : " << sc_simulation_time () / t << endl;
+  printf("\nPress <RETURN> to exit simulation.");
+  char buf_ret[2];
+  cin.getline(buf_ret,1);
+  return EXIT_SUCCESS;
 }
Index: sources/test_regression/28102005/system.cpp
===================================================================
--- sources/test_regression/28102005/system.cpp	(revision 34)
+++ sources/test_regression/28102005/system.cpp	(revision 35)
@@ -1,3 +1,3 @@
-#include "systemc.h"
+#include <systemc.h>
 #include <iostream>
 #include <cstring>
Index: sources/test_regression/Makefile
===================================================================
--- sources/test_regression/Makefile	(revision 34)
+++ sources/test_regression/Makefile	(revision 35)
@@ -30,4 +30,5 @@
 # 05042006  : check number of writings into each out port
 #             check reading from an sc_out port
+#             (test check_multiwriting2port option)
 # 02052006  : check sc_uint, sc_int, sc_signal<X> when X is double, char, 
 #             signed int, unsigned int and so on. (little/big endianness test)
@@ -38,5 +39,5 @@
 # 07122006  : check if we can declare an undefined external function as 
 #             a sc_method.
-#             check a virtual method as a sc_method => segmentation fault
+#             check a virtual method as a sc_method
 #             (Unable to check if sc_method is a virtual one)
 # 20122006  : check Petrot's scheduling (CASS, quasi static)
@@ -46,4 +47,6 @@
 # 23032007  : check multiple execution on the same computer
 # 15042009  : check sc_uint operators (==, =, <<=, +=)
+#             in some cases, such as a compairison, the developper has to use
+#             sc_signal<T>::read() method to explicitly read a sc_signal.
 
 ## Uncomment the following variable if you want to compile and run the 
