X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/blobdiff_plain/86d93ed383c14be2a4548bd8ab98e4c1a79cb1f0..35eea586ba9af7af69f0646f5f6a5958b8215dd8:/src/constraintTerm.c diff --git a/src/constraintTerm.c b/src/constraintTerm.c index 9d25c7b..868c9d5 100644 --- a/src/constraintTerm.c +++ b/src/constraintTerm.c @@ -17,8 +17,8 @@ ** 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 */ @@ -38,8 +38,12 @@ # include "exprNodeSList.h" /*@-czechfcns@*/ +/*@-nullderef@*/ /* !!! DRL needs to fix this code! */ +/*@-nullstate@*/ /* !!! DRL needs to fix this code! */ +/*@-nullpass@*/ /* !!! DRL needs to fix this code! */ +/*@-temptrans@*/ /* !!! DRL needs to fix this code! */ -/*@access exprNode @*/ +/*@access exprNode@*/ /* !!! NO! Don't do this recklessly! */ bool constraintTerm_isDefined (constraintTerm t) { @@ -577,6 +581,10 @@ void constraintTerm_dump ( /*@observer@*/ constraintTerm t, FILE *f) fprintf(f, "Param %s %d\n", cstring_toCharsSafe(ctString), (int) param ); cstring_free(ctString); } + else if (sRef_isField (s) ) + { + fprintf(f, "sRef_dump %s\n", cstring_toCharsSafe(sRef_dump(s)) ); + } else { u = sRef_getUentry(s); @@ -597,7 +605,7 @@ void constraintTerm_dump ( /*@observer@*/ constraintTerm t, FILE *f) } -/*@only@*/ constraintTerm constraintTerm_undump ( FILE *f) +/*@only@*/ constraintTerm constraintTerm_undump (FILE *f) { constraintTermType kind; constraintTerm ret; @@ -611,9 +619,13 @@ void constraintTerm_dump ( /*@observer@*/ constraintTerm t, FILE *f) str = fgets (os, MAX_DUMP_LINE_LENGTH, f); + llassert (str != NULL); + kind = (constraintTermType) reader_getInt(&str); str = fgets(os, MAX_DUMP_LINE_LENGTH, f); + llassert (str != NULL); + switch (kind) { @@ -643,6 +655,11 @@ void constraintTerm_dump ( /*@observer@*/ constraintTerm t, FILE *f) s = sRef_makeParam (param, t, stateInfo_makeLoc (g_currentloc)); free (ostr2); } + else if (strcmp (term, "sRef_dump" ) == 0 ) + { + reader_checkChar(&str, ' '); + s = sRef_undump (&str); + } else /* This must be an identified that we can search for in usymTab */ { cstring termStr = cstring_makeLiteralTemp(term);