/* ;-*-C-*-;
** Splint - annotation-assisted static program checker
-** Copyright (C) 1994-2002 University of Virginia,
+** 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 splint: splint@cs.virginia.edu
-** To report a bug: splint-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
*/
/*
for (i = 0; i < cttab.size; i++)
{
- ctentry_free (cttab.entries[i]);
+ /*drl bee: si*/ ctentry_free (cttab.entries[i]);
}
/*@-compdestroy@*/
static /*@only@*/ ctentry
-ctentry_undump (/*@dependent@*/ char *s)
+ctentry_undump (/*@dependent@*/ char *s) /*@requires maxRead(s) >= 2 @*/
{
int base, ptr, array;
ctkind kind;
/*@access ctbase@*/
for (i = 0; i < cttab.size; i++)
{
- ctentry cte = cttab.entries[i];
+ /*drl bee: si*/ ctentry cte = cttab.entries[i];
if (ctentry_isInteresting (cte))
{
if (ctbase_isUA (cte->ctbase))
/*@access ctbase@*/
for (i = 0; i < cttab.size; i++)
{
- ctentry cte = cttab.entries[i];
+ /*drl bee: si*/ ctentry cte = cttab.entries[i];
if (TRUE) /* ctentry_isInteresting (cte)) */
{
if (ctbase_isUA (cte->ctbase))
{
- fprintf (g_msgstream, "%3d: %s [%d]\n", i,
+ fprintf (g_warningstream, "%3d: %s [%d]\n", i,
cstring_toCharsSafe (ctentry_doUnparse (cttab.entries[i])),
cte->ctbase->contents.tid);
}
else
{
- fprintf (g_msgstream, "%3d: %s\n", i,
+ fprintf (g_warningstream, "%3d: %s\n", i,
cstring_toCharsSafe (ctentry_doUnparse (cttab.entries[i])));
}
}
else
{
- /* fprintf (g_msgstream, "%3d: <no name>\n", i); */
+ /* fprintf (g_warningstream, "%3d: <no name>\n", i); */
}
}
/*@noaccess ctbase@*/
if (context_getFlag (FLG_SHOWSCAN) && cttab.size > 5000)
{
- fprintf (g_msgstream, " >\n"); /* end dumping to */
- fprintf (g_msgstream, "< Dumping type table (%d types) ", cttab.size);
+ displayScanClose ();
+ displayScanOpen (message ("Dumping type table (%d types)", cttab.size));
showdotstride = cttab.size / 5;
showdots = TRUE;
}
- /*
- DPRINTF (("Dumping cttable: "));
- cttable_print ();
- */
-
for (i = 0; i < cttab.size; i++)
{
cstring s;
- s = ctentry_dump (cttab.entries[i]);
+ /*drl bee: si*/ s = ctentry_dump (cttab.entries[i]);
DPRINTF (("[%d] = %s", i, ctentry_unparse (cttab.entries[i])));
llassert (cstring_length (s) < MAX_DUMP_LINE_LENGTH);
fputline (fout, cstring_toCharsSafe (s));
if (showdots && (i != 0 && ((i - 1) % showdotstride == 0)))
{
- (void) fflush (g_msgstream);
- fprintf (stderr, ".");
+ (void) fflush (g_warningstream);
+ displayScanContinue (cstring_makeLiteralTemp ("."));
(void) fflush (stderr);
}
}
if (showdots)
{
- fprintf (stderr, " >\n< Continuing dump ");
+ displayScanClose ();
+ displayScanOpen (cstring_makeLiteral ("Continuing dump "));
}
}
/*@modifies cttab, f @*/
{
char *s = mstring_create (MAX_DUMP_LINE_LENGTH);
+ char *os = s;
ctentry cte;
cttable_reset ();
{
ctype ct;
- cte = ctentry_undump (s);
+ /*drl bee: tcf*/ cte = ctentry_undump (s);
ct = cttable_addFull (cte);
DPRINTF (("Type: %d: %s", ct, ctype_unparse (ct)));
ctype_recordConj (ct);
}
- (void) reader_readLine (f, s, MAX_DUMP_LINE_LENGTH);
+ s = reader_readLine (f, s, MAX_DUMP_LINE_LENGTH);
}
- sfree (s);
+ sfree (os);
/*
DPRINTF (("Done loading cttable: "));
for (i = 0; i < cttab.size; i++)
{
- newentries[i] = cttab.entries[i];
+ /*drl bee: dm*/ /*drl bee: si*/ newentries[i] = cttab.entries[i];
}
/*@-compdestroy@*/
if (cttab.nspace == 0)
cttable_grow ();
- cttab.entries[cttab.size] =
+ /*drl bee: si*/ cttab.entries[cttab.size] =
ctentry_make (ctk, cnew, base, ctype_dne, ctype_dne, cstring_undefined);
cttab.nspace--;
ctb = ctype_getCtbase (i);
- /*@i32 is this optimization really worthwhile??? */
+ /* is this optimization really worthwhile? */
if (ctbase_isDefined (ctb) && ctbase_equivStrict (cnew, ctb))
{
if (cttab.nspace == 0)
cttable_grow ();
- cttab.entries[cttab.size] = ctentry_make (CTK_COMPLEX, cnew, ctype_undefined,
+ /*drl bee: si*/ cttab.entries[cttab.size] = ctentry_make (CTK_COMPLEX, cnew, ctype_undefined,
ctype_dne, ctype_dne,
cstring_undefined);
cttab.nspace--;
cttable_grow ();
}
- cttab.entries[cttab.size] = cnew;
+ /*drl bee: si*/ cttab.entries[cttab.size] = cnew;
cttab.nspace--;
return (cttab.size++);
if (cttab.nspace == 0)
cttable_grow ();
- cttab.entries[cttab.size] = cnew;
+ /*drl bee: si*/ cttab.entries[cttab.size] = cnew;
cttab.nspace--;