]> andersk Git - splint.git/blobdiff - src/symtable.c
noexpand always false.
[splint.git] / src / symtable.c
index 48219a3ecbed756fda55cbd78f60c98c6e78a461..b00dbb8d9e99cd5b89ab92e20aee0bc5c66ace12 100644 (file)
@@ -1,6 +1,6 @@
 /*
-** LCLint - annotation-assisted static program checker
-** Copyright (C) 1994-2001 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
@@ -17,9 +17,9 @@
 ** 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
 */
 /*
 ** symtable.c
@@ -40,8 +40,8 @@
 **     20 January 1991
 */
 
-# include "lclintMacros.nf"
-# include "llbasic.h"
+# include "splintMacros.nf"
+# include "basic.h"
 # include "gram.h"
 # include "lclscan.h"
 # include "lclsyntable.h"
@@ -519,7 +519,7 @@ symtable_enterType (symtable stable, /*@only@*/ typeInfo ti)
 
   /* symtable_disp (stable); */
 
-  if (k != SPE_GLOBAL && k != SPE_INVALID)     /* fixed for LCLint */
+  if (k != SPE_GLOBAL && k != SPE_INVALID)     /* fixed for Splint */
     {
       llbug (message ("%q: symtable_enterType: expect global scope. (type: %s)",
                      ltoken_unparseLoc (ti->id),
@@ -1043,7 +1043,7 @@ parseLine (char *line, inputStream srce, mapping map)
          llassert (lineptr != NULL);
          lineptr = strchr (lineptr + 1, ' ');  /* go past namestr */
          llassert (lineptr != NULL);
-         col = 5 + lineptr - line;     /* 5 for initial "%LCL "*/
+         col = 5 + ((int) (lineptr - line));   /* 5 for initial "%LCL "*/
 
          lclbug (message ("%q: Imported files contains unknown base sort",
                           fileloc_unparseRawCol (importfile, inputStream_thisLineNumber (srce), col)));
@@ -1078,10 +1078,11 @@ parseLine (char *line, inputStream srce, mapping map)
          if (!usymtab_existsGlobEither (cnamestr))
            {
              (void) usymtab_addEntry 
-               (uentry_makeDatatype (cnamestr, ctype_unknown,
-                                     ti->abstract ? ynm_fromBool (ti->modifiable) : MAYBE,
-                                     ti->abstract ? YES : NO,
-                                     fileloc_copy (imploc)));
+               (uentry_makeDatatype
+                (cnamestr, ctype_unknown,
+                 ti->abstract ? ynm_fromBool (ti->modifiable) : MAYBE,
+                 ti->abstract ? qual_createAbstract () : qual_createConcrete (),
+                 fileloc_copy (imploc)));
            }
        }
 
@@ -1107,7 +1108,7 @@ parseLine (char *line, inputStream srce, mapping map)
       llassert (lineptr != NULL);
       lineptr = strchr (lineptr + 1, ' ');     /* go past namestr */
       llassert (lineptr != NULL);
-      col = 5 + lineptr - line;        /* 5 for initial "%LCL "*/
+      col = 5 + ((int) (lineptr - line));      /* 5 for initial "%LCL "*/
 
       if (sort_isNoSort (bsort))
        {
@@ -1158,7 +1159,7 @@ parseLine (char *line, inputStream srce, mapping map)
       lineptr = strchr (lineptr + 1, ' ');     /* go past namestr */
       llassert (lineptr != NULL);
       
-      col = 5 + lineptr - line;        /* 5 for initial "%LCL "*/
+      col = 5 + ((int) (lineptr - line));      /* 5 for initial "%LCL "*/
 
       if (sort_isNoSort (bsort))
        {
@@ -1306,7 +1307,7 @@ parseLine (char *line, inputStream srce, mapping map)
        }
       else
        {
-         /* evans 2001-05-27: detected by lclint after fixing external alias bug. */
+         /* evans 2001-05-27: detected by splint after fixing external alias bug. */
          if (op->name != NULL) 
            {
              ltoken_free (op->name->content.opid); 
@@ -1340,7 +1341,7 @@ parseLine (char *line, inputStream srce, mapping map)
       lineptr = strchr (lineptr + 1, ' ');     /* go past namestr */
       llassert (lineptr != NULL);
 
-      col = 5 + lineptr - line;        /* 5 for initial "%LCL "*/
+      col = 5 + ((int) (lineptr - line));      /* 5 for initial "%LCL "*/
       if (sort_isNoSort (bsort))
        {
          lclplainerror (message ("%q: unknown base sort\n",
@@ -2093,7 +2094,7 @@ domainMatches (ltokenList domain, sortSetList argSorts)
 
 /*@only@*/ lslOpSet
   symtable_opsWithLegalDomain (symtable tab, /*@temp@*/ /*@null@*/ nameNode n,
-                              sortSetList argSorts, sort qual)
+                              sortSetList argSorts, sort q)
 {
  /* handles nil qual */
   lslOpSet ops = lslOpSet_new ();
@@ -2114,7 +2115,7 @@ domainMatches (ltokenList domain, sortSetList argSorts)
            {
              rangeSort = sigNode_rangeSort (sig);
              
-             if ((qual == 0) || (sort_equal (rangeSort, qual)))
+             if ((q == NULL) || (sort_equal (rangeSort, q)))
                {
                  if (domainMatches (sig->domain, argSorts))
                    {
This page took 0.046345 seconds and 4 git commands to generate.