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);
 };
 
