/*
-** LCLint - annotation-assisted static program checker
-** Copyright (C) 1994-2000 University of Virginia,
+** Splint - annotation-assisted static program checker
+** Copyright (C) 1994-2003 University of Virginia,
** Massachusetts Institute of Technology
**
** This program is free software; you can redistribute it and/or modify it
** 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 more information: http://lclint.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
*/
/*
** structNames.c
** Hacks to fit tags into the same namespace.
*/
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
# include "basic.h"
# include "structNames.h"
/*@constant char MARKCHAR_PARAM; @*/
# define MARKCHAR_PARAM '%'
+/*@observer@*/ cstring plainTagName (cstring s)
+{
+ llassert (!isFakeTag (s));
+
+ return cstring_suffix (s, 1);
+}
+
/*@only@*/ cstring fixTagName (cstring s)
{
if (isFakeTag (s))
case MARKCHAR_UNION: return (cstring_makeLiteral ("union"));
case MARKCHAR_ENUM: return (cstring_makeLiteral ("enum"));
default: return (message ("<bad tag name: %s>", s));
- /* BADDEFAULT; */
}
}
else
bool isFakeTag (cstring s)
{
- int length = cstring_length (s);
+ size_t length = cstring_length (s);
return ((length >= 1 && cstring_firstChar (s) == '!')
|| (length >= 2 && cstring_getChar (s, 2) == '!'));