/*
** LCLint - annotation-assisted static program checker
-** Copyright (C) 1994-2000 University of Virginia,
+** Copyright (C) 1994-2001 University of Virginia,
** Massachusetts Institute of Technology
**
** This program is free software; you can redistribute it and/or modify it
uentryList uentryList_copy (uentryList s)
{
-
if (uentryList_isDefined (s))
{
uentryList t = (uentryList) dmalloc (sizeof (*t));
for (i = 0; i < s->nelements; i++)
{
- t->elements[i] = uentry_copy (s->elements[i]);
- }
+ t->elements[i] = uentry_copy (s->elements[i]);
+ }
}
else
{
t->elements = NULL;
}
-
+
return t;
}
else
if (uc != 0)
{
+ DPRINTF (("Bad compare: %s / %s",
+ uentry_unparseFull (s->elements [i]),
+ uentry_unparseFull (t->elements [i])));
+
return uc;
}
}
uentryList_elements (s, current)
{
+ DPRINTF (("Dump param: %s", uentry_unparse (current)));
st = message ("%q%q,", st, uentry_dumpParam (current));
} end_uentryList_elements;
if (!uentry_isVariable (current))
{
llassert (uentry_isFunction (current));
+ DPRINTF (("Dump field: %s", uentry_unparse (current)));
st = message ("%q!%q,", st, uentry_dump (current));
}
else
{
+ DPRINTF (("Dump field: %s", uentry_unparse (current)));
st = message ("%q%q,", st, uentry_dump (current));
}
} end_uentryList_elements;
{
if (**s == '!')
{
- checkChar (s, '!');
+ reader_checkChar (s, '!');
ul = uentryList_add (ul, uentry_undump (ekind_function, loc, s));
}
else
{
ul = uentryList_add (ul, uentry_undump (ekind_variable, loc, s));
}
- checkChar (s, ',');
+ reader_checkChar (s, ',');
}
- checkChar (s, '}');
+ reader_checkChar (s, '}');
return ul;
}
uentry_free (ue);
}
- checkChar (s, ',');
+ reader_checkChar (s, ',');
c = **s;
paramno++;
}
- checkChar (s, ')');
+ reader_checkChar (s, ')');
return pn;
}
else
{
/* evs 2000-07-25 was ctype_match, should match uentryList_matchFields */
+
if (!ctype_almostEqual (uentry_getType (cp1), uentry_getType (cp2)))
{
llgenindentmsg
uentryList_unparse (p1), uentryList_unparse (p2)));
}
+bool
+uentryList_equivFields (uentryList p1, uentryList p2)
+{
+ return (uentryList_compareFields (p1, p2) == 0);
+}
+
bool
uentryList_matchFields (uentryList p1, uentryList p2)
{
cp1 = p1->elements[index];
cp2 = p2->elements[index];
+ /*@i32
+ **
+ ** Should compare uentry's --- need to fix report errors too.
+ */
+
if (!(cstring_equal (uentry_rawName (cp1), uentry_rawName (cp2))
&& (ctype_almostEqual (uentry_getType (cp1), uentry_getType (cp2)))))
- { /* was ctype_match! */
+ {
return FALSE;
}
}
return TRUE;
}
-