+2004-03-14 Ken Raeburn <raeburn@mit.edu>
+
+ * gssapiP_generic.h (struct _g_set_elt, g_set_elt): Renamed from
+ non-_elt versions.
+ * util_set.c, util_validate.c: Uses updated.
+
2004-02-08 Ken Raeburn <raeburn@mit.edu>
* util_ordering.c (g_queue_externalize, g_queue_internalize):
#define g_local_host_name gssint_g_local_host_name
#define g_strdup gssint_g_strdup
-typedef struct _g_set *g_set;
+typedef struct _g_set_elt *g_set_elt;
-int g_set_init (g_set *s);
-int g_set_destroy (g_set *s);
-int g_set_entry_add (g_set *s, void *key, void *value);
-int g_set_entry_delete (g_set *s, void *key);
-int g_set_entry_get (g_set *s, void *key, void **value);
+int g_set_init (g_set_elt *s);
+int g_set_destroy (g_set_elt *s);
+int g_set_entry_add (g_set_elt *s, void *key, void *value);
+int g_set_entry_delete (g_set_elt *s, void *key);
+int g_set_entry_get (g_set_elt *s, void *key, void **value);
int g_save_name (void **vdb, gss_name_t *name);
int g_save_cred_id (void **vdb, gss_cred_id_t *cred);
#include "gssapiP_generic.h"
-struct _g_set {
+struct _g_set_elt {
void *key;
void *value;
- struct _g_set *next;
+ struct _g_set_elt *next;
};
-int g_set_init(g_set *s)
+int g_set_init(g_set_elt *s)
{
*s = NULL;
}
#if 0
-int g_set_destroy(g_set *s)
+int g_set_destroy(g_set_elt *s)
{
g_set next;
}
#endif
-int g_set_entry_add(g_set *s, void *key, void *value)
+int g_set_entry_add(g_set_elt *s, void *key, void *value)
{
- g_set first;
+ g_set_elt first;
- if ((first = (struct _g_set *) malloc(sizeof(struct _g_set))) == NULL)
+ if ((first = (struct _g_set_elt *) malloc(sizeof(struct _g_set_elt))) == NULL)
return(ENOMEM);
first->key = key;
return(0);
}
-int g_set_entry_delete(g_set *s, void *key)
+int g_set_entry_delete(g_set_elt *s, void *key)
{
- g_set *p;
+ g_set_elt *p;
for (p=s; *p; p = &((*p)->next)) {
if ((*p)->key == key) {
- g_set next = (*p)->next;
+ g_set_elt next = (*p)->next;
free(*p);
*p = next;
return(-1);
}
-int g_set_entry_get(g_set *s, void *key, void **value)
+int g_set_entry_get(g_set_elt *s, void *key, void **value)
{
- g_set p;
+ g_set_elt p;
for (p = *s; p; p = p->next) {
if (p->key == key) {
return((*((*vdb)->put))(*vdb, &key, &dbtone, 0) == 0);
#else
- g_set *gs = (g_set *) db;
+ g_set_elt *gs = (g_set_elt *) db;
if (!*gs)
if (g_set_init(gs))
return((value.size == sizeof(one)) &&
(*((int *) value.data) == one));
#else
- g_set *gs = (g_set *) db;
+ g_set_elt *gs = (g_set_elt *) db;
void *value;
if (!*gs)
return((*((*vdb)->del))(*vdb, &key, 0) == 0);
#else
- g_set *gs = (g_set *) db;
+ g_set_elt *gs = (g_set_elt *) db;
if (!*gs)
return(0);