]> andersk Git - splint.git/blobdiff - src/fileTable.c
Merged this branch with the one in the splint.sf.net repository.
[splint.git] / src / fileTable.c
index dd04efccdf2efb73da0e99219f9133351bfe3572..96c060dc5c0e426ba7be4880b258d93be77c6a22 100644 (file)
 
 # if defined(__IBMC__) && defined(OS2)
 # include <process.h>
-# include <io.h>
 # define getpid _getpid
-# define S_IRUSR S_IREAD
-# define S_IWUSR S_IWRITE 
-# define S_IXUSR S_IEXEC
 # endif
 
 /*@access fileId*/
@@ -101,12 +97,6 @@ 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);
@@ -283,18 +273,7 @@ fileTable_internAddEntry (fileTable ft, /*@only@*/ ftentry e)
   ft->nspace--;
 
   DPRINTF (("Adding: %s", e->fname));
-
-  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); 
-    }
-
+  cstringTable_insert (ft->htable, e->fname, ft->nentries);
   ft->elements[ft->nentries] = e;
 
   ft->nentries++;
@@ -324,7 +303,7 @@ fileTable_addFilePrim (fileTable ft, /*@temp@*/ cstring name,
   cstring absname = osd_absolutePath (NULL, name);
   int tindex = fileTable_getIndex (ft, absname);
   
-  /*@i534 fprintf (stderr, "Got abs path: %s", absname); */
+  DPRINTF (("Got abs path: %s", absname));
   llassert (ft != fileTable_undefined);
 
   if (tindex != NOT_FOUND)
@@ -661,18 +640,7 @@ fileTable_setFilePath (fileTable ft, fileId fid, cstring path)
 fileId
 fileTable_lookupBase (fileTable ft, cstring 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);
-    }
+  int tindex = fileTable_getIndex (ft, base);
 
   if (tindex == NOT_FOUND)
     {
@@ -809,7 +777,7 @@ fileTable_cleanup (fileTable ft)
   if (msg)
     {
       (void) fflush (g_warningstream);
-      displayScanOpen (cstring_makeLiteral ("cleaning"));
+      fprintf (stderr, "< cleaning");
     }
 
   for (i = 0; i < ft->nentries; i++)
@@ -851,13 +819,21 @@ fileTable_cleanup (fileTable ft)
 
       if (msg && ((i % skip) == 0))
        {
-         displayScanContinue (cstring_makeLiteral (i == 0 ? " " : "."));
+         (void) fflush (g_warningstream);
+
+         if (i == 0) {
+           fprintf (stderr, " ");
+         } else {
+           fprintf (stderr, ".");
+         }
+
+         (void) fflush (stderr);
        }
     }
-
+  
   if (msg)
     {
-      displayScanClose ();
+      fprintf (stderr, " >\n");
     }
 }
 
This page took 0.056594 seconds and 4 git commands to generate.