]> andersk Git - splint.git/commitdiff
Fixed manual typo.
authorevans1629 <evans1629>
Sun, 28 Apr 2002 22:43:39 +0000 (22:43 +0000)
committerevans1629 <evans1629>
Sun, 28 Apr 2002 22:43:39 +0000 (22:43 +0000)
Split streams for warnings and status messages.

doc/manual.doc
src/clabstract.c
src/context.c
src/ctype.c
src/fileTable.c
src/fileloc.c
src/flags.def
src/sRef.c
src/usymtab.c
test/tests2.4/Makefile

index e9f9daa798910520ca9cf9980216426d415a0d28..3f965cdf7614a8f5cfac2ce4b2953bb3237400b0 100644 (file)
Binary files a/doc/manual.doc and b/doc/manual.doc differ
index 41ffacc6b6b5e87fdc32c04916a91fdd18d3e84d..db7300c787f9bd215e9e1405bf413dc27507a514 100644 (file)
@@ -957,12 +957,23 @@ checkTypeDecl (uentry e, ctype rep)
                      uentry ue = usymtab_lookupSafe (ye);
 
                      llassert (uentry_isEitherConstant (ue));
-                     llassertprint (ctype_match (uentry_getType (ue), rrep),
-                                    ("Bad enum: %s / %s",
-                                     uentry_unparse (ue),
-                                     ctype_unparse (rrep)));
-                     
-                     uentry_setType (ue, at);
+
+                     /* evans 2002-04-22 */
+                     if (ctype_isBool (uentry_getType (ue)))
+                       {
+                         /*
+                         ** If set using -booltrue or -boolfalse, don't change the type.
+                         */
+                       }
+                     else
+                       {
+                         llassertprint (ctype_match (uentry_getType (ue), rrep),
+                                        ("Bad enum: %s / %s",
+                                         uentry_unparse (ue),
+                                         ctype_unparse (rrep)));
+                         
+                         uentry_setType (ue, at);
+                       }
                    }
                } end_enumNameList_elements;
            }
index d301d75deb688a36d74f8600e326aec9d2254447..5a435305ad9dd1cecea3c1377e42d1595399617d 100644 (file)
@@ -936,11 +936,12 @@ context_resetAllFlags (void)
   gc.flags[FLG_WARNSYSFILES] = TRUE;
 
   /*
-  ** On by default for Win32, but not Unix (to support MS/VC++ error message format).
+  ** On by default for Win32, but not Unix
   */
 
 # ifdef WIN32
   gc.flags[FLG_PARENFILEFORMAT] = TRUE;
+  gc.flags[FLG_CASEINSENSITIVEFILENAMES] = TRUE;
 # endif
 }
 
@@ -2897,6 +2898,20 @@ context_setString (flagcode flag, cstring val)
 
   switch (flag)
     {
+      /*
+    case FLG_BOOLTRUE:
+      usymtab_supGlobalEntry 
+       (uentry_makeConstantValue (val, ctype_bool, 
+                                  fileloc_getBuiltin (), TRUE, 
+                                  multiVal_makeInt (1)));
+      break;
+    case FLG_BOOLFALSE:
+      usymtab_supGlobalEntry 
+       (uentry_makeConstantValue (val, ctype_bool, 
+                                  fileloc_getBuiltin (), FALSE, 
+                                  multiVal_makeInt (0)));
+      break;
+      */
     case FLG_MESSAGESTREAM:
     case FLG_WARNINGSTREAM:
     case FLG_ERRORSTREAM:
@@ -3110,7 +3125,6 @@ void context_initMod (void)
   end_allFlagCodes ;
   
   usymtab_initMod ();
-
   context_resetAllFlags ();
 
   assertSet (gc.flags); /* Can't use global in defines */
index 81cc6aacaff560a05acec9369a135fbe1051425a..29c0a6bf9533cf1b21828cc210903127aca6ff67 100644 (file)
@@ -236,7 +236,8 @@ ctype_realishType (ctype c)
 bool
 ctype_isUA (ctype c)
 {
-  return (!ctype_isUnknown (c) && ctbase_isUA (ctype_getCtbase (c)));
+  return (!ctype_isUnknown (c) 
+         && ctbase_isUA (ctype_getCtbase (c)));
 }
 
 bool
index 3256cd6c637f1db1efe14a29dc3669f5ed6940f9..2d6b9a7c21cf640baa23802311ec77b661f821e8 100644 (file)
@@ -101,6 +101,12 @@ fileTable_getIndex (fileTable ft, cstring s)
   cstring abspath;
   if (ft == NULL) return NOT_FOUND;
   abspath = osd_absolutePath (cstring_undefined, s);
+  
+  if (context_getFlag (FLG_CASEINSENSITIVEFILENAMES))
+    {
+      abspath = cstring_downcase (abspath);
+    }
+
   DPRINTF (("Absolute path: %s: %s", s, abspath));
   res = cstringTable_lookup (ft->htable, abspath);
   cstring_free (abspath);
@@ -277,7 +283,18 @@ fileTable_internAddEntry (fileTable ft, /*@only@*/ ftentry e)
   ft->nspace--;
 
   DPRINTF (("Adding: %s", e->fname));
-  cstringTable_insert (ft->htable, e->fname, ft->nentries);
+
+  if (context_getFlag (FLG_CASEINSENSITIVEFILENAMES))
+    {
+      cstring sd = cstring_downcase (e->fname);
+      cstringTable_insert (ft->htable, sd, ft->nentries);
+      cstring_free (e->fname);
+    }
+  else
+    {
+      cstringTable_insert (ft->htable, e->fname, ft->nentries); 
+    }
+
   ft->elements[ft->nentries] = e;
 
   ft->nentries++;
@@ -644,7 +661,18 @@ fileTable_setFilePath (fileTable ft, fileId fid, cstring path)
 fileId
 fileTable_lookupBase (fileTable ft, cstring base)
 {
-  int tindex = fileTable_getIndex (ft, base);
+  int tindex;
+
+  if (context_getFlag (FLG_CASEINSENSITIVEFILENAMES))
+    {
+      cstring dbase = cstring_downcase (base);
+      tindex = fileTable_getIndex (ft, dbase);
+      cstring_free (dbase);
+    }
+  else
+    {
+      tindex = fileTable_getIndex (ft, base);
+    }
 
   if (tindex == NOT_FOUND)
     {
index 55454b615f92d110676c1cb953c02b410eace4b7..729c633debbf41413e101988bca191d1ab16724b 100644 (file)
@@ -352,7 +352,7 @@ fileloc_sameModule (fileloc f1, fileloc f2)
          cstring s1 = fileloc_getBase (f1);
          cstring s2 = fileloc_getBase (f2);
          
-         return (cstring_equal (s1, s2));
+         return (cstring_equal (s1, s2)); 
        }
     }
 }
index 588cfb10a268ffafc19da191e47a733661deb7b8..f8a08086bed8ff0c5f577c60fb54700ffb3bde46 100644 (file)
@@ -2935,6 +2935,13 @@ static flaglist flags =
     "Should use <stdarg.h> instead.",
     0, 0
   },
+  {
+    FK_HEADERS, FK_FILES, plainFlag,
+    "caseinsensitivefilenames",
+    FLG_CASEINSENSITIVEFILENAMES,
+    "file names are case insensitive (file.h and FILE.H are the same file)",
+    NULL, 0, 0
+  },
 
   /* 14.2 Generating Libraries */
 
index 349048b72ecb06f07d21867b2ed365279ee2e21f..691b14fe4fc81c7cc4e8974aa8c03e339efb6bd6 100644 (file)
@@ -7315,7 +7315,9 @@ sRef_makeConst (ctype ct)
   /* start modification */
   s->bufinfo.bufstate = BB_NULLTERMINATED;
   /* end modification */
-  if (ctype_isUA (ct))
+
+  /* evans 2002-04-22: added isManifestBool to avoid errors for -boolfalse initializations */
+  if (!ctype_isManifestBool (ct) && ctype_isUA (ct)) 
     {
       typeId uid = ctype_typeId (ct);
       uentry te = usymtab_getTypeEntrySafe (uid);
@@ -7326,7 +7328,6 @@ sRef_makeConst (ctype ct)
        }
     }
   
-  
   s->oaliaskind = s->aliaskind;
   s->oexpkind = s->expkind;
 
index 52a2f287262529be444f11d86434160812477cfa..099737a3754e22ce47b8b3633fe2c30adb09fdda 100644 (file)
@@ -363,6 +363,8 @@ usymtab_initGlobalMarker () /*@globals globtab@*/
 void
 usymtab_initBool ()
 {
+  DPRINTF (("Init bool!"));
+
   if (context_getFlag (FLG_NOLIB))
     {
       ctype boolt = ctype_bool;
index 8984a7bf588960f1cb54c002843934af7d729aaa..734a5ff4da677987a13496662a285afcdf99f7eb 100644 (file)
@@ -70,7 +70,7 @@ fink:
        $(SPLINT) fink.c 
 
 driverstub:
-       $(SPLINT) driverstub.c
+       $(SPLINT) driverstub.c -sysdirs "/usr/"
 
 alignof:
        $(SPLINT) alignof.c -expect 2
This page took 0.089207 seconds and 5 git commands to generate.