1 /* Association List Implementation */
3 /* Copyright (c) 1994 Stanford University
7 This software is provided under the terms described in
8 the "suif_copyright.h" include file. */
10 #include <suif_copyright.h>
12 #define _MODULE_ "libsuif.a"
14 #pragma implementation "alist.h"
16 #define RCS_BASE_FILE alist_cc
24 "$Id: alist.cc,v 1.2 1999/08/25 03:29:08 brm Exp $")
27 /*****************************************************************************/
31 * The search functions in amtflist use the same search function as
32 * mtflist by providing a separate function to compare the keys.
36 amtflist_pred (alist_e
*a
, void *k
)
43 amtflist::search (void *k
)
45 return (alist_e
*)mtflist::lookup((mtflist_test_f
)amtflist_pred
, k
);
50 amtflist::lookup (void *k
)
52 alist_e
*ap
= search(k
);
53 assert_msg(ap
, ("amtflist::lookup - attempt to lookup %x failed", k
));
59 amtflist::exists (void *k
, const void **i
)
61 alist_e
*ap
= search(k
);