Index: trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h	(revision 82)
@@ -2,6 +2,28 @@
 #define DEBUG_H
 
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * function to help the debugging :
+ *
+ *  - debug_tab
+ *  - log_printf
+ *  - log_begin
+ *  - log_end
+ *  - breakpoint
+ *
+ *  Debug's Level :
+ *  - None    : print elementary information
+ *  - Info    : print basic information
+ *  - Trace   : trace internal variable
+ *  - Func    : trace call and return function
+ *  - All     : print all information
+ */
+
 #include "Common/include/Message.h"
 #include "Behavioural/include/Debug_component.h"
+#include "Behavioural/include/Environment.h"
 #include <stdio.h>
 #include <string.h>
@@ -9,15 +31,4 @@
 #include <sstream>
 #include <string>
-
-std::string debug_tab            (void);
-void        debug_function_begin (std::string component, std::string function);
-void        debug_function_end   (std::string component, std::string function);
-
-// Debug's Level :
-//  * None    : print elementary information
-//  * Info    : print basic information
-//  * Trace   : trace internal variable
-//  * Func    : trace call and return function
-//  * All     : print all information
 
 enum _debug_verbosity 
@@ -30,4 +41,8 @@
   };
 
+std::string debug_tab     (void);
+void        debug_tab_inc (void);
+void        debug_tab_dec (void);
+
 #ifdef DEBUG
 # define log_printf(level, component, func, str... )			\
@@ -39,5 +54,8 @@
 	   ( DEBUG_ ## component == true )) )				\
 	{								\
-	  msg(_("%s"),debug_tab().c_str());				\
+	  if (DEBUG >= DEBUG_FUNC)					\
+	    {								\
+	      msg(_("%s"),debug_tab().c_str());				\
+	    }								\
 	  if (DEBUG >= DEBUG_ALL )					\
 	    {								\
@@ -64,6 +82,31 @@
 	}								\
     } while(0)
+
+# define log_begin(component, func)					\
+  do									\
+    {									\
+      debug_tab_inc ();							\
+      log_printf(FUNC,component,func,"Begin");				\
+    } while(0)
+
+# define log_end(component, func)					\
+  do									\
+    {									\
+      log_printf(FUNC,component,func,"End");				\
+      debug_tab_dec ();							\
+    } while(0)
+
 #else
 # define log_printf(level, component, func, str... )			\
+  do									\
+    {									\
+    } while(0)
+
+# define log_begin(component, func)					\
+  do									\
+    {									\
+    } while(0)
+
+# define log_end(component, func)					\
   do									\
     {									\
@@ -77,7 +120,23 @@
       msg(_("Breakpoint : file %s, line %d. Enter Any key to continue\n"),__FILE__,__LINE__); \
       msg(str);								\
-      msg(_("\n"));							\
       getchar();							\
     } while(0)
 
+#ifdef DEBUG_TEST
+#define TEST_PTR(x)							\
+  do									\
+    {									\
+      if (x == NULL)							\
+	err(_("%s File %s, Line %d, this pointeur is null"),MSG_ERROR,__FILE__,__LINE__); \
+    }									\
+  while (0)
+#else
+#define TEST_PTR(x)	 \
+  do			 \
+    {			 \
+    }			 \
+  while (0)
+#endif
+
+
 #endif // !DEBUG_H
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/ErrorMorpheo.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/ErrorMorpheo.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/ErrorMorpheo.h	(revision 82)
@@ -30,5 +30,5 @@
 				       std::string file    ) throw() 
     { 
-      _msg = "<"+funcname+"> at line " + toString(line) + ", in file " + file + " : "+msg;
+      _msg = toString("<%s> at line %d, in file %s : %s",funcname.c_str(),line,file.c_str(),msg.c_str());
     }
   public  :             ~ErrorMorpheo (void)       throw() {}
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/Message.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/Message.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/Message.h	(revision 82)
@@ -11,16 +11,25 @@
 #include <stdio.h>
 #include <string.h>
-#include <libintl.h>
+#include "Translation.h"
 
 namespace morpheo {
 
-#ifdef NO_TRANSLATE
-# define _(String) (String)
-#else
-# define _(String) gettext (String)
-#endif
+#define MSG_ERROR         _("[   ERROR   ]")
+#define MSG_WARNING       _("[  WARNING  ]")
+#define MSG_INFORMATION   _("[INFORMATION]")
 
-#define msg(arg...) fprintf(stdout,arg);
-#define err(arg...) fprintf(stderr,arg);
+#define msg(arg...)				\
+  do						\
+    {						\
+      fprintf(stdout,arg);			\
+    } while (0) 
+
+#define err(arg...)				\
+  do						\
+    {						\
+      fprintf(stderr,"%s ",MSG_ERROR);		\
+      fprintf(stderr,arg);			\
+    } while (0) 
+
 
 }; // end namespace morpheo
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/ToString.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/ToString.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/ToString.h	(revision 82)
@@ -16,4 +16,7 @@
 #include <string>
 #include <limits>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
 
 namespace morpheo              {
@@ -99,4 +102,6 @@
     return out.str();
   }
+
+  std::string toString (const char *fmt, ...);
   
 }; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/Translation.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/Translation.h	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/Translation.h	(revision 82)
@@ -0,0 +1,33 @@
+#ifndef morpheo_Translation_H
+#define morpheo_Translation_H
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include <libintl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <iostream>
+
+#define MORPHEO_PACKAGE "morpheo"
+
+#ifdef NO_TRANSLATION
+# define _(str) (str)
+#else
+# define _(str) dgettext (MORPHEO_PACKAGE,str)
+#endif
+
+namespace morpheo 
+{
+  class Translation
+  {
+  public :  Translation (void);
+  public : ~Translation (void);
+  };
+
+}; // end namespace morpheo
+#endif
