Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (16 years ago)
Author:
rosiere
Message:

Almost complete design
with Test and test platform

Location:
trunk/IPs/systemC/processor/Morpheo/Common/src
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Common/src/Debug.cpp

    r82 r88  
    77
    88#include "Common/include/Debug.h"
     9#include "Common/include/Environment.h"
     10
     11namespace morpheo {
    912
    1013static uint32_t _debug_depth = 0;
    1114
     15#undef  FUNCTION
     16#define FUNCTION "debug_tab"
    1217std::string debug_tab (void)
    1318{
     
    1520}
    1621
     22#undef  FUNCTION
     23#define FUNCTION "debug_tab_inc"
    1724void debug_tab_inc (void)
    1825{
     
    2027}
    2128
     29#undef  FUNCTION
     30#define FUNCTION "debug_tab_dec"
    2231void debug_tab_dec (void)
    2332{
    2433//   _debug_depth --;
    2534}
     35
     36}; // end namespace morpheo
  • trunk/IPs/systemC/processor/Morpheo/Common/src/Translation.cpp

    r82 r88  
    66 */
    77
    8 #include "../include/Translation.h"
    9 #include "../include/ErrorMorpheo.h"
     8#include "Common/include/Environment.h"
     9#include "Common/include/Translation.h"
     10#include "Common/include/ErrorMorpheo.h"
    1011
    1112namespace morpheo {
    1213
    13   Translation:: Translation (void)
     14  static bool translation_initialized;
     15
     16  void translation (void)
    1417  {
    15 #ifndef NO_TRANSLATION
    16     char * top_level = getenv("MORPHEO_TOPLEVEL");
    17    
    18     if (top_level == NULL)
    19       throw ERRORMORPHEO("Translation","Error morpheo environment is not positioned\n");
    20  
    21     std::string dirname = top_level;
    22     dirname += "IPs/systemC/processor/Morpheo/locale";
     18#ifdef TRANSLATION
     19    if (not translation_initialized)
     20      {
     21        environment();
     22       
     23        std::string dirname = MORPHEO_TOPLEVEL;
     24        dirname += "/IPs/systemC/processor/Morpheo/locale";
    2325
    24     bindtextdomain(MORPHEO_PACKAGE,dirname.c_str());
     26        if (bindtextdomain(MORPHEO_PACKAGE,dirname.c_str()) == NULL)
     27          throw ERRORMORPHEO("Translation","Error in set directory containing message catalogs.\n");
     28       
     29        translation_initialized = true;
     30      }
    2531#endif   
    2632  }
    2733
    28   Translation::~Translation (void)
    29   {
    30 
    31   }
    32 
    3334}; // end namespace morpheo
Note: See TracChangeset for help on using the changeset viewer.