* sim/ucsim/cmd.src/cmdmem.cc, sim/ucsim/cmd.src/mem.cc:
[fw/sdcc] / sim / ucsim / errorcl.h
index dd7bb8d9f16176cbe049640e9e92e2839e34e759..ae3e284e4a19b8246b996c97dcc31580223cfecb 100644 (file)
@@ -53,17 +53,17 @@ protected:
   //char *name;
   enum error_on_off on;
 public:
-  cl_error_class(enum error_type typ, char *aname,
-                enum error_on_off be_on= ERROR_PARENT);
-  cl_error_class(enum error_type typ, char *aname,
-                class cl_error_class *parent,
-                enum error_on_off be_on= ERROR_PARENT);
+  cl_error_class(enum error_type typ, const char *aname,
+                 enum error_on_off be_on= ERROR_PARENT);
+  cl_error_class(enum error_type typ, const char *aname,
+                 class cl_error_class *parent,
+                 enum error_on_off be_on= ERROR_PARENT);
   
   enum error_on_off get_on(void) { return(on); }
   void set_on(enum error_on_off val);
   bool is_on(void);
   enum error_type get_type(void);
-  char *get_type_name(void);
+  const char *get_type_name(void);
   //char *get_name(void);
 };
 
@@ -71,11 +71,11 @@ class cl_error_registry
 {
 public:
   cl_error_registry(void);
-  class cl_error_class *find(char *type_name)
+  class cl_error_class *find(const char *type_name)
   {
     if (NIL == registered_errors)
       return NIL;
-    return static_cast<class cl_error_class *>(registered_errors->first_that(compare, static_cast<void *>(type_name)));
+    return static_cast<class cl_error_class *>(registered_errors->first_that(compare, type_name));
   }
   static class cl_list *get_list(void)
   {
@@ -93,21 +93,21 @@ protected:
 
 private:
   static class cl_list *registered_errors;
-  static int compare(void *obj1, void *obj2)
+  static int compare(void *obj1, const void *obj2)
   {
-    return (static_cast<class cl_base *>(obj1))->is_named(static_cast<char *>(obj2));
+    return (static_cast<class cl_base *>(obj1))->is_named(static_cast<const char *>(obj2));
   }
 };
 
-class cl_commander; //forward
+class cl_commander_base; //forward
 
 class cl_error: public cl_base
 {
 protected:
   class cl_error_class *classification;
 public:
-  bool inst;   // Occured during instruction execution
-  t_addr PC;   // Address of the instruction
+  bool inst;    // Occured during instruction execution
+  t_addr PC;    // Address of the instruction
 public:
   cl_error(void);
   virtual ~cl_error(void);
@@ -119,8 +119,8 @@ public:
   virtual bool is_on(void);
   virtual class cl_error_class *get_class(void) { return(classification); }
 
-  virtual void print(class cl_commander *c);
-  virtual char *get_type_name();
+  virtual void print(class cl_commander_base *c);
+  virtual const char *get_type_name();
 };
 
 #endif