** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
** MA 02111-1307, USA.
**
-** For information on lclint: lclint-request@cs.virginia.edu
-** To report a bug: lclint-bug@cs.virginia.edu
+** For information on splint: info@splint.org
+** To report a bug: splint-bug@splint.org
** For more information: http://www.splint.org
*/
/*
** uentryList.c (from slist_template.c)
*/
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
# include "basic.h"
/*@only@*/ /*@notnull@*/ uentryList
if (uentryList_size (p) == 0)
return cstring_makeLiteral ("void");
- for (i = 0; i < p->nelements && i < PRINTBREADTH; i++)
+ for (i = 0; i < p->nelements && i < uentryList_abbrevBreadth; i++)
{
if (first)
{
}
else
{
+ uentryList_elements (f, el)
+ {
+ if (uentry_isUnnamedVariable (el))
+ {
+ ctype ct = uentry_getType (el);
+
+ if (ctype_isStruct (ct) || ctype_isUnion (ct))
+ {
+ uentryList fields = ctype_getFields (ct);
+ uentry ue = uentryList_lookupField (fields, name);
+
+ if (uentry_isValid (ue))
+ {
+ return ue;
+ }
+ }
+ }
+ }
+ end_uentryList_elements ;
+
return uentry_undefined;
}
}
/*@only@*/ uentryList
uentryList_mergeFields (/*@only@*/ uentryList f1, /*@only@*/ uentryList f2)
{
+ DPRINTF (("Merge: %s + %s", uentryList_unparse (f1), uentryList_unparse (f2)));
+
if (uentryList_isUndefined (f1))
{
return (f2);