projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* sim/ucsim/*.*, sim/ucsim/configure, sim/ucsim/configure.in:
[fw/sdcc]
/
sim
/
ucsim
/
pobj.cc
diff --git
a/sim/ucsim/pobj.cc
b/sim/ucsim/pobj.cc
index 126e14db5d7e31c6f33610938cfc7f22bcfe38a7..e32deed6a03105499583afb7a53432995192e88a 100644
(file)
--- a/
sim/ucsim/pobj.cc
+++ b/
sim/ucsim/pobj.cc
@@
-76,16
+76,16
@@
cl_base::~cl_base(void)
int cl_base::init(void) {return(0);}
int cl_base::init(void) {return(0);}
-char *
-cl_base::get_name(char *def)
+c
onst c
har *
+cl_base::get_name(c
onst c
har *def)
{
if (!name)
return(def);
return(name);
}
{
if (!name)
return(def);
return(name);
}
-char *
-cl_base::set_name(char *new_name)
+c
onst c
har *
+cl_base::set_name(c
onst c
har *new_name)
{
if (name)
free(name);
{
if (name)
free(name);
@@
-98,8
+98,8
@@
cl_base::set_name(char *new_name)
return(name);
}
return(name);
}
-char *
-cl_base::set_name(c
har *new_name,
char *def_name)
+c
onst c
har *
+cl_base::set_name(c
onst char *new_name, const
char *def_name)
{
char *def;
{
char *def;
@@
-120,7
+120,7
@@
cl_base::set_name(char *new_name, char *def_name)
}
bool
}
bool
-cl_base::is_named(char *the_name)
+cl_base::is_named(c
onst c
har *the_name)
{
if (!name ||
!*name ||
{
if (!name ||
!*name ||
@@
-131,7
+131,7
@@
cl_base::is_named(char *the_name)
}
bool
}
bool
-cl_base::is_inamed(char *the_name)
+cl_base::is_inamed(c
onst c
har *the_name)
{
if (!name ||
!*name ||
{
if (!name ||
!*name ||
@@
-265,7
+265,7
@@
cl_event::~cl_event(void)
* Initializing a collection
*/
* Initializing a collection
*/
-cl_list::cl_list(t_index alimit, t_index adelta, char *aname):
+cl_list::cl_list(t_index alimit, t_index adelta, c
onst c
har *aname):
cl_base()
{
count= 0;
cl_base()
{
count= 0;
@@
-460,7
+460,7
@@
cl_list::error(t_index code, t_index info)
*/
void *
*/
void *
-cl_list::first_that(match_func test, void *arg)
+cl_list::first_that(match_func test,
const
void *arg)
{
for (t_index i= 0; i < count; i++)
{
{
for (t_index i= 0; i < count; i++)
{
@@
-677,7
+677,7
@@
cl_list::set_limit(t_index alimit)
* Initilizing the sorted collection
*/
* Initilizing the sorted collection
*/
-cl_sorted_list::cl_sorted_list(t_index alimit, t_index adelta, char *aname):
+cl_sorted_list::cl_sorted_list(t_index alimit, t_index adelta, c
onst c
har *aname):
cl_list(alimit, adelta, aname)
{
Duplicates= DD_FALSE;
cl_list(alimit, adelta, aname)
{
Duplicates= DD_FALSE;
@@
-691,7
+691,7
@@
cl_sorted_list::~cl_sorted_list(void) {}
* Get the address of the key field in an item.
*/
* Get the address of the key field in an item.
*/
-void *
+
const
void *
cl_sorted_list::key_of(void *item)
{
return(item);
cl_sorted_list::key_of(void *item)
{
return(item);
@@
-746,7
+746,7
@@
cl_sorted_list::add(void *item)
*/
bool
*/
bool
-cl_sorted_list::search(void *key, t_index &index)
+cl_sorted_list::search(
const
void *key, t_index &index)
{
t_index l = 0;
t_index h = count - 1;
{
t_index l = 0;
t_index h = count - 1;
@@
-784,7
+784,7
@@
cl_sorted_list::search(void *key, t_index &index)
* Initilizing the string collection
*/
* Initilizing the string collection
*/
-cl_strings::cl_strings(t_index alimit, t_index adelta, char *aname):
+cl_strings::cl_strings(t_index alimit, t_index adelta, c
onst c
har *aname):
cl_sorted_list(alimit, adelta, aname)
{
Duplicates= DD_TRUE;
cl_sorted_list(alimit, adelta, aname)
{
Duplicates= DD_TRUE;
@@
-799,9
+799,9
@@
cl_strings::~cl_strings(void) {}
*/
int
*/
int
-cl_strings::compare(
void *key1,
void *key2)
+cl_strings::compare(
const void *key1, const
void *key2)
{
{
- return(strcmp(
(char *)key1, (char *)key2
));
+ return(strcmp(
static_cast<const char *>(key1), static_cast<const char *>(key2)
));
}
}
@@
-827,7
+827,7
@@
cl_strings::free_item(void* item)
* Initilizing the unsorted string collection
*/
* Initilizing the unsorted string collection
*/
-cl_ustrings::cl_ustrings(t_index alimit, t_index adelta, char *aname):
+cl_ustrings::cl_ustrings(t_index alimit, t_index adelta, c
onst c
har *aname):
cl_strings(alimit, adelta, aname)
{}
cl_strings(alimit, adelta, aname)
{}
@@
-840,7
+840,7
@@
cl_ustrings::~cl_ustrings(void) {}
*/
int
*/
int
-cl_ustrings::compare(
void *key1,
void *key2)
+cl_ustrings::compare(
const void *key1, const
void *key2)
{
return(-1);
}
{
return(-1);
}
@@
-851,11
+851,11
@@
cl_ustrings::compare(void *key1, void *key2)
*/
bool
*/
bool
-cl_ustrings::search(void *key, t_index& index)
+cl_ustrings::search(
const
void *key, t_index& index)
{
t_index i = 0;
bool found= DD_FALSE;
{
t_index i = 0;
bool found= DD_FALSE;
-
void
*Actual;
+
const void
*Actual;
if ((count) && key)
{
if ((count) && key)
{