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
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@*/ ;
cstringTable_countCollisions (cstringTable h)
{
int nc = 0;
- unsigned int i;
+ unsigned long i;
llassert (cstringTable_isDefined (h));
cstringTable_countEmpty (cstringTable h)
{
int nc = 0;
- unsigned int i;
+ unsigned long i;
llassert (cstringTable_isDefined (h));
/*@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;
cstring cstringTable_unparse (cstringTable h)
{
cstring res = cstring_newEmpty ();
- unsigned int i;
+ unsigned long i;
if (cstringTable_isDefined (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),
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)));
}
** 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 */
void
cstringTable_insert (cstringTable h, cstring key, int value)
{
- unsigned int hindex;
+ unsigned long hindex;
hbucket hb;
hentry e;