]> andersk Git - splint.git/commitdiff
Added va_copy to standard.h.
authorevans1629 <evans1629>
Fri, 21 May 2004 12:57:21 +0000 (12:57 +0000)
committerevans1629 <evans1629>
Fri, 21 May 2004 12:57:21 +0000 (12:57 +0000)
lib/posix.h
lib/standard.h
src/Headers/cstringTable.h
src/Headers/system_constants.h
src/cstringTable.c

index fbe09379b4ac1953cd5d86cf0dc5ee2c21c5cd2c..aa35f6dcfc24b29a54f86d0b9cd582045e47fa23 100644 (file)
@@ -467,6 +467,10 @@ struct stat {
   time_t st_mtime; /* evans 2001-08-23 - these were previously st_st_mtime - POSIX spec says st_mtime */
   time_t st_ctime; /* evans 2001-08-23 - these were previously st_st_ctime - POSIX spec says st_ctime */
 } ;
+/*
+** evans 2004-05-19: dependent annotations atted for time_t fields.  Could not find
+** any clear documetation on this, but it seems to be correct. 
+*/
 
 /*
 ** POSIX does not require that the S_I* be functions. They're
index 7e2288b6102d69f5339a5f340c202e9f7e002c02..1ae8d373f0f59f1d41b306c59ee389cd890d460f 100644 (file)
@@ -469,6 +469,8 @@ typedef /*@abstract@*/ /*@mutable@*/ void *va_list;
 void va_start (/*@out@*/ va_list ap, ...) /*@modifies ap;@*/ ;
 void va_end (va_list va) /*@modifies va;@*/ ;
 
+void va_copy (/*@out@*/ va_list dest, va_list src) /*modifies dest;@*/ ;
+
 /*
 ** va_arg is builtin
 */
index ea3ddf1a559b803bb878135e825ddabc95e708dc..40516b32e62fcb8260673f3b84cae05b871d3e48 100644 (file)
@@ -54,7 +54,7 @@ extern /*@falsewhennull@*/ bool cstringTable_isDefined(cstringTable) /*@*/ ;
 extern /*@nullwhentrue@*/ /*@unused@*/ bool cstringTable_isUndefined(cstringTable) /*@*/ ;
 # define cstringTable_isUndefined(p_h) ((p_h) == cstringTable_undefined)
 
-extern /*@only@*/ cstringTable cstringTable_create(int p_size) /*@*/ ;
+extern /*@only@*/ cstringTable cstringTable_create(unsigned long p_size) /*@*/ ;
 extern void cstringTable_insert (cstringTable p_h, 
                                 /*@only@*/ cstring p_key, 
                                 int p_value) /*@modifies p_h@*/ ;
index df6bda5e0ee6d6a8be22f51a3351930baf38e032..513fd2c25ad79c7e441acb60902a67e3d8cff008 100644 (file)
 /*@constant int CGLOBBASESIZE; @*/
 # define CGLOBBASESIZE 1024
 
-/*@constant int CGLOBHASHSIZE; @*/
+/*@constant unsigned long CGLOBHASHSIZE; @*/
 # define CGLOBHASHSIZE 1795
 
 /*@constant int LLHASHSIZE; @*/
index d53ab14f80a9eb55bdc75eb28bab362040f83f53..c6cacbecda052652e9b97381cf36d1f98b0fa0bd 100644 (file)
@@ -217,7 +217,7 @@ static int
 cstringTable_countCollisions (cstringTable h)
 {
   int nc = 0;
-  unsigned int i;
+  unsigned long i;
 
   llassert (cstringTable_isDefined (h)); 
 
@@ -234,7 +234,7 @@ static int
 cstringTable_countEmpty (cstringTable h)
 {
   int nc = 0;
-  unsigned int i;
+  unsigned long i;
 
   llassert (cstringTable_isDefined (h)); 
 
@@ -276,9 +276,9 @@ cstringTable_hash (/*@notnull@*/ cstringTable h, cstring key)
 
 
 /*@only@*/ cstringTable
-cstringTable_create (unsigned int size)
+cstringTable_create (unsigned long size)
 {
-  int i;
+  unsigned long i;
   cstringTable h = (cstringTable) dmalloc (sizeof (*h));
   
   h->size = size;
@@ -297,7 +297,7 @@ cstringTable_create (unsigned int size)
 cstring cstringTable_unparse (cstringTable h)
 {
   cstring res = cstring_newEmpty ();
-  unsigned int i;
+  unsigned long i;
 
   if (cstringTable_isDefined (h)) 
     {
@@ -307,11 +307,11 @@ cstring cstringTable_unparse (cstringTable h)
          
          if (hb != NULL)
            {
-             res = message ("%q%d. %q\n", res, i, hbucket_unparse (hb));
+             res = message ("%q%ul. %q\n", res, i, hbucket_unparse (hb));
            }
        }
       
-      res = message ("%qsize: %u, collisions: %d, empty: %d", 
+      res = message ("%qsize: %ul, collisions: %d, empty: %d", 
                     res,
                     h->size, 
                     cstringTable_countCollisions (h),
@@ -331,7 +331,7 @@ cstring cstringTable_unparse (cstringTable h)
 cstringTable_stats (cstringTable h)
 {
   llassert (cstringTable_isDefined (h)); 
-  return (message ("size: %u, collisions: %d, empty: %d\n", 
+  return (message ("size: %ul, collisions: %d, empty: %d\n", 
                   h->size, cstringTable_countCollisions (h),
                   cstringTable_countEmpty (h)));
 }
@@ -343,7 +343,7 @@ cstringTable_rehash (/*@notnull@*/ cstringTable h)
   ** rehashing based (loosely) on code by Steve Harrison
   */
 
-  unsigned int i;
+  unsigned long i;
   /* Fix provided by Thomas Mertz (int -> unsigned long), 21 Apr 2004 */
   unsigned long oldsize = h->size;
   unsigned long newsize = 1 + ((oldsize * 26244) / 10000); /* 26244 = 162^2 */
@@ -424,7 +424,7 @@ cstringTable_addEntry (/*@notnull@*/ cstringTable h, /*@only@*/ hentry e)
 void
 cstringTable_insert (cstringTable h, cstring key, int value)
 {
-  unsigned int hindex;
+  unsigned long hindex;
   hbucket hb;
   hentry e;  
 
This page took 0.048284 seconds and 5 git commands to generate.