+/*drl 12/30/01 these are some ugly functions that were added to facilitate struct annotations */
+
+
+/*drl added */
+static ctype lastStruct;
+
+ctype context_setLastStruct (/*@returned@*/ ctype s) /*@globals lastStruct@*/
+{
+ lastStruct = s;
+ return s;
+}
+
+ctype context_getLastStruct (/*@returned@*/ /*ctype s*/) /*@globals lastStruct@*/
+{
+ return lastStruct;
+}
+
+/*
+** Why is this stuff in context.c?
+*/
+
+/*@unused@*/ static int sInfoNum = 0;
+
+
+struct getUe {
+ /*@unused@*/ uentry ue;
+ /*@unused@*/ sRef s;
+};
+
+struct sInfo {
+ /*@unused@*/ ctype ct;
+ /*@unused@*/ constraintList inv;
+ /*@unused@*/ int ngetUe;
+ /*@unused@*/ struct getUe * t ;
+};
+
+/* unused: static struct sInfo globalStructInfo; */
+
+/*drl 1/6/2001: I didn't think these functions were solid enough to include in the
+ stable release of splint. I coomented them out so that they won't break anything
+ but didn't delete them because they will be fixed and included later
+
+
+*/
+
+/*@-paramuse@*/
+
+void context_setGlobalStructInfo (ctype ct, constraintList list)
+{
+# if 0
+ /* int i;
+ uentryList f;
+
+ f = ctype_getFields (ct);
+
+ if (constraintList_isDefined(list) )
+ {
+ globalStructInfo.ct = ct;
+ globalStructInfo.inv = list;
+
+ globalStructInfo.ngetUe = 0;
+
+ /* abstraction violation fix it * /
+ globalStructInfo.t = dmalloc(f->nelements * sizeof(struct getUe) );
+
+ globalStructInfo.ngetUe = f->nelements;
+
+ i = 0;
+
+ uentryList_elements(f, ue)
+ {
+ globalStructInfo.t[i].ue = ue;
+ globalStructInfo.t[i].s = uentry_getSref(ue);
+ TPRINTF(( message(" setGlobalStructInfo:: adding ue=%s and sRef=%s",
+ uentry_unparse(ue), sRef_unparse( uentry_getSref(ue) )
+ )
+ ));
+ i++;
+ }
+ end_uentryList_elements;
+ }
+ */
+# endif
+}
+
+# if 0
+/*
+
+bool hasInvariants (ctype ct) /*@* /
+{
+ if ( ctype_sameName(globalStructInfo.ct, ct) )
+
+ return TRUE;
+
+ else
+
+ return FALSE;
+
+}
+*/
+# endif
+
+/*@=paramuse@*/
+
+
+