** 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
*/
/*
** Massachusetts Institute of Technology
*/
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
# include "llbasic.h"
# include "lslparse.h"
# include "llgrammar.h" /* need simpleOp, MULOP and logicalOp in makeInfixTermNode */
ti->modifiable = FALSE;
ti->abstract = TRUE;
ti->basedOn = sort_bool;
- ti->export = FALSE; /* this wasn't set (detected by lclint) */
+ ti->export = FALSE; /* this wasn't set (detected by Splint) */
symtable_enterType (g_symtab, ti);
/* do "constant bool FALSE = false;" */
privateNode e = (privateNode) dmalloc (sizeof (*e));
/*
- ** bug detected by lclint enum checking
+ ** bug detected by enum checking
** e->kind = XPK_FCN;
*/
static cstring extractQuote (/*@only@*/ cstring s)
{
- int len = cstring_length (s);
+ size_t len = cstring_length (s);
char *sc = cstring_toCharsSafe (s);
cstring t;
lclTypeSpecNode n = (lclTypeSpecNode) dmalloc (sizeof (*n));
n->kind = LTS_CONJ;
- n->pointers = 0;
+ n->pointers = pointers_undefined;
n->quals = qualList_new ();
n->content.conj = (lclconj) dmalloc (sizeof (*n->content.conj));
n->content.conj->a = a;
lclTypeSpecNode n = (lclTypeSpecNode) dmalloc (sizeof (*n));
n->kind = LTS_TYPE;
- n->pointers = 0;
+ n->pointers = pointers_undefined;
n->content.type = x;
n->quals = qualList_new ();
return (n);
lclTypeSpecNode n = (lclTypeSpecNode) dmalloc (sizeof (*n));
n->kind = LTS_STRUCTUNION;
- n->pointers = 0;
+ n->pointers = pointers_undefined;
n->content.structorunion = x;
n->quals = qualList_new ();
return (n);
n->quals = qualList_new ();
n->kind = LTS_ENUM;
- n->pointers = 0;
+ n->pointers = pointers_undefined;
n->content.enumspec = x;
return (n);
}
llassert (lclTypeSpecNode_isDefined (t));
- if (t->pointers == 0
+ if (pointers_isUndefined (t->pointers)
&& (d != (typeExpr)0 && d->kind != TEXPR_PTR) && d->kind != TEXPR_ARRAY)
{
if (t->kind == LTS_TYPE)
return (message ("%q%s", s, ltoken_unparse (n->opttagid)));
}
- s = message ("%q%s {\n\2\1", s, ltoken_unparse (n->opttagid));
+ s = message ("%q%s {\n\t", s, ltoken_unparse (n->opttagid));
}
else
{
- s = message ("%q{\n\2\1", s);
+ s = message ("%q{\n\t", s);
}
decls = n->structdecls;
stDeclNodeList_elements (decls, f)
{
- s = message ("%q%q\1%q;\n\1", s,
+ s = message ("%q%q %q;\n\t", s,
lclTypeSpecNode_unparseAltComments (f->lcltypespec),
declaratorNodeList_unparse (f->declarators));
} end_stDeclNodeList_elements;
- return (message ("%q\3}", s));
+ return (message ("%q }", s));
}
case LTS_CONJ:
{
return (message ("%q%s", s, ltoken_unparse (n->opttagid)));
}
- s = message ("%q%s {\n\2\1", s, ltoken_unparse (n->opttagid));
+ s = message ("%q%s {\n\t", s, ltoken_unparse (n->opttagid));
}
else
{
- s = message ("%q{\n\2\1", s);
+ s = message ("%q{\n\t", s);
}
decls = n->structdecls;
stDeclNodeList_elements (decls, f)
{
- s = message ("%q%q\1%q;\n\1", s,
+ s = message ("%q%q %q;\n\t", s,
lclTypeSpecNode_unparseComments (f->lcltypespec),
declaratorNodeList_unparse (f->declarators));
} end_stDeclNodeList_elements;
- return (message ("%q\3}", s));
+ return (message ("%q }", s));
}
case LTS_CONJ:
{
termNode n = (termNode) dmalloc (sizeof (*n));
quantifiedTermNode q = (quantifiedTermNode) dmalloc (sizeof (*q));
- n->name = NULL; /*> missing this --- detected by lclint <*/
+ n->name = NULL; /*> missing this --- detected by splint <*/
n->error_reported = FALSE;
n->wrapped = 0;
n->error_reported = FALSE;
return sort_makePtrN (type->content.type->sort, type->pointers);
case LTS_STRUCTUNION:
llassert (type->content.structorunion != NULL);
- return sort_makePtrN (type->content.structorunion->sort,
- type->pointers);
+ return sort_makePtrN (type->content.structorunion->sort, type->pointers);
case LTS_ENUM:
llassert (type->content.enumspec != NULL);
- return sort_makePtrN (type->content.enumspec->sort,
- type->pointers);
+ return sort_makePtrN (type->content.enumspec->sort, type->pointers);
case LTS_CONJ:
return (lclTypeSpecNode2sort (type->content.conj->a));
}
}
else
{
- /* error should be detected by lclint: forgot to copy opform! */
+ /* error should be detected by splint: forgot to copy opform! */
return (makeNameNodeForm (opFormNode_copy (n->content.opform)));
}
}