You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(4) |
Nov
(7) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(9) |
Oct
(2) |
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(6) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Pascal G. <sp...@us...> - 2006-09-05 12:24:20
|
Committer : spale CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2006-09-05 12:24:19 UTC Modified files: tests/t_smat.c Log message: Removed abusive backslashes. ---------------------- diff included ---------------------- Index: dbprim/tests/t_smat.c diff -u dbprim/tests/t_smat.c:1.2 dbprim/tests/t_smat.c:1.3 --- dbprim/tests/t_smat.c:1.2 Mon Sep 4 06:24:29 2006 +++ dbprim/tests/t_smat.c Tue Sep 5 05:24:09 2006 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: t_smat.c,v 1.2 2006/09/04 13:24:29 spale Exp $ +** @(#)$Id: t_smat.c,v 1.3 2006/09/05 12:24:09 spale Exp $ */ #include <stdio.h> #include <stdlib.h> @@ -27,7 +27,7 @@ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: t_smat.c,v 1.2 2006/09/04 13:24:29 spale Exp $"); +RCSTAG("@(#)$Id: t_smat.c,v 1.3 2006/09/05 12:24:09 spale Exp $"); TEST_PROG(t_smat, "Test sparse matrix functionality") @@ -144,9 +144,9 @@ /* Can we look them up? */ TEST_DECL(t_smat, st_find, "Test that st_find() can locate elements in a " "sparse matrix") - for ( \ - rt = 0, ct = 0, set_ones(&visited); \ - !check_zeros(&visited) && rt <= SMAT_HEAD_CNT && ct <= SMAT_HEAD_CNT; \ + for ( + rt = 0, ct = 0, set_ones(&visited); + !check_zeros(&visited) && rt <= SMAT_HEAD_CNT && ct <= SMAT_HEAD_CNT; clr_assoc(&visited, rt, ct), rt++ ) { if ( rt == SMAT_HEAD_CNT ) { rt = 0; ct++; } ----------------------- End of diff ----------------------- |
From: Pascal G. <sp...@us...> - 2006-09-04 13:24:40
|
Committer : spale CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2006-09-04 13:24:39 UTC Modified files: tests/t_smat.c Log message: Fixed FreeBSD issue running the test in an infinite loop ---------------------- diff included ---------------------- Index: dbprim/tests/t_smat.c diff -u dbprim/tests/t_smat.c:1.1 dbprim/tests/t_smat.c:1.2 --- dbprim/tests/t_smat.c:1.1 Tue Sep 21 20:25:48 2004 +++ dbprim/tests/t_smat.c Mon Sep 4 06:24:29 2006 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: t_smat.c,v 1.1 2004/09/22 03:25:48 klmitch Exp $ +** @(#)$Id: t_smat.c,v 1.2 2006/09/04 13:24:29 spale Exp $ */ #include <stdio.h> #include <stdlib.h> @@ -27,7 +27,7 @@ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: t_smat.c,v 1.1 2004/09/22 03:25:48 klmitch Exp $"); +RCSTAG("@(#)$Id: t_smat.c,v 1.2 2006/09/04 13:24:29 spale Exp $"); TEST_PROG(t_smat, "Test sparse matrix functionality") @@ -144,10 +144,12 @@ /* Can we look them up? */ TEST_DECL(t_smat, st_find, "Test that st_find() can locate elements in a " "sparse matrix") - for (set_ones(&visited); !check_zeros(&visited); - clr_assoc(&visited, rt, ct)) { - rt = rand() % SMAT_HEAD_CNT; /* select row and column elements... */ - ct = rand() % SMAT_HEAD_CNT; + for ( \ + rt = 0, ct = 0, set_ones(&visited); \ + !check_zeros(&visited) && rt <= SMAT_HEAD_CNT && ct <= SMAT_HEAD_CNT; \ + clr_assoc(&visited, rt, ct), rt++ ) { + + if ( rt == SMAT_HEAD_CNT ) { rt = 0; ct++; } fprintf(stderr, "Looking up association %d<->%d\n", rt, ct); ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2006-07-15 18:06:31
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2006-07-15 18:06:28 UTC Modified files: ChangeLog Makefile.am Makefile.in configure dbprim.h dbprim_int.h st_init.c Added files: hash_comp.c rbtree_comp.c Removed files: _smat_comp.c Log message: * _smat_comp.c: remove deprecated _smat_comp() function (internal interface, no one should notice) * st_init.c (st_init): utilize hash_comp() instead of deprecated _smat_comp() function * rbtree_comp.c (rbtree_comp): memcmp()-based red-black tree comparison function * hash_comp.c (hash_comp): memcmp()-based hash comparison function * dbprim_int.h: move declaration for _smat_resize() to the internal header * dbprim.h: add hash_comp() (based on memcmp()) to complement hash_fnv1() and hash_fnv1a(); remove now-deprecated _smat_comp() (in preference for hash_comp()); move _smat_resize() declaration to dbprim_int.h; fix a minor documentation typo; add rbtree_comp(), similar to hash_comp() but for red-black trees * Makefile.am: add hash_comp.c and rbtree_comp.c; versioning info's 'age' field can be 1 ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.25 dbprim/ChangeLog:1.26 --- dbprim/ChangeLog:1.25 Thu Jul 13 13:40:53 2006 +++ dbprim/ChangeLog Sat Jul 15 11:06:17 2006 @@ -1,3 +1,28 @@ +2006-07-15 Kevin L. Mitchell <kl...@mi...> + + * _smat_comp.c: remove deprecated _smat_comp() function (internal + interface, no one should notice) + + * st_init.c (st_init): utilize hash_comp() instead of deprecated + _smat_comp() function + + * rbtree_comp.c (rbtree_comp): memcmp()-based red-black tree + comparison function + + * hash_comp.c (hash_comp): memcmp()-based hash comparison function + + * dbprim_int.h: move declaration for _smat_resize() to the + internal header + + * dbprim.h: add hash_comp() (based on memcmp()) to complement + hash_fnv1() and hash_fnv1a(); remove now-deprecated _smat_comp() + (in preference for hash_comp()); move _smat_resize() declaration + to dbprim_int.h; fix a minor documentation typo; add + rbtree_comp(), similar to hash_comp() but for red-black trees + + * Makefile.am: add hash_comp.c and rbtree_comp.c; versioning + info's 'age' field can be 1 + 2006-07-13 Kevin L. Mitchell <kl...@mi...> * doc/Doxyfile.in (PREDEFINED): correct a missing \ Index: dbprim/Makefile.am diff -u dbprim/Makefile.am:1.12 dbprim/Makefile.am:1.13 --- dbprim/Makefile.am:1.12 Thu Jul 13 13:27:36 2006 +++ dbprim/Makefile.am Sat Jul 15 11:06:18 2006 @@ -17,7 +17,7 @@ ## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ## MA 02111-1307, USA ## -## @(#)$Id: Makefile.am,v 1.12 2006/07/13 20:27:36 klmitch Exp $ +## @(#)$Id: Makefile.am,v 1.13 2006/07/15 18:06:18 klmitch Exp $ ## ## Process this file with automake to generate Makefile.in @@ -40,6 +40,7 @@ _hash_prime.c \ hash_fnv1.c \ hash_fnv1a.c \ + hash_comp.c \ he_init.c \ ht_add.c \ ht_find.c \ @@ -62,6 +63,7 @@ \ _rb_locate.c \ _rb_rotate.c \ + rbtree_comp.c \ rn_init.c \ rt_add.c \ rt_find.c \ @@ -77,7 +79,6 @@ sh_init.c \ sh_iter.c \ sh_move.c \ - _smat_comp.c \ smat_freelist.c \ _smat_resize.c \ st_add.c \ @@ -90,7 +91,7 @@ st_resize.c libdbprim_la_LIBADD = @DBPRIM_ET_OBJS@ libdbprim_la_DEPENDENCIES = @DBPRIM_ET_OBJS@ -libdbprim_la_LDFLAGS = -version-info 3:0:0 +libdbprim_la_LDFLAGS = -version-info 3:0:1 pkginclude_HEADERS = dbprim.h dbprim_err.h dbprim_version.h Index: dbprim/Makefile.in diff -u dbprim/Makefile.in:1.8 dbprim/Makefile.in:1.9 --- dbprim/Makefile.in:1.8 Thu Jul 13 13:27:36 2006 +++ dbprim/Makefile.in Sat Jul 15 11:06:18 2006 @@ -67,20 +67,20 @@ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(pkgincludedir)" + "$(DESTDIR)$(pkgincludedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am_libdbprim_la_OBJECTS = dbprim_version.lo _hash_prime.lo \ - hash_fnv1.lo hash_fnv1a.lo he_init.lo ht_add.lo ht_find.lo \ - ht_flush.lo ht_free.lo ht_init.lo ht_iter.lo ht_move.lo \ - ht_remove.lo ht_resize.lo le_init.lo ll_add.lo ll_find.lo \ - ll_flush.lo ll_init.lo ll_iter.lo ll_move.lo ll_remove.lo \ - _rb_locate.lo _rb_rotate.lo rn_init.lo rt_add.lo rt_find.lo \ - rt_flush.lo rt_init.lo rt_iter.lo rt_move.lo rt_next.lo \ - rt_remove.lo sh_find.lo sh_flush.lo sh_init.lo sh_iter.lo \ - sh_move.lo _smat_comp.lo smat_freelist.lo _smat_resize.lo \ - st_add.lo st_find.lo st_flush.lo st_free.lo st_init.lo \ - st_iter.lo st_remove.lo st_resize.lo + hash_fnv1.lo hash_fnv1a.lo hash_comp.lo he_init.lo ht_add.lo \ + ht_find.lo ht_flush.lo ht_free.lo ht_init.lo ht_iter.lo \ + ht_move.lo ht_remove.lo ht_resize.lo le_init.lo ll_add.lo \ + ll_find.lo ll_flush.lo ll_init.lo ll_iter.lo ll_move.lo \ + ll_remove.lo _rb_locate.lo _rb_rotate.lo rbtree_comp.lo \ + rn_init.lo rt_add.lo rt_find.lo rt_flush.lo rt_init.lo \ + rt_iter.lo rt_move.lo rt_next.lo rt_remove.lo sh_find.lo \ + sh_flush.lo sh_init.lo sh_iter.lo sh_move.lo smat_freelist.lo \ + _smat_resize.lo st_add.lo st_find.lo st_flush.lo st_free.lo \ + st_init.lo st_iter.lo st_remove.lo st_resize.lo libdbprim_la_OBJECTS = $(am_libdbprim_la_OBJECTS) binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) @@ -103,9 +103,6 @@ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive -man3dir = $(mandir)/man3 -NROFF = nroff -MANS = $(man_MANS) pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(pkginclude_HEADERS) ETAGS = etags @@ -247,6 +244,7 @@ _hash_prime.c \ hash_fnv1.c \ hash_fnv1a.c \ + hash_comp.c \ he_init.c \ ht_add.c \ ht_find.c \ @@ -269,6 +267,7 @@ \ _rb_locate.c \ _rb_rotate.c \ + rbtree_comp.c \ rn_init.c \ rt_add.c \ rt_find.c \ @@ -284,7 +283,6 @@ sh_init.c \ sh_iter.c \ sh_move.c \ - _smat_comp.c \ smat_freelist.c \ _smat_resize.c \ st_add.c \ @@ -298,169 +296,14 @@ libdbprim_la_LIBADD = @DBPRIM_ET_OBJS@ libdbprim_la_DEPENDENCIES = @DBPRIM_ET_OBJS@ -libdbprim_la_LDFLAGS = -version-info 2:0:0 +libdbprim_la_LDFLAGS = -version-info 3:0:1 pkginclude_HEADERS = dbprim.h dbprim_err.h dbprim_version.h bin_SCRIPTS = dbprim-config EXTRA_CSTATUS = dbprim_version.c dbprim_version.h BUILT_SOURCES = dbprim_err.h -docmandir = doc/man/man3 -man_MANS = $(docmandir)/dbprim_hash.3 \ - $(docmandir)/dbprim.3 \ - $(docmandir)/dbprim_link.3 \ - $(docmandir)/dbprim_rbtree.3 \ - $(docmandir)/dbprim_smat.3 \ - \ - $(docmandir)/DB_KEY_INIT.3 \ - $(docmandir)/db_key_t.3 \ - $(docmandir)/dk_key.3 \ - $(docmandir)/dk_len.3 \ - $(docmandir)/hash_comp_t.3 \ - $(docmandir)/HASH_ENTRY_INIT.3 \ - $(docmandir)/hash_entry_t.3 \ - $(docmandir)/hash_func_t.3 \ - $(docmandir)/hash_iter_t.3 \ - $(docmandir)/hash_resize_t.3 \ - $(docmandir)/HASH_TABLE_INIT.3 \ - $(docmandir)/hash_table_t.3 \ - $(docmandir)/he_flags.3 \ - $(docmandir)/he_hash.3 \ - $(docmandir)/he_init.3 \ - $(docmandir)/he_key.3 \ - $(docmandir)/he_link.3 \ - $(docmandir)/he_table.3 \ - $(docmandir)/he_value.3 \ - $(docmandir)/he_verify.3 \ - $(docmandir)/ht_add.3 \ - $(docmandir)/ht_comp.3 \ - $(docmandir)/ht_count.3 \ - $(docmandir)/ht_extra.3 \ - $(docmandir)/ht_find.3 \ - $(docmandir)/ht_flags.3 \ - $(docmandir)/ht_flush.3 \ - $(docmandir)/ht_free.3 \ - $(docmandir)/ht_frozen.3 \ - $(docmandir)/ht_func.3 \ - $(docmandir)/ht_init.3 \ - $(docmandir)/ht_iter.3 \ - $(docmandir)/ht_modulus.3 \ - $(docmandir)/ht_move.3 \ - $(docmandir)/ht_remove.3 \ - $(docmandir)/ht_resize.3 \ - $(docmandir)/ht_rsize.3 \ - $(docmandir)/ht_size.3 \ - $(docmandir)/ht_verify.3 \ - $(docmandir)/le_flags.3 \ - $(docmandir)/le_head.3 \ - $(docmandir)/le_init.3 \ - $(docmandir)/le_next.3 \ - $(docmandir)/le_object.3 \ - $(docmandir)/le_prev.3 \ - $(docmandir)/le_verify.3 \ - $(docmandir)/link_comp_t.3 \ - $(docmandir)/LINK_ELEM_INIT.3 \ - $(docmandir)/link_elem_t.3 \ - $(docmandir)/LINK_HEAD_INIT.3 \ - $(docmandir)/link_head_t.3 \ - $(docmandir)/link_iter_t.3 \ - $(docmandir)/link_loc_t.3 \ - $(docmandir)/ll_add.3 \ - $(docmandir)/ll_count.3 \ - $(docmandir)/ll_extra.3 \ - $(docmandir)/ll_find.3 \ - $(docmandir)/ll_first.3 \ - $(docmandir)/ll_flush.3 \ - $(docmandir)/ll_init.3 \ - $(docmandir)/ll_iter.3 \ - $(docmandir)/ll_last.3 \ - $(docmandir)/ll_move.3 \ - $(docmandir)/ll_remove.3 \ - $(docmandir)/ll_verify.3 \ - $(docmandir)/rb_color_t.3 \ - $(docmandir)/rb_comp_t.3 \ - $(docmandir)/rb_iter_t.3 \ - $(docmandir)/RB_NODE_INIT.3 \ - $(docmandir)/rb_node_t.3 \ - $(docmandir)/RB_TREE_INIT.3 \ - $(docmandir)/rb_tree_t.3 \ - $(docmandir)/rn_color.3 \ - $(docmandir)/rn_init.3 \ - $(docmandir)/rn_isblack.3 \ - $(docmandir)/rn_isleft.3 \ - $(docmandir)/rn_isred.3 \ - $(docmandir)/rn_isright.3 \ - $(docmandir)/rn_key.3 \ - $(docmandir)/rn_left.3 \ - $(docmandir)/rn_parent.3 \ - $(docmandir)/rn_right.3 \ - $(docmandir)/rn_tree.3 \ - $(docmandir)/rn_value.3 \ - $(docmandir)/rn_verify.3 \ - $(docmandir)/rt_add.3 \ - $(docmandir)/rt_comp.3 \ - $(docmandir)/rt_count.3 \ - $(docmandir)/rt_extra.3 \ - $(docmandir)/rt_find.3 \ - $(docmandir)/rt_flush.3 \ - $(docmandir)/rt_frozen.3 \ - $(docmandir)/rt_init.3 \ - $(docmandir)/rt_iter.3 \ - $(docmandir)/rt_move.3 \ - $(docmandir)/rt_next.3 \ - $(docmandir)/rt_prev.3 \ - $(docmandir)/rt_remove.3 \ - $(docmandir)/rt_root.3 \ - $(docmandir)/rt_verify.3 \ - $(docmandir)/se_flags.3 \ - $(docmandir)/se_hash.3 \ - $(docmandir)/se_lflags.3 \ - $(docmandir)/se_next.3 \ - $(docmandir)/se_object.3 \ - $(docmandir)/se_prev.3 \ - $(docmandir)/se_table.3 \ - $(docmandir)/se_verify.3 \ - $(docmandir)/sh_count.3 \ - $(docmandir)/sh_elem.3 \ - $(docmandir)/sh_find.3 \ - $(docmandir)/sh_first.3 \ - $(docmandir)/sh_frozen.3 \ - $(docmandir)/sh_init.3 \ - $(docmandir)/sh_iter.3 \ - $(docmandir)/sh_last.3 \ - $(docmandir)/sh_move.3 \ - $(docmandir)/sh_object.3 \ - $(docmandir)/sh_size.3 \ - $(docmandir)/sh_table.3 \ - $(docmandir)/sh_verify.3 \ - $(docmandir)/smat_cleanup.3 \ - $(docmandir)/smat_comp_t.3 \ - $(docmandir)/smat_entry_t.3 \ - $(docmandir)/smat_freemem.3 \ - $(docmandir)/SMAT_HEAD_INIT.3 \ - $(docmandir)/smat_head_t.3 \ - $(docmandir)/smat_iter_t.3 \ - $(docmandir)/smat_loc_t.3 \ - $(docmandir)/smat_resize_t.3 \ - $(docmandir)/smat_table_t.3 \ - $(docmandir)/st_add.3 \ - $(docmandir)/st_count.3 \ - $(docmandir)/st_extra.3 \ - $(docmandir)/st_find.3 \ - $(docmandir)/st_flags.3 \ - $(docmandir)/st_flush.3 \ - $(docmandir)/st_free.3 \ - $(docmandir)/st_frozen.3 \ - $(docmandir)/st_init.3 \ - $(docmandir)/st_iter.3 \ - $(docmandir)/st_modulus.3 \ - $(docmandir)/st_remove.3 \ - $(docmandir)/st_resize.3 \ - $(docmandir)/st_rsize.3 \ - $(docmandir)/st_size.3 \ - $(docmandir)/st_verify.3 - EXTRA_DIST = dbprim_err.et dbprim.spec dbprim.spec.in m4 \ autogen.sh comp_et-sh.in COPYING INSTALL AUTHORS \ - doc/Doxyfile doc/Doxyfile.in doc/html doc/latex doc/man + doc/Doxyfile doc/Doxyfile.in doc/html doc/latex SUFFIXES = .et .h CLEANFILES = $(EXTRA_CSTATUS) \ @@ -572,9 +415,9 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_hash_prime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_rb_locate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_rb_rotate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_smat_comp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_smat_resize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbprim_version.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash_comp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash_fnv1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash_fnv1a.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/he_init.Plo@am__quote@ @@ -595,6 +438,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ll_iter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ll_move.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ll_remove.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rbtree_comp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rn_init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_add.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_find.Plo@am__quote@ @@ -649,51 +493,6 @@ distclean-libtool: -rm -f libtool uninstall-info-am: -install-man3: $(man3_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)" - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \ - done -uninstall-man3: - @$(NORMAL_UNINSTALL) - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man3dir)/$$inst"; \ - done install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)" @@ -992,10 +791,10 @@ check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(HEADERS) +all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(pkgincludedir)"; do \ + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -1048,13 +847,13 @@ info-am: -install-data-am: install-man install-pkgincludeHEADERS +install-data-am: install-pkgincludeHEADERS install-exec-am: install-binSCRIPTS install-libLTLIBRARIES install-info: install-info-recursive -install-man: install-man3 +install-man: installcheck-am: @@ -1079,13 +878,10 @@ ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-info-am \ - uninstall-libLTLIBRARIES uninstall-man \ - uninstall-pkgincludeHEADERS + uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS uninstall-info: uninstall-info-recursive -uninstall-man: uninstall-man3 - .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool clean-recursive ctags ctags-recursive dist \ @@ -1096,16 +892,14 @@ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-man3 \ - install-pkgincludeHEADERS install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ + install-libLTLIBRARIES install-man install-pkgincludeHEADERS \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-info-am \ - uninstall-libLTLIBRARIES uninstall-man uninstall-man3 \ - uninstall-pkgincludeHEADERS + uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS .et.c .et.h: comp_et-sh Index: dbprim/_smat_comp.c diff -u dbprim/_smat_comp.c:1.4 dbprim/_smat_comp.c:removed --- dbprim/_smat_comp.c:1.4 Thu Jul 13 12:16:23 2006 +++ dbprim/_smat_comp.c Sat Jul 15 11:06:28 2006 @@ -1,51 +0,0 @@ -/* -** Copyright (C) 2002 by Kevin L. Mitchell <kl...@mi...> -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Library General Public -** License as published by the Free Software Foundation; either -** version 2 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Library General Public License for more details. -** -** You should have received a copy of the GNU Library General Public -** License along with this library; if not, write to the Free -** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -** MA 02111-1307, USA -** -** @(#)$Id: _smat_comp.c,v 1.4 2006/07/13 19:16:23 klmitch Exp $ -*/ -/** \internal - * \file - * \brief Implementation of _smat_comp(). - * - * This file contains the implementation of the _smat_comp() function, - * the comparison callback used by sparse matrices. - */ -#include "dbprim.h" -#include "dbprim_int.h" - -RCSTAG("@(#)$Id: _smat_comp.c,v 1.4 2006/07/13 19:16:23 klmitch Exp $"); - -unsigned long -_smat_comp(hash_table_t *table, db_key_t *key1, db_key_t *key2) -{ - int i; - void **objects1, **objects2; - - if (!key1 || !key2 || !dk_key(key1) || !dk_key(key2)) /* if invalid... */ - return 1; /* return "no match" */ - - objects1 = dk_key(key1); /* massage these into a useful form */ - objects2 = dk_key(key2); - - /* walk through the elements in the array and compare them */ - for (i = SMAT_LOC_FIRST; i <= SMAT_LOC_SECOND; i++) - if (objects1[i] != objects2[i]) - return 1; /* they don't match */ - - return 0; /* we've got a match */ -} Index: dbprim/configure diff -u dbprim/configure:1.9 dbprim/configure:1.10 --- dbprim/configure:1.9 Thu Jul 13 12:16:23 2006 +++ dbprim/configure Sat Jul 15 11:06:18 2006 @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac Revision: 1.9 . +# From configure.ac Revision: 1.10 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for Database Primitives Library 1.0.0. +# Generated by GNU Autoconf 2.59 for Database Primitives Library 1.1.0. # # Report bugs to <kl...@mi...>. # @@ -441,8 +441,8 @@ # Identity of this package. PACKAGE_NAME='Database Primitives Library' PACKAGE_TARNAME='dbprim' -PACKAGE_VERSION='1.0.0' -PACKAGE_STRING='Database Primitives Library 1.0.0' +PACKAGE_VERSION='1.1.0' +PACKAGE_STRING='Database Primitives Library 1.1.0' PACKAGE_BUGREPORT='kl...@mi...' ac_unique_file="dbprim_int.h" @@ -972,7 +972,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Database Primitives Library 1.0.0 to adapt to many kinds of systems. +\`configure' configures Database Primitives Library 1.1.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1038,7 +1038,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Database Primitives Library 1.0.0:";; + short | recursive ) echo "Configuration of Database Primitives Library 1.1.0:";; esac cat <<\_ACEOF @@ -1178,7 +1178,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -Database Primitives Library configure 1.0.0 +Database Primitives Library configure 1.1.0 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1209,7 +1209,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Database Primitives Library $as_me 1.0.0, which was +It was created by Database Primitives Library $as_me 1.1.0, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1870,7 +1870,7 @@ # Define the identity of the package. PACKAGE='dbprim' - VERSION='1.0.0' + VERSION='1.1.0' cat >>confdefs.h <<_ACEOF @@ -20484,7 +20484,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by Database Primitives Library $as_me 1.0.0, which was +This file was extended by Database Primitives Library $as_me 1.1.0, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20542,7 +20542,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -Database Primitives Library config.status 1.0.0 +Database Primitives Library config.status 1.1.0 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Index: dbprim/dbprim.h diff -u dbprim/dbprim.h:1.12 dbprim/dbprim.h:1.13 --- dbprim/dbprim.h:1.12 Thu Jul 13 13:40:53 2006 +++ dbprim/dbprim.h Sat Jul 15 11:06:18 2006 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: dbprim.h,v 1.12 2006/07/13 20:40:53 klmitch Exp $ +** @(#)$Id: dbprim.h,v 1.13 2006/07/15 18:06:18 klmitch Exp $ */ #ifndef __include_dbprim_h__ #define __include_dbprim_h__ @@ -1048,6 +1048,20 @@ */ unsigned long hash_fnv1a(hash_table_t *table, db_key_t *key); +/** \ingroup dbprim_hash + * \brief Hash comparison function. + * + * This is a hash comparison function, compatible with #hash_comp_t, + * based around memcmp(). + * + * \param[in] table A pointer to a #hash_table_t. + * \param[in] key1 The first key being compared. + * \param[in] key2 The second key being compared. + * + * \return Zero if the keys match, non-zero otherwise. + */ +unsigned long hash_comp(hash_table_t *table, db_key_t *key1, db_key_t *key2); + /** \internal * \ingroup dbprim_hash * \brief Hash table structure. @@ -1777,40 +1791,6 @@ #define st_size(table) ((table)->st_table.ht_modulus * sizeof(link_head_t) + \ (table)->st_table.ht_count * sizeof(smat_entry_t)) -/** \internal - * \ingroup dbprim_smat - * \brief Sparse matrix comparison function. - * - * This function is a hash table-compatible comparison function for - * use by sparse matrices. - * - * \param[in] table The hash table for which the - * comparison is being performed. - * \param[in] key1 The first database key being - * compared. - * \param[in] key2 The second database key being - * compared. - * - * \return Zero if the database keys are identical, non-zero - * otherwise. - */ -unsigned long _smat_comp(hash_table_t *table, db_key_t *key1, db_key_t *key2); - -/** \internal - * \ingroup dbprim_smat - * \brief Sparse matrix resize function. - * - * This function is a hash table-compatible resize callback for use by - * sparse matrices. - * - * \param[in] table The hash table being resized. - * \param[in] new_mod The new hash table bucket size. - * - * \return Zero if the resize operation should be performed, - * non-zero otherwise. - */ -unsigned long _smat_resize(hash_table_t *table, unsigned long new_mod); - /** \ingroup dbprim_smat * \brief Dynamically initialize a sparse matrix table. * @@ -2314,7 +2294,7 @@ unsigned long sh_iter(smat_head_t *head, smat_entry_t *start, smat_iter_t iter_func, void *extra, unsigned long flags); -/** ingroup dbprim_smat +/** \ingroup dbprim_smat * \brief Flush a row or column of a sparse matrix. * * This function flushes a sparse matrix row or column--that is, it @@ -2534,6 +2514,22 @@ */ #define se_object(entry, n) ((entry)->se_object[(n)]) +/** \ingroup dbprim_rbtree + * \brief Red-black tree comparison function. + * + * This is a red-black tree comparison function, compatible with + * #rb_comp_t, based around memcmp(). + * + * \param[in] tree A pointer to a #rb_tree_t. + * \param[in] key1 The first key being compared. + * \param[in] key2 The second key being compared. + * + * \return Zero if the keys match, less than zero if the first + * key orders before the second key, or greater than zero + * if the first key orders after the second key. + */ +long rbtree_comp(rb_tree_t *tree, db_key_t *key1, db_key_t *key2); + /** \internal * \ingroup dbprim_rbtree * \brief Red-black tree structure. Index: dbprim/dbprim_int.h diff -u dbprim/dbprim_int.h:1.6 dbprim/dbprim_int.h:1.7 --- dbprim/dbprim_int.h:1.6 Thu Jul 13 13:27:36 2006 +++ dbprim/dbprim_int.h Sat Jul 15 11:06:18 2006 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: dbprim_int.h,v 1.6 2006/07/13 20:27:36 klmitch Exp $ +** @(#)$Id: dbprim_int.h,v 1.7 2006/07/15 18:06:18 klmitch Exp $ */ /** \internal * \file @@ -220,6 +220,21 @@ void _smat_free(smat_entry_t *entry); /** \internal + * \ingroup dbprim_smat + * \brief Sparse matrix resize function. + * + * This function is a hash table-compatible resize callback for use by + * sparse matrices. + * + * \param[in] table The hash table being resized. + * \param[in] new_mod The new hash table bucket size. + * + * \return Zero if the resize operation should be performed, + * non-zero otherwise. + */ +unsigned long _smat_resize(hash_table_t *table, unsigned long new_mod); + +/** \internal * \ingroup dbprim_rbtree * \brief Locate or insert a red-black tree node. * Index: dbprim/hash_comp.c diff -u /dev/null dbprim/hash_comp.c:1.1 --- /dev/null Sat Jul 15 11:06:29 2006 +++ dbprim/hash_comp.c Sat Jul 15 11:06:18 2006 @@ -0,0 +1,45 @@ +/* +** Copyright (C) 2006 by Kevin L. Mitchell <kl...@mi...> +** +** This library is free software; you can redistribute it and/or +** modify it under the terms of the GNU Library General Public +** License as published by the Free Software Foundation; either +** version 2 of the License, or (at your option) any later version. +** +** This library is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** Library General Public License for more details. +** +** You should have received a copy of the GNU Library General Public +** License along with this library; if not, write to the Free +** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +** MA 02111-1307, USA +** +** @(#)$Id: hash_comp.c,v 1.1 2006/07/15 18:06:18 klmitch Exp $ +*/ +/** \internal + * \file + * \brief Implementation of hash_comp(). + * + * This file contains the implementation of the hash_comp() function, + * a generic hash comparison callback utilizing memcmp(). + */ +#include <string.h> + +#include "dbprim.h" +#include "dbprim_int.h" + +RCSTAG("@(#)$Id: hash_comp.c,v 1.1 2006/07/15 18:06:18 klmitch Exp $"); + +unsigned long +hash_comp(hash_table_t *table, db_key_t *key1, db_key_t *key2) +{ + if (!key1 || !dk_len(key1) || !dk_key(key1) || /* invalid keys? */ + !key2 || !dk_len(key2) || !dk_key(key2)) + return 1; /* return "no match" */ + + /* Compare lengths and keys... */ + return dk_len(key1) != dk_len(key2) || + memcmp(dk_key(key1), dk_key(key2), dk_len(key1)); +} Index: dbprim/rbtree_comp.c diff -u /dev/null dbprim/rbtree_comp.c:1.1 --- /dev/null Sat Jul 15 11:06:29 2006 +++ dbprim/rbtree_comp.c Sat Jul 15 11:06:18 2006 @@ -0,0 +1,50 @@ +/* +** Copyright (C) 2006 by Kevin L. Mitchell <kl...@mi...> +** +** This library is free software; you can redistribute it and/or +** modify it under the terms of the GNU Library General Public +** License as published by the Free Software Foundation; either +** version 2 of the License, or (at your option) any later version. +** +** This library is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** Library General Public License for more details. +** +** You should have received a copy of the GNU Library General Public +** License along with this library; if not, write to the Free +** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +** MA 02111-1307, USA +** +** @(#)$Id: rbtree_comp.c,v 1.1 2006/07/15 18:06:18 klmitch Exp $ +*/ +/** \internal + * \file + * \brief Implementation of rbtree_comp(). + * + * This file contains the implementation of the rbtree_comp() + * function, a generic red-black tree comparison callback utilizing + * memcmp(). + */ +#include <string.h> + +#include "dbprim.h" +#include "dbprim_int.h" + +RCSTAG("@(#)$Id: rbtree_comp.c,v 1.1 2006/07/15 18:06:18 klmitch Exp $"); + +long +rbtree_comp(rb_tree_t *tree, db_key_t *key1, db_key_t *key2) +{ + int tmp; + + if (!key1 || !dk_len(key1) || !dk_key(key1) || /* invalid keys? */ + !key2 || !dk_len(key2) || !dk_key(key2)) + return 1; /* return "no match" */ + + if ((tmp = memcmp(dk_key(key1), dk_key(key2), dk_len(key1) < dk_len(key2) ? + dk_len(key1) : dk_len(key2)))) + return tmp; + + return dk_len(key1) - dk_len(key2); +} Index: dbprim/st_init.c diff -u dbprim/st_init.c:1.6 dbprim/st_init.c:1.7 --- dbprim/st_init.c:1.6 Thu Jul 13 13:27:36 2006 +++ dbprim/st_init.c Sat Jul 15 11:06:18 2006 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: st_init.c,v 1.6 2006/07/13 20:27:36 klmitch Exp $ +** @(#)$Id: st_init.c,v 1.7 2006/07/15 18:06:18 klmitch Exp $ */ /** \internal * \file @@ -28,7 +28,7 @@ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: st_init.c,v 1.6 2006/07/13 20:27:36 klmitch Exp $"); +RCSTAG("@(#)$Id: st_init.c,v 1.7 2006/07/15 18:06:18 klmitch Exp $"); unsigned long st_init(smat_table_t *table, unsigned long flags, smat_resize_t resize, @@ -45,7 +45,7 @@ table->st_resize = resize; /* initialize the hash table */ - if ((retval = ht_init(&table->st_table, flags, hash_fnv1a, _smat_comp, + if ((retval = ht_init(&table->st_table, flags, hash_fnv1a, hash_comp, _smat_resize, table, init_mod))) return retval; ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2006-07-13 21:56:08
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2006-07-13 21:55:57 UTC Modified files: doc/html/__hash__prime_8c-source.html doc/html/__hash__prime_8c.html doc/html/__rb__locate_8c-source.html doc/html/__rb__locate_8c.html doc/html/__rb__rotate_8c-source.html doc/html/__rb__rotate_8c.html doc/html/__smat__comp_8c-source.html doc/html/__smat__comp_8c.html doc/html/__smat__resize_8c-source.html doc/html/__smat__resize_8c.html doc/html/annotated.html doc/html/classes.html doc/html/dbprim_8h-source.html doc/html/dbprim_8h.html doc/html/dbprim__int_8h-source.html doc/html/dbprim__int_8h.html doc/html/dir_000000.html doc/html/dirs.html doc/html/files.html doc/html/functions.html doc/html/functions_vars.html doc/html/globals.html doc/html/globals_0x61.html doc/html/globals_0x63.html doc/html/globals_0x64.html doc/html/globals_0x66.html doc/html/globals_0x68.html doc/html/globals_0x69.html doc/html/globals_0x6b.html doc/html/globals_0x6c.html doc/html/globals_0x6d.html doc/html/globals_0x6e.html doc/html/globals_0x6f.html doc/html/globals_0x70.html doc/html/globals_0x72.html doc/html/globals_0x73.html doc/html/globals_0x74.html doc/html/globals_0x75.html doc/html/globals_0x76.html doc/html/globals_defs.html doc/html/globals_enum.html doc/html/globals_eval.html doc/html/globals_func.html doc/html/globals_type.html doc/html/globals_vars.html doc/html/graph_legend.html doc/html/group__dbprim.html doc/html/group__dbprim__hash.html doc/html/group__dbprim__link.html doc/html/group__dbprim__rbtree.html doc/html/group__dbprim__smat.html doc/html/hash__fnv1_8c-source.html doc/html/hash__fnv1_8c.html doc/html/hash__fnv1a_8c-source.html doc/html/hash__fnv1a_8c.html doc/html/he__init_8c-source.html doc/html/he__init_8c.html doc/html/ht__add_8c-source.html doc/html/ht__add_8c.html doc/html/ht__find_8c-source.html doc/html/ht__find_8c.html doc/html/ht__flush_8c-source.html doc/html/ht__flush_8c.html doc/html/ht__free_8c-source.html doc/html/ht__free_8c.html doc/html/ht__init_8c-source.html doc/html/ht__init_8c.html doc/html/ht__iter_8c-source.html doc/html/ht__iter_8c.html doc/html/ht__move_8c-source.html doc/html/ht__move_8c.html doc/html/ht__remove_8c-source.html doc/html/ht__remove_8c.html doc/html/ht__resize_8c-source.html doc/html/ht__resize_8c.html doc/html/index.html doc/html/le__init_8c-source.html doc/html/le__init_8c.html doc/html/ll__add_8c-source.html doc/html/ll__add_8c.html doc/html/ll__find_8c-source.html doc/html/ll__find_8c.html doc/html/ll__flush_8c-source.html doc/html/ll__flush_8c.html doc/html/ll__init_8c-source.html doc/html/ll__init_8c.html doc/html/ll__iter_8c-source.html doc/html/ll__iter_8c.html doc/html/ll__move_8c-source.html doc/html/ll__move_8c.html doc/html/ll__remove_8c-source.html doc/html/ll__remove_8c.html doc/html/modules.html doc/html/rn__init_8c-source.html doc/html/rn__init_8c.html doc/html/rt__add_8c-source.html doc/html/rt__add_8c.html doc/html/rt__find_8c-source.html doc/html/rt__find_8c.html doc/html/rt__flush_8c-source.html doc/html/rt__flush_8c.html doc/html/rt__init_8c-source.html doc/html/rt__init_8c.html doc/html/rt__iter_8c-source.html doc/html/rt__iter_8c.html doc/html/rt__move_8c-source.html doc/html/rt__move_8c.html doc/html/rt__next_8c-source.html doc/html/rt__next_8c.html doc/html/rt__remove_8c-source.html doc/html/rt__remove_8c.html doc/html/sh__find_8c-source.html doc/html/sh__find_8c.html doc/html/sh__flush_8c-source.html doc/html/sh__flush_8c.html doc/html/sh__init_8c-source.html doc/html/sh__init_8c.html doc/html/sh__iter_8c-source.html doc/html/sh__iter_8c.html doc/html/sh__move_8c-source.html doc/html/sh__move_8c.html doc/html/smat__freelist_8c-source.html doc/html/smat__freelist_8c.html doc/html/st__add_8c-source.html doc/html/st__add_8c.html doc/html/st__find_8c-source.html doc/html/st__find_8c.html doc/html/st__flush_8c-source.html doc/html/st__flush_8c.html doc/html/st__free_8c-source.html doc/html/st__free_8c.html doc/html/st__init_8c-source.html doc/html/st__init_8c.html doc/html/st__iter_8c-source.html doc/html/st__iter_8c.html doc/html/st__remove_8c-source.html doc/html/st__remove_8c.html doc/html/st__resize_8c-source.html doc/html/st__resize_8c.html doc/html/struct__db__key__s.html doc/html/struct__hash__entry__s.html doc/html/struct__hash__table__s.html doc/html/struct__link__elem__s.html doc/html/struct__link__head__s.html doc/html/struct__rb__node__s.html doc/html/struct__rb__tree__s.html doc/html/struct__sh__find__s.html doc/html/struct__sh__flush__s.html doc/html/struct__sh__iter__s.html doc/html/struct__smat__entry__s.html doc/html/struct__smat__head__s.html doc/html/struct__smat__table__s.html doc/html/struct__st__flush__s.html doc/html/struct__st__iter__s.html doc/html/structassoc__s.html doc/html/structflush__test.html doc/html/structiter__desc.html doc/html/structiter__s.html doc/html/structiter__test.html doc/html/structmoves__s.html doc/html/structtdata__s.html doc/html/structtmove__s.html doc/html/t__hashtab_8c-source.html doc/html/t__hashtab_8c.html doc/html/t__linklists_8c-source.html doc/html/t__linklists_8c.html doc/html/t__redblack_8c-source.html doc/html/t__redblack_8c.html doc/html/t__smat_8c-source.html doc/html/t__smat_8c.html doc/latex/annotated.tex doc/latex/dirs.tex doc/latex/doxygen.sty doc/latex/files.tex doc/latex/modules.tex doc/latex/refman.tex Log message: regenerate documentation from correct Doxyfile ---------------------- diff included ---------------------- Index: dbprim/doc/html/__hash__prime_8c-source.html diff -u dbprim/doc/html/__hash__prime_8c-source.html:1.1 dbprim/doc/html/__hash__prime_8c-source.html:1.2 --- dbprim/doc/html/__hash__prime_8c-source.html:1.1 Thu Jul 13 13:47:29 2006 +++ dbprim/doc/html/__hash__prime_8c-source.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: _hash_prime.c Source File</title> +<title>DatabasePrimitivesLibrary: _hash_prime.c Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -786,7 +786,7 @@ <a name="l00801"></a>00801 <span class="comment">/* NOT REACHED */</span> <a name="l00802"></a>00802 <span class="keywordflow">return</span> 0; <a name="l00803"></a>00803 } -</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:46 2006 for @PACKAGE_NAME@ by +</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:50 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/__hash__prime_8c.html diff -u dbprim/doc/html/__hash__prime_8c.html:1.1 dbprim/doc/html/__hash__prime_8c.html:1.2 --- dbprim/doc/html/__hash__prime_8c.html:1.1 Thu Jul 13 13:47:29 2006 +++ dbprim/doc/html/__hash__prime_8c.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: _hash_prime.c File Reference</title> +<title>DatabasePrimitivesLibrary: _hash_prime.c File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -39,7 +39,7 @@ <tr><td class="mdescLeft"> </td><td class="mdescRight">Table of primes. <a href="group__dbprim__hash.html#ga0"></a><br></td></tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:47 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:50 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/__rb__locate_8c-source.html diff -u dbprim/doc/html/__rb__locate_8c-source.html:1.1 dbprim/doc/html/__rb__locate_8c-source.html:1.2 --- dbprim/doc/html/__rb__locate_8c-source.html:1.1 Thu Jul 13 13:47:29 2006 +++ dbprim/doc/html/__rb__locate_8c-source.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: _rb_locate.c Source File</title> +<title>DatabasePrimitivesLibrary: _rb_locate.c Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -82,7 +82,7 @@ <a name="l00082"></a>00082 <a name="l00083"></a>00083 <span class="keywordflow">return</span> node; <span class="comment">/* return the node */</span> <a name="l00084"></a>00084 } -</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:46 2006 for @PACKAGE_NAME@ by +</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:50 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/__rb__locate_8c.html diff -u dbprim/doc/html/__rb__locate_8c.html:1.1 dbprim/doc/html/__rb__locate_8c.html:1.2 --- dbprim/doc/html/__rb__locate_8c.html:1.1 Thu Jul 13 13:47:29 2006 +++ dbprim/doc/html/__rb__locate_8c.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: _rb_locate.c File Reference</title> +<title>DatabasePrimitivesLibrary: _rb_locate.c File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -31,7 +31,7 @@ <tr><td class="mdescLeft"> </td><td class="mdescRight">Locate or insert a red-black tree node. <a href="group__dbprim__rbtree.html#ga14"></a><br></td></tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:47 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:51 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/__rb__rotate_8c-source.html diff -u dbprim/doc/html/__rb__rotate_8c-source.html:1.1 dbprim/doc/html/__rb__rotate_8c-source.html:1.2 --- dbprim/doc/html/__rb__rotate_8c-source.html:1.1 Thu Jul 13 13:47:29 2006 +++ dbprim/doc/html/__rb__rotate_8c-source.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: _rb_rotate.c Source File</title> +<title>DatabasePrimitivesLibrary: _rb_rotate.c Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -64,7 +64,7 @@ <a name="l00064"></a>00064 child-><a class="code" href="struct__rb__node__s.html#o5">rn_right</a> = parent; <span class="comment">/* Finally, link the parent to the child */</span> <a name="l00065"></a>00065 } <a name="l00066"></a>00066 } -</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:46 2006 for @PACKAGE_NAME@ by +</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:50 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/__rb__rotate_8c.html diff -u dbprim/doc/html/__rb__rotate_8c.html:1.1 dbprim/doc/html/__rb__rotate_8c.html:1.2 --- dbprim/doc/html/__rb__rotate_8c.html:1.1 Thu Jul 13 13:47:29 2006 +++ dbprim/doc/html/__rb__rotate_8c.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: _rb_rotate.c File Reference</title> +<title>DatabasePrimitivesLibrary: _rb_rotate.c File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -31,7 +31,7 @@ <tr><td class="mdescLeft"> </td><td class="mdescRight">Rotate tree nodes. <a href="group__dbprim__rbtree.html#ga15"></a><br></td></tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:48 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:51 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/__smat__comp_8c-source.html diff -u dbprim/doc/html/__smat__comp_8c-source.html:1.1 dbprim/doc/html/__smat__comp_8c-source.html:1.2 --- dbprim/doc/html/__smat__comp_8c-source.html:1.1 Thu Jul 13 13:47:29 2006 +++ dbprim/doc/html/__smat__comp_8c-source.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: _smat_comp.c Source File</title> +<title>DatabasePrimitivesLibrary: _smat_comp.c Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -49,7 +49,7 @@ <a name="l00049"></a>00049 <a name="l00050"></a>00050 <span class="keywordflow">return</span> 0; <span class="comment">/* we've got a match */</span> <a name="l00051"></a>00051 } -</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:46 2006 for @PACKAGE_NAME@ by +</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:50 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/__smat__comp_8c.html diff -u dbprim/doc/html/__smat__comp_8c.html:1.1 dbprim/doc/html/__smat__comp_8c.html:1.2 --- dbprim/doc/html/__smat__comp_8c.html:1.1 Thu Jul 13 13:47:30 2006 +++ dbprim/doc/html/__smat__comp_8c.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: _smat_comp.c File Reference</title> +<title>DatabasePrimitivesLibrary: _smat_comp.c File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -31,7 +31,7 @@ <tr><td class="mdescLeft"> </td><td class="mdescRight">Sparse matrix comparison function. <a href="group__dbprim__smat.html#ga10"></a><br></td></tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:48 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:51 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/__smat__resize_8c-source.html diff -u dbprim/doc/html/__smat__resize_8c-source.html:1.1 dbprim/doc/html/__smat__resize_8c-source.html:1.2 --- dbprim/doc/html/__smat__resize_8c-source.html:1.1 Thu Jul 13 13:47:30 2006 +++ dbprim/doc/html/__smat__resize_8c-source.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: _smat_resize.c Source File</title> +<title>DatabasePrimitivesLibrary: _smat_resize.c Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -43,7 +43,7 @@ <a name="l00043"></a>00043 <a name="l00044"></a>00044 <span class="keywordflow">return</span> 0; <span class="comment">/* allow the resize */</span> <a name="l00045"></a>00045 } -</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:46 2006 for @PACKAGE_NAME@ by +</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:50 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/__smat__resize_8c.html diff -u dbprim/doc/html/__smat__resize_8c.html:1.1 dbprim/doc/html/__smat__resize_8c.html:1.2 --- dbprim/doc/html/__smat__resize_8c.html:1.1 Thu Jul 13 13:47:30 2006 +++ dbprim/doc/html/__smat__resize_8c.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: _smat_resize.c File Reference</title> +<title>DatabasePrimitivesLibrary: _smat_resize.c File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -31,7 +31,7 @@ <tr><td class="mdescLeft"> </td><td class="mdescRight">Sparse matrix resize function. <a href="group__dbprim__smat.html#ga11"></a><br></td></tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:48 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:51 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/annotated.html diff -u dbprim/doc/html/annotated.html:1.1 dbprim/doc/html/annotated.html:1.2 --- dbprim/doc/html/annotated.html:1.1 Thu Jul 13 13:47:30 2006 +++ dbprim/doc/html/annotated.html Thu Jul 13 14:55:44 2006 @@ -1,11 +1,11 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Structures</title> +<title>DatabasePrimitivesLibrary: Data Structures</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindexHL" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div> -<h1>@PACKAGE_NAME@ Data Structures</h1>Here are the data structures with brief descriptions:<table> +<h1>DatabasePrimitivesLibrary Data Structures</h1>Here are the data structures with brief descriptions:<table> <tr><td class="indexkey"><a class="el" href="struct__db__key__s.html">_db_key_s</a></td><td class="indexvalue">Database key structure </td></tr> <tr><td class="indexkey"><a class="el" href="struct__hash__entry__s.html">_hash_entry_s</a></td><td class="indexvalue">Hash table entry structure </td></tr> <tr><td class="indexkey"><a class="el" href="struct__hash__table__s.html">_hash_table_s</a></td><td class="indexvalue">Hash table structure </td></tr> @@ -30,7 +30,7 @@ <tr><td class="indexkey"><a class="el" href="structtdata__s.html">tdata_s</a></td><td class="indexvalue"></td></tr> <tr><td class="indexkey"><a class="el" href="structtmove__s.html">tmove_s</a></td><td class="indexvalue"></td></tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:09 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:01 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/classes.html diff -u dbprim/doc/html/classes.html:1.1 dbprim/doc/html/classes.html:1.2 --- dbprim/doc/html/classes.html:1.1 Thu Jul 13 13:47:30 2006 +++ dbprim/doc/html/classes.html Thu Jul 13 14:55:44 2006 @@ -1,11 +1,11 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Alphabetical List</title> +<title>DatabasePrimitivesLibrary: Alphabetical List</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindexHL" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div> -<h1>@PACKAGE_NAME@ Data Structure Index</h1><p><div class="qindex"><a class="qindex" href="#letter__">_</a> | <a class="qindex" href="#letter_A">A</a> | <a class="qindex" href="#letter_F">F</a> | <a class="qindex" href="#letter_I">I</a> | <a class="qindex" href="#letter_M">M</a> | <a class="qindex" href="#letter_T">T</a></div><p> +<h1>DatabasePrimitivesLibrary Data Structure Index</h1><p><div class="qindex"><a class="qindex" href="#letter__">_</a> | <a class="qindex" href="#letter_A">A</a> | <a class="qindex" href="#letter_F">F</a> | <a class="qindex" href="#letter_I">I</a> | <a class="qindex" href="#letter_M">M</a> | <a class="qindex" href="#letter_T">T</a></div><p> <table align="center" width="95%" border="0" cellspacing="0" cellpadding="0"> <tr><td><a name="letter__"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> _ </div></td></tr></table> </td><td><a class="el" href="struct__rb__node__s.html">_rb_node_s</a> </td><td><a class="el" href="struct__smat__head__s.html">_smat_head_s</a> </td><td><a name="letter_F"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> F </div></td></tr></table> @@ -14,7 +14,7 @@ </td><td><a name="letter_T"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> T </div></td></tr></table> </td></tr><tr><td><a class="el" href="struct__hash__table__s.html">_hash_table_s</a> </td><td><a class="el" href="struct__sh__flush__s.html">_sh_flush_s</a> </td><td><a class="el" href="struct__st__iter__s.html">_st_iter_s</a> </td><td><a class="el" href="structiter__desc.html">iter_desc</a> </td><td><a class="el" href="structtdata__s.html">tdata_s</a> </td></tr><tr><td><a class="el" href="struct__link__elem__s.html">_link_elem_s</a> </td><td><a class="el" href="struct__sh__iter__s.html">_sh_iter_s</a> </td><td><a name="letter_A"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> A </div></td></tr></table> </td><td><a class="el" href="structiter__s.html">iter_s</a> </td><td><a class="el" href="structtmove__s.html">tmove_s</a> </td></tr><tr><td><a class="el" href="struct__link__head__s.html">_link_head_s</a> </td><td><a class="el" href="struct__smat__entry__s.html">_smat_entry_s</a> </td><td><a class="el" href="structassoc__s.html">assoc_s</a> </td><td><a class="el" href="structiter__test.html">iter_test</a> </td></tr></table><p><div class="qindex"><a class="qindex" href="#letter__">_</a> | <a class="qindex" href="#letter_A">A</a> | <a class="qindex" href="#letter_F">F</a> | <a class="qindex" href="#letter_I">I</a> | <a class="qindex" href="#letter_M">M</a> | <a class="qindex" href="#letter_T">T</a></div><p> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:09 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:01 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/dbprim_8h-source.html diff -u dbprim/doc/html/dbprim_8h-source.html:1.1 dbprim/doc/html/dbprim_8h-source.html:1.2 --- dbprim/doc/html/dbprim_8h-source.html:1.1 Thu Jul 13 13:47:30 2006 +++ dbprim/doc/html/dbprim_8h-source.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: dbprim.h Source File</title> +<title>DatabasePrimitivesLibrary: dbprim.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -556,7 +556,7 @@ <a name="l03106"></a>03106 <a class="code" href="dbprim_8h.html#a1">DBPRIM_END_C_DECLS</a> <a name="l03107"></a>03107 <a name="l03108"></a>03108 <span class="preprocessor">#endif </span><span class="comment">/* __include_dbprim_h__ */</span> -</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:47 2006 for @PACKAGE_NAME@ by +</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:50 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/dbprim_8h.html diff -u dbprim/doc/html/dbprim_8h.html:1.1 dbprim/doc/html/dbprim_8h.html:1.2 --- dbprim/doc/html/dbprim_8h.html:1.1 Thu Jul 13 13:47:30 2006 +++ dbprim/doc/html/dbprim_8h.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: dbprim.h File Reference</title> +<title>DatabasePrimitivesLibrary: dbprim.h File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -861,7 +861,7 @@ </td> </tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:50 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:52 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/dbprim__int_8h-source.html diff -u dbprim/doc/html/dbprim__int_8h-source.html:1.1 dbprim/doc/html/dbprim__int_8h-source.html:1.2 --- dbprim/doc/html/dbprim__int_8h-source.html:1.1 Thu Jul 13 13:47:30 2006 +++ dbprim/doc/html/dbprim__int_8h-source.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: dbprim_int.h Source File</title> +<title>DatabasePrimitivesLibrary: dbprim_int.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -75,7 +75,7 @@ <a name="l00254"></a>00254 <span class="keywordtype">void</span> <a class="code" href="group__dbprim__rbtree.html#ga15">_rb_rotate</a>(<a class="code" href="struct__rb__tree__s.html">rb_tree_t</a> *tree, <a class="code" href="struct__rb__node__s.html">rb_node_t</a> *child); <a name="l00255"></a>00255 <a name="l00256"></a>00256 <span class="preprocessor">#endif </span><span class="comment">/* __include_dbprim_int_h__ */</span> -</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:47 2006 for @PACKAGE_NAME@ by +</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:50 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/dbprim__int_8h.html diff -u dbprim/doc/html/dbprim__int_8h.html:1.1 dbprim/doc/html/dbprim__int_8h.html:1.2 --- dbprim/doc/html/dbprim__int_8h.html:1.1 Thu Jul 13 13:47:30 2006 +++ dbprim/doc/html/dbprim__int_8h.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: dbprim_int.h File Reference</title> +<title>DatabasePrimitivesLibrary: dbprim_int.h File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -164,7 +164,7 @@ Definition at line <a class="el" href="dbprim__int_8h-source.html#l00050">50</a> of file <a class="el" href="dbprim__int_8h-source.html">dbprim_int.h</a>. </td> </tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:50 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:52 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/dir_000000.html diff -u dbprim/doc/html/dir_000000.html:1.1 dbprim/doc/html/dir_000000.html:1.2 --- dbprim/doc/html/dir_000000.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/dir_000000.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: tests/ Directory Reference</title> +<title>DatabasePrimitivesLibrary: tests/ Directory Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -27,7 +27,7 @@ <tr><td class="memItemLeft" nowrap align="right" valign="top">file </td><td class="memItemRight" valign="bottom"><a class="el" href="t__smat_8c.html">t_smat.c</a> <a href="t__smat_8c-source.html">[code]</a></td></tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/dirs.html diff -u dbprim/doc/html/dirs.html:1.1 dbprim/doc/html/dirs.html:1.2 --- dbprim/doc/html/dirs.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/dirs.html Thu Jul 13 14:55:44 2006 @@ -1,14 +1,14 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Directory Hierarchy</title> +<title>DatabasePrimitivesLibrary: Directory Hierarchy</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindexHL" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div> -<h1>@PACKAGE_NAME@ Directories</h1>This directory hierarchy is sorted roughly, but not completely, alphabetically:<ul> +<h1>DatabasePrimitivesLibrary Directories</h1>This directory hierarchy is sorted roughly, but not completely, alphabetically:<ul> <li><a class="el" href="dir_000000.html">tests</a> </ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/files.html diff -u dbprim/doc/html/files.html:1.1 dbprim/doc/html/files.html:1.2 --- dbprim/doc/html/files.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/files.html Thu Jul 13 14:55:44 2006 @@ -1,11 +1,11 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: File Index</title> +<title>DatabasePrimitivesLibrary: File Index</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindexHL" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div> -<h1>@PACKAGE_NAME@ File List</h1>Here is a list of all files with brief descriptions:<table> +<h1>DatabasePrimitivesLibrary File List</h1>Here is a list of all files with brief descriptions:<table> <tr><td class="indexkey"><a class="el" href="__hash__prime_8c.html">_hash_prime.c</a> <a href="__hash__prime_8c-source.html">[code]</a></td><td class="indexvalue">Implementation of <a class="el" href="group__dbprim__hash.html#ga19">_hash_prime()</a> </td></tr> <tr><td class="indexkey"><a class="el" href="__rb__locate_8c.html">_rb_locate.c</a> <a href="__rb__locate_8c-source.html">[code]</a></td><td class="indexvalue">Implementation of <a class="el" href="group__dbprim__rbtree.html#ga14">_rb_locate()</a> </td></tr> <tr><td class="indexkey"><a class="el" href="__rb__rotate_8c.html">_rb_rotate.c</a> <a href="__rb__rotate_8c-source.html">[code]</a></td><td class="indexvalue">Implementation of <a class="el" href="group__dbprim__rbtree.html#ga15">_rb_rotate()</a> </td></tr> @@ -61,7 +61,7 @@ <tr><td class="indexkey"><a class="el" href="t__redblack_8c.html">t_redblack.c</a> <a href="t__redblack_8c-source.html">[code]</a></td><td class="indexvalue"></td></tr> <tr><td class="indexkey"><a class="el" href="t__smat_8c.html">t_smat.c</a> <a href="t__smat_8c-source.html">[code]</a></td><td class="indexvalue"></td></tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:41:46 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:53:50 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/functions.html diff -u dbprim/doc/html/functions.html:1.1 dbprim/doc/html/functions.html:1.2 --- dbprim/doc/html/functions.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/functions.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -115,7 +115,7 @@ <h3><a class="anchor" name="index_v">- v -</a></h3><ul> <li>visited : <a class="el" href="structiter__test.html#o0">iter_test</a>, <a class="el" href="structflush__test.html#o1">flush_test</a>, <a class="el" href="structiter__desc.html#o4">iter_desc</a>, <a class="el" href="structiter__s.html#o2">iter_s</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:09 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:01 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/functions_vars.html diff -u dbprim/doc/html/functions_vars.html:1.1 dbprim/doc/html/functions_vars.html:1.2 --- dbprim/doc/html/functions_vars.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/functions_vars.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields - Variables</title> +<title>DatabasePrimitivesLibrary: Data Fields - Variables</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -115,7 +115,7 @@ <h3><a class="anchor" name="index_v">- v -</a></h3><ul> <li>visited : <a class="el" href="structiter__test.html#o0">iter_test</a>, <a class="el" href="structflush__test.html#o1">flush_test</a>, <a class="el" href="structiter__desc.html#o4">iter_desc</a>, <a class="el" href="structiter__s.html#o2">iter_s</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:09 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:01 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals.html diff -u dbprim/doc/html/globals.html:1.1 dbprim/doc/html/globals.html:1.2 --- dbprim/doc/html/globals.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -45,7 +45,7 @@ : <a class="el" href="group__dbprim__smat.html#ga30">st_flush.c</a><li>_st_iter_iter() : <a class="el" href="group__dbprim__smat.html#ga31">st_iter.c</a><li>_st_remove() : <a class="el" href="group__dbprim__smat.html#ga24">st_remove.c</a>, <a class="el" href="group__dbprim__smat.html#ga24">dbprim_int.h</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x61.html diff -u dbprim/doc/html/globals_0x61.html:1.1 dbprim/doc/html/globals_0x61.html:1.2 --- dbprim/doc/html/globals_0x61.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x61.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -14,7 +14,7 @@ <h3><a class="anchor" name="index_a">- a -</a></h3><ul> <li>associations : <a class="el" href="t__smat_8c.html#a8">t_smat.c</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x63.html diff -u dbprim/doc/html/globals_0x63.html:1.1 dbprim/doc/html/globals_0x63.html:1.2 --- dbprim/doc/html/globals_0x63.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x63.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -19,7 +19,7 @@ : <a class="el" href="t__smat_8c.html#a4">t_smat.c</a><li>columns : <a class="el" href="t__smat_8c.html#a7">t_smat.c</a><li>comp_order() : <a class="el" href="t__redblack_8c.html#a11">t_redblack.c</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x64.html diff -u dbprim/doc/html/globals_0x64.html:1.1 dbprim/doc/html/globals_0x64.html:1.2 --- dbprim/doc/html/globals_0x64.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x64.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -22,7 +22,7 @@ : <a class="el" href="t__linklists_8c.html#a12">t_linklists.c</a><li>dk_key : <a class="el" href="group__dbprim.html#ga2">dbprim.h</a><li>dk_len : <a class="el" href="group__dbprim.html#ga3">dbprim.h</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x66.html diff -u dbprim/doc/html/globals_0x66.html:1.1 dbprim/doc/html/globals_0x66.html:1.2 --- dbprim/doc/html/globals_0x66.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x66.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -15,7 +15,7 @@ <li>flip : <a class="el" href="group__dbprim__rbtree.html#ga44">rt_add.c</a><li>FLUSH_THRESHOLD : <a class="el" href="t__hashtab_8c.html#a0">t_hashtab.c</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x68.html diff -u dbprim/doc/html/globals_0x68.html:1.1 dbprim/doc/html/globals_0x68.html:1.2 --- dbprim/doc/html/globals_0x68.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x68.html Thu Jul 13 14:55:44 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -62,7 +62,7 @@ : <a class="el" href="group__dbprim__hash.html#ga33">dbprim.h</a><li>ht_size : <a class="el" href="group__dbprim__hash.html#ga35">dbprim.h</a><li>ht_verify : <a class="el" href="group__dbprim__hash.html#ga26">dbprim.h</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x69.html diff -u dbprim/doc/html/globals_0x69.html:1.1 dbprim/doc/html/globals_0x69.html:1.2 --- dbprim/doc/html/globals_0x69.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x69.html Thu Jul 13 14:55:45 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -15,7 +15,7 @@ <li>isleft : <a class="el" href="group__dbprim__rbtree.html#ga47">rt_remove.c</a><li>ITER_TRIALS : <a class="el" href="t__redblack_8c.html#a6">t_redblack.c</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x6b.html diff -u dbprim/doc/html/globals_0x6b.html:1.1 dbprim/doc/html/globals_0x6b.html:1.2 --- dbprim/doc/html/globals_0x6b.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x6b.html Thu Jul 13 14:55:45 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -14,7 +14,7 @@ <h3><a class="anchor" name="index_k">- k -</a></h3><ul> <li>keys : <a class="el" href="t__hashtab_8c.html#a11">t_hashtab.c</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x6c.html diff -u dbprim/doc/html/globals_0x6c.html:1.1 dbprim/doc/html/globals_0x6c.html:1.2 --- dbprim/doc/html/globals_0x6c.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x6c.html Thu Jul 13 14:55:45 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -51,7 +51,7 @@ : <a class="el" href="group__dbprim__link.html#ga7">ll_move.c</a>, <a class="el" href="group__dbprim__link.html#ga7">dbprim.h</a><li>ll_remove() : <a class="el" href="group__dbprim__link.html#ga8">ll_remove.c</a>, <a class="el" href="group__dbprim__link.html#ga8">dbprim.h</a><li>ll_verify : <a class="el" href="group__dbprim__link.html#ga15">dbprim.h</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x6d.html diff -u dbprim/doc/html/globals_0x6d.html:1.1 dbprim/doc/html/globals_0x6d.html:1.2 --- dbprim/doc/html/globals_0x6d.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x6d.html Thu Jul 13 14:55:45 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -17,7 +17,7 @@ : <a class="el" href="t__redblack_8c.html#a10">t_redblack.c</a><li>MAX_PRIME : <a class="el" href="group__dbprim__hash.html#ga20">_hash_prime.c</a><li>moves : <a class="el" href="t__hashtab_8c.html#a12">t_hashtab.c</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x6e.html diff -u dbprim/doc/html/globals_0x6e.html:1.1 dbprim/doc/html/globals_0x6e.html:1.2 --- dbprim/doc/html/globals_0x6e.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x6e.html Thu Jul 13 14:55:45 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -14,7 +14,7 @@ <h3><a class="anchor" name="index_n">- n -</a></h3><ul> <li>n_debargs : <a class="el" href="t__redblack_8c.html#a3">t_redblack.c</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x6f.html diff -u dbprim/doc/html/globals_0x6f.html:1.1 dbprim/doc/html/globals_0x6f.html:1.2 --- dbprim/doc/html/globals_0x6f.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x6f.html Thu Jul 13 14:55:45 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -17,7 +17,7 @@ : <a class="el" href="t__linklists_8c.html#a14">t_linklists.c</a><li>order_move : <a class="el" href="t__linklists_8c.html#a9">t_linklists.c</a><li>order_remove : <a class="el" href="t__linklists_8c.html#a11">t_linklists.c</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x70.html diff -u dbprim/doc/html/globals_0x70.html:1.1 dbprim/doc/html/globals_0x70.html:1.2 --- dbprim/doc/html/globals_0x70.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x70.html Thu Jul 13 14:55:45 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -14,7 +14,7 @@ <h3><a class="anchor" name="index_p">- p -</a></h3><ul> <li>primes : <a class="el" href="group__dbprim__hash.html#ga0">_hash_prime.c</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x72.html diff -u dbprim/doc/html/globals_0x72.html:1.1 dbprim/doc/html/globals_0x72.html:1.2 --- dbprim/doc/html/globals_0x72.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x72.html Thu Jul 13 14:55:45 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -69,7 +69,7 @@ : <a class="el" href="group__dbprim__rbtree.html#ga8">rt_remove.c</a>, <a class="el" href="group__dbprim__rbtree.html#ga8">dbprim.h</a><li>rt_root : <a class="el" href="group__dbprim__rbtree.html#ga21">dbprim.h</a><li>rt_verify : <a class="el" href="group__dbprim__rbtree.html#ga18">dbprim.h</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x73.html diff -u dbprim/doc/html/globals_0x73.html:1.1 dbprim/doc/html/globals_0x73.html:1.2 --- dbprim/doc/html/globals_0x73.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x73.html Thu Jul 13 14:55:45 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -80,7 +80,7 @@ : <a class="el" href="group__dbprim__smat.html#ga40">dbprim.h</a><li>st_verify : <a class="el" href="group__dbprim__smat.html#ga34">dbprim.h</a><li>STOP_RETURN : <a class="el" href="t__redblack_8c.html#a4">t_redblack.c</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x74.html diff -u dbprim/doc/html/globals_0x74.html:1.1 dbprim/doc/html/globals_0x74.html:1.2 --- dbprim/doc/html/globals_0x74.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x74.html Thu Jul 13 14:55:45 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>@PACKAGE_NAME@: Data Fields</title> +<title>DatabasePrimitivesLibrary: Data Fields</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> @@ -22,7 +22,7 @@ : <a class="el" href="t__linklists_8c.html#a8">t_linklists.c</a><li>treecheck() : <a class="el" href="t__redblack_8c.html#a12">t_redblack.c</a><li>tremove : <a class="el" href="t__linklists_8c.html#a10">t_linklists.c</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 16:42:24 2006 for @PACKAGE_NAME@ by +<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 13 17:54:08 2006 for DatabasePrimitivesLibrary by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> Index: dbprim/doc/html/globals_0x75.html diff -u dbprim/doc/html/globals_0x75.html:1.1 dbprim/doc/html/globals_0x75.html:1.2 --- dbprim/doc/html/globals_0x75.html:1.1 Thu Jul 13 13:47:31 2006 +++ dbprim/doc/html/globals_0x75.html Thu Jul 13 14:55:45 2006 @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-... [truncated message content] |
From: Kevin L. M. <kl...@us...> - 2006-07-13 20:41:13
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2006-07-13 20:41:04 UTC Modified files: ChangeLog dbprim.h doc/Doxyfile.in Added files: doc/dbprim.doxytag Removed files: doc/html/doxygen.css doc/html/doxygen.png doc/html/group__dbprim.html doc/html/group__dbprim__hash.html doc/html/group__dbprim__link.html doc/html/group__dbprim__rbtree.html doc/html/group__dbprim__smat.html doc/html/index.html doc/html/modules.html doc/latex/Makefile doc/latex/doxygen.sty doc/latex/group__dbprim.tex doc/latex/group__dbprim__hash.tex doc/latex/group__dbprim__link.tex doc/latex/group__dbprim__rbtree.tex doc/latex/group__dbprim__smat.tex doc/latex/index.tex doc/latex/modules.tex doc/latex/refman.tex Log message: * doc/Doxyfile.in (PREDEFINED): correct a missing \ * dbprim.h: correct a couple of documentation snafus ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.24 dbprim/ChangeLog:1.25 --- dbprim/ChangeLog:1.24 Thu Jul 13 13:27:36 2006 +++ dbprim/ChangeLog Thu Jul 13 13:40:53 2006 @@ -1,5 +1,9 @@ 2006-07-13 Kevin L. Mitchell <kl...@mi...> + * doc/Doxyfile.in (PREDEFINED): correct a missing \ + + * dbprim.h: correct a couple of documentation snafus + * doc/Doxyfile.in: turn off man page generation * st_init.c (st_init): use hash_fnv1a() instead of custom Index: dbprim/dbprim.h diff -u dbprim/dbprim.h:1.11 dbprim/dbprim.h:1.12 --- dbprim/dbprim.h:1.11 Thu Jul 13 13:27:36 2006 +++ dbprim/dbprim.h Thu Jul 13 13:40:53 2006 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: dbprim.h,v 1.11 2006/07/13 20:27:36 klmitch Exp $ +** @(#)$Id: dbprim.h,v 1.12 2006/07/13 20:40:53 klmitch Exp $ */ #ifndef __include_dbprim_h__ #define __include_dbprim_h__ @@ -768,11 +768,11 @@ * This function moves a specified element within the linked list. * * \param[in] list A pointer to a #link_head_t. - * \param[in] new A pointer to the #link_elem_t + * \param[in] elem A pointer to the #link_elem_t * describing the element to be moved. * \param[in] loc A #link_loc_t indicating where the * entry should be moved to. - * \param[in] elem A pointer to a #link_elem_t describing + * \param[in] elem2 A pointer to a #link_elem_t describing * another element in the list if \p loc * is #LINK_LOC_BEFORE or * #LINK_LOC_AFTER. @@ -2323,7 +2323,7 @@ * removed from the row or column, and may safely call * <CODE>free()</CODE>. * - * \param[in] list A pointer to a #smat_head_t. + * \param[in] head A pointer to a #smat_head_t. * \param[in] flush_func * A pointer to a callback function used * to perform user-specifed actions on an Index: dbprim/doc/Doxyfile.in diff -u dbprim/doc/Doxyfile.in:1.4 dbprim/doc/Doxyfile.in:1.5 --- dbprim/doc/Doxyfile.in:1.4 Thu Jul 13 13:27:36 2006 +++ dbprim/doc/Doxyfile.in Thu Jul 13 13:40:53 2006 @@ -1009,7 +1009,7 @@ PREDEFINED = DBPRIM_BEGIN_C_DECLS= \ DBPRIM_END_C_DECLS= \ - DBPRIM_DOXYGEN=1 + DBPRIM_DOXYGEN=1 \ __attribute__(a)= \ RCSTAG(a)= \ TEST_PROG(name,desc)= \ Index: dbprim/doc/dbprim.doxytag diff -u /dev/null dbprim/doc/dbprim.doxytag:1.1 --- /dev/null Thu Jul 13 13:41:04 2006 +++ dbprim/doc/dbprim.doxytag Thu Jul 13 13:40:53 2006 @@ -0,0 +1,5104 @@ +<?xml version='1.0' encoding='ISO-8859-1' standalone='yes' ?> +<tagfile> + <compound kind="page"> + <name>index</name> + <title>Database Primitives Library</title> + <filename>index</filename> + </compound> + <compound kind="file"> + <name>_hash_prime.c</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>__hash__prime_8c</filename> + <includes id="dbprim_8h" name="dbprim.h" local="yes" imported="no">dbprim.h</includes> + <includes id="dbprim__int_8h" name="dbprim_int.h" local="yes" imported="no">dbprim_int.h</includes> + <member kind="define"> + <type>#define</type> + <name>MAX_PRIME</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga20</anchor> + <arglist></arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>_hash_prime</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga19</anchor> + <arglist>(unsigned long start)</arglist> + </member> + <member kind="variable" static="yes"> + <type>static unsigned long</type> + <name>primes</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga0</anchor> + <arglist>[]</arglist> + </member> + </compound> + <compound kind="file"> + <name>_rb_locate.c</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>__rb__locate_8c</filename> + <includes id="dbprim_8h" name="dbprim.h" local="yes" imported="no">dbprim.h</includes> + <includes id="dbprim__int_8h" name="dbprim_int.h" local="yes" imported="no">dbprim_int.h</includes> + <member kind="function"> + <type>rb_node_t *</type> + <name>_rb_locate</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga14</anchor> + <arglist>(rb_tree_t *tree, rb_node_t *node, db_key_t *key)</arglist> + </member> + </compound> + <compound kind="file"> + <name>_rb_rotate.c</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>__rb__rotate_8c</filename> + <includes id="dbprim_8h" name="dbprim.h" local="yes" imported="no">dbprim.h</includes> + <includes id="dbprim__int_8h" name="dbprim_int.h" local="yes" imported="no">dbprim_int.h</includes> + <member kind="function"> + <type>void</type> + <name>_rb_rotate</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga15</anchor> + <arglist>(rb_tree_t *tree, rb_node_t *child)</arglist> + </member> + </compound> + <compound kind="file"> + <name>_smat_comp.c</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>__smat__comp_8c</filename> + <includes id="dbprim_8h" name="dbprim.h" local="yes" imported="no">dbprim.h</includes> + <includes id="dbprim__int_8h" name="dbprim_int.h" local="yes" imported="no">dbprim_int.h</includes> + <member kind="function"> + <type>unsigned long</type> + <name>_smat_comp</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga10</anchor> + <arglist>(hash_table_t *table, db_key_t *key1, db_key_t *key2)</arglist> + </member> + </compound> + <compound kind="file"> + <name>_smat_resize.c</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>__smat__resize_8c</filename> + <includes id="dbprim_8h" name="dbprim.h" local="yes" imported="no">dbprim.h</includes> + <includes id="dbprim__int_8h" name="dbprim_int.h" local="yes" imported="no">dbprim_int.h</includes> + <member kind="function"> + <type>unsigned long</type> + <name>_smat_resize</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga11</anchor> + <arglist>(hash_table_t *table, unsigned long new_mod)</arglist> + </member> + </compound> + <compound kind="file"> + <name>dbprim.h</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>dbprim_8h</filename> + <class kind="struct">_db_key_s</class> + <class kind="struct">_link_head_s</class> + <class kind="struct">_link_elem_s</class> + <class kind="struct">_hash_table_s</class> + <class kind="struct">_hash_entry_s</class> + <class kind="struct">_smat_table_s</class> + <class kind="struct">_smat_head_s</class> + <class kind="struct">_smat_entry_s</class> + <class kind="struct">_rb_tree_s</class> + <class kind="struct">_rb_node_s</class> + <member kind="define"> + <type>#define</type> + <name>DBPRIM_BEGIN_C_DECLS</name> + <anchorfile>dbprim_8h.html</anchorfile> + <anchor>a0</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>DBPRIM_END_C_DECLS</name> + <anchorfile>dbprim_8h.html</anchorfile> + <anchor>a1</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>DB_KEY_INIT</name> + <anchorfile>group__dbprim.html</anchorfile> + <anchor>ga1</anchor> + <arglist>(key, size)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>dk_key</name> + <anchorfile>group__dbprim.html</anchorfile> + <anchor>ga2</anchor> + <arglist>(key)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>dk_len</name> + <anchorfile>group__dbprim.html</anchorfile> + <anchor>ga3</anchor> + <arglist>(key)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>DB_FLAG_REVERSE</name> + <anchorfile>group__dbprim.html</anchorfile> + <anchor>ga4</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>LINK_HEAD_MAGIC</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga13</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>LINK_HEAD_INIT</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga14</anchor> + <arglist>(extra)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ll_verify</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga15</anchor> + <arglist>(list)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ll_count</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga16</anchor> + <arglist>(list)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ll_first</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga17</anchor> + <arglist>(list)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ll_last</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga18</anchor> + <arglist>(list)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ll_extra</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga19</anchor> + <arglist>(list)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>LINK_ELEM_MAGIC</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga20</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>LINK_ELEM_INIT</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga21</anchor> + <arglist>(obj)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>le_verify</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga22</anchor> + <arglist>(element)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>le_next</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga23</anchor> + <arglist>(elem)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>le_prev</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga24</anchor> + <arglist>(elem)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>le_object</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga25</anchor> + <arglist>(elem)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>le_head</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga26</anchor> + <arglist>(elem)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>le_flags</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga27</anchor> + <arglist>(elem)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>HASH_TABLE_MAGIC</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga21</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>HASH_FLAG_AUTOGROW</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga22</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>HASH_FLAG_AUTOSHRINK</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga23</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>HASH_FLAG_MASK</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga24</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>HASH_FLAG_FREEZE</name> + <anchorfile>dbprim_8h.html</anchorfile> + <anchor>a25</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>HASH_TABLE_INIT</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga25</anchor> + <arglist>(flags, func, comp, resize, extra)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ht_verify</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga26</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ht_flags</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga27</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ht_frozen</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga28</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ht_modulus</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga29</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ht_count</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga30</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ht_func</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga31</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ht_comp</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga32</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ht_rsize</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga33</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ht_extra</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga34</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ht_size</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga35</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>HASH_ENTRY_MAGIC</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga36</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>HASH_ENTRY_INIT</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga37</anchor> + <arglist>(value)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>he_verify</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga38</anchor> + <arglist>(entry)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>he_link</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga39</anchor> + <arglist>(entry)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>he_flags</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga40</anchor> + <arglist>(entry)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>he_table</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga41</anchor> + <arglist>(entry)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>he_hash</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga42</anchor> + <arglist>(entry)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>he_key</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga43</anchor> + <arglist>(entry)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>he_value</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga44</anchor> + <arglist>(entry)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>_smat_ent</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga32</anchor> + <arglist>(ent)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>SMAT_TABLE_MAGIC</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga33</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>st_verify</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga34</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>st_flags</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga35</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>st_frozen</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga36</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>st_modulus</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga37</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>st_count</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga38</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>st_rsize</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga45</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>st_extra</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga39</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>st_size</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga40</anchor> + <arglist>(table)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>SMAT_HEAD_MAGIC</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga41</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>SMAT_HEAD_INIT</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga42</anchor> + <arglist>(elem, object)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>sh_verify</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga43</anchor> + <arglist>(head)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>sh_elem</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga44</anchor> + <arglist>(head)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>sh_table</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga45</anchor> + <arglist>(head)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>sh_frozen</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga46</anchor> + <arglist>(head)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>sh_count</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga47</anchor> + <arglist>(head)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>_sh_first</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga48</anchor> + <arglist>(head)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>sh_first</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga49</anchor> + <arglist>(head)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>_sh_last</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga50</anchor> + <arglist>(head)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>sh_last</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga51</anchor> + <arglist>(head)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>sh_object</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga52</anchor> + <arglist>(head)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>sh_size</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga53</anchor> + <arglist>(head)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>SMAT_ENTRY_MAGIC</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga54</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>se_verify</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga55</anchor> + <arglist>(entry)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>se_table</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga56</anchor> + <arglist>(entry)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>_se_link</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga57</anchor> + <arglist>(entry)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>se_flags</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga58</anchor> + <arglist>(entry)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>se_hash</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga59</anchor> + <arglist>(entry)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>_se_next</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga60</anchor> + <arglist>(entry, n)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>se_next</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga61</anchor> + <arglist>(entry, n)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>_se_prev</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga62</anchor> + <arglist>(entry, n)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>se_prev</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga63</anchor> + <arglist>(entry, n)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>se_lflags</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga64</anchor> + <arglist>(entry, n)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>se_object</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga65</anchor> + <arglist>(entry, n)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>RB_TREE_MAGIC</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga16</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>RBT_FLAG_FREEZE</name> + <anchorfile>dbprim_8h.html</anchorfile> + <anchor>a82</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>RB_TREE_INIT</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga17</anchor> + <arglist>(comp, extra)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rt_verify</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga18</anchor> + <arglist>(tree)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rt_frozen</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga19</anchor> + <arglist>(tree)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rt_count</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga20</anchor> + <arglist>(tree)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rt_root</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga21</anchor> + <arglist>(tree)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rt_comp</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga22</anchor> + <arglist>(tree)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rt_extra</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga23</anchor> + <arglist>(tree)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>RBT_ORDER_PRE</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga24</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>RBT_ORDER_IN</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga25</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>RBT_ORDER_POST</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga26</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>RBT_ORDER_MASK</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga27</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rt_prev</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga28</anchor> + <arglist>(tree, node_io, flags)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>RB_NODE_MAGIC</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga29</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>RB_NODE_INIT</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga30</anchor> + <arglist>(value)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rn_verify</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga31</anchor> + <arglist>(node)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rn_color</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga32</anchor> + <arglist>(node)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rn_tree</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga33</anchor> + <arglist>(node)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rn_parent</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga34</anchor> + <arglist>(node)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rn_left</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga35</anchor> + <arglist>(node)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rn_right</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga36</anchor> + <arglist>(node)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rn_key</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga37</anchor> + <arglist>(node)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rn_value</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga38</anchor> + <arglist>(node)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rn_isblack</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga39</anchor> + <arglist>(node)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rn_isred</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga40</anchor> + <arglist>(node)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rn_isleft</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga41</anchor> + <arglist>(node)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>rn_isright</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga42</anchor> + <arglist>(node)</arglist> + </member> + <member kind="typedef"> + <type>_db_key_s</type> + <name>db_key_t</name> + <anchorfile>group__dbprim.html</anchorfile> + <anchor>ga0</anchor> + <arglist></arglist> + </member> + <member kind="typedef"> + <type>_link_head_s</type> + <name>link_head_t</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga0</anchor> + <arglist></arglist> + </member> + <member kind="typedef"> + <type>_link_elem_s</type> + <name>link_elem_t</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga1</anchor> + <arglist></arglist> + </member> + <member kind="typedef"> + <type>_hash_table_s</type> + <name>hash_table_t</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga1</anchor> + <arglist></arglist> + </member> + <member kind="typedef"> + <type>_hash_entry_s</type> + <name>hash_entry_t</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga2</anchor> + <arglist></arglist> + </member> + <member kind="typedef"> + <type>_smat_table_s</type> + <name>smat_table_t</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga0</anchor> + <arglist></arglist> + </member> + <member kind="typedef"> + <type>_smat_head_s</type> + <name>smat_head_t</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga1</anchor> + <arglist></arglist> + </member> + <member kind="typedef"> + <type>_smat_entry_s</type> + <name>smat_entry_t</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga2</anchor> + <arglist></arglist> + </member> + <member kind="typedef"> + <type>_rb_tree_s</type> + <name>rb_tree_t</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga0</anchor> + <arglist></arglist> + </member> + <member kind="typedef"> + <type>_rb_node_s</type> + <name>rb_node_t</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga1</anchor> + <arglist></arglist> + </member> + <member kind="typedef"> + <type>unsigned long(*</type> + <name>link_iter_t</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga2</anchor> + <arglist>)(link_head_t *list, link_elem_t *elem, void *extra)</arglist> + </member> + <member kind="typedef"> + <type>unsigned long(*</type> + <name>link_comp_t</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga3</anchor> + <arglist>)(db_key_t *key, void *obj)</arglist> + </member> + <member kind="typedef"> + <type>unsigned long(*</type> + <name>hash_iter_t</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga3</anchor> + <arglist>)(hash_table_t *table, hash_entry_t *ent, void *extra)</arglist> + </member> + <member kind="typedef"> + <type>unsigned long(*</type> + <name>hash_func_t</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga4</anchor> + <arglist>)(hash_table_t *table, db_key_t *key)</arglist> + </member> + <member kind="typedef"> + <type>unsigned long(*</type> + <name>hash_comp_t</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga5</anchor> + <arglist>)(hash_table_t *table, db_key_t *key1, db_key_t *key2)</arglist> + </member> + <member kind="typedef"> + <type>unsigned long(*</type> + <name>hash_resize_t</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga6</anchor> + <arglist>)(hash_table_t *table, unsigned long new_mod)</arglist> + </member> + <member kind="typedef"> + <type>unsigned long(*</type> + <name>smat_resize_t</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga3</anchor> + <arglist>)(smat_table_t *table, unsigned long new_mod)</arglist> + </member> + <member kind="typedef"> + <type>unsigned long(*</type> + <name>smat_iter_t</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga4</anchor> + <arglist>)(smat_table_t *table, smat_entry_t *ent, void *extra)</arglist> + </member> + <member kind="typedef"> + <type>unsigned long(*</type> + <name>smat_comp_t</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga5</anchor> + <arglist>)(db_key_t *key, smat_entry_t *ent)</arglist> + </member> + <member kind="typedef"> + <type>unsigned long(*</type> + <name>rb_iter_t</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga2</anchor> + <arglist>)(rb_tree_t *tree, rb_node_t *node, void *extra)</arglist> + </member> + <member kind="typedef"> + <type>long(*</type> + <name>rb_comp_t</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga3</anchor> + <arglist>)(rb_tree_t *tree, db_key_t *key1, db_key_t *key2)</arglist> + </member> + <member kind="typedef"> + <type>enum _link_loc_e</type> + <name>link_loc_t</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga4</anchor> + <arglist></arglist> + </member> + <member kind="typedef"> + <type>enum _smat_loc_e</type> + <name>smat_loc_t</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga6</anchor> + <arglist></arglist> + </member> + <member kind="typedef"> + <type>enum _rb_color_e</type> + <name>rb_color_t</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga4</anchor> + <arglist></arglist> + </member> + <member kind="enumeration"> + <name>_link_loc_e</name> + <anchor>ga28</anchor> + <arglist></arglist> + </member> + <member kind="enumvalue"> + <name>LINK_LOC_HEAD</name> + <anchor>gga28a133</anchor> + <arglist></arglist> + </member> + <member kind="enumvalue"> + <name>LINK_LOC_TAIL</name> + <anchor>gga28a134</anchor> + <arglist></arglist> + </member> + <member kind="enumvalue"> + <name>LINK_LOC_BEFORE</name> + <anchor>gga28a135</anchor> + <arglist></arglist> + </member> + <member kind="enumvalue"> + <name>LINK_LOC_AFTER</name> + <anchor>gga28a136</anchor> + <arglist></arglist> + </member> + <member kind="enumeration"> + <name>_smat_loc_e</name> + <anchor>ga70</anchor> + <arglist></arglist> + </member> + <member kind="enumvalue"> + <name>SMAT_LOC_FIRST</name> + <anchor>gga70a137</anchor> + <arglist></arglist> + </member> + <member kind="enumvalue"> + <name>SMAT_LOC_SECOND</name> + <anchor>gga70a138</anchor> + <arglist></arglist> + </member> + <member kind="enumeration"> + <name>_rb_color_e</name> + <anchor>ga52</anchor> + <arglist></arglist> + </member> + <member kind="enumvalue"> + <name>RB_COLOR_NONE</name> + <anchor>gga52a139</anchor> + <arglist></arglist> + </member> + <member kind="enumvalue"> + <name>RB_COLOR_RED</name> + <anchor>gga52a140</anchor> + <arglist></arglist> + </member> + <member kind="enumvalue"> + <name>RB_COLOR_BLACK</name> + <anchor>gga52a141</anchor> + <arglist></arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ll_init</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga5</anchor> + <arglist>(link_head_t *list, void *extra)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ll_add</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga6</anchor> + <arglist>(link_head_t *list, link_elem_t *new, link_loc_t loc, link_elem_t *elem)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ll_move</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga7</anchor> + <arglist>(link_head_t *list, link_elem_t *elem, link_loc_t loc, link_elem_t *elem2)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ll_remove</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga8</anchor> + <arglist>(link_head_t *list, link_elem_t *elem)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ll_find</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga9</anchor> + <arglist>(link_head_t *list, link_elem_t **elem_p, link_comp_t comp_func, link_elem_t *start, db_key_t *key)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ll_iter</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga10</anchor> + <arglist>(link_head_t *list, link_elem_t *start, link_iter_t iter_func, void *extra, unsigned long flags)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ll_flush</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga11</anchor> + <arglist>(link_head_t *list, link_iter_t flush_func, void *extra)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>le_init</name> + <anchorfile>group__dbprim__link.html</anchorfile> + <anchor>ga12</anchor> + <arglist>(link_elem_t *elem, void *object)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>hash_fnv1</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga7</anchor> + <arglist>(hash_table_t *table, db_key_t *key)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>hash_fnv1a</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga8</anchor> + <arglist>(hash_table_t *table, db_key_t *key)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ht_init</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga9</anchor> + <arglist>(hash_table_t *table, unsigned long flags, hash_func_t func, hash_comp_t comp, hash_resize_t resize, void *extra, unsigned long init_mod)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ht_add</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga10</anchor> + <arglist>(hash_table_t *table, hash_entry_t *entry, db_key_t *key)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ht_move</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga11</anchor> + <arglist>(hash_table_t *table, hash_entry_t *entry, db_key_t *key)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ht_remove</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga12</anchor> + <arglist>(hash_table_t *table, hash_entry_t *entry)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ht_find</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga13</anchor> + <arglist>(hash_table_t *table, hash_entry_t **entry_p, db_key_t *key)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ht_iter</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga14</anchor> + <arglist>(hash_table_t *table, hash_iter_t iter_func, void *extra)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ht_flush</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga15</anchor> + <arglist>(hash_table_t *table, hash_iter_t flush_func, void *extra)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ht_resize</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga16</anchor> + <arglist>(hash_table_t *table, unsigned long new_size)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>ht_free</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga17</anchor> + <arglist>(hash_table_t *table)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>he_init</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga18</anchor> + <arglist>(hash_entry_t *entry, void *value)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>smat_cleanup</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga8</anchor> + <arglist>(void)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>smat_freemem</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga9</anchor> + <arglist>(void)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>_smat_comp</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga10</anchor> + <arglist>(hash_table_t *table, db_key_t *key1, db_key_t *key2)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>_smat_resize</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga11</anchor> + <arglist>(hash_table_t *table, unsigned long new_mod)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>st_init</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga12</anchor> + <arglist>(smat_table_t *table, unsigned long flags, smat_resize_t resize, void *extra, unsigned long init_mod)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>st_add</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga13</anchor> + <arglist>(smat_table_t *table, smat_entry_t **entry_p, smat_head_t *head1, link_loc_t loc1, smat_entry_t *ent1, smat_head_t *head2, link_loc_t loc2, smat_entry_t *ent2)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>st_remove</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga14</anchor> + <arglist>(smat_table_t *table, smat_entry_t *entry)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>st_find</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga15</anchor> + <arglist>(smat_table_t *table, smat_entry_t **entry_p, smat_head_t *head1, smat_head_t *head2)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>st_iter</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga16</anchor> + <arglist>(smat_table_t *table, smat_iter_t iter_func, void *extra)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>st_flush</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga17</anchor> + <arglist>(smat_table_t *table, smat_iter_t flush_func, void *extra)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>st_resize</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga18</anchor> + <arglist>(smat_table_t *table, unsigned long new_size)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>st_free</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga19</anchor> + <arglist>(smat_table_t *table)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>sh_init</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga20</anchor> + <arglist>(smat_head_t *head, smat_loc_t elem, void *object)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>sh_move</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga21</anchor> + <arglist>(smat_head_t *head, smat_entry_t *elem, link_loc_t loc, smat_entry_t *elem2)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>sh_find</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga22</anchor> + <arglist>(smat_head_t *head, smat_entry_t **elem_p, smat_comp_t comp_func, smat_entry_t *start, db_key_t *key)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>sh_iter</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga23</anchor> + <arglist>(smat_head_t *head, smat_entry_t *start, smat_iter_t iter_func, void *extra, unsigned long flags)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>sh_flush</name> + <anchorfile>dbprim_8h.html</anchorfile> + <anchor>a178</anchor> + <arglist>(smat_head_t *head, smat_iter_t flush_func, void *extra)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>rt_init</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga5</anchor> + <arglist>(rb_tree_t *tree, rb_comp_t comp, void *extra)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>rt_add</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga6</anchor> + <arglist>(rb_tree_t *tree, rb_node_t *node, db_key_t *key)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>rt_move</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga7</anchor> + <arglist>(rb_tree_t *tree, rb_node_t *node, db_key_t *key)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>rt_remove</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga8</anchor> + <arglist>(rb_tree_t *tree, rb_node_t *node)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>rt_find</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga9</anchor> + <arglist>(rb_tree_t *tree, rb_node_t **node_p, db_key_t *key)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>rt_next</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga10</anchor> + <arglist>(rb_tree_t *tree, rb_node_t **node_io, unsigned long flags)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>rt_iter</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga11</anchor> + <arglist>(rb_tree_t *tree, rb_node_t *start, rb_iter_t iter_func, void *extra, unsigned long flags)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>rt_flush</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga12</anchor> + <arglist>(rb_tree_t *tree, rb_iter_t flush_func, void *extra)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>rn_init</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga13</anchor> + <arglist>(rb_node_t *node, void *value)</arglist> + </member> + </compound> + <compound kind="file"> + <name>dbprim_int.h</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>dbprim__int_8h</filename> + <member kind="define"> + <type>#define</type> + <name>RCSTAG</name> + <anchorfile>dbprim__int_8h.html</anchorfile> + <anchor>a0</anchor> + <arglist>(tag)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>_hash_rollover</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga46</anchor> + <arglist>(mod)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>_hash_rollunder</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga47</anchor> + <arglist>(mod)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>_hash_fuzz</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga48</anchor> + <arglist>(mod)</arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>HASH_FNV_OFFSET</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga49</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>HASH_FNV_PRIME</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga50</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ST_REM_FIRST</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga66</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ST_REM_SECOND</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga67</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ST_REM_HASH</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga68</anchor> + <arglist></arglist> + </member> + <member kind="define"> + <type>#define</type> + <name>ST_REM_FREE</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga69</anchor> + <arglist></arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>_hash_prime</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga19</anchor> + <arglist>(unsigned long start)</arglist> + </member> + <member kind="function"> + <type>unsigned long</type> + <name>_st_remove</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga24</anchor> + <arglist>(smat_table_t *table, smat_entry_t *entry, unsigned int remflag)</arglist> + </member> + <member kind="function"> + <type>smat_entry_t *</type> + <name>_smat_alloc</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga25</anchor> + <arglist>(void)</arglist> + </member> + <member kind="function"> + <type>void</type> + <name>_smat_free</name> + <anchorfile>group__dbprim__smat.html</anchorfile> + <anchor>ga26</anchor> + <arglist>(smat_entry_t *entry)</arglist> + </member> + <member kind="function"> + <type>rb_node_t *</type> + <name>_rb_locate</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga14</anchor> + <arglist>(rb_tree_t *tree, rb_node_t *node, db_key_t *key)</arglist> + </member> + <member kind="function"> + <type>void</type> + <name>_rb_rotate</name> + <anchorfile>group__dbprim__rbtree.html</anchorfile> + <anchor>ga15</anchor> + <arglist>(rb_tree_t *tree, rb_node_t *child)</arglist> + </member> + </compound> + <compound kind="file"> + <name>hash_fnv1.c</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>hash__fnv1_8c</filename> + <includes id="dbprim_8h" name="dbprim.h" local="yes" imported="no">dbprim.h</includes> + <includes id="dbprim__int_8h" name="dbprim_int.h" local="yes" imported="no">dbprim_int.h</includes> + <member kind="function"> + <type>unsigned long</type> + <name>hash_fnv1</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga7</anchor> + <arglist>(hash_table_t *table, db_key_t *key)</arglist> + </member> + </compound> + <compound kind="file"> + <name>hash_fnv1a.c</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>hash__fnv1a_8c</filename> + <includes id="dbprim_8h" name="dbprim.h" local="yes" imported="no">dbprim.h</includes> + <includes id="dbprim__int_8h" name="dbprim_int.h" local="yes" imported="no">dbprim_int.h</includes> + <member kind="function"> + <type>unsigned long</type> + <name>hash_fnv1a</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga8</anchor> + <arglist>(hash_table_t *table, db_key_t *key)</arglist> + </member> + </compound> + <compound kind="file"> + <name>he_init.c</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>he__init_8c</filename> + <includes id="dbprim_8h" name="dbprim.h" local="yes" imported="no">dbprim.h</includes> + <includes id="dbprim__int_8h" name="dbprim_int.h" local="yes" imported="no">dbprim_int.h</includes> + <member kind="function"> + <type>unsigned long</type> + <name>he_init</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga18</anchor> + <arglist>(hash_entry_t *entry, void *value)</arglist> + </member> + </compound> + <compound kind="file"> + <name>ht_add.c</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>ht__add_8c</filename> + <includes id="dbprim_8h" name="dbprim.h" local="yes" imported="no">dbprim.h</includes> + <includes id="dbprim__int_8h" name="dbprim_int.h" local="yes" imported="no">dbprim_int.h</includes> + <member kind="function"> + <type>unsigned long</type> + <name>ht_add</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga10</anchor> + <arglist>(hash_table_t *table, hash_entry_t *entry, db_key_t *key)</arglist> + </member> + </compound> + <compound kind="file"> + <name>ht_find.c</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>ht__find_8c</filename> + <includes id="dbprim_8h" name="dbprim.h" local="yes" imported="no">dbprim.h</includes> + <includes id="dbprim__int_8h" name="dbprim_int.h" local="yes" imported="no">dbprim_int.h</includes> + <member kind="function"> + <type>unsigned long</type> + <name>ht_find</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga13</anchor> + <arglist>(hash_table_t *table, hash_entry_t **entry_p, db_key_t *key)</arglist> + </member> + </compound> + <compound kind="file"> + <name>ht_flush.c</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>ht__flush_8c</filename> + <includes id="dbprim_8h" name="dbprim.h" local="yes" imported="no">dbprim.h</includes> + <includes id="dbprim__int_8h" name="dbprim_int.h" local="yes" imported="no">dbprim_int.h</includes> + <member kind="function"> + <type>unsigned long</type> + <name>ht_flush</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga15</anchor> + <arglist>(hash_table_t *table, hash_iter_t flush_func, void *extra)</arglist> + </member> + </compound> + <compound kind="file"> + <name>ht_free.c</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>ht__free_8c</filename> + <includes id="dbprim_8h" name="dbprim.h" local="yes" imported="no">dbprim.h</includes> + <includes id="dbprim__int_8h" name="dbprim_int.h" local="yes" imported="no">dbprim_int.h</includes> + <member kind="function"> + <type>unsigned long</type> + <name>ht_free</name> + <anchorfile>group__dbprim__hash.html</anchorfile> + <anchor>ga17</anchor> + <arglist>(hash_table_t *table)</arglist> + </member> + </compound> + <compound kind="file"> + <name>ht_init.c</name> + <path>/home/klmitch/devel/src/dbprim/</path> + <filename>ht__init_8c</filename> + <includes ... [truncated message content] |
From: Kevin L. M. <kl...@us...> - 2006-07-13 20:28:03
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2006-07-13 20:27:54 UTC Modified files: ChangeLog Makefile.am Makefile.in configure.ac dbprim.h dbprim_int.h smat_freelist.c st_add.c st_find.c st_init.c doc/Doxyfile.in Added files: hash_fnv1.c hash_fnv1a.c Removed files: _smat_hash.c doc/man/man3/DB_FLAG_REVERSE.3 doc/man/man3/DB_KEY_INIT.3 doc/man/man3/HASH_ENTRY_INIT.3 doc/man/man3/HASH_FLAG_AUTOGROW.3 doc/man/man3/HASH_FLAG_AUTOSHRINK.3 doc/man/man3/HASH_TABLE_INIT.3 doc/man/man3/LINK_ELEM_INIT.3 doc/man/man3/LINK_HEAD_INIT.3 doc/man/man3/LINK_LOC_AFTER.3 doc/man/man3/LINK_LOC_BEFORE.3 doc/man/man3/LINK_LOC_HEAD.3 doc/man/man3/LINK_LOC_TAIL.3 doc/man/man3/RBT_ORDER_IN.3 doc/man/man3/RBT_ORDER_POST.3 doc/man/man3/RBT_ORDER_PRE.3 doc/man/man3/RB_COLOR_BLACK.3 doc/man/man3/RB_COLOR_NONE.3 doc/man/man3/RB_COLOR_RED.3 doc/man/man3/RB_NODE_INIT.3 doc/man/man3/RB_TREE_INIT.3 doc/man/man3/SMAT_HEAD_INIT.3 doc/man/man3/SMAT_LOC_FIRST.3 doc/man/man3/SMAT_LOC_SECOND.3 doc/man/man3/_link_loc_e.3 doc/man/man3/_rb_color_e.3 doc/man/man3/_smat_loc_e.3 doc/man/man3/db_key_t.3 doc/man/man3/dbprim.3 doc/man/man3/dbprim_hash.3 doc/man/man3/dbprim_link.3 doc/man/man3/dbprim_rbtree.3 doc/man/man3/dbprim_smat.3 doc/man/man3/dk_key.3 doc/man/man3/dk_len.3 doc/man/man3/hash_comp_t.3 doc/man/man3/hash_entry_t.3 doc/man/man3/hash_func_t.3 doc/man/man3/hash_iter_t.3 doc/man/man3/hash_resize_t.3 doc/man/man3/hash_table_t.3 doc/man/man3/he_flags.3 doc/man/man3/he_hash.3 doc/man/man3/he_init.3 doc/man/man3/he_key.3 doc/man/man3/he_link.3 doc/man/man3/he_table.3 doc/man/man3/he_value.3 doc/man/man3/he_verify.3 doc/man/man3/ht_add.3 doc/man/man3/ht_comp.3 doc/man/man3/ht_count.3 doc/man/man3/ht_extra.3 doc/man/man3/ht_find.3 doc/man/man3/ht_flags.3 doc/man/man3/ht_flush.3 doc/man/man3/ht_free.3 doc/man/man3/ht_frozen.3 doc/man/man3/ht_func.3 doc/man/man3/ht_init.3 doc/man/man3/ht_iter.3 doc/man/man3/ht_modulus.3 doc/man/man3/ht_move.3 doc/man/man3/ht_remove.3 doc/man/man3/ht_resize.3 doc/man/man3/ht_rsize.3 doc/man/man3/ht_size.3 doc/man/man3/ht_verify.3 doc/man/man3/le_flags.3 doc/man/man3/le_head.3 doc/man/man3/le_init.3 doc/man/man3/le_next.3 doc/man/man3/le_object.3 doc/man/man3/le_prev.3 doc/man/man3/le_verify.3 doc/man/man3/link_comp_t.3 doc/man/man3/link_elem_t.3 doc/man/man3/link_head_t.3 doc/man/man3/link_iter_t.3 doc/man/man3/link_loc_t.3 doc/man/man3/ll_add.3 doc/man/man3/ll_count.3 doc/man/man3/ll_extra.3 doc/man/man3/ll_find.3 doc/man/man3/ll_first.3 doc/man/man3/ll_flush.3 doc/man/man3/ll_init.3 doc/man/man3/ll_iter.3 doc/man/man3/ll_last.3 doc/man/man3/ll_move.3 doc/man/man3/ll_remove.3 doc/man/man3/ll_verify.3 doc/man/man3/rb_color_t.3 doc/man/man3/rb_comp_t.3 doc/man/man3/rb_iter_t.3 doc/man/man3/rb_node_t.3 doc/man/man3/rb_tree_t.3 doc/man/man3/rn_color.3 doc/man/man3/rn_init.3 doc/man/man3/rn_isblack.3 doc/man/man3/rn_isleft.3 doc/man/man3/rn_isred.3 doc/man/man3/rn_isright.3 doc/man/man3/rn_key.3 doc/man/man3/rn_left.3 doc/man/man3/rn_parent.3 doc/man/man3/rn_right.3 doc/man/man3/rn_tree.3 doc/man/man3/rn_value.3 doc/man/man3/rn_verify.3 doc/man/man3/rt_add.3 doc/man/man3/rt_comp.3 doc/man/man3/rt_count.3 doc/man/man3/rt_extra.3 doc/man/man3/rt_find.3 doc/man/man3/rt_flush.3 doc/man/man3/rt_frozen.3 doc/man/man3/rt_init.3 doc/man/man3/rt_iter.3 doc/man/man3/rt_move.3 doc/man/man3/rt_next.3 doc/man/man3/rt_prev.3 doc/man/man3/rt_remove.3 doc/man/man3/rt_root.3 doc/man/man3/rt_verify.3 doc/man/man3/se_flags.3 doc/man/man3/se_hash.3 doc/man/man3/se_lflags.3 doc/man/man3/se_next.3 doc/man/man3/se_object.3 doc/man/man3/se_prev.3 doc/man/man3/se_table.3 doc/man/man3/se_verify.3 doc/man/man3/sh_count.3 doc/man/man3/sh_elem.3 doc/man/man3/sh_find.3 doc/man/man3/sh_first.3 doc/man/man3/sh_frozen.3 doc/man/man3/sh_init.3 doc/man/man3/sh_iter.3 doc/man/man3/sh_last.3 doc/man/man3/sh_move.3 doc/man/man3/sh_object.3 doc/man/man3/sh_size.3 doc/man/man3/sh_table.3 doc/man/man3/sh_verify.3 doc/man/man3/smat_cleanup.3 doc/man/man3/smat_comp_t.3 doc/man/man3/smat_entry_t.3 doc/man/man3/smat_freemem.3 doc/man/man3/smat_head_t.3 doc/man/man3/smat_iter_t.3 doc/man/man3/smat_loc_t.3 doc/man/man3/smat_resize_t.3 doc/man/man3/smat_table_t.3 doc/man/man3/st_add.3 doc/man/man3/st_count.3 doc/man/man3/st_extra.3 doc/man/man3/st_find.3 doc/man/man3/st_flags.3 doc/man/man3/st_flush.3 doc/man/man3/st_free.3 doc/man/man3/st_frozen.3 doc/man/man3/st_init.3 doc/man/man3/st_iter.3 doc/man/man3/st_modulus.3 doc/man/man3/st_remove.3 doc/man/man3/st_resize.3 doc/man/man3/st_rsize.3 doc/man/man3/st_size.3 doc/man/man3/st_verify.3 Log message: * doc/Doxyfile.in: turn off man page generation * st_init.c (st_init): use hash_fnv1a() instead of custom _smat_hash() function * st_find.c (st_find): initialize object pointers with memset() in case of padding * st_add.c (st_add): set key size * smat_freelist.c (_smat_alloc): use memset() to initialize the object pointers * hash_fnv1a.c: implementation of FNV-1a hash * hash_fnv1.c: implementation of FNV-1 hash * dbprim_int.h: bump copyright date; add FNV hash parameters * dbprim.h: bump copyright date; add FNV-1 and FNV-1a hash functions; remove deprecated _smat_hash() function * configure.ac: bump version number for impending updated release... * _smat_hash.c: remove now-deprecated _smat_hash() function * Makefile.am: add FNV hash function files; remove old _smat_hash.c file; tidy up sources list; update library version info; drop man page information ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.23 dbprim/ChangeLog:1.24 --- dbprim/ChangeLog:1.23 Thu Jul 13 12:16:23 2006 +++ dbprim/ChangeLog Thu Jul 13 13:27:36 2006 @@ -1,5 +1,36 @@ 2006-07-13 Kevin L. Mitchell <kl...@mi...> + * doc/Doxyfile.in: turn off man page generation + + * st_init.c (st_init): use hash_fnv1a() instead of custom + _smat_hash() function + + * st_find.c (st_find): initialize object pointers with memset() in + case of padding + + * st_add.c (st_add): set key size + + * smat_freelist.c (_smat_alloc): use memset() to initialize the + object pointers + + * hash_fnv1a.c: implementation of FNV-1a hash + + * hash_fnv1.c: implementation of FNV-1 hash + + * dbprim_int.h: bump copyright date; add FNV hash parameters + + * dbprim.h: bump copyright date; add FNV-1 and FNV-1a hash + functions; remove deprecated _smat_hash() function + + * configure.ac: bump version number for impending updated + release... + + * _smat_hash.c: remove now-deprecated _smat_hash() function + + * Makefile.am: add FNV hash function files; remove old + _smat_hash.c file; tidy up sources list; update library version + info; drop man page information + * rn_init.c, rt_add.c, rt_find.c, rt_flush.c, rt_init.c, rt_iter.c, rt_move.c, rt_next.c, rt_remove.c, sh_find.c, sh_flush.c, sh_init.c, sh_iter.c, sh_move.c, smat_freelist.c, Index: dbprim/Makefile.am diff -u dbprim/Makefile.am:1.11 dbprim/Makefile.am:1.12 --- dbprim/Makefile.am:1.11 Wed Jul 12 22:36:15 2006 +++ dbprim/Makefile.am Thu Jul 13 13:27:36 2006 @@ -17,7 +17,7 @@ ## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ## MA 02111-1307, USA ## -## @(#)$Id: Makefile.am,v 1.11 2006/07/13 05:36:15 klmitch Exp $ +## @(#)$Id: Makefile.am,v 1.12 2006/07/13 20:27:36 klmitch Exp $ ## ## Process this file with automake to generate Makefile.in @@ -31,26 +31,66 @@ AM_CPPFLAGS = -D__DBPRIM_LIBRARY__ lib_LTLIBRARIES = libdbprim.la -libdbprim_la_SOURCES = dbprim.h dbprim_err.h dbprim_int.h dbprim_version.c \ - \ - _hash_prime.c he_init.c ht_add.c ht_find.c ht_flush.c \ - ht_free.c ht_init.c ht_iter.c ht_move.c ht_remove.c \ - ht_resize.c \ - \ - le_init.c ll_add.c ll_find.c ll_flush.c ll_init.c \ - ll_iter.c ll_move.c ll_remove.c \ - \ - _rb_locate.c _rb_rotate.c rn_init.c rt_add.c rt_find.c \ - rt_flush.c rt_init.c rt_iter.c rt_move.c rt_next.c \ - rt_remove.c \ - \ - sh_find.c sh_flush.c sh_init.c sh_iter.c sh_move.c \ - _smat_comp.c smat_freelist.c _smat_hash.c \ - _smat_resize.c st_add.c st_find.c st_flush.c st_free.c \ - st_init.c st_iter.c st_remove.c st_resize.c +libdbprim_la_SOURCES = \ + dbprim.h \ + dbprim_err.h \ + dbprim_int.h \ + dbprim_version.c \ + \ + _hash_prime.c \ + hash_fnv1.c \ + hash_fnv1a.c \ + he_init.c \ + ht_add.c \ + ht_find.c \ + ht_flush.c \ + ht_free.c \ + ht_init.c \ + ht_iter.c \ + ht_move.c \ + ht_remove.c \ + ht_resize.c \ + \ + le_init.c \ + ll_add.c \ + ll_find.c \ + ll_flush.c \ + ll_init.c \ + ll_iter.c \ + ll_move.c \ + ll_remove.c \ + \ + _rb_locate.c \ + _rb_rotate.c \ + rn_init.c \ + rt_add.c \ + rt_find.c \ + rt_flush.c \ + rt_init.c \ + rt_iter.c \ + rt_move.c \ + rt_next.c \ + rt_remove.c \ + \ + sh_find.c \ + sh_flush.c \ + sh_init.c \ + sh_iter.c \ + sh_move.c \ + _smat_comp.c \ + smat_freelist.c \ + _smat_resize.c \ + st_add.c \ + st_find.c \ + st_flush.c \ + st_free.c \ + st_init.c \ + st_iter.c \ + st_remove.c \ + st_resize.c libdbprim_la_LIBADD = @DBPRIM_ET_OBJS@ libdbprim_la_DEPENDENCIES = @DBPRIM_ET_OBJS@ -libdbprim_la_LDFLAGS = -version-info 2:0:0 +libdbprim_la_LDFLAGS = -version-info 3:0:0 pkginclude_HEADERS = dbprim.h dbprim_err.h dbprim_version.h @@ -60,165 +100,9 @@ BUILT_SOURCES = dbprim_err.h -docmandir = doc/man/man3 - -man_MANS = $(docmandir)/dbprim_hash.3 \ - $(docmandir)/dbprim.3 \ - $(docmandir)/dbprim_link.3 \ - $(docmandir)/dbprim_rbtree.3 \ - $(docmandir)/dbprim_smat.3 \ - \ - $(docmandir)/DB_KEY_INIT.3 \ - $(docmandir)/db_key_t.3 \ - $(docmandir)/dk_key.3 \ - $(docmandir)/dk_len.3 \ - $(docmandir)/hash_comp_t.3 \ - $(docmandir)/HASH_ENTRY_INIT.3 \ - $(docmandir)/hash_entry_t.3 \ - $(docmandir)/hash_func_t.3 \ - $(docmandir)/hash_iter_t.3 \ - $(docmandir)/hash_resize_t.3 \ - $(docmandir)/HASH_TABLE_INIT.3 \ - $(docmandir)/hash_table_t.3 \ - $(docmandir)/he_flags.3 \ - $(docmandir)/he_hash.3 \ - $(docmandir)/he_init.3 \ - $(docmandir)/he_key.3 \ - $(docmandir)/he_link.3 \ - $(docmandir)/he_table.3 \ - $(docmandir)/he_value.3 \ - $(docmandir)/he_verify.3 \ - $(docmandir)/ht_add.3 \ - $(docmandir)/ht_comp.3 \ - $(docmandir)/ht_count.3 \ - $(docmandir)/ht_extra.3 \ - $(docmandir)/ht_find.3 \ - $(docmandir)/ht_flags.3 \ - $(docmandir)/ht_flush.3 \ - $(docmandir)/ht_free.3 \ - $(docmandir)/ht_frozen.3 \ - $(docmandir)/ht_func.3 \ - $(docmandir)/ht_init.3 \ - $(docmandir)/ht_iter.3 \ - $(docmandir)/ht_modulus.3 \ - $(docmandir)/ht_move.3 \ - $(docmandir)/ht_remove.3 \ - $(docmandir)/ht_resize.3 \ - $(docmandir)/ht_rsize.3 \ - $(docmandir)/ht_size.3 \ - $(docmandir)/ht_verify.3 \ - $(docmandir)/le_flags.3 \ - $(docmandir)/le_head.3 \ - $(docmandir)/le_init.3 \ - $(docmandir)/le_next.3 \ - $(docmandir)/le_object.3 \ - $(docmandir)/le_prev.3 \ - $(docmandir)/le_verify.3 \ - $(docmandir)/link_comp_t.3 \ - $(docmandir)/LINK_ELEM_INIT.3 \ - $(docmandir)/link_elem_t.3 \ - $(docmandir)/LINK_HEAD_INIT.3 \ - $(docmandir)/link_head_t.3 \ - $(docmandir)/link_iter_t.3 \ - $(docmandir)/link_loc_t.3 \ - $(docmandir)/ll_add.3 \ - $(docmandir)/ll_count.3 \ - $(docmandir)/ll_extra.3 \ - $(docmandir)/ll_find.3 \ - $(docmandir)/ll_first.3 \ - $(docmandir)/ll_flush.3 \ - $(docmandir)/ll_init.3 \ - $(docmandir)/ll_iter.3 \ - $(docmandir)/ll_last.3 \ - $(docmandir)/ll_move.3 \ - $(docmandir)/ll_remove.3 \ - $(docmandir)/ll_verify.3 \ - $(docmandir)/rb_color_t.3 \ - $(docmandir)/rb_comp_t.3 \ - $(docmandir)/rb_iter_t.3 \ - $(docmandir)/RB_NODE_INIT.3 \ - $(docmandir)/rb_node_t.3 \ - $(docmandir)/RB_TREE_INIT.3 \ - $(docmandir)/rb_tree_t.3 \ - $(docmandir)/rn_color.3 \ - $(docmandir)/rn_init.3 \ - $(docmandir)/rn_isblack.3 \ - $(docmandir)/rn_isleft.3 \ - $(docmandir)/rn_isred.3 \ - $(docmandir)/rn_isright.3 \ - $(docmandir)/rn_key.3 \ - $(docmandir)/rn_left.3 \ - $(docmandir)/rn_parent.3 \ - $(docmandir)/rn_right.3 \ - $(docmandir)/rn_tree.3 \ - $(docmandir)/rn_value.3 \ - $(docmandir)/rn_verify.3 \ - $(docmandir)/rt_add.3 \ - $(docmandir)/rt_comp.3 \ - $(docmandir)/rt_count.3 \ - $(docmandir)/rt_extra.3 \ - $(docmandir)/rt_find.3 \ - $(docmandir)/rt_flush.3 \ - $(docmandir)/rt_frozen.3 \ - $(docmandir)/rt_init.3 \ - $(docmandir)/rt_iter.3 \ - $(docmandir)/rt_move.3 \ - $(docmandir)/rt_next.3 \ - $(docmandir)/rt_prev.3 \ - $(docmandir)/rt_remove.3 \ - $(docmandir)/rt_root.3 \ - $(docmandir)/rt_verify.3 \ - $(docmandir)/se_flags.3 \ - $(docmandir)/se_hash.3 \ - $(docmandir)/se_lflags.3 \ - $(docmandir)/se_next.3 \ - $(docmandir)/se_object.3 \ - $(docmandir)/se_prev.3 \ - $(docmandir)/se_table.3 \ - $(docmandir)/se_verify.3 \ - $(docmandir)/sh_count.3 \ - $(docmandir)/sh_elem.3 \ - $(docmandir)/sh_find.3 \ - $(docmandir)/sh_first.3 \ - $(docmandir)/sh_frozen.3 \ - $(docmandir)/sh_init.3 \ - $(docmandir)/sh_iter.3 \ - $(docmandir)/sh_last.3 \ - $(docmandir)/sh_move.3 \ - $(docmandir)/sh_object.3 \ - $(docmandir)/sh_size.3 \ - $(docmandir)/sh_table.3 \ - $(docmandir)/sh_verify.3 \ - $(docmandir)/smat_cleanup.3 \ - $(docmandir)/smat_comp_t.3 \ - $(docmandir)/smat_entry_t.3 \ - $(docmandir)/smat_freemem.3 \ - $(docmandir)/SMAT_HEAD_INIT.3 \ - $(docmandir)/smat_head_t.3 \ - $(docmandir)/smat_iter_t.3 \ - $(docmandir)/smat_loc_t.3 \ - $(docmandir)/smat_resize_t.3 \ - $(docmandir)/smat_table_t.3 \ - $(docmandir)/st_add.3 \ - $(docmandir)/st_count.3 \ - $(docmandir)/st_extra.3 \ - $(docmandir)/st_find.3 \ - $(docmandir)/st_flags.3 \ - $(docmandir)/st_flush.3 \ - $(docmandir)/st_free.3 \ - $(docmandir)/st_frozen.3 \ - $(docmandir)/st_init.3 \ - $(docmandir)/st_iter.3 \ - $(docmandir)/st_modulus.3 \ - $(docmandir)/st_remove.3 \ - $(docmandir)/st_resize.3 \ - $(docmandir)/st_rsize.3 \ - $(docmandir)/st_size.3 \ - $(docmandir)/st_verify.3 - EXTRA_DIST = dbprim_err.et dbprim.spec dbprim.spec.in m4 \ autogen.sh comp_et-sh.in COPYING INSTALL AUTHORS \ - doc/Doxyfile doc/Doxyfile.in doc/html doc/latex doc/man + doc/Doxyfile doc/Doxyfile.in doc/html doc/latex SUFFIXES = .et .h Index: dbprim/Makefile.in diff -u dbprim/Makefile.in:1.7 dbprim/Makefile.in:1.8 --- dbprim/Makefile.in:1.7 Wed Jul 12 22:36:15 2006 +++ dbprim/Makefile.in Thu Jul 13 13:27:36 2006 @@ -70,17 +70,17 @@ "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(pkgincludedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) -am_libdbprim_la_OBJECTS = dbprim_version.lo _hash_prime.lo he_init.lo \ - ht_add.lo ht_find.lo ht_flush.lo ht_free.lo ht_init.lo \ - ht_iter.lo ht_move.lo ht_remove.lo ht_resize.lo le_init.lo \ - ll_add.lo ll_find.lo ll_flush.lo ll_init.lo ll_iter.lo \ - ll_move.lo ll_remove.lo _rb_locate.lo _rb_rotate.lo rn_init.lo \ - rt_add.lo rt_find.lo rt_flush.lo rt_init.lo rt_iter.lo \ - rt_move.lo rt_next.lo rt_remove.lo sh_find.lo sh_flush.lo \ - sh_init.lo sh_iter.lo sh_move.lo _smat_comp.lo \ - smat_freelist.lo _smat_hash.lo _smat_resize.lo st_add.lo \ - st_find.lo st_flush.lo st_free.lo st_init.lo st_iter.lo \ - st_remove.lo st_resize.lo +am_libdbprim_la_OBJECTS = dbprim_version.lo _hash_prime.lo \ + hash_fnv1.lo hash_fnv1a.lo he_init.lo ht_add.lo ht_find.lo \ + ht_flush.lo ht_free.lo ht_init.lo ht_iter.lo ht_move.lo \ + ht_remove.lo ht_resize.lo le_init.lo ll_add.lo ll_find.lo \ + ll_flush.lo ll_init.lo ll_iter.lo ll_move.lo ll_remove.lo \ + _rb_locate.lo _rb_rotate.lo rn_init.lo rt_add.lo rt_find.lo \ + rt_flush.lo rt_init.lo rt_iter.lo rt_move.lo rt_next.lo \ + rt_remove.lo sh_find.lo sh_flush.lo sh_init.lo sh_iter.lo \ + sh_move.lo _smat_comp.lo smat_freelist.lo _smat_resize.lo \ + st_add.lo st_find.lo st_flush.lo st_free.lo st_init.lo \ + st_iter.lo st_remove.lo st_resize.lo libdbprim_la_OBJECTS = $(am_libdbprim_la_OBJECTS) binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) @@ -238,23 +238,63 @@ SUBDIRS = . tests AM_CPPFLAGS = -D__DBPRIM_LIBRARY__ lib_LTLIBRARIES = libdbprim.la -libdbprim_la_SOURCES = dbprim.h dbprim_err.h dbprim_int.h dbprim_version.c \ - \ - _hash_prime.c he_init.c ht_add.c ht_find.c ht_flush.c \ - ht_free.c ht_init.c ht_iter.c ht_move.c ht_remove.c \ - ht_resize.c \ - \ - le_init.c ll_add.c ll_find.c ll_flush.c ll_init.c \ - ll_iter.c ll_move.c ll_remove.c \ - \ - _rb_locate.c _rb_rotate.c rn_init.c rt_add.c rt_find.c \ - rt_flush.c rt_init.c rt_iter.c rt_move.c rt_next.c \ - rt_remove.c \ - \ - sh_find.c sh_flush.c sh_init.c sh_iter.c sh_move.c \ - _smat_comp.c smat_freelist.c _smat_hash.c \ - _smat_resize.c st_add.c st_find.c st_flush.c st_free.c \ - st_init.c st_iter.c st_remove.c st_resize.c +libdbprim_la_SOURCES = \ + dbprim.h \ + dbprim_err.h \ + dbprim_int.h \ + dbprim_version.c \ + \ + _hash_prime.c \ + hash_fnv1.c \ + hash_fnv1a.c \ + he_init.c \ + ht_add.c \ + ht_find.c \ + ht_flush.c \ + ht_free.c \ + ht_init.c \ + ht_iter.c \ + ht_move.c \ + ht_remove.c \ + ht_resize.c \ + \ + le_init.c \ + ll_add.c \ + ll_find.c \ + ll_flush.c \ + ll_init.c \ + ll_iter.c \ + ll_move.c \ + ll_remove.c \ + \ + _rb_locate.c \ + _rb_rotate.c \ + rn_init.c \ + rt_add.c \ + rt_find.c \ + rt_flush.c \ + rt_init.c \ + rt_iter.c \ + rt_move.c \ + rt_next.c \ + rt_remove.c \ + \ + sh_find.c \ + sh_flush.c \ + sh_init.c \ + sh_iter.c \ + sh_move.c \ + _smat_comp.c \ + smat_freelist.c \ + _smat_resize.c \ + st_add.c \ + st_find.c \ + st_flush.c \ + st_free.c \ + st_init.c \ + st_iter.c \ + st_remove.c \ + st_resize.c libdbprim_la_LIBADD = @DBPRIM_ET_OBJS@ libdbprim_la_DEPENDENCIES = @DBPRIM_ET_OBJS@ @@ -533,9 +573,10 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_rb_locate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_rb_rotate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_smat_comp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_smat_hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_smat_resize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbprim_version.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash_fnv1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash_fnv1a.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/he_init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ht_add.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ht_find.Plo@am__quote@ Index: dbprim/_smat_hash.c diff -u dbprim/_smat_hash.c:1.5 dbprim/_smat_hash.c:removed --- dbprim/_smat_hash.c:1.5 Thu Jul 13 12:16:23 2006 +++ dbprim/_smat_hash.c Thu Jul 13 13:27:54 2006 @@ -1,54 +0,0 @@ -/* -** Copyright (C) 2002 by Kevin L. Mitchell <kl...@mi...> -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Library General Public -** License as published by the Free Software Foundation; either -** version 2 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Library General Public License for more details. -** -** You should have received a copy of the GNU Library General Public -** License along with this library; if not, write to the Free -** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -** MA 02111-1307, USA -** -** @(#)$Id: _smat_hash.c,v 1.5 2006/07/13 19:16:23 klmitch Exp $ -*/ -/** \internal - * \file - * \brief Implementation of _smat_hash(). - * - * This file contains the implementation of the _smat_hash() function, - * the hash callback used by sparse matrices. - */ -#include "dbprim.h" -#include "dbprim_int.h" - -RCSTAG("@(#)$Id: _smat_hash.c,v 1.5 2006/07/13 19:16:23 klmitch Exp $"); - -unsigned long -_smat_hash(hash_table_t *table, db_key_t *key) -{ - int i, j; - unsigned long hash = 0; - void **objects; - unsigned char *c; - - if (!key || !dk_key(key)) /* if the key's invalid, return 0 */ - return 0; - - objects = dk_key(key); /* get the key--a pair of pointers */ - - /* walk through both elements in the array... */ - for (i = SMAT_LOC_FIRST; i <= SMAT_LOC_SECOND; i++) { - c = (unsigned char *)&objects[i]; /* get a char pointer to pointer value */ - for (j = 0; j < sizeof(void *); j++) /* step through each character */ - hash = (hash * 257) + c[j]; - } - - return hash; /* return the hash value */ -} Index: dbprim/configure.ac diff -u dbprim/configure.ac:1.9 dbprim/configure.ac:1.10 --- dbprim/configure.ac:1.9 Wed Jul 12 22:36:15 2006 +++ dbprim/configure.ac Thu Jul 13 13:27:36 2006 @@ -17,11 +17,11 @@ dnl Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, dnl MA 02111-1307, USA dnl -dnl @(#)$Id: configure.ac,v 1.9 2006/07/13 05:36:15 klmitch Exp $ +dnl @(#)$Id: configure.ac,v 1.10 2006/07/13 20:27:36 klmitch Exp $ dnl dnl Process this file with autoconf to produce a configure script. -AC_INIT([Database Primitives Library], 1.0.0, [kl...@mi...], [dbprim]) +AC_INIT([Database Primitives Library], 1.1.0, [kl...@mi...], [dbprim]) AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (C) 2002, 2006 by Kevin L. Mitchell <kl...@mi...> @@ -41,7 +41,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA]) -AC_REVISION($Revision: 1.9 $) +AC_REVISION($Revision: 1.10 $) AC_CONFIG_SRCDIR([dbprim_int.h]) AC_CONFIG_MACRO_DIR([m4]) Index: dbprim/dbprim.h diff -u dbprim/dbprim.h:1.10 dbprim/dbprim.h:1.11 --- dbprim/dbprim.h:1.10 Thu Jul 13 12:16:24 2006 +++ dbprim/dbprim.h Thu Jul 13 13:27:36 2006 @@ -1,5 +1,5 @@ /* -*- c -*- -** Copyright (C) 2002 by Kevin L. Mitchell <kl...@mi...> +** Copyright (C) 2002, 2006 by Kevin L. Mitchell <kl...@mi...> ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Library General Public @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: dbprim.h,v 1.10 2006/07/13 19:16:24 klmitch Exp $ +** @(#)$Id: dbprim.h,v 1.11 2006/07/13 20:27:36 klmitch Exp $ */ #ifndef __include_dbprim_h__ #define __include_dbprim_h__ @@ -1018,6 +1018,36 @@ */ unsigned long le_init(link_elem_t *elem, void *object); +/** \ingroup dbprim_hash + * \brief FNV-1 hash function. + * + * This is a hash function, compatible with #hash_func_t, based around + * the FNV-1 hash algorithm. See + * http://www.isthe.com/chongo/tech/comp/fnv/ for more information + * about FNV-1. + * + * \param[in] table A pointer to a #hash_table_t. + * \param[in] key The database key to hash. + * + * \return A 32-bit hash value for \p key. + */ +unsigned long hash_fnv1(hash_table_t *table, db_key_t *key); + +/** \ingroup dbprim_hash + * \brief FNV-1a hash function. + * + * This is a hash function, compatible with #hash_func_t, based around + * the FNV-1a hash algorithm. See + * http://www.isthe.com/chongo/tech/comp/fnv/ for more information + * about FNV-1a. + * + * \param[in] table A pointer to a #hash_table_t. + * \param[in] key The database key to hash. + * + * \return A 32-bit hash value for \p key. + */ +unsigned long hash_fnv1a(hash_table_t *table, db_key_t *key); + /** \internal * \ingroup dbprim_hash * \brief Hash table structure. @@ -1581,6 +1611,8 @@ * * This function frees all smat_entry_t objects on the internal free * list. It is always successful and returns 0. + * + * \return This function always returns 0. */ unsigned long smat_cleanup(void); @@ -1747,22 +1779,6 @@ /** \internal * \ingroup dbprim_smat - * \brief Sparse matrix hash function. - * - * This function is a hash table-compatible hash function for use by - * sparse matrices. - * - * \param[in] table The hash table for which the hash is - * being generated. - * \param[in] key The database key being hashed. - * - * \return A <CODE>unsigned long</CODE> representing the hash - * value of \p key. - */ -unsigned long _smat_hash(hash_table_t *table, db_key_t *key); - -/** \internal - * \ingroup dbprim_smat * \brief Sparse matrix comparison function. * * This function is a hash table-compatible comparison function for Index: dbprim/dbprim_int.h diff -u dbprim/dbprim_int.h:1.5 dbprim/dbprim_int.h:1.6 --- dbprim/dbprim_int.h:1.5 Thu Jul 13 12:16:24 2006 +++ dbprim/dbprim_int.h Thu Jul 13 13:27:36 2006 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 by Kevin L. Mitchell <kl...@mi...> +** Copyright (C) 2002, 2006 by Kevin L. Mitchell <kl...@mi...> ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Library General Public @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: dbprim_int.h,v 1.5 2006/07/13 19:16:24 klmitch Exp $ +** @(#)$Id: dbprim_int.h,v 1.6 2006/07/13 20:27:36 klmitch Exp $ */ /** \internal * \file @@ -107,6 +107,26 @@ #define _hash_fuzz(mod) (((mod) * 4) / 3) /** \internal + * \ingroup dbprim_hash + * \brief FNV offset basis parameter. + * + * This is the 32-bit offset basis for the FNV hash algorithm. See + * http://www.isthe.com/chongo/tech/comp/fnv/ for more information + * about the FNV hash algorithm. + */ +#define HASH_FNV_OFFSET 2166136261UL + +/** \internal + * \ingroup dbprim_hash + * \brief FNV prime parameter. + * + * This is the 32-bit multiplication prime for the FNV hash algorithm. + * See http://www.isthe.com/chongo/tech/comp/fnv/ for more information + * about the FNV hash algorithm. + */ +#define HASH_FNV_PRIME 16777619UL + +/** \internal * \ingroup dbprim_smat * \brief Remove an entry from a sparse matrix (internal). * Index: dbprim/doc/Doxyfile.in diff -u dbprim/doc/Doxyfile.in:1.3 dbprim/doc/Doxyfile.in:1.4 --- dbprim/doc/Doxyfile.in:1.3 Thu Jul 13 12:16:24 2006 +++ dbprim/doc/Doxyfile.in Thu Jul 13 13:27:36 2006 @@ -857,7 +857,7 @@ # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages -GENERATE_MAN = YES +GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be Index: dbprim/doc/man/man3/DB_FLAG_REVERSE.3 diff -u dbprim/doc/man/man3/DB_FLAG_REVERSE.3:1.1 dbprim/doc/man/man3/DB_FLAG_REVERSE.3:removed --- dbprim/doc/man/man3/DB_FLAG_REVERSE.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/DB_FLAG_REVERSE.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim.3 Index: dbprim/doc/man/man3/DB_KEY_INIT.3 diff -u dbprim/doc/man/man3/DB_KEY_INIT.3:1.1 dbprim/doc/man/man3/DB_KEY_INIT.3:removed --- dbprim/doc/man/man3/DB_KEY_INIT.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/DB_KEY_INIT.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim.3 Index: dbprim/doc/man/man3/HASH_ENTRY_INIT.3 diff -u dbprim/doc/man/man3/HASH_ENTRY_INIT.3:1.1 dbprim/doc/man/man3/HASH_ENTRY_INIT.3:removed --- dbprim/doc/man/man3/HASH_ENTRY_INIT.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/HASH_ENTRY_INIT.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim_hash.3 Index: dbprim/doc/man/man3/HASH_FLAG_AUTOGROW.3 diff -u dbprim/doc/man/man3/HASH_FLAG_AUTOGROW.3:1.1 dbprim/doc/man/man3/HASH_FLAG_AUTOGROW.3:removed --- dbprim/doc/man/man3/HASH_FLAG_AUTOGROW.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/HASH_FLAG_AUTOGROW.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim_hash.3 Index: dbprim/doc/man/man3/HASH_FLAG_AUTOSHRINK.3 diff -u dbprim/doc/man/man3/HASH_FLAG_AUTOSHRINK.3:1.1 dbprim/doc/man/man3/HASH_FLAG_AUTOSHRINK.3:removed --- dbprim/doc/man/man3/HASH_FLAG_AUTOSHRINK.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/HASH_FLAG_AUTOSHRINK.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim_hash.3 Index: dbprim/doc/man/man3/HASH_TABLE_INIT.3 diff -u dbprim/doc/man/man3/HASH_TABLE_INIT.3:1.1 dbprim/doc/man/man3/HASH_TABLE_INIT.3:removed --- dbprim/doc/man/man3/HASH_TABLE_INIT.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/HASH_TABLE_INIT.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim_hash.3 Index: dbprim/doc/man/man3/LINK_ELEM_INIT.3 diff -u dbprim/doc/man/man3/LINK_ELEM_INIT.3:1.1 dbprim/doc/man/man3/LINK_ELEM_INIT.3:removed --- dbprim/doc/man/man3/LINK_ELEM_INIT.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/LINK_ELEM_INIT.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim_link.3 Index: dbprim/doc/man/man3/LINK_HEAD_INIT.3 diff -u dbprim/doc/man/man3/LINK_HEAD_INIT.3:1.1 dbprim/doc/man/man3/LINK_HEAD_INIT.3:removed --- dbprim/doc/man/man3/LINK_HEAD_INIT.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/LINK_HEAD_INIT.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim_link.3 Index: dbprim/doc/man/man3/LINK_LOC_AFTER.3 diff -u dbprim/doc/man/man3/LINK_LOC_AFTER.3:1.1 dbprim/doc/man/man3/LINK_LOC_AFTER.3:removed --- dbprim/doc/man/man3/LINK_LOC_AFTER.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/LINK_LOC_AFTER.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim_link.3 Index: dbprim/doc/man/man3/LINK_LOC_BEFORE.3 diff -u dbprim/doc/man/man3/LINK_LOC_BEFORE.3:1.1 dbprim/doc/man/man3/LINK_LOC_BEFORE.3:removed --- dbprim/doc/man/man3/LINK_LOC_BEFORE.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/LINK_LOC_BEFORE.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim_link.3 Index: dbprim/doc/man/man3/LINK_LOC_HEAD.3 diff -u dbprim/doc/man/man3/LINK_LOC_HEAD.3:1.1 dbprim/doc/man/man3/LINK_LOC_HEAD.3:removed --- dbprim/doc/man/man3/LINK_LOC_HEAD.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/LINK_LOC_HEAD.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim_link.3 Index: dbprim/doc/man/man3/LINK_LOC_TAIL.3 diff -u dbprim/doc/man/man3/LINK_LOC_TAIL.3:1.1 dbprim/doc/man/man3/LINK_LOC_TAIL.3:removed --- dbprim/doc/man/man3/LINK_LOC_TAIL.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/LINK_LOC_TAIL.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim_link.3 Index: dbprim/doc/man/man3/RBT_ORDER_IN.3 diff -u dbprim/doc/man/man3/RBT_ORDER_IN.3:1.1 dbprim/doc/man/man3/RBT_ORDER_IN.3:removed --- dbprim/doc/man/man3/RBT_ORDER_IN.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/RBT_ORDER_IN.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim_rbtree.3 Index: dbprim/doc/man/man3/RBT_ORDER_POST.3 diff -u dbprim/doc/man/man3/RBT_ORDER_POST.3:1.1 dbprim/doc/man/man3/RBT_ORDER_POST.3:removed --- dbprim/doc/man/man3/RBT_ORDER_POST.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/RBT_ORDER_POST.3 Thu Jul 13 13:27:54 2006 @@ -1 +0,0 @@ -.so man3/dbprim_rbtree.3 Index: dbprim/doc/man/man3/RBT_ORDER_PRE.3 diff -u dbprim/doc/man/man3/RBT_ORDER_PRE.3:1.1 dbprim/doc/man/man3/RBT_ORDER_PRE.3:removed --- dbprim/doc/man/man3/RBT_ORDER_PRE.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/RBT_ORDER_PRE.3 Thu Jul 13 13:27:55 2006 @@ -1 +0,0 @@ -.so man3/dbprim_rbtree.3 Index: dbprim/doc/man/man3/RB_COLOR_BLACK.3 diff -u dbprim/doc/man/man3/RB_COLOR_BLACK.3:1.1 dbprim/doc/man/man3/RB_COLOR_BLACK.3:removed --- dbprim/doc/man/man3/RB_COLOR_BLACK.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/RB_COLOR_BLACK.3 Thu Jul 13 13:27:55 2006 @@ -1 +0,0 @@ -.so man3/dbprim_rbtree.3 Index: dbprim/doc/man/man3/RB_COLOR_NONE.3 diff -u dbprim/doc/man/man3/RB_COLOR_NONE.3:1.1 dbprim/doc/man/man3/RB_COLOR_NONE.3:removed --- dbprim/doc/man/man3/RB_COLOR_NONE.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/RB_COLOR_NONE.3 Thu Jul 13 13:27:55 2006 @@ -1 +0,0 @@ -.so man3/dbprim_rbtree.3 Index: dbprim/doc/man/man3/RB_COLOR_RED.3 diff -u dbprim/doc/man/man3/RB_COLOR_RED.3:1.1 dbprim/doc/man/man3/RB_COLOR_RED.3:removed --- dbprim/doc/man/man3/RB_COLOR_RED.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/RB_COLOR_RED.3 Thu Jul 13 13:27:55 2006 @@ -1 +0,0 @@ -.so man3/dbprim_rbtree.3 Index: dbprim/doc/man/man3/RB_NODE_INIT.3 diff -u dbprim/doc/man/man3/RB_NODE_INIT.3:1.1 dbprim/doc/man/man3/RB_NODE_INIT.3:removed --- dbprim/doc/man/man3/RB_NODE_INIT.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/RB_NODE_INIT.3 Thu Jul 13 13:27:55 2006 @@ -1 +0,0 @@ -.so man3/dbprim_rbtree.3 Index: dbprim/doc/man/man3/RB_TREE_INIT.3 diff -u dbprim/doc/man/man3/RB_TREE_INIT.3:1.1 dbprim/doc/man/man3/RB_TREE_INIT.3:removed --- dbprim/doc/man/man3/RB_TREE_INIT.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/RB_TREE_INIT.3 Thu Jul 13 13:27:55 2006 @@ -1 +0,0 @@ -.so man3/dbprim_rbtree.3 Index: dbprim/doc/man/man3/SMAT_HEAD_INIT.3 diff -u dbprim/doc/man/man3/SMAT_HEAD_INIT.3:1.1 dbprim/doc/man/man3/SMAT_HEAD_INIT.3:removed --- dbprim/doc/man/man3/SMAT_HEAD_INIT.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/SMAT_HEAD_INIT.3 Thu Jul 13 13:27:55 2006 @@ -1 +0,0 @@ -.so man3/dbprim_smat.3 Index: dbprim/doc/man/man3/SMAT_LOC_FIRST.3 diff -u dbprim/doc/man/man3/SMAT_LOC_FIRST.3:1.1 dbprim/doc/man/man3/SMAT_LOC_FIRST.3:removed --- dbprim/doc/man/man3/SMAT_LOC_FIRST.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/SMAT_LOC_FIRST.3 Thu Jul 13 13:27:55 2006 @@ -1 +0,0 @@ -.so man3/dbprim_smat.3 Index: dbprim/doc/man/man3/SMAT_LOC_SECOND.3 diff -u dbprim/doc/man/man3/SMAT_LOC_SECOND.3:1.1 dbprim/doc/man/man3/SMAT_LOC_SECOND.3:removed --- dbprim/doc/man/man3/SMAT_LOC_SECOND.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/SMAT_LOC_SECOND.3 Thu Jul 13 13:27:55 2006 @@ -1 +0,0 @@ -.so man3/dbprim_smat.3 Index: dbprim/doc/man/man3/_link_loc_e.3 diff -u dbprim/doc/man/man3/_link_loc_e.3:1.1 dbprim/doc/man/man3/_link_loc_e.3:removed --- dbprim/doc/man/man3/_link_loc_e.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/_link_loc_e.3 Thu Jul 13 13:27:55 2006 @@ -1 +0,0 @@ -.so man3/dbprim_link.3 Index: dbprim/doc/man/man3/_rb_color_e.3 diff -u dbprim/doc/man/man3/_rb_color_e.3:1.1 dbprim/doc/man/man3/_rb_color_e.3:removed --- dbprim/doc/man/man3/_rb_color_e.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/_rb_color_e.3 Thu Jul 13 13:27:55 2006 @@ -1 +0,0 @@ -.so man3/dbprim_rbtree.3 Index: dbprim/doc/man/man3/_smat_loc_e.3 diff -u dbprim/doc/man/man3/_smat_loc_e.3:1.1 dbprim/doc/man/man3/_smat_loc_e.3:removed --- dbprim/doc/man/man3/_smat_loc_e.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/_smat_loc_e.3 Thu Jul 13 13:27:55 2006 @@ -1 +0,0 @@ -.so man3/dbprim_smat.3 Index: dbprim/doc/man/man3/db_key_t.3 diff -u dbprim/doc/man/man3/db_key_t.3:1.1 dbprim/doc/man/man3/db_key_t.3:removed --- dbprim/doc/man/man3/db_key_t.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/db_key_t.3 Thu Jul 13 13:27:55 2006 @@ -1 +0,0 @@ -.so man3/dbprim.3 Index: dbprim/doc/man/man3/dbprim.3 diff -u dbprim/doc/man/man3/dbprim.3:1.6 dbprim/doc/man/man3/dbprim.3:removed --- dbprim/doc/man/man3/dbprim.3:1.6 Wed Oct 20 08:03:12 2004 +++ dbprim/doc/man/man3/dbprim.3 Thu Jul 13 13:27:55 2006 @@ -1,90 +0,0 @@ -.TH "Database Primitives" 3 "20 Oct 2004" "Database Primitives Library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Database Primitives \- -.SH "Detailed Description" -.PP -This module describes interfaces common to all database modules--mainly the macros concerned with manipulating database keys and the definition of the key structure. -.PP -The key may be any arbitrary pointer, including a pointer to a string. Everything that handles a key either copies the contents of the \fBdb_key_t\fP structure or passes it to a user-defined function. If required, as in the case of a string, a length may also be represented in the key structure. -.SS "Defines" - -.in +1c -.ti -1c -.RI "#define \fBDB_KEY_INIT\fP(key, size)" -.br -.RI "\fIDatabase key static initializer. \fP" -.ti -1c -.RI "#define \fBdk_key\fP(key)" -.br -.RI "\fIDatabase key accessor macro. \fP" -.ti -1c -.RI "#define \fBdk_len\fP(key)" -.br -.RI "\fIDatabase key length accessor macro. \fP" -.ti -1c -.RI "#define \fBDB_FLAG_REVERSE\fP" -.br -.RI "\fIReverse flag. \fP" -.in -1c -.SS "Typedefs" - -.in +1c -.ti -1c -.RI "typedef _db_key_s \fBdb_key_t\fP" -.br -.RI "\fIDatabase key. \fP" -.in -1c -.SH "Define Documentation" -.PP -.SS "#define DB_FLAG_REVERSE" -.PP -This flag can be passed to ordered iterations to reverse the order of the iterations. -.SS "#define DB_KEY_INIT(key, size)" -.PP -This macro allows a \fBdb_key_t\fP to be initialized statically. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP A pointer to the key. -.br -\fIsize\fP Size of the key. -.RE -.PP - -.SS "#define dk_key(key)" -.PP -This macro allows access to the key field of a \fBdb_key_t\fP. It may be used as an lvalue in order to assign a key to a \fBdb_key_t\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP A pointer to a \fBdb_key_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -A pointer to a key (\fCvoid *\fP). -.RE -.PP - -.SS "#define dk_len(key)" -.PP -This macro allows access to the key length field of a \fBdb_key_t\fP. It may be used as an lvalue in order to assign a length to a \fBdb_key_t\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP A pointer to a \fBdb_key_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An \fCint\fP describing the length of the key. -.RE -.PP - -.SH "Typedef Documentation" -.PP -.SS "typedef struct _db_key_s \fBdb_key_t\fP" -.PP -This structure is a generic key containing a void * pointer and a length parameter. It should be accessed with \fBdk_key()\fP and \fBdk_len()\fP. Index: dbprim/doc/man/man3/dbprim_hash.3 diff -u dbprim/doc/man/man3/dbprim_hash.3:1.6 dbprim/doc/man/man3/dbprim_hash.3:removed --- dbprim/doc/man/man3/dbprim_hash.3:1.6 Wed Oct 20 08:03:15 2004 +++ dbprim/doc/man/man3/dbprim_hash.3 Thu Jul 13 13:27:55 2006 @@ -1,746 +0,0 @@ -.TH "Hash tables" 3 "20 Oct 2004" "Database Primitives Library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Hash tables \- -.SH "Detailed Description" -.PP -Hash tables are a basic data structure used in building databases. Hash tables provide a means of storing data such that an arbitrary entry may be looked up efficiently. This library implements a hash table that may optionally grow and shrink to provide maximum efficiency. The implementation is with two kinds of caller-allocated structures--a \fBhash_table_t\fP structure that describes the table and a \fBhash_entry_t\fP structure for each entry in the table. The library allocates a bucket array which must be released with the \fBht_free()\fP function when the hash table has been emptied. Additionally, the hash table may be manually resized with the \fBht_resize()\fP function. -.PP -Entries may be added to and removed from the table using the \fBht_add()\fP and \fBht_remove()\fP functions. Additionally, the key on a given entry may be changed using the \fBht_move()\fP function. Of course, any given entry may be looked up using the \fBht_find()\fP function, and \fBht_iter()\fP will execute a user-defined function for each entry in the hash table (in an unspecified order). The \fBht_flush()\fP function will remove all entries from the hash table, optionally executing a user-specified clean-up function. -.SS "Defines" - -.in +1c -.ti -1c -.RI "#define \fBHASH_FLAG_AUTOGROW\fP" -.br -.RI "\fIFlag permitting a hash table to automatically grow. \fP" -.ti -1c -.RI "#define \fBHASH_FLAG_AUTOSHRINK\fP" -.br -.RI "\fIFlag permitting a hash table to automatically shrink. \fP" -.ti -1c -.RI "#define \fBHASH_TABLE_INIT\fP(flags, func, comp, resize, extra)" -.br -.RI "\fIHash table static initializer. \fP" -.ti -1c -.RI "#define \fBht_verify\fP(table)" -.br -.RI "\fIHash table verification macro. \fP" -.ti -1c -.RI "#define \fBht_flags\fP(table)" -.br -.RI "\fIHash table flags. \fP" -.ti -1c -.RI "#define \fBht_frozen\fP(table)" -.br -.RI "\fIDetermine if a hash table is frozen. \fP" -.ti -1c -.RI "#define \fBht_modulus\fP(table)" -.br -.RI "\fIHash table modulus. \fP" -.ti -1c -.RI "#define \fBht_count\fP(table)" -.br -.RI "\fIHash table count. \fP" -.ti -1c -.RI "#define \fBht_func\fP(table)" -.br -.RI "\fIHash table hash function. \fP" -.ti -1c -.RI "#define \fBht_comp\fP(table)" -.br -.RI "\fIHash table comparison function. \fP" -.ti -1c -.RI "#define \fBht_rsize\fP(table)" -.br -.RI "\fIHash table resize callback function. \fP" -.ti -1c -.RI "#define \fBht_extra\fP(table)" -.br -.RI "\fIExtra pointer data in a hash table. \fP" -.ti -1c -.RI "#define \fBht_size\fP(table)" -.br -.RI "\fIHash table memory size. \fP" -.ti -1c -.RI "#define \fBHASH_ENTRY_INIT\fP(value)" -.br -.RI "\fIHash table entry static initializer. \fP" -.ti -1c -.RI "#define \fBhe_verify\fP(entry)" -.br -.RI "\fIHash table entry verification macro. \fP" -.ti -1c -.RI "#define \fBhe_link\fP(entry)" -.br -.RI "\fIHash table entry linked list element. \fP" -.ti -1c -.RI "#define \fBhe_flags\fP(entry)" -.br -.RI "\fIHash table entry flags. \fP" -.ti -1c -.RI "#define \fBhe_table\fP(entry)" -.br -.RI "\fIHash table entry table pointer. \fP" -.ti -1c -.RI "#define \fBhe_hash\fP(entry)" -.br -.RI "\fIHash table entry hash value. \fP" -.ti -1c -.RI "#define \fBhe_key\fP(entry)" -.br -.RI "\fIHash table entry key pointer. \fP" -.ti -1c -.RI "#define \fBhe_value\fP(entry)" -.br -.RI "\fIHash table entry value pointer. \fP" -.ti -1c -.RI "#define \fBst_rsize\fP(table)" -.br -.RI "\fISparse matrix table resize callback function. \fP" -.in -1c -.SS "Typedefs" - -.in +1c -.ti -1c -.RI "typedef _hash_table_s \fBhash_table_t\fP" -.br -.RI "\fIHash table. \fP" -.ti -1c -.RI "typedef _hash_entry_s \fBhash_entry_t\fP" -.br -.RI "\fIHash table entry. \fP" -.ti -1c -.RI "typedef unsigned long(* \fBhash_iter_t\fP )(\fBhash_table_t\fP *, \fBhash_entry_t\fP *, void *)" -.br -.RI "\fIHash table iteration callback. \fP" -.ti -1c -.RI "typedef unsigned long(* \fBhash_func_t\fP )(\fBhash_table_t\fP *, \fBdb_key_t\fP *)" -.br -.RI "\fIHash function callback. \fP" -.ti -1c -.RI "typedef unsigned long(* \fBhash_comp_t\fP )(\fBhash_table_t\fP *, \fBdb_key_t\fP *, \fBdb_key_t\fP *)" -.br -.RI "\fIHash table comparison callback. \fP" -.ti -1c -.RI "typedef unsigned long(* \fBhash_resize_t\fP )(\fBhash_table_t\fP *, unsigned long)" -.br -.RI "\fIHash table resize callback. \fP" -.in -1c -.SS "Functions" - -.in +1c -.ti -1c -.RI "unsigned long \fBht_init\fP (\fBhash_table_t\fP *table, unsigned long flags, \fBhash_func_t\fP func, \fBhash_comp_t\fP comp, \fBhash_resize_t\fP resize, void *extra, unsigned long init_mod)" -.br -.RI "\fIDynamically initialize a hash table. \fP" -.ti -1c -.RI "unsigned long \fBht_add\fP (\fBhash_table_t\fP *table, \fBhash_entry_t\fP *entry, \fBdb_key_t\fP *key)" -.br -.RI "\fIAdd an entry to a hash table. \fP" -.ti -1c -.RI "unsigned long \fBht_move\fP (\fBhash_table_t\fP *table, \fBhash_entry_t\fP *entry, \fBdb_key_t\fP *key)" -.br -.RI "\fIMove an entry in the hash table. \fP" -.ti -1c -.RI "unsigned long \fBht_remove\fP (\fBhash_table_t\fP *table, \fBhash_entry_t\fP *entry)" -.br -.RI "\fIRemove an element from a hash table. \fP" -.ti -1c -.RI "unsigned long \fBht_find\fP (\fBhash_table_t\fP *table, \fBhash_entry_t\fP **entry_p, \fBdb_key_t\fP *key)" -.br -.RI "\fIFind an entry in a hash table. \fP" -.ti -1c -.RI "unsigned long \fBht_iter\fP (\fBhash_table_t\fP *table, \fBhash_iter_t\fP iter_func, void *extra)" -.br -.RI "\fIIterate over each entry in a hash table. \fP" -.ti -1c -.RI "unsigned long \fBht_flush\fP (\fBhash_table_t\fP *table, \fBhash_iter_t\fP flush_func, void *extra)" -.br -.RI "\fIFlush a hash table. \fP" -.ti -1c -.RI "unsigned long \fBht_resize\fP (\fBhash_table_t\fP *table, unsigned long new_size)" -.br -.RI "\fIResize a hash table. \fP" -.ti -1c -.RI "unsigned long \fBht_free\fP (\fBhash_table_t\fP *table)" -.br -.RI "\fIFree memory used by an empty hash table. \fP" -.ti -1c -.RI "unsigned long \fBhe_init\fP (\fBhash_entry_t\fP *entry, void *value)" -.br -.RI "\fIDynamically initialize a hash table entry. \fP" -.in -1c -.SH "Define Documentation" -.PP -.SS "#define HASH_ENTRY_INIT(value)" -.PP -This macro statically initializes a \fBhash_entry_t\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIvalue\fP A pointer to \fCvoid\fP representing the object associated with the entry. -.RE -.PP - -.SS "#define HASH_FLAG_AUTOGROW" -.PP -If passed in to \fBHASH_TABLE_INIT()\fP or \fBht_init()\fP, allows the hash table to grow automatically. -.SS "#define HASH_FLAG_AUTOSHRINK" -.PP -If passed in to \fBHASH_TABLE_INIT()\fP or \fBht_init()\fP, allows the hash table to shrink automatically. -.SS "#define HASH_TABLE_INIT(flags, func, comp, resize, extra)" -.PP -This macro statically initializes a \fBhash_table_t\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIflags\fP A bit-wise OR of \fBHASH_FLAG_AUTOGROW\fP and \fBHASH_FLAG_AUTOSHRINK\fP. If neither behavior is desired, use 0. -.br -\fIfunc\fP A \fBhash_func_t\fP function pointer for a hash function. -.br -\fIcomp\fP A \fBhash_comp_t\fP function pointer for a comparison function. -.br -\fIresize\fP A \fBhash_resize_t\fP function pointer for determining whether resizing is permitted and/or for notification of the resize. -.br -\fIextra\fP Extra pointer data that should be associated with the hash table. -.RE -.PP - -.SS "#define he_flags(entry)" -.PP -This macro retrieves a set of user-defined flags associated with the entry. It may be used as an lvalue to set those flags. -.PP -\fBParameters:\fP -.RS 4 -\fIentry\fP A pointer to a \fBhash_entry_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An \fCunsigned long\fP containing the flags associated with the entry. -.RE -.PP - -.SS "#define he_hash(entry)" -.PP -This macro retrieves the hash value of the given hash entry. If the hash table has been resized, this value may not be the same as a previous value. -.PP -\fBParameters:\fP -.RS 4 -\fIentry\fP A pointer to a \fBhash_entry_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An \fCunsigned long\fP containing the hash code for the entry. -.RE -.PP - -.SS "#define he_key(entry)" -.PP -This macro retrieves the key associated with the hash table entry. -.PP -\fBParameters:\fP -.RS 4 -\fIentry\fP A pointer to a \fBhash_entry_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -A pointer to a \fBdb_key_t\fP. -.RE -.PP - -.SS "#define he_link(entry)" -.PP -This macro provides access to the linked list element buried in the hash table entry. It should *not* be used on entries currently in a hash table. The purpose of this macro is to allow an object containing a hash table entry to be placed upon a free list. -.PP -\fBParameters:\fP -.RS 4 -\fIentry\fP A pointer to a \fBhash_entry_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -A pointer to a \fBlink_elem_t\fP. -.RE -.PP - -.SS "#define he_table(entry)" -.PP -This macro retrieves a pointer to the hash table the entry is in. -.PP -\fBParameters:\fP -.RS 4 -\fIentry\fP A pointer to a \fBhash_entry_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -A pointer to a \fBhash_table_t\fP. -.RE -.PP - -.SS "#define he_value(entry)" -.PP -This macro retrieves the value associated with the hash table entry. It may be treated as an lvalue to change that value. Care should be taken when using this option. -.PP -\fBParameters:\fP -.RS 4 -\fIentry\fP A pointer to a \fBhash_entry_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -A pointer to \fCvoid\fP representing the value associated with this entry. -.RE -.PP - -.SS "#define he_verify(entry)" -.PP -This macro verifies that a given pointer actually does point to a hash table entry. -.PP -\fBWarning:\fP -.RS 4 -This macro may evaluate the \fCentry\fP argument twice. -.RE -.PP -\fBParameters:\fP -.RS 4 -\fIentry\fP A pointer to a \fBhash_entry_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Boolean true if \fCentry\fP is a valid hash table entry or false otherwise. -.RE -.PP - -.SS "#define ht_comp(table)" -.PP -This macro retrieves the comparison function pointer. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -A \fBhash_comp_t\fP. -.RE -.PP - -.SS "#define ht_count(table)" -.PP -This macro retrieves the total number of items actually in the hash table. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An \fCunsigned long\fP containing a count of the number of items in the hash table. -.RE -.PP - -.SS "#define ht_extra(table)" -.PP -This macro retrieves the extra pointer data associated with a particular hash table. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -A pointer to \fCvoid\fP. -.RE -.PP - -.SS "#define ht_flags(table)" -.PP -This macro retrieves the flags associated with the hash table. Only \fBHASH_FLAG_AUTOGROW\fP and \fBHASH_FLAG_AUTOSHRINK\fP have any meaning to the application; all other bits are reserved for use in the library. This macro may be used as an lvalue, but care must be taken to avoid modifying the library-specific bits. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An \fCunsigned long\fP containing the flags for the hash table. -.RE -.PP - -.SS "#define ht_frozen(table)" -.PP -This macro returns a non-zero value if the table is currently frozen. The hash table may be frozen if there is an iteration in progress. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -A zero value if the table is not frozen or a non-zero value if the table is frozen. -.RE -.PP - -.SS "#define ht_func(table)" -.PP -This macro retrieves the hash function pointer. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -A \fBhash_func_t\fP. -.RE -.PP - -.SS "#define ht_modulus(table)" -.PP -This macro retrieves the number of buckets allocated for the hash table. An application may wish to save this value between invocations to avoid the overhead of growing the table while filling it with data. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An \fCunsigned long\fP containing the number of buckets allocated for the hash table. -.RE -.PP - -.SS "#define ht_rsize(table)" -.PP -This macro retrieves the resize callback function pointer. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -A \fBhash_resize_t\fP. -.RE -.PP - -.SS "#define ht_size(table)" -.PP -This macro returns the physical size of the bucket array allocated by the library for this hash table. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -A \fCsize_t\fP. -.RE -.PP - -.SS "#define ht_verify(table)" -.PP -This macro verifies that a given pointer actually does point to a hash table. -.PP -\fBWarning:\fP -.RS 4 -This macro may evaluate the \fCtable\fP argument twice. -.RE -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Boolean true if \fCtable\fP is a valid hash table or false otherwise. -.RE -.PP - -.SS "#define st_rsize(table)" -.PP -This macro retrieves the resize callback function pointer. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBsmat_table_t\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -A \fBsmat_resize_t\fP. -.RE -.PP - -.SH "Typedef Documentation" -.PP -.SS "typedef unsigned long(* \fBhash_comp_t\fP)(\fBhash_table_t\fP *, \fBdb_key_t\fP *, \fBdb_key_t\fP *)" -.PP -This function pointer references a callback used to compare entries in a hash table. It should return 0 for identical entries and non-zero otherwise. No assumptions should be made about the order in which the two keys are passed to this function. -.SS "typedef struct _hash_entry_s \fBhash_entry_t\fP" -.PP -This structure represents a single entry of a hash table. -.SS "typedef unsigned long(* \fBhash_func_t\fP)(\fBhash_table_t\fP *, \fBdb_key_t\fP *)" -.PP -This function is associated with a hash table, and is responsible for generating a hash value. The full 32-bit range of an \fCunsigned long\fP should be used--do *not* reduce the hash value by the modulus of the hash table. -.SS "typedef unsigned long(* \fBhash_iter_t\fP)(\fBhash_table_t\fP *, \fBhash_entry_t\fP *, void *)" -.PP -This function pointer references a callback used by \fBht_iter()\fP and \fBht_flush()\fP. It should return 0 for success. A non-zero return value will terminate the operation and will become the return value of the \fBht_iter()\fP or \fBht_flush()\fP call. -.SS "typedef unsigned long(* \fBhash_resize_t\fP)(\fBhash_table_t\fP *, unsigned long)" -.PP -This function pointer references a callback that will be called with both the old and new hash table sizes whenever a hash table is resized. It should return non-zero only when the resize should be inhibited. -.SS "typedef struct _hash_table_s \fBhash_table_t\fP" -.PP -This structure is the basis of all hash tables maintained by this library. -.SH "Function Documentation" -.PP -.SS "unsigned long he_init (\fBhash_entry_t\fP * entry, void * value)" -.PP -This function dynamically initializes a hash table entry. -.PP -\fBParameters:\fP -.RS 4 -\fIentry\fP A pointer to a \fBhash_entry_t\fP to be initialized. -.br -\fIvalue\fP A pointer to \fCvoid\fP which will be the value of the hash table entry. -.RE -.PP -\fBReturn values:\fP -.RS 4 -\fIDB_ERR_BADARGS\fP A \fCNULL\fP pointer was passed for \fCentry\fP. -.RE -.PP - -.SS "unsigned long ht_add (\fBhash_table_t\fP * table, \fBhash_entry_t\fP * entry, \fBdb_key_t\fP * key)" -.PP -This function adds an entry to a hash table. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.br -\fIentry\fP A pointer to a \fBhash_entry_t\fP to be added to the table. -.br -\fIkey\fP A pointer to a \fBdb_key_t\fP containing the key for the entry. -.RE -.PP -\fBReturn values:\fP -.RS 4 -\fIDB_ERR_BADARGS\fP An invalid argument was given. -.br -\fIDB_ERR_BUSY\fP The entry is already in a table. -.br -\fIDB_ERR_FROZEN\fP The table is currently frozen. -.br -\fIDB_ERR_NOTABLE\fP The bucket table has not been allocated and automatic growth is not enabled. -.br -\fIDB_ERR_DUPLICATE\fP The entry is a duplicate of an existing entry. -.br -\fIDB_ERR_UNRECOVERABLE\fP An unrecoverable error occurred while resizing the table. -.RE -.PP - -.SS "unsigned long ht_find (\fBhash_table_t\fP * table, \fBhash_entry_t\fP ** entry_p, \fBdb_key_t\fP * key)" -.PP -This function looks up an entry matching the given \fCkey\fP. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.br -\fIentry_p\fP A pointer to a pointer to a \fBhash_entry_t\fP. This is a result parameter. If \fCNULL\fP is passed, the lookup will be performed and an appropriate error code returned. -.br -\fIkey\fP A pointer to a \fBdb_key_t\fP describing the item to find. -.RE -.PP -\fBReturn values:\fP -.RS 4 -\fIDB_ERR_BADARGS\fP An argument was invalid. -.br -\fIDB_ERR_NOENTRY\fP No matching entry was found. -.RE -.PP - -.SS "unsigned long ht_flush (\fBhash_table_t\fP * table, \fBhash_iter_t\fP flush_func, void * extra)" -.PP -This function flushes a hash table--that is, it removes each entry from the table. If a \fCflush_func\fP is specified, it will be called on the entry after it has been removed from the table, and may safely call \fCfree()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.br -\fIflush_func\fP A pointer to a callback function used to perform user-specified actions on an entry after removing it from the table. May be \fCNULL\fP. See the documentation for \fBhash_iter_t\fP for more information. -.br -\fIextra\fP A \fCvoid\fP pointer that will be passed to \fCflush_func\fP. -.RE -.PP -\fBReturn values:\fP -.RS 4 -\fIDB_ERR_BADARGS\fP An argument was invalid. -.br -\fIDB_ERR_FROZEN\fP The hash table is frozen. -.RE -.PP - -.SS "unsigned long ht_free (\fBhash_table_t\fP * table)" -.PP -This function releases the memory used by the bucket table in an empty hash table. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.RE -.PP -\fBReturn values:\fP -.RS 4 -\fIDB_ERR_BADARGS\fP An invalid argument was given. -.br -\fIDB_ERR_FROZEN\fP The table is frozen. -.br -\fIDB_ERR_NOTEMPTY\fP The table is not empty. -.RE -.PP - -.SS "unsigned long ht_init (\fBhash_table_t\fP * table, unsigned long flags, \fBhash_func_t\fP func, \fBhash_comp_t\fP comp, \fBhash_resize_t\fP resize, void * extra, unsigned long init_mod)" -.PP -This function dynamically initializes a hash table. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP to be initialized. -.br -\fIflags\fP A bit-wise OR of \fBHASH_FLAG_AUTOGROW\fP and \fBHASH_FLAG_AUTOSHRINK\fP. If neither behavior is desired, use 0. -.br -\fIfunc\fP A \fBhash_func_t\fP function pointer for a hash function. -.br -\fIcomp\fP A \fBhash_comp_t\fP function pointer for a comparison function. -.br -\fIresize\fP A \fBhash_resize_t\fP function pointer for determining whether resizing is permitted and/or for notification of the resize. -.br -\fIextra\fP Extra pointer data that should be associated with the hash table. -.br -\fIinit_mod\fP An initial modulus for the table. This will presumably be extracted by \fBht_modulus()\fP in a previous invocation of the application. A 0 value is valid. -.RE -.PP -\fBReturn values:\fP -.RS 4 -\fIDB_ERR_BADARGS\fP An invalid argument was given. -.br -\fIENOMEM\fP Unable to allocate memory. -.RE -.PP - -.SS "unsigned long ht_iter (\fBhash_table_t\fP * table, \fBhash_iter_t\fP iter_func, void * extra)" -.PP -This function iterates over every entry in a hash table (in an unspecified order), executing the given \fCiter_func\fP on each entry. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.br -\fIiter_func\fP A pointer to a callback function used to perform user-specified actions on an entry in a hash table. \fCNULL\fP is an invalid value. See the documentation for \fBhash_iter_t\fP for more information. -.br -\fIextra\fP A \fCvoid\fP pointer that will be passed to \fCiter_func\fP. -.RE -.PP -\fBReturn values:\fP -.RS 4 -\fIDB_ERR_BADARGS\fP An argument was invalid. -.br -\fIDB_ERR_FROZEN\fP The hash table is frozen. -.RE -.PP - -.SS "unsigned long ht_move (\fBhash_table_t\fP * table, \fBhash_entry_t\fP * entry, \fBdb_key_t\fP * key)" -.PP -This function moves an existing entry in the hash table to correspond to the new key. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.br -\fIentry\fP A pointer to a \fBhash_entry_t\fP to be moved. It must already be in the hash table. -.br -\fIkey\fP A pointer to a \fBdb_key_t\fP describing the new key for the entry. -.RE -.PP -\fBReturn values:\fP -.RS 4 -\fIDB_ERR_BADARGS\fP An invalid argument was given. -.br -\fIDB_ERR_UNUSED\fP Entry is not in a hash table. -.br -\fIDB_ERR_WRONGTABLE\fP Entry is not in this hash table. -.br -\fIDB_ERR_FROZEN\fP Hash table is frozen. -.br -\fIDB_ERR_DUPLICATE\fP New key is a duplicate of an existing key. -.br -\fIDB_ERR_READDFAILED\fP Unable to re-add entry to table. -.RE -.PP - -.SS "unsigned long ht_remove (\fBhash_table_t\fP * table, \fBhash_entry_t\fP * entry)" -.PP -This function removes the given element from the specified hash table. -.PP -\fBParameters:\fP -.RS 4 -\fItable\fP A pointer to a \fBhash_table_t\fP. -.br -\fIentry\fP A pointer to a \fBhash_entry_t\fP to be removed from the table. -.RE -.PP -\fBReturn values:\fP -.RS 4 -\fIDB_ERR_BADARGS\fP An invalid argument was given. -.br -\fIDB_ERR_UNUSED\fP Entry is not in a hash table. -.br -\fIDB_ERR_WRONGTABLE\fP Entry is not in this hash table. -.br -\fIDB_ERR_FROZEN\fP Hash table is frozen. -.br -\fIDB_ERR_UNRECOVERABLE\fP An unrecoverable error occurred while resizing the table. -.RE -.PP - -.SS "unsigned long ht_resize (\fBhas... [truncated message content] |
From: Kevin L. M. <kl...@us...> - 2006-07-13 19:16:37
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2006-07-13 19:16:34 UTC Modified files: ChangeLog _hash_prime.c _rb_locate.c _rb_rotate.c _smat_comp.c _smat_hash.c _smat_resize.c configure dbprim.h dbprim_int.h rn_init.c rt_add.c rt_find.c rt_flush.c rt_init.c rt_iter.c rt_move.c rt_next.c rt_remove.c sh_find.c sh_flush.c sh_init.c sh_iter.c sh_move.c smat_freelist.c st_add.c st_find.c st_flush.c st_free.c st_init.c st_iter.c st_remove.c st_resize.c doc/Doxyfile.in Log message: * rn_init.c, rt_add.c, rt_find.c, rt_flush.c, rt_init.c, rt_iter.c, rt_move.c, rt_next.c, rt_remove.c, sh_find.c, sh_flush.c, sh_init.c, sh_iter.c, sh_move.c, smat_freelist.c, st_add.c, st_find.c, st_flush.c, st_free.c, st_init.c, st_iter.c, st_remove.c, st_resize.c: pull documentation comments into dbprim.h * dbprim_int.h: document internal entities * dbprim.h: finish futzing with documentation * _hash_prime.c, _rb_locate.c, _rb_rotate.c, _smat_comp.c, _smat_hash.c, _smat_resize.c: file documentation ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.22 dbprim/ChangeLog:1.23 --- dbprim/ChangeLog:1.22 Wed Jul 12 22:36:15 2006 +++ dbprim/ChangeLog Thu Jul 13 12:16:23 2006 @@ -1,3 +1,19 @@ +2006-07-13 Kevin L. Mitchell <kl...@mi...> + + * rn_init.c, rt_add.c, rt_find.c, rt_flush.c, rt_init.c, + rt_iter.c, rt_move.c, rt_next.c, rt_remove.c, sh_find.c, + sh_flush.c, sh_init.c, sh_iter.c, sh_move.c, smat_freelist.c, + st_add.c, st_find.c, st_flush.c, st_free.c, st_init.c, st_iter.c, + st_remove.c, st_resize.c: pull documentation comments into + dbprim.h + + * dbprim_int.h: document internal entities + + * dbprim.h: finish futzing with documentation + + * _hash_prime.c, _rb_locate.c, _rb_rotate.c, _smat_comp.c, + _smat_hash.c, _smat_resize.c: file documentation + 2006-07-12 Kevin L. Mitchell <kl...@mi...> * tests/test-harness.h: update to most recent version Index: dbprim/_hash_prime.c diff -u dbprim/_hash_prime.c:1.2 dbprim/_hash_prime.c:1.3 --- dbprim/_hash_prime.c:1.2 Wed Jun 11 18:10:04 2003 +++ dbprim/_hash_prime.c Thu Jul 13 12:16:23 2006 @@ -16,17 +16,36 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: _hash_prime.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $ +** @(#)$Id: _hash_prime.c,v 1.3 2006/07/13 19:16:23 klmitch Exp $ */ +/** \internal + * \file + * \brief Implementation of _hash_prime(). + * + * This file contains the implementation of the _hash_prime() + * function, used to determine a prime number to use as a hash table + * modulus. + */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: _hash_prime.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $"); +RCSTAG("@(#)$Id: _hash_prime.c,v 1.3 2006/07/13 19:16:23 klmitch Exp $"); +/** \internal + * \ingroup dbprim_hash + * \brief Largest prime. + * + * This is the largest prime number that can be handled by the + * _hash_prime() function. + */ #define MAX_PRIME 4294967291UL -/* Table of all 16-bit primes plus two extra--used for checking computed - * primes for primality. +/** \internal + * \ingroup dbprim_hash + * \brief Table of primes. + * + * This variable contains a table of 16-bit prime numbers, used by + * _hash_prime() to test the primality of potential primes. */ static unsigned long primes[] = { 3, 5, 7, 11, 13, 17, 19, 23, 29, Index: dbprim/_rb_locate.c diff -u dbprim/_rb_locate.c:1.2 dbprim/_rb_locate.c:1.3 --- dbprim/_rb_locate.c:1.2 Thu Sep 23 12:41:31 2004 +++ dbprim/_rb_locate.c Thu Jul 13 12:16:23 2006 @@ -16,12 +16,19 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: _rb_locate.c,v 1.2 2004/09/23 19:41:31 klmitch Exp $ +** @(#)$Id: _rb_locate.c,v 1.3 2006/07/13 19:16:23 klmitch Exp $ */ +/** \internal + * \file + * \brief Implementation of _rb_locate(). + * + * This file contains the implementation of the _rb_locate() function, + * used to locate a given node in a red-black tree. + */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: _rb_locate.c,v 1.2 2004/09/23 19:41:31 klmitch Exp $"); +RCSTAG("@(#)$Id: _rb_locate.c,v 1.3 2006/07/13 19:16:23 klmitch Exp $"); /* Locate a given node, placing the given node if necessary */ rb_node_t * Index: dbprim/_rb_rotate.c diff -u dbprim/_rb_rotate.c:1.1 dbprim/_rb_rotate.c:1.2 --- dbprim/_rb_rotate.c:1.1 Sat Jun 28 11:48:21 2003 +++ dbprim/_rb_rotate.c Thu Jul 13 12:16:23 2006 @@ -16,12 +16,19 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: _rb_rotate.c,v 1.1 2003/06/28 18:48:21 klmitch Exp $ +** @(#)$Id: _rb_rotate.c,v 1.2 2006/07/13 19:16:23 klmitch Exp $ */ +/** \internal + * \file + * \brief Implementation of _rb_rotate(). + * + * This file contains the implementation of the _rb_rotate() function, + * used to perform a tree node rotation for tree balancing. + */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: _rb_rotate.c,v 1.1 2003/06/28 18:48:21 klmitch Exp $"); +RCSTAG("@(#)$Id: _rb_rotate.c,v 1.2 2006/07/13 19:16:23 klmitch Exp $"); /* Swap a child with its parent, effecting a rotation */ void Index: dbprim/_smat_comp.c diff -u dbprim/_smat_comp.c:1.3 dbprim/_smat_comp.c:1.4 --- dbprim/_smat_comp.c:1.3 Sat Nov 22 06:46:51 2003 +++ dbprim/_smat_comp.c Thu Jul 13 12:16:23 2006 @@ -16,12 +16,19 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: _smat_comp.c,v 1.3 2003/11/22 14:46:51 klmitch Exp $ +** @(#)$Id: _smat_comp.c,v 1.4 2006/07/13 19:16:23 klmitch Exp $ */ +/** \internal + * \file + * \brief Implementation of _smat_comp(). + * + * This file contains the implementation of the _smat_comp() function, + * the comparison callback used by sparse matrices. + */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: _smat_comp.c,v 1.3 2003/11/22 14:46:51 klmitch Exp $"); +RCSTAG("@(#)$Id: _smat_comp.c,v 1.4 2006/07/13 19:16:23 klmitch Exp $"); unsigned long _smat_comp(hash_table_t *table, db_key_t *key1, db_key_t *key2) Index: dbprim/_smat_hash.c diff -u dbprim/_smat_hash.c:1.4 dbprim/_smat_hash.c:1.5 --- dbprim/_smat_hash.c:1.4 Mon Sep 20 22:00:15 2004 +++ dbprim/_smat_hash.c Thu Jul 13 12:16:23 2006 @@ -16,12 +16,19 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: _smat_hash.c,v 1.4 2004/09/21 05:00:15 klmitch Exp $ +** @(#)$Id: _smat_hash.c,v 1.5 2006/07/13 19:16:23 klmitch Exp $ */ +/** \internal + * \file + * \brief Implementation of _smat_hash(). + * + * This file contains the implementation of the _smat_hash() function, + * the hash callback used by sparse matrices. + */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: _smat_hash.c,v 1.4 2004/09/21 05:00:15 klmitch Exp $"); +RCSTAG("@(#)$Id: _smat_hash.c,v 1.5 2006/07/13 19:16:23 klmitch Exp $"); unsigned long _smat_hash(hash_table_t *table, db_key_t *key) Index: dbprim/_smat_resize.c diff -u dbprim/_smat_resize.c:1.2 dbprim/_smat_resize.c:1.3 --- dbprim/_smat_resize.c:1.2 Wed Jun 11 18:10:04 2003 +++ dbprim/_smat_resize.c Thu Jul 13 12:16:23 2006 @@ -16,12 +16,19 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: _smat_resize.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $ +** @(#)$Id: _smat_resize.c,v 1.3 2006/07/13 19:16:23 klmitch Exp $ */ +/** \internal + * \file + * \brief Implementation of _smat_resize(). + * + * This file contains the implementation of the _smat_resize() + * function, the resize callback used by sparse matrices. + */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: _smat_resize.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $"); +RCSTAG("@(#)$Id: _smat_resize.c,v 1.3 2006/07/13 19:16:23 klmitch Exp $"); unsigned long _smat_resize(hash_table_t *table, unsigned long new_mod) Index: dbprim/configure diff -u dbprim/configure:1.8 dbprim/configure:1.9 --- dbprim/configure:1.8 Wed Jul 12 22:36:15 2006 +++ dbprim/configure Thu Jul 13 12:16:23 2006 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision. +# From configure.ac Revision: 1.9 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for Database Primitives Library 1.0.0. # Index: dbprim/dbprim.h diff -u dbprim/dbprim.h:1.9 dbprim/dbprim.h:1.10 --- dbprim/dbprim.h:1.9 Wed Jul 12 22:36:16 2006 +++ dbprim/dbprim.h Thu Jul 13 12:16:24 2006 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: dbprim.h,v 1.9 2006/07/13 05:36:16 klmitch Exp $ +** @(#)$Id: dbprim.h,v 1.10 2006/07/13 19:16:24 klmitch Exp $ */ #ifndef __include_dbprim_h__ #define __include_dbprim_h__ @@ -213,15 +213,15 @@ * ordering, if you wish. */ -/** \def DBPRIM_BEGIN_C_DECLS - * \internal +/** \internal + * \def DBPRIM_BEGIN_C_DECLS * \brief Begin declaration in C namespace. * * This macro is defined to <CODE>extern "C" {</CODE> when compiling * with a C++ compiler. See #DBPRIM_END_C_DECLS. */ -/** \def DBPRIM_END_C_DECLS - * \internal +/** \internal + * \def DBPRIM_END_C_DECLS * \brief End declaration in C namespace. * * This macro is defined to <CODE>}</CODE> when compiling with a C++ @@ -329,8 +329,18 @@ * ll_flush(). It should return 0 for success. A non-zero return * value will terminate the operation and will become the return value * of the ll_iter() or ll_flush() call. + * + * \param[in] head A pointer to a #link_head_t. + * \param[in] elem A pointer to the #link_elem_t being + * considered. + * \param[in] extra A \c void pointer passed to ll_iter() + * or ll_flush(). + * + * \return Zero for success, or non-zero to terminate the + * iteration. */ -typedef unsigned long (*link_iter_t)(link_head_t *, link_elem_t *, void *); +typedef unsigned long (*link_iter_t)(link_head_t *list, link_elem_t *elem, + void *extra); /** \ingroup dbprim_link * \brief Linked list comparison callback. @@ -338,8 +348,13 @@ * This function pointer references a callback used by ll_find(). It * should return 0 if the entry passed as the second argument matches * the key passed as the first argument. + * + * \param[in] key The database key being searched for. + * \param[in] obj The object to compare with the key. + * + * \return Zero if \p key matches \p obj, non-zero otherwise. */ -typedef unsigned long (*link_comp_t)(db_key_t *, void *); +typedef unsigned long (*link_comp_t)(db_key_t *key, void *obj); /** \ingroup dbprim_hash * \brief Hash table iteration callback. @@ -348,8 +363,18 @@ * ht_flush(). It should return 0 for success. A non-zero return * value will terminate the operation and will become the return value * of the ht_iter() or ht_flush() call. + * + * \param[in] table A pointer to a #hash_table_t. + * \param[in] ent A pointer to the #hash_entry_t being + * considered. + * \param[in] extra A \c void pointer passed to ht_iter() + * or ht_flush(). + * + * \return Zero for success, or non-zero to terminate the + * iteration. */ -typedef unsigned long (*hash_iter_t)(hash_table_t *, hash_entry_t *, void *); +typedef unsigned long (*hash_iter_t)(hash_table_t *table, hash_entry_t *ent, + void *extra); /** \ingroup dbprim_hash * \brief Hash function callback. @@ -358,8 +383,13 @@ * for generating a hash value. The full 32-bit range of an * <CODE>unsigned long</CODE> should be used--do *not* reduce the hash * value by the modulus of the hash table. + * + * \param[in] table A pointer to a #hash_table_t. + * \param[in] key The database key to hash. + * + * \return A 32-bit hash value for \p key. */ -typedef unsigned long (*hash_func_t)(hash_table_t *, db_key_t *); +typedef unsigned long (*hash_func_t)(hash_table_t *table, db_key_t *key); /** \ingroup dbprim_hash * \brief Hash table comparison callback. @@ -368,8 +398,15 @@ * in a hash table. It should return 0 for identical entries and * non-zero otherwise. No assumptions should be made about the order * in which the two keys are passed to this function. + * + * \param[in] table A pointer to a #hash_table_t. + * \param[in] key1 The first key being compared. + * \param[in] key2 The second key being compared. + * + * \return Zero if the keys match, non-zero otherwise. */ -typedef unsigned long (*hash_comp_t)(hash_table_t *, db_key_t *, db_key_t *); +typedef unsigned long (*hash_comp_t)(hash_table_t *table, db_key_t *key1, + db_key_t *key2); /** \ingroup dbprim_hash * \brief Hash table resize callback. @@ -378,8 +415,14 @@ * with both the old and new hash table sizes whenever a hash table is * resized. It should return non-zero only when the resize should be * inhibited. + * + * \param[in] table A pointer to a #hash_table_t. + * \param[in] new_mod The new table modulus. + * + * \return Zero to permit the table resize, non-zero otherwise. */ -typedef unsigned long (*hash_resize_t)(hash_table_t *, unsigned long); +typedef unsigned long (*hash_resize_t)(hash_table_t *table, + unsigned long new_mod); /** \ingroup dbprim_smat * \brief Sparse matrix table resize callback. @@ -388,8 +431,14 @@ * with both the old and new sparse matrix table sizes whenever a * sparse matrix's hash table table is resized. It should return * non-zero only when the resize should be inhibited. + * + * \param[in] table A pointer to a #smat_table_t. + * \param[in] new_mod The new table modulus. + * + * \return Zero to permit the table resize, non-zero otherwise. */ -typedef unsigned long (*smat_resize_t)(smat_table_t *, unsigned long); +typedef unsigned long (*smat_resize_t)(smat_table_t *table, + unsigned long new_mod); /** \ingroup dbprim_smat * \brief Sparse matrix iteration callback. @@ -398,8 +447,18 @@ * st_flush(), sh_iter(), and sh_flush(). It should return 0 for * success. A non-zero return value will terminate the operation and * will become the return value of the call. + * + * \param[in] table A pointer to a #smat_table_t. + * \param[in] ent A pointer to the #smat_entry_t being + * considered. + * \param[in] extra A \c void pointer passed to st_iter(), + * st_flush(), sh_iter(), or sh_flush(). + * + * \return Zero for success, or non-zero to terminate the + * iteration. */ -typedef unsigned long (*smat_iter_t)(smat_table_t *, smat_entry_t *, void *); +typedef unsigned long (*smat_iter_t)(smat_table_t *table, smat_entry_t *ent, + void *extra); /** \ingroup dbprim_smat * \brief Sparse matrix comparison callback. @@ -407,8 +466,14 @@ * This function pointer references a callback used by sh_find(). It * should return 0 if the sparse matrix entry represented by the * second argument matches the key passed as the first argument. + * + * \param[in] key The database key being searched for. + * \param[in] ent A pointer to the #smat_entry_t being + * considered. + * + * \return Zero if \p key matches \p ent, non-zero otherwise. */ -typedef unsigned long (*smat_comp_t)(db_key_t *, smat_entry_t *); +typedef unsigned long (*smat_comp_t)(db_key_t *key, smat_entry_t *ent); /** \ingroup dbprim_rbtree * \brief Red-black tree iteration callback. @@ -417,8 +482,18 @@ * rb_flush(). It should return 0 for success. A non-zero return * value will terminate the operation and will become the return * value of the call. + * + * \param[in] tree A pointer to a #rb_tree_t. + * \param[in] node A pointer to the #rb_node_t being + * considered. + * \param[in] extra A \c void pointer passed to rt_iter() + * or rt_flush(). + * + * \return Zero for success, or non-zero to terminate the + * iteration. */ -typedef unsigned long (*rb_iter_t)(rb_tree_t *, rb_node_t *, void *); +typedef unsigned long (*rb_iter_t)(rb_tree_t *tree, rb_node_t *node, + void *extra); /** \ingroup dbprim_rbtree * \brief Red-black tree comparison callback. @@ -427,8 +502,16 @@ * in a red-black tree. It should return 0 for identical entries, * less than 0 if the first key is less than the second, or greater * than 0 if the first key is greater than the second. + * + * \param[in] tree A pointer to a #rb_tree_t. + * \param[in] key1 The first key being compared. + * \param[in] key2 The second key being compared. + * + * \return Zero if the keys match, less than zero if the first + * key orders before the second key, or greater than zero + * if the first key orders after the second key. */ -typedef long (*rb_comp_t)(rb_tree_t *, db_key_t *, db_key_t *); +typedef long (*rb_comp_t)(rb_tree_t *tree, db_key_t *key1, db_key_t *key2); /** \ingroup dbprim_link * \brief Linked list location. @@ -507,8 +590,8 @@ * * This macro allows a #db_key_t to be initialized statically. * - * \param key A pointer to the key. - * \param size Size of the key. + * \param[in] key A pointer to the key. + * \param[in] size Size of the key. */ #define DB_KEY_INIT(key, size) { (key), (size) } @@ -518,7 +601,7 @@ * This macro allows access to the key field of a #db_key_t. It may * be used as an lvalue in order to assign a key to a #db_key_t. * - * \param key A pointer to a #db_key_t. + * \param[in] key A pointer to a #db_key_t. * * \return A pointer to a key (<CODE>void *</CODE>). */ @@ -531,7 +614,7 @@ * It may be used as an lvalue in order to assign a length to a * #db_key_t. * - * \param key A pointer to a #db_key_t. + * \param[in] key A pointer to a #db_key_t. * * \return An \c int describing the length of the key. */ @@ -572,8 +655,8 @@ * * This macro statically initializes a #link_head_t. * - * \param extra Extra pointer data that should be associated with the - * list head. + * \param[in] extra Extra pointer data that should be + * associated with the list head. */ #define LINK_HEAD_INIT(extra) { LINK_HEAD_MAGIC, 0, 0, 0, (extra) } @@ -583,12 +666,12 @@ * This macro verifies that a given pointer actually does point to a * linked list head. * - * \warning This macro evaluates the \p list argument twice. + * \warning This macro evaluates the \p list argument twice. * - * \param list A pointer to a #link_head_t. + * \param[in] list A pointer to a #link_head_t. * - * \return Boolean true if \p list is a valid linked list head or - * false otherwise. + * \return Boolean \c true if \p list is a valid linked list head + * or \c false otherwise. */ #define ll_verify(list) ((list) && \ (list)->lh_magic == LINK_HEAD_MAGIC) @@ -598,7 +681,7 @@ * * This macro retrieves the number of elements in a linked list. * - * \param list A pointer to a #link_head_t. + * \param[in] list A pointer to a #link_head_t. * * \return An <CODE>unsigned long</CODE> containing a count of * the number of elements in the linked list. @@ -610,7 +693,7 @@ * * This macro retrieves the first element in a linked list. * - * \param list A pointer to a #link_head_t. + * \param[in] list A pointer to a #link_head_t. * * \return A pointer to a #link_elem_t. */ @@ -621,7 +704,7 @@ * * This macro retrieves the last element in a linked list. * - * \param list A pointer to a #link_head_t. + * \param[in] list A pointer to a #link_head_t. * * \return A pointer to a #link_elem_t. */ @@ -633,7 +716,7 @@ * This macro retrieves the extra pointer data associated with a * particular linked list. * - * \param list A pointer to a #link_head_t. + * \param[in] list A pointer to a #link_head_t. * * \return A pointer to \c void. */ @@ -644,9 +727,11 @@ * * This function dynamically initializes a linked list head. * - * \param list A pointer to a #link_head_t to be initialized. - * \param extra A pointer to \c void containing extra pointer data - * associated with the linked list. + * \param[in] list A pointer to a #link_head_t to be + * initialized. + * \param[in] extra A pointer to \c void containing extra + * pointer data associated with the + * linked list. * * \retval DB_ERR_BADARGS A \c NULL pointer was passed for \p * list. @@ -659,14 +744,15 @@ * This function adds a given element to a specified linked list in * the specified location. * - * \param list A pointer to a #link_head_t. - * \param new A pointer to the #link_elem_t to be added to the - * linked list. - * \param loc A #link_loc_t indicating where the entry should be - * added. - * \param elem A pointer to a #link_elem_t describing another element - * in the list if \p loc is #LINK_LOC_BEFORE or - * #LINK_LOC_AFTER. + * \param[in] list A pointer to a #link_head_t. + * \param[in] new A pointer to the #link_elem_t to be + * added to the linked list. + * \param[in] loc A #link_loc_t indicating where the + * entry should be added. + * \param[in] elem A pointer to a #link_elem_t describing + * another element in the list if \p loc + * is #LINK_LOC_BEFORE or + * #LINK_LOC_AFTER. * * \retval DB_ERR_BADARGS An argument was invalid. * \retval DB_ERR_BUSY The element is already in a list. @@ -681,14 +767,15 @@ * * This function moves a specified element within the linked list. * - * \param list A pointer to a #link_head_t. - * \param new A pointer to the #link_elem_t describing the element - * to be moved. - * \param loc A #link_loc_t indicating where the entry should be - * moved to. - * \param elem A pointer to a #link_elem_t describing another element - * in the list if \p loc is #LINK_LOC_BEFORE or - * #LINK_LOC_AFTER. + * \param[in] list A pointer to a #link_head_t. + * \param[in] new A pointer to the #link_elem_t + * describing the element to be moved. + * \param[in] loc A #link_loc_t indicating where the + * entry should be moved to. + * \param[in] elem A pointer to a #link_elem_t describing + * another element in the list if \p loc + * is #LINK_LOC_BEFORE or + * #LINK_LOC_AFTER. * * \retval DB_ERR_BADARGS An argument was invalid. * \retval DB_ERR_BUSY \p new and \p elem are the same @@ -706,9 +793,9 @@ * * This function removes a specified element from a linked list. * - * \param list A pointer to a #link_head_t. - * \param elem A pointer to the #link_elem_t describing the element - * to be removed. + * \param[in] list A pointer to a #link_head_t. + * \param[in] elem A pointer to the #link_elem_t + * describing the element to be removed. * * \retval DB_ERR_BADARGS An argument was invalid. * \retval DB_ERR_UNUSED \p elem is not in a linked list. @@ -722,18 +809,21 @@ * This function iterates through a linked list looking for an element * that matches the given \p key. * - * \param list A pointer to a #link_head_t. - * \param elem_p - * A pointer to a pointer to a #link_elem_t. This is a - * result parameter. \c NULL is an invalid value. - * \param comp_func - * A pointer to a comparison function used to compare the - * key to a particular element. See the documentation - * for #link_comp_t for more information. - * \param start A pointer to a #link_elem_t describing where in the - * linked list to start. If \c NULL is passed, the - * beginning of the list will be assumed. - * \param key A key to search for. + * \param[in] list A pointer to a #link_head_t. + * \param[out] elem_p A pointer to a pointer to a + * #link_elem_t. \c NULL is an invalid + * value. + * \param[in] comp_func + * A pointer to a comparison function + * used to compare the key to a + * particular element. See the + * documentation for #link_comp_t for + * more information. + * \param[in] start A pointer to a #link_elem_t describing + * where in the linked list to start. If + * \c NULL is passed, the beginning of + * the list will be assumed. + * \param[in] key A key to search for. * * \retval DB_ERR_BADARGS An argument was invalid. * \retval DB_ERR_WRONGTABLE \p start is not in this linked list. @@ -749,19 +839,23 @@ * This function iterates over a linked list, executing the given \p * iter_func for each entry. * - * \param list A pointer to a #link_head_t. - * \param start A pointer to a #link_elem_t describing where in the - * linked list to start. If \c NULL is passed, the - * beginning of the list will be assumed. - * \param iter_func - * A pointer to a callback function used to perform - * user-specified actions on an element in a linked - * list. \c NULL is an invalid value. See the - * documentation for #link_iter_t for more information. - * \param extra A \c void pointer that will be passed to \p - * iter_func. - * \param flags If #DB_FLAG_REVERSE is given, iteration will be done - * from the end of the list backwards towards the head. + * \param[in] list A pointer to a #link_head_t. + * \param[in] start A pointer to a #link_elem_t describing + * where in the linked list to start. If + * \c NULL is passed, the beginning of + * the list will be assumed. + * \param[in] iter_func + * A pointer to a callback function used + * to perform user-specified actions on + * an element in a linked list. \c NULL + * is an invalid value. See the + * documentation for #link_iter_t for + * more information. + * \param[in] extra A \c void pointer that will be passed + * to \p iter_func. + * \param[in] flags If #DB_FLAG_REVERSE is given, + * iteration will be done from the end of + * the list backwards towards the head. * * \retval DB_ERR_BADARGS An argument was invalid. * \retval DB_ERR_WRONGTABLE \p start is not in this linked list. @@ -777,14 +871,16 @@ * called on the entry after it has been removed from the list, and * may safely call <CODE>free()</CODE>. * - * \param list A pointer to a #link_head_t. - * \param flush_func - * A pointer to a callback function used to perform - * user-specified actions on an element after removing it - * from the list. May be \c NULL. See the documentation - * for #link_iter_t for more information. - * \param extra A \c void pointer that will be passed to \p - * flush_func. + * \param[in] list A pointer to a #link_head_t. + * \param[in] flush_func + * A pointer to a callback function used + * to perform user-specified actions on + * an element after removing it from the + * list. May be \c NULL. See the + * documentation for #link_iter_t for + * more information. + * \param[in] extra A \c void pointer that will be passed + * to \p flush_func. * * \retval DB_ERR_BADARGS An argument was invalid. */ @@ -819,8 +915,8 @@ * * This macro statically initializes a #link_elem_t. * - * \param obj A pointer to \c void representing the object - * associated with the element. + * \param[in] obj A pointer to \c void representing the + * object associated with the element. */ #define LINK_ELEM_INIT(obj) { LINK_ELEM_MAGIC, 0, 0, (obj), 0, 0 } @@ -830,13 +926,12 @@ * This macro verifies that a given pointer actually does point to a * linked list element. * - * \warning This macro evaluates the \p element argument twice. + * \warning This macro evaluates the \p element argument twice. * - * \param element - * A pointer to a #link_elem_t. + * \param[in] element A pointer to a #link_elem_t. * - * \return Boolean true if \p element is a valid linked list - * element or false otherwise. + * \return Boolean \c true if \p element is a valid linked list + * element or \c false otherwise. */ #define le_verify(element) ((element) && \ (element)->le_magic == LINK_ELEM_MAGIC) @@ -847,7 +942,7 @@ * This macro retrieves a pointer to the next element in the linked * list. * - * \param elem A pointer to a #link_elem_t. + * \param[in] elem A pointer to a #link_elem_t. * * \return A pointer to a #link_elem_t representing the next * element in the linked list. @@ -860,7 +955,7 @@ * This macro retrieves a pointer to the previous element in the * linked list. * - * \param elem A pointer to a #link_elem_t. + * \param[in] elem A pointer to a #link_elem_t. * * \return A pointer to a #link_elem_t representing the previous * element in the linked list. @@ -874,7 +969,7 @@ * element. It may be used as an lvalue to change the object pointed * to. Care should be taken when using this feature. * - * \param elem A pointer to a #link_elem_t. + * \param[in] elem A pointer to a #link_elem_t. * * \return A pointer to \c void representing the object * associated with the linked list element. @@ -887,7 +982,7 @@ * This macro retrieves a pointer to the head of the linked list that * the element is in. * - * \param elem A pointer to a #link_elem_t. + * \param[in] elem A pointer to a #link_elem_t. * * \return A pointer to a #link_head_t representing the head of * the linked list the element is in. @@ -900,7 +995,7 @@ * This macro retrieves a set of user-defined flags associated with * the element. It may be used as an lvalue to set those flags. * - * \param elem A pointer to a #link_elem_t. + * \param[in] elem A pointer to a #link_elem_t. * * \return An <CODE>unsigned long</CODE> containing the flags * associated with the element. @@ -912,10 +1007,11 @@ * * This function dynamically initializes a linked list element. * - * \param elem A pointer to a #link_elem_t to be initialized. - * \param object - * A pointer to \c void used to represent the object - * associated with the element. + * \param[in] elem A pointer to a #link_elem_t to be + * initialized. + * \param[in] object A pointer to \c void used to represent + * the object associated with the + * element. * * \retval DB_ERR_BADARGS A \c NULL pointer was passed for \p * elem or \p object. @@ -988,18 +1084,19 @@ * * This macro statically initializes a #hash_table_t. * - * \param flags A bit-wise OR of #HASH_FLAG_AUTOGROW and - * #HASH_FLAG_AUTOSHRINK. If neither behavior is - * desired, use 0. - * \param func A #hash_func_t function pointer for a hash function. - * \param comp A #hash_comp_t function pointer for a comparison - * function. - * \param resize - * A #hash_resize_t function pointer for determining - * whether resizing is permitted and/or for notification - * of the resize. - * \param extra Extra pointer data that should be associated with the - * hash table. + * \param[in] flags A bit-wise OR of #HASH_FLAG_AUTOGROW + * and #HASH_FLAG_AUTOSHRINK. If neither + * behavior is desired, use 0. + * \param[in] func A #hash_func_t function pointer for a + * hash function. + * \param[in] comp A #hash_comp_t function pointer for a + * comparison function. + * \param[in] resize A #hash_resize_t function pointer for + * determining whether resizing is + * permitted and/or for notification of + * the resize. + * \param[in] extra Extra pointer data that should be + * associated with the hash table. */ #define HASH_TABLE_INIT(flags, func, comp, resize, extra) \ { HASH_TABLE_MAGIC, (flags) & HASH_FLAG_MASK, 0, 0, 0, 0, 0, \ @@ -1011,12 +1108,12 @@ * This macro verifies that a given pointer actually does point to a * hash table. * - * \warning This macro evaluates the \p table argument twice. + * \warning This macro evaluates the \p table argument twice. * - * \param table A pointer to a #hash_table_t. + * \param[in] table A pointer to a #hash_table_t. * - * \return Boolean true if \p table is a valid hash table or - * false otherwise. + * \return Boolean \c true if \p table is a valid hash table or + * \c false otherwise. */ #define ht_verify(table) ((table) && \ (table)->ht_magic == HASH_TABLE_MAGIC) @@ -1030,7 +1127,7 @@ * library. This macro may be used as an lvalue, but care must be * taken to avoid modifying the library-specific bits. * - * \param table A pointer to a #hash_table_t. + * \param[in] table A pointer to a #hash_table_t. * * \return An <CODE>unsigned long</CODE> containing the flags for * the hash table. @@ -1044,7 +1141,7 @@ * frozen. The hash table may be frozen if there is an iteration in * progress. * - * \param table A pointer to a #hash_table_t. + * \param[in] table A pointer to a #hash_table_t. * * \return A zero value if the table is not frozen or a non-zero * value if the table is frozen. @@ -1059,7 +1156,7 @@ * invocations to avoid the overhead of growing the table while * filling it with data. * - * \param table A pointer to a #hash_table_t. + * \param[in] table A pointer to a #hash_table_t. * * \return An <CODE>unsigned long</CODE> containing the number of * buckets allocated for the hash table. @@ -1072,7 +1169,7 @@ * This macro retrieves the total number of items actually in the hash * table. * - * \param table A pointer to a #hash_table_t. + * \param[in] table A pointer to a #hash_table_t. * * \return An <CODE>unsigned long</CODE> containing a count of * the number of items in the hash table. @@ -1084,7 +1181,7 @@ * * This macro retrieves the hash function pointer. * - * \param table A pointer to a #hash_table_t. + * \param[in] table A pointer to a #hash_table_t. * * \return A #hash_func_t. */ @@ -1095,7 +1192,7 @@ * * This macro retrieves the comparison function pointer. * - * \param table A pointer to a #hash_table_t. + * \param[in] table A pointer to a #hash_table_t. * * \return A #hash_comp_t. */ @@ -1106,7 +1203,7 @@ * * This macro retrieves the resize callback function pointer. * - * \param table A pointer to a #hash_table_t. + * \param[in] table A pointer to a #hash_table_t. * * \return A #hash_resize_t. */ @@ -1118,7 +1215,7 @@ * This macro retrieves the extra pointer data associated with a * particular hash table. * - * \param table A pointer to a #hash_table_t. + * \param[in] table A pointer to a #hash_table_t. * * \return A pointer to \c void. */ @@ -1130,7 +1227,7 @@ * This macro returns the physical size of the bucket array allocated * by the library for this hash table. * - * \param table A pointer to a #hash_table_t. + * \param[in] table A pointer to a #hash_table_t. * * \return A \c size_t. */ @@ -1141,23 +1238,27 @@ * * This function dynamically initializes a hash table. * - * \param table A pointer to a #hash_table_t to be initialized. - * \param flags A bit-wise OR of #HASH_FLAG_AUTOGROW and - * #HASH_FLAG_AUTOSHRINK. If neither behavior is - * desired, use 0. - * \param func A #hash_func_t function pointer for a hash function. - * \param comp A #hash_comp_t function pointer for a comparison - * function. - * \param resize - * A #hash_resize_t function pointer for determining - * whether resizing is permitted and/or for notification - * of the resize. - * \param extra Extra pointer data that should be associated with the - * hash table. - * \param init_mod - * An initial modulus for the table. This will - * presumably be extracted by ht_modulus() in a previous - * invocation of the application. A 0 value is valid. + * \param[in] table A pointer to a #hash_table_t to be + * initialized. + * \param[in] flags A bit-wise OR of #HASH_FLAG_AUTOGROW + * and #HASH_FLAG_AUTOSHRINK. If neither + * behavior is desired, use 0. + * \param[in] func A #hash_func_t function pointer for a + * hash function. + * \param[in] comp A #hash_comp_t function pointer for a + * comparison function. + * \param[in] resize A #hash_resize_t function pointer for + * determining whether resizing is + * permitted and/or for notification of + * the resize. + * \param[in] extra Extra pointer data that should be + * associated with the hash table. + * \param[in] init_mod + * An initial modulus for the table. + * This will presumably be extracted by + * ht_modulus() in a previous invocation + * of the application. A 0 value is + * valid. * * \retval DB_ERR_BADARGS An invalid argument was given. * \retval ENOMEM Unable to allocate memory. @@ -1172,11 +1273,11 @@ * * This function adds an entry to a hash table. * - * \param table A pointer to a #hash_table_t. - * \param entry A pointer to a #hash_entry_t to be added to the - * table. - * \param key A pointer to a #db_key_t containing the key for the - * entry. + * \param[in] table A pointer to a #hash_table_t. + * \param[in] entry A pointer to a #hash_entry_t to be + * added to the table. + * \param[in] key A pointer to a #db_key_t containing + * the key for the entry. * * \retval DB_ERR_BADARGS An invalid argument was given. * \retval DB_ERR_BUSY The entry is already in a table. @@ -1197,11 +1298,12 @@ * This function moves an existing entry in the hash table to * correspond to the new key. * - * \param table A pointer to a #hash_table_t. - * \param entry A pointer to a #hash_entry_t to be moved. It must - * already be in the hash table. - * \param key A pointer to a #db_key_t describing the new key for - * the entry. + * \param[in] table A pointer to a #hash_table_t. + * \param[in] entry A pointer to a #hash_entry_t to be + * moved. It must already be in the hash + * table. + * \param[in] key A pointer to a #db_key_t describing + * the new key for the entry. * * \retval DB_ERR_BADARGS An invalid argument was given. * \retval DB_ERR_UNUSED Entry is not in a hash table. @@ -1219,9 +1321,9 @@ * This function removes the given element from the specified hash * table. * - * \param table A pointer to a #hash_table_t. - * \param entry A pointer to a #hash_entry_t to be removed from the - * table. + * \param[in] table A pointer to a #hash_table_t. + * \param[in] entry A pointer to a #hash_entry_t to be + * removed from the table. * * \retval DB_ERR_BADARGS An invalid argument was given. * \retval DB_ERR_UNUSED Entry is not in a hash table. @@ -1237,13 +1339,13 @@ * * This function looks up an entry matching the given \p key. * - * \param table A pointer to a #hash_table_t. - * \param entry_p - * A pointer to a pointer to a #hash_entry_t. This is a - * result parameter. If \c NULL is passed, the lookup - * will be performed and an appropriate error code - * returned. - * \param key A pointer to a #db_key_t describing the item to find. + * \param[in] table A pointer to a #hash_table_t. + * \param[out] entry_p A pointer to a pointer to a + * #hash_entry_t. If \c NULL is passed, + * the lookup will be performed and an + * appropriate error code returned. + * \param[in] key A pointer to a #db_key_t describing + * the item to find. * * \retval DB_ERR_BADARGS An argument was invalid. * \retval DB_ERR_NOENTRY No matching entry was found. @@ -1257,14 +1359,16 @@ * This function iterates over every entry in a hash table (in an * unspecified order), executing the given \p iter_func on each entry. * - * \param table A pointer to a #hash_table_t. - * \param iter_func - * A pointer to a callback function used to perform - * user-specified actions on an entry in a hash table. \c - * NULL is an invalid value. See the documentation for - * #hash_iter_t for more information. - * \param extra A \c void pointer that will be passed to \p - * iter_func. + * \param[in] table A pointer to a #hash_table_t. + * \param[in] iter_func + * A pointer to a callback function used + * to perform user-specified actions on + * an entry in a hash table. \c NULL is + * an invalid value. See the + * documentation for #hash_iter_t for + * more information. + * \param[in] extra A \c void pointer that will be passed + * to \p iter_func. * * \retval DB_ERR_BADARGS An argument was invalid. * \retval DB_ERR_FROZEN The hash table is frozen. @@ -1279,14 +1383,16 @@ * on the entry after it has been removed from the table, and may * safely call <CODE>free()</CODE>. * - * \param table A pointer to a #hash_table_t. - * \param flush_func - * A pointer to a callback function used to perform - * user-specified actions on an entry after removing it - * from the table. May be \c NULL. See the - * documentation for #hash_iter_t for more information. - * \param extra A \c void pointer that will be passed to \p - * flush_func. + * \param[in] table A pointer to a #hash_table_t. + * \param[in] flush_func + * A pointer to a callback function used + * to perform user-specified actions on + * an entry after removing it from the + * table. May be \c NULL. See the + * documentation for #hash_iter_t for + * more information. + * \param[in] extra A \c void pointer that will be passed + * to \p flush_func. * * \retval DB_ERR_BADARGS An argument was invalid. * \retval DB_ERR_FROZEN The hash table is frozen. @@ -1301,9 +1407,9 @@ * new_size is 0, then an appropriate new size based on the current * number of items in the hash table will be selected. * - * \param table A pointer to a #hash_table_t. - * \param new_size - * A new size value for the table. + * \param[in] table A pointer to a #hash_table_t. + * \param[in] new_size + * A new size value for the table. * * \retval DB_ERR_BADARGS An argument was invalid. * \retval DB_ERR_FROZEN The table is currently frozen. @@ -1320,7 +1426,7 @@ * This function releases the memory used by the bucket table in an * empty hash table. * - * \param table A pointer to a #hash_table_t. + * \param[in] table A pointer to a #hash_table_t. * * \retval DB_ERR_BADARGS An invalid argument was given. * \retval DB_ERR_FROZEN The table is frozen. @@ -1356,8 +1462,8 @@ * * This macro statically initializes a #hash_entry_t. * - * \param value A pointer to \c void representing the object - * associated with the entry. + * \param[in] value A pointer to \c void representing the + * object associated with the entry. */ #define HASH_ENTRY_INIT(value) \ { HASH_ENTRY_MAGIC, LINK_ELEM_INIT(0), 0, 0, DB_KEY_INIT(0, 0), (value) } @@ -1368,12 +1474,12 @@ * This macro verifies that a given pointer actually does point to a * hash table entry. * - * \warning This macro evaluates the \p entry argument twice. + * \warning This macro evaluates the \p entry argument twice. * - * \param entry A pointer to a #hash_entry_t. + * \param[in] entry A pointer to a #hash_entry_t. * - * \return Boolean true if \p entry is a valid hash table entry - * or false otherwise. + * \return Boolean \c true if \p entry is a valid hash table + * entry or \c false otherwise. */ #define he_verify(entry) ((entry) && \ (entry)->he_magic == HASH_ENTRY_MAGIC) @@ -1386,7 +1492,7 @@ * a hash table. The purpose of this macro is to allow an object * containing a hash table entry to be placed upon a free list. * - * \param entry A pointer to a #hash_entry_t. + * \param[in] entry A pointer to a #hash_entry_t. * * \return A pointer to a #link_elem_t. */ @@ -1398,7 +1504,7 @@ * This macro retrieves a set of user-defined flags associated with * the entry. It may be used as an lvalue to set those flags. * - * \param entry A pointer to a #hash_entry_t. + * \param[in] entry A pointer to a #hash_entry_t. * * \return An <CODE>unsigned long</CODE> containing the flags * associated with the entry. @@ -1410,7 +1516,7 @@ * * This macro retrieves a pointer to the hash table the entry is in. * - * \param entry A pointer to a #hash_entry_t. + * \param[in] entry A pointer to a #hash_entry_t. * * \return A pointer to a #hash_table_t. */ @@ -1423,7 +1529,7 @@ * the hash table has been resized, this value may not be the same as * a previous value. * - * \param entry A pointer to a #hash_entry_t. + * \param[in] entry A pointer to a #hash_entry_t. * * \return An <CODE>unsigned long</CODE> containing the hash code * for the entry. @@ -1435,7 +1541,7 @@ * * This macro retrieves the key associated with the hash table entry. * - * \param entry A pointer to a #hash_entry_t. + * \param[in] entry A pointer to a #hash_entry_t. * * \return A pointer to a #db_key_t. */ @@ -1448,7 +1554,7 @@ * entry. It may be treated as an lvalue to change that value. Care * should be taken when using this option. * - * \param entry A pointer to a #hash_entry_t. + * \param[in] entry A pointer to a #hash_entry_t. * * \return A pointer to \c void representing the value associated * with this entry. @@ -1460,28 +1566,69 @@ * * This function dynamically initializes a hash table entry. * - * \param entry A pointer to a #hash_entry_t to be initialized. - * \param value A pointer to \c void which will be the value of the - * hash table entry. + * \param[in] entry A pointer to a #hash_entry_t to be + * initialized. + * \param[in] value A pointer to \c void which will be the + * value of the hash table entry. * * \retval DB_ERR_BADARGS A \c NULL pointer was passed for \p * entry. */ unsigned long he_init(hash_entry_t *entry, void *value); +/** \ingroup dbprim_smat + * \brief Clean up the smat free list. + * + * This function frees all smat_entry_t objects on the internal free + * list. It is always successful and returns 0. + */ unsigned long smat_cleanup(void); + +/** \ingroup dbprim_smat + * \brief Report how much memory is used by the free list. + * + * This function returns the amount of memory being used by the + * internal free list of smat_entry_t objects. + * + * \return A number indicating the size, in bytes, of the memory + * allocated for smat_entry_t objects on the free list. + */ unsigned long smat_freemem(void); -/* Macro to convert a link_elem_t into a smat_entry_t */ +/** \internal + * \ingroup dbprim_smat + * \brief Retrieve pointer to sparse matrix entry. + * + * This simple macro simply retrieves a pointer to the sparse matrix + * entry from a linked list element. It is a helper macro for the + * other macros that access sparse matrix entries. + * + * \param[in] ent A pointer to a #link_elem_t. + * + * \return A pointer to the relevant #smat_entry_t. + */ #define _smat_ent(ent) ((smat_entry_t *)le_object(ent)) +/** \internal + * \ingroup dbprim_smat + * \brief Sparse matrix table structure. + * + * This is the implementation of the #smat_table_t type. + */ struct _smat_table_s { - unsigned long st_magic; /* magic number */ - smat_resize_t st_resize; /* function pointer for resize callback */ - void *st_extra; /* extra data pointer */ - hash_table_t st_table; /* hash table */ + unsigned long st_magic; /**< Magic number. */ + smat_resize_t st_resize; /**< Function pointer for resize callback. */ + void *st_extra; /**< Extra data pointer. */ + hash_table_t st_table; /**< Hash table. */ }; +/** \internal + * \ingroup dbprim_smat + * \brief Sparse matrix table magic number. + * + * This is the magic number used for the sparse matrix table + * structure. + */ #define SMAT_TABLE_MAGIC 0x2f92a7b1 /** \ingroup dbprim_smat @@ -1490,12 +1637,12 @@ * This macro verifies that a given pointer actually does point to a * sparse matrix table. * - * \warning This macro evaluates the \p table argument twice. + * \warning This macro evaluates the \p table argument twice. * - * \param table A pointer to a #smat_table_t. + * \param[in] table A pointer to a #smat_table_t. * - * \return Boolean true if \p table is a valid sparse matrix - * table or false otherwise. + * \return Boolean \c true if \p table is a valid sparse matrix + * table or \c false otherwise. */ #define st_verify(table) ((table) && \ (table)->st_magic == SMAT_TABLE_MAGIC) @@ -1509,7 +1656,7 @@ * the library. This macro may be used as an lvalue, but care must be * taken to avoid modifying the library-specific bits. * - * \param table A pointer to a #smat_table_t. + * \param[in] table A pointer to a #smat_table_t. * * \return An <CODE>unsigned long</CODE> containing the flags for * the sparse matrix table. @@ -1523,12 +1670,12 @@ * frozen. The sparse matrix may be frozen if there is an iteration * in progress. * - * \param table A pointer to a #smat_table_t. + * \param[in] table A pointer to a #smat_table_t. * * \return A zero value if the matrix is not frozen or a non-zero * value if the matrix is frozen. */ -#define st_frozen(table) ((table)->st_table.ht_flags & HASH_FLAG_FROZEN) +#define st_frozen(table) ((table)->st_table.ht_flags & HASH_FLAG_FREEZE) /** \ingroup dbprim_smat * \brief Sparse matrix table modulus. @@ -1538,7 +1685,7 @@ * invocations to avoid the overhead of growing the table while * filling it with data. * - * \param table A pointer to a #smat_table_t. + * \param[in] table A pointer to a #smat_table_t. * * \return An <CODE>unsigned long</CODE> containing the number of * buckets allocated for the sparse matrix table. @@ -1551,7 +1698,7 @@ * This macro retrieves the total number of items actually in the * sparse matrix table. * - * \param table A pointer to a #smat_table_t. + * \param[in] table A pointer to a #smat_table_t. * * \return An <CODE>unsigned long</CODE> containing a count of * the number of items in the sparse matrix table. @@ -1563,7 +1710,7 @@ * * This macro retrieves the resize callback function pointer. * - * \param table A pointer to a #smat_table_t. + * \param[in] table A pointer to a #smat_table_t. * * \return A #smat_resize_t. */ @@ -1575,7 +1722,7 @@ * This macro retrieves the extra pointer data associated with a * particular sparse matrix table. * - * \param table A pointer to a #smat_table_t. + * \param[in] table A pointer to a #smat_table_t. * * \return A pointer to \c void. */ @@ -1591,39 +1738,288 @@ * in the table. Summing the results of sh_size() and st_size() will * over-count the amount of memory actually in use. * - * \param table A pointer to a #smat_table_t. + * \param[in] table A pointer to a #smat_table_t. * * \return A \c size_t. */ #define st_size(table) ((table)->st_table.ht_modulus * sizeof(link_head_t) + \ (table)->st_table.ht_count * sizeof(smat_entry_t)) +/** \internal + * \ingroup dbprim_smat + * \brief Sparse matrix hash function. + * + * This function is a hash table-compatible hash function for use by + * sparse matrices. + * + * \param[in] table The hash table for which the hash is + * being generated. + * \param[in] key The database key being hashed. + * + * \return A <CODE>unsigned long</CODE> representing the hash + * value of \p key. + */ unsigned long _smat_hash(hash_table_t *table, db_key_t *key); + +/** \internal + * \ingroup dbprim_smat + * \brief Sparse matrix comparison function. + * + * This function is a hash table-compatible comparison function for + * use by sparse matrices. + * + * \param[in] table The hash table for which the + * comparison is being performed. + * \param[in] key1 The first database key being + * compared. + * \param[in] key2 The second database key being + * compared. + * + * \return Zero if the database keys are identical, non-zero + * otherwise. + */ unsigned long _smat_comp(hash_table_t *table, db_key_t *key1, db_key_t *key2); + +/** \internal + * \ingroup dbprim_smat + * \brief Sparse matrix resize function. + * + * This function is a hash table-compatible resize callback for use by + * sparse matrices. + * + * \param[in] table The hash table being resized. + * \param[in] new_mod The new hash table bucket size. + * + * \return Zero if the resize operation should be performed, + * non-zero otherwise. + */ unsigned long _smat_resize(hash_table_t *table, unsigned long new_mod); +/** \ingroup dbprim_smat + * \brief Dynamically initialize a sparse matrix table. + * + * This function initializes a sparse matrix table. + * + * \param[in] table A pointer to a #smat_table_t to be + * initialized. + * \param[in] flags A bit-wise OR of #HASH_FLAG_AUTOGROW + * and #HASH_FLAG_AUTOSHRINK. If neither + * behavior is desired, use 0. + * \param[in] resize A #hash_resize_t function pointer for + * determining whether resizing is + * permitted and/or for notification of + * the resize. + * \param[in] extra Extra pointer data that should be + * associated with the sparse matrix + * table. + * \param[in] init_mod + * An initial modulus for the table. + * This will presumably be extracted by + * st_modulus() in a previous invocation + * of the application. A 0 value is + * valid. + * + * \retval DB_ERR_BADARGS An invalid argument was given. + * \retval ENOMEM Unable to allocate memory. + */ unsigned long st_init(smat_table_t *table, unsigned long flags, smat_resize_t resize, void *extra, unsigned long init_mod); + +/** \ingroup dbprim_smat + * \brief Add an entry to a sparse matrix. + * + * This function adds an entry to a sparse matrix. The entry is + * referenced in three different places, thus the complex set of + * arguments. This function will allocate a #smat_entry_t and return + * it through the \c entry_p result parameter. + * + * \param[in] table A pointer to a #smat_table_t. + * \param[out] entry_p A pointer to a pointer to a + * #smat_entry_t. If \c NULL is passed, + * the addition will be performed and an + * appropriate error code returned. + * \param[in] head1 A pointer to a #smat_head_t + * representing a #SMAT_LOC_FIRST sparse + * matrix list. + * \param[in] loc1 A #link_loc_t indicating where the + * entry should be added for \c head1. + * \param[in] ent1 A pointer to a #smat_entry_t + * describing another element in the list + * represented by \c head1 if \p loc1 is + * #LINK_LOC_BEFORE or #LINK_LOC_AFTER. + * \param[in] head2 A pointer to a #smat_head_t + * representing a #SMAT_LOC_SECOND sparse + * matrix list. + * \param[in] loc2 A #link_loc_t indicating where the + * entry should be added for \c head2. + * \param[in] ent2 A pointer to a #smat_entry_t + * describing another element in the list + * represented by \c head2 if \p loc2 is + * #LINK_LOC_BEFORE or #LINK_LOC_AFTER. + * + * \retval DB_ERR_BADARGS An argument was invalid. + * \retval DB_ERR_BUSY One of the arguments is already in the + * table. + * \retval DB_ERR_FROZEN The table is currently frozen. + * \retval DB_ERR_NOTABLE The bucket table has not been + * allocated and automatic growth is not + * enabled. + * \retval DB_ERR_WRONGTABLE One of the arguments was not in the + * proper table or list. + * \retval DB_ERR_UNUSED One of the \c ent arguments is not + * presently in a list. + * \retval DB_ERR_UNRECOVERABLE An unrecoverable error occurred while + * resizing the table. + * \retval ENOMEM No memory could be allocated for the + * #smat_entry_t structure. + */ unsigned long st_add(smat_table_t *table, smat_entry_t **entry_p, smat_head_t *head1, link_loc_t loc1, smat_entry_t *ent1, smat_head_t *head2, link_loc_t loc2, smat_entry_t *ent2); + +/** \ingroup dbprim_smat + * \brief Remove an entry from a sparse matrix. + * + * This function removes the given entry from the specified sparse + * matrix. + * + * \param[in] table A pointer to a #smat_table_t. + * \param[in] entry A pointer to a #smat_entry_t to be + * removed from the table. + * + * \retval DB_ERR_BADARGS An invalid argument was given. + * \retval DB_ERR_WRONGTABLE Entry is not in this sparse matrix. + * \retval DB_ERR_UNRECOVERABLE An unrecoverable error occurred while + * removing the entry from the table. + */ unsigned long st_remove(smat_table_t *table, smat_entry_t *entry); + +/** \ingroup dbprim_smat + * \brief Find an entry in a sparse matrix. + * + * This function looks up the entry matching the given \p head1 and \p + * head2. + * + * \param[in] table A pointer to a #smat_table_t. + * \param[out] entry_p A pointer to a pointer to a + * #smat_entry_t. If \c NULL is passed, + * the lookup will be performed and an + * appropriate error code returned. + * \param[in] head1 A pointer to a #smat_head_t + * initialized to #SMAT_LOC_FIRST. + * \param[in] head2 A pointer to a #smat_head_t + * initialized to #SMAT_LOC_SECOND. + * + * \retval DB_ERR_BADARGS An argument was invalid. + * \retval DB_ERR_WRONGTABLE One or both of \p head1 or \p head2 + * are not referenced in this table. + * \retval DB_ERR_NOENTRY No matching entry was found. + */ unsigned long st_find(smat_table_t *table, smat_entry_t **entry_p, smat_head_t *head1, smat_head_t *head2); + +/** \ingroup dbprim_smat + * \brief Iterate over each entry in a sparse matrix. + * + * This function iterates over every entry in a sparse matrix (in an + * unspecified order), executing the given \p iter_func on each entry. + * + * \param[in] table A pointer to a #smat_table_t. + * \param[in] iter_func + * A pointer to a callback function used + * to perform user-specified actions on + * an entry in a sparse matrix. \c NULL + * is an invalid value. See the + * documentation for #smat_iter_t for + * more information. + * \param[in] extra A \c void pointer that will be passed + * to \p iter_func. + * + * \retval DB_ERR_BADARGS An argument was invalid. + * \retval DB_ERR_FROZEN The sparse matrix is frozen. + */ unsigned long st_iter(smat_table_t *table, smat_iter_t iter_func, void *extra); + +/** \ingroup dbprim_smat + * \brief Flush a sparse matrix. + * + * This function flushes a sparse matrix--that is, it removes each + * entry from the matrix. If a \p flush_func is specified, it will be + * called on the entry after it has been removed from the table, and + * may safely call <CODE>free()</CODE>. + * + * \param[in] table A pointer to a #smat_table_t. + * \param[in] flush_func + * A pointer to a callback function used + * to perform user-specified actions on + * an entry after removing it from the + * table. May be \c NULL. See the + * documentation for #smat_iter_t for + * more information. + * \param[in] extra A \c void pointer that will be passed + * to \p iter_func. + * + * \retval DB_ERR_BADARGS An argument was invalid. + * \retval DB_ERR_FROZEN The sparse matrix is frozen. + */ unsigned long st_flush(smat_table_t *table, smat_iter_t flush_func, void *extra); + +/** \ingroup dbprim_smat + * \brief Resize a sparse matrix table. + * + * This function resizes the hash table associated with a sparse + * matrix based on the \p new_size parameter. See the documentation + * for ht_resize() for more information. + * + * \param[in] table A pointer to a #smat_table_t. + * \param[in] new_size + * A new size value for the table. + * + * \retval DB_ERR_BADARGS An argument was invalid. + * \retval DB_ERR_FROZEN The table is currently frozen. + * \retval DB_ERR_UNRECOVERABLE A catastrophic error was encountered. + * The table is now unusable. + * \retval ENOMEM No memory could be allocated for the + * new bucket table. + */ unsigned long st_resize(smat_table_t *table, unsigned long new_size); + +/** \ingroup dbprim_smat + * \brief Free memory used by an empty sparse matrix table. + * + * This function releases the memory used by the bucket table of the + * empty hash table associated with a sparse matrix. + * + * \param[in] table A pointer to a #smat_table_t. + * + * \retval DB_ERR_BADARGS An invalid argument was given. + * \retval DB_ERR_FROZEN The table is frozen. + * \retval DB_ERR_NOTEMPTY The table is not empty. + */ unsigned long st_free(smat_table_t *table); +/** \internal + * \ingroup dbprim_smat + * \brief Sparse matrix list head structure. + * + * This is the implementation of the #smat_head_t type. + */ struct _smat_head_s { - unsigned long sh_magic; /* magic number */ - smat_loc_t sh_elem; /* 0 or 1 to indicate first or second */ - smat_table_t *sh_table; /* table this object's in */ - link_head_t sh_head; /* linked list head */ + unsigned long sh_magic; /**< Magic number. */ + smat_loc_t sh_elem; /**< 0 or 1 to indicate first or second. */ + smat_table_t *sh_table; /**< Table this object's in. */ + link_head_t sh_head; /**< Linked list head. */ }; +/** \internal + * \ingroup dbprim_smat + * \brief Sparse matrix list head magic number. + * + * This is the magic number used for the sparse matrix list head + * structure. + */ #define SMAT_HEAD_MAGIC 0x4e5d9b8e /** \ingroup dbprim_smat @@ -1631,12 +2027,12 @@ * * This macro statically initializes a #smat_head_t. * - * \param elem One of #SMAT_LOC_FIRST or #SMAT_LOC_SECOND specifing - * whether the object is a member of the set of rows or - * columns. - * \param object - * A pointer to \c v... [truncated message content] |
From: Kevin L. M. <kl...@us...> - 2006-07-13 02:47:57
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2006-07-13 02:47:57 UTC Log message: Directory /cvsroot/dbprim/dbprim/m4 added to the repository |
From: Kevin L. M. <kl...@us...> - 2004-10-20 15:03:39
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2004-10-20 15:03:26 UTC Modified files: ChangeLog configure configure.ac doc/html/group__dbprim.html doc/html/group__dbprim__hash.html doc/html/group__dbprim__link.html doc/html/group__dbprim__rbtree.html doc/html/group__dbprim__smat.html doc/html/index.html doc/html/modules.html doc/latex/doxygen.sty doc/latex/refman.tex doc/man/man3/dbprim.3 doc/man/man3/dbprim_hash.3 doc/man/man3/dbprim_link.3 doc/man/man3/dbprim_rbtree.3 doc/man/man3/dbprim_smat.3 Log message: Bump version for initial production release; regenerate documentation. ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.20 dbprim/ChangeLog:1.21 --- dbprim/ChangeLog:1.20 Sat Sep 25 07:37:41 2004 +++ dbprim/ChangeLog Wed Oct 20 08:03:06 2004 @@ -1,3 +1,7 @@ +2004-10-20 Kevin L Mitchell <kl...@mi...> + + * configure.ac: bump version number for initial production release + 2004-09-25 Kevin L Mitchell <kl...@mi...> * acinclude.m4: update checks for com_err Index: dbprim/configure diff -u dbprim/configure:1.6 dbprim/configure:1.7 --- dbprim/configure:1.6 Sat Sep 25 07:37:41 2004 +++ dbprim/configure Wed Oct 20 08:03:06 2004 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57 for Database Primitives Library 0.9.3. +# Generated by GNU Autoconf 2.57 for Database Primitives Library 1.0.0. # # Report bugs to <kl...@mi...>. # @@ -422,8 +422,8 @@ # Identity of this package. PACKAGE_NAME='Database Primitives Library' PACKAGE_TARNAME='dbprim' -PACKAGE_VERSION='0.9.3' -PACKAGE_STRING='Database Primitives Library 0.9.3' +PACKAGE_VERSION='1.0.0' +PACKAGE_STRING='Database Primitives Library 1.0.0' PACKAGE_BUGREPORT='kl...@mi...' ac_unique_file="dbprim_int.h" @@ -953,7 +953,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Database Primitives Library 0.9.3 to adapt to many kinds of systems. +\`configure' configures Database Primitives Library 1.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1019,7 +1019,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Database Primitives Library 0.9.3:";; + short | recursive ) echo "Configuration of Database Primitives Library 1.0.0:";; esac cat <<\_ACEOF @@ -1126,7 +1126,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -Database Primitives Library configure 0.9.3 +Database Primitives Library configure 1.0.0 generated by GNU Autoconf 2.57 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 @@ -1141,7 +1141,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Database Primitives Library $as_me 0.9.3, which was +It was created by Database Primitives Library $as_me 1.0.0, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ @@ -1751,7 +1751,7 @@ # Define the identity of the package. PACKAGE='dbprim' - VERSION='0.9.3' + VERSION='1.0.0' cat >>confdefs.h <<_ACEOF @@ -19223,7 +19223,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by Database Primitives Library $as_me 0.9.3, which was +This file was extended by Database Primitives Library $as_me 1.0.0, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19281,7 +19281,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -Database Primitives Library config.status 0.9.3 +Database Primitives Library config.status 1.0.0 configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Index: dbprim/configure.ac diff -u dbprim/configure.ac:1.7 dbprim/configure.ac:1.8 --- dbprim/configure.ac:1.7 Sat Sep 25 07:17:22 2004 +++ dbprim/configure.ac Wed Oct 20 08:03:08 2004 @@ -17,11 +17,11 @@ dnl Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, dnl MA 02111-1307, USA dnl -dnl @(#)$Id: configure.ac,v 1.7 2004/09/25 14:17:22 klmitch Exp $ +dnl @(#)$Id: configure.ac,v 1.8 2004/10/20 15:03:08 klmitch Exp $ dnl dnl Process this file with autoconf to produce a configure script. -AC_INIT([Database Primitives Library], 0.9.3, [kl...@mi...], [dbprim]) +AC_INIT([Database Primitives Library], 1.0.0, [kl...@mi...], [dbprim]) AC_CONFIG_SRCDIR([dbprim_int.h]) AM_INIT_AUTOMAKE Index: dbprim/doc/html/group__dbprim.html diff -u dbprim/doc/html/group__dbprim.html:1.7 dbprim/doc/html/group__dbprim.html:1.8 --- dbprim/doc/html/group__dbprim.html:1.7 Sat Sep 25 07:17:23 2004 +++ dbprim/doc/html/group__dbprim.html Wed Oct 20 08:03:10 2004 @@ -180,7 +180,7 @@ This structure is a generic key containing a void * pointer and a length parameter. It should be accessed with <a class="el" href="group__dbprim.html#a2">dk_key()</a> and <a class="el" href="group__dbprim.html#a3">dk_len()</a>. </td> </tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 25 10:13:17 2004 for Database Primitives Library by +<hr size="1"><address style="align: right;"><small>Generated on Wed Oct 20 11:00:02 2004 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.4 </small></address> Index: dbprim/doc/html/group__dbprim__hash.html diff -u dbprim/doc/html/group__dbprim__hash.html:1.7 dbprim/doc/html/group__dbprim__hash.html:1.8 --- dbprim/doc/html/group__dbprim__hash.html:1.7 Sat Sep 25 07:17:23 2004 +++ dbprim/doc/html/group__dbprim__hash.html Wed Oct 20 08:03:10 2004 @@ -1587,7 +1587,7 @@ </td> </tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 25 10:13:17 2004 for Database Primitives Library by +<hr size="1"><address style="align: right;"><small>Generated on Wed Oct 20 11:00:03 2004 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.4 </small></address> Index: dbprim/doc/html/group__dbprim__link.html diff -u dbprim/doc/html/group__dbprim__link.html:1.7 dbprim/doc/html/group__dbprim__link.html:1.8 --- dbprim/doc/html/group__dbprim__link.html:1.7 Sat Sep 25 07:17:23 2004 +++ dbprim/doc/html/group__dbprim__link.html Wed Oct 20 08:03:10 2004 @@ -1179,7 +1179,7 @@ </td> </tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 25 10:13:17 2004 for Database Primitives Library by +<hr size="1"><address style="align: right;"><small>Generated on Wed Oct 20 11:00:02 2004 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.4 </small></address> Index: dbprim/doc/html/group__dbprim__rbtree.html diff -u dbprim/doc/html/group__dbprim__rbtree.html:1.7 dbprim/doc/html/group__dbprim__rbtree.html:1.8 --- dbprim/doc/html/group__dbprim__rbtree.html:1.7 Sat Sep 25 07:17:23 2004 +++ dbprim/doc/html/group__dbprim__rbtree.html Wed Oct 20 08:03:10 2004 @@ -1598,7 +1598,7 @@ </td> </tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 25 10:13:17 2004 for Database Primitives Library by +<hr size="1"><address style="align: right;"><small>Generated on Wed Oct 20 11:00:03 2004 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.4 </small></address> Index: dbprim/doc/html/group__dbprim__smat.html diff -u dbprim/doc/html/group__dbprim__smat.html:1.7 dbprim/doc/html/group__dbprim__smat.html:1.8 --- dbprim/doc/html/group__dbprim__smat.html:1.7 Sat Sep 25 07:17:23 2004 +++ dbprim/doc/html/group__dbprim__smat.html Wed Oct 20 08:03:10 2004 @@ -2058,7 +2058,7 @@ </td> </tr> </table> -<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 25 10:13:17 2004 for Database Primitives Library by +<hr size="1"><address style="align: right;"><small>Generated on Wed Oct 20 11:00:03 2004 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.4 </small></address> Index: dbprim/doc/html/index.html diff -u dbprim/doc/html/index.html:1.7 dbprim/doc/html/index.html:1.8 --- dbprim/doc/html/index.html:1.7 Sat Sep 25 07:17:23 2004 +++ dbprim/doc/html/index.html Wed Oct 20 08:03:11 2004 @@ -7,7 +7,7 @@ <div class="qindex"><a class="qindexHL" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a></div> <h1>Database Primitives Library </h1> <p> -<h3 align="center">Version 0.9.3 </h3>This library contains a set of database primitives. The primitives defined by this library include a powerful linked list abstraction, a hash table with optional automatic resizing, a powerful and efficient sparse matrix implementation, and a red-black tree with iterative traversals. All of the necessary declarations for using this library are found in the header file <a class="el" href="dbprim_8h.html">dbprim.h</a>. For more information about the components of this library, see the module list. <hr size="1"><address style="align: right;"><small>Generated on Sat Sep 25 10:13:17 2004 for Database Primitives Library by +<h3 align="center">Version 1.0.0 </h3>This library contains a set of database primitives. The primitives defined by this library include a powerful linked list abstraction, a hash table with optional automatic resizing, a powerful and efficient sparse matrix implementation, and a red-black tree with iterative traversals. All of the necessary declarations for using this library are found in the header file <a class="el" href="dbprim_8h.html">dbprim.h</a>. For more information about the components of this library, see the module list. <hr size="1"><address style="align: right;"><small>Generated on Wed Oct 20 11:00:02 2004 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.4 </small></address> Index: dbprim/doc/html/modules.html diff -u dbprim/doc/html/modules.html:1.7 dbprim/doc/html/modules.html:1.8 --- dbprim/doc/html/modules.html:1.7 Sat Sep 25 07:17:23 2004 +++ dbprim/doc/html/modules.html Wed Oct 20 08:03:11 2004 @@ -12,7 +12,7 @@ <li><a class="el" href="group__dbprim__smat.html">Sparse matrices</a> <li><a class="el" href="group__dbprim__rbtree.html">Red-black trees</a> </ul> -<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 25 10:13:17 2004 for Database Primitives Library by +<hr size="1"><address style="align: right;"><small>Generated on Wed Oct 20 11:00:03 2004 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.4 </small></address> Index: dbprim/doc/latex/doxygen.sty diff -u dbprim/doc/latex/doxygen.sty:1.7 dbprim/doc/latex/doxygen.sty:1.8 --- dbprim/doc/latex/doxygen.sty:1.7 Sat Sep 25 07:17:23 2004 +++ dbprim/doc/latex/doxygen.sty Wed Oct 20 08:03:11 2004 @@ -10,8 +10,8 @@ {\fancyplain{}{\bfseries\rightmark}} \rhead[\fancyplain{}{\bfseries\leftmark}] {\fancyplain{}{\bfseries\thepage}} -\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Sat Sep 25 10:13:18 2004 for Database Primitives Library by Doxygen }]{} -\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Sat Sep 25 10:13:18 2004 for Database Primitives Library by Doxygen }} +\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Wed Oct 20 11:00:03 2004 for Database Primitives Library by Doxygen }]{} +\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Wed Oct 20 11:00:03 2004 for Database Primitives Library by Doxygen }} \cfoot{} \newenvironment{CompactList} {\begin{list}{}{ Index: dbprim/doc/latex/refman.tex diff -u dbprim/doc/latex/refman.tex:1.7 dbprim/doc/latex/refman.tex:1.8 --- dbprim/doc/latex/refman.tex:1.7 Sat Sep 25 07:17:23 2004 +++ dbprim/doc/latex/refman.tex Wed Oct 20 08:03:11 2004 @@ -29,11 +29,11 @@ \begin{titlepage} \vspace*{7cm} \begin{center} -{\Large Database Primitives Library Reference Manual\\[1ex]\large Version 0.9.3 }\\ +{\Large Database Primitives Library Reference Manual\\[1ex]\large Version 1.0.0 }\\ \vspace*{1cm} {\large Generated by Doxygen 1.3.4}\\ \vspace*{0.5cm} -{\small Sat Sep 25 10:13:17 2004}\\ +{\small Wed Oct 20 11:00:02 2004}\\ \end{center} \end{titlepage} \clearemptydoublepage Index: dbprim/doc/man/man3/dbprim.3 diff -u dbprim/doc/man/man3/dbprim.3:1.5 dbprim/doc/man/man3/dbprim.3:1.6 --- dbprim/doc/man/man3/dbprim.3:1.5 Sat Sep 25 07:17:24 2004 +++ dbprim/doc/man/man3/dbprim.3 Wed Oct 20 08:03:12 2004 @@ -1,4 +1,4 @@ -.TH "Database Primitives" 3 "25 Sep 2004" "Database Primitives Library" \" -*- nroff -*- +.TH "Database Primitives" 3 "20 Oct 2004" "Database Primitives Library" \" -*- nroff -*- .ad l .nh .SH NAME Index: dbprim/doc/man/man3/dbprim_hash.3 diff -u dbprim/doc/man/man3/dbprim_hash.3:1.5 dbprim/doc/man/man3/dbprim_hash.3:1.6 --- dbprim/doc/man/man3/dbprim_hash.3:1.5 Sat Sep 25 07:17:24 2004 +++ dbprim/doc/man/man3/dbprim_hash.3 Wed Oct 20 08:03:15 2004 @@ -1,4 +1,4 @@ -.TH "Hash tables" 3 "25 Sep 2004" "Database Primitives Library" \" -*- nroff -*- +.TH "Hash tables" 3 "20 Oct 2004" "Database Primitives Library" \" -*- nroff -*- .ad l .nh .SH NAME Index: dbprim/doc/man/man3/dbprim_link.3 diff -u dbprim/doc/man/man3/dbprim_link.3:1.5 dbprim/doc/man/man3/dbprim_link.3:1.6 --- dbprim/doc/man/man3/dbprim_link.3:1.5 Sat Sep 25 07:17:24 2004 +++ dbprim/doc/man/man3/dbprim_link.3 Wed Oct 20 08:03:16 2004 @@ -1,4 +1,4 @@ -.TH "Linked lists" 3 "25 Sep 2004" "Database Primitives Library" \" -*- nroff -*- +.TH "Linked lists" 3 "20 Oct 2004" "Database Primitives Library" \" -*- nroff -*- .ad l .nh .SH NAME Index: dbprim/doc/man/man3/dbprim_rbtree.3 diff -u dbprim/doc/man/man3/dbprim_rbtree.3:1.5 dbprim/doc/man/man3/dbprim_rbtree.3:1.6 --- dbprim/doc/man/man3/dbprim_rbtree.3:1.5 Sat Sep 25 07:17:24 2004 +++ dbprim/doc/man/man3/dbprim_rbtree.3 Wed Oct 20 08:03:16 2004 @@ -1,4 +1,4 @@ -.TH "Red-black trees" 3 "25 Sep 2004" "Database Primitives Library" \" -*- nroff -*- +.TH "Red-black trees" 3 "20 Oct 2004" "Database Primitives Library" \" -*- nroff -*- .ad l .nh .SH NAME Index: dbprim/doc/man/man3/dbprim_smat.3 diff -u dbprim/doc/man/man3/dbprim_smat.3:1.5 dbprim/doc/man/man3/dbprim_smat.3:1.6 --- dbprim/doc/man/man3/dbprim_smat.3:1.5 Sat Sep 25 07:17:24 2004 +++ dbprim/doc/man/man3/dbprim_smat.3 Wed Oct 20 08:03:16 2004 @@ -1,4 +1,4 @@ -.TH "Sparse matrices" 3 "25 Sep 2004" "Database Primitives Library" \" -*- nroff -*- +.TH "Sparse matrices" 3 "20 Oct 2004" "Database Primitives Library" \" -*- nroff -*- .ad l .nh .SH NAME ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2004-09-25 14:58:48
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : webpage Commit time: 2004-09-25 14:58:34 UTC Modified files: download.php Log message: Add links for 0.9.3 download ---------------------- diff included ---------------------- Index: webpage/download.php diff -u webpage/download.php:1.2 webpage/download.php:1.3 --- webpage/download.php:1.2 Mon Sep 20 17:24:49 2004 +++ webpage/download.php Sat Sep 25 07:58:23 2004 @@ -11,7 +11,14 @@ <br> <p> -<b>Version 0.9.1 - latest</b><br> +<b>Version 0.9.3 - latest</b><br> +<ul> +<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.3.tar.gz?download">Source (.tar.gz)</a> +<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.3-1.i386.rpm?download">RPM</a> +<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-devel-0.9.3-1.i386.rpm?download">Development RPM</a> +<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.3-1.src.rpm?download">Source RPM</a> +</ul> +<b>Version 0.9.1</b><br> <ul> <li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.1.tar.gz?download">Source (.tar.gz)</a> <li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.1-1.i386.rpm?download">RPM</a> ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2004-09-25 14:37:58
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2004-09-25 14:37:51 UTC Modified files: ChangeLog acinclude.m4 aclocal.m4 configure Log message: fix com_err stuff... ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.19 dbprim/ChangeLog:1.20 --- dbprim/ChangeLog:1.19 Sat Sep 25 07:17:21 2004 +++ dbprim/ChangeLog Sat Sep 25 07:37:41 2004 @@ -1,5 +1,7 @@ 2004-09-25 Kevin L Mitchell <kl...@mi...> + * acinclude.m4: update checks for com_err + * configure.ac: bump the patch level * tests/test-harness.dat: add test descriptions for red-black Index: dbprim/acinclude.m4 diff -u dbprim/acinclude.m4:1.1 dbprim/acinclude.m4:1.2 --- dbprim/acinclude.m4:1.1 Sat Aug 23 13:46:19 2003 +++ dbprim/acinclude.m4 Sat Sep 25 07:37:41 2004 @@ -19,15 +19,20 @@ AC_DEFUN(KLM_COM_ERR_LIB, [AC_REQUIRE([KLM_WITH_COM_ERR]) -t_LIBS=${LIBS} -LIBS="${LIBS} -L${klm_cv_path_com_err}/lib" +if test "x$COM_ERR" = "xtrue"; then + t_LIBS=${LIBS} + LIBS="${LIBS} -L${klm_cv_path_com_err}/lib" -AC_CHECK_LIB(com_err, com_err, , -[AC_MSG_ERROR([Unable to find com_err libraries])]) + AC_CHECK_LIB(com_err, com_err, , + [AC_MSG_ERROR([Unable to find com_err libraries])]) -LIBS=${t_LIBS} -COM_ERR_LIBPATH="${klm_cv_path_com_err}/lib" -COM_ERR_LDADD="-L${COM_ERR_LIBPATH} -lcom_err" + LIBS=${t_LIBS} + COM_ERR_LIBPATH="${klm_cv_path_com_err}/lib" + COM_ERR_LDADD="-L${COM_ERR_LIBPATH} -lcom_err" +else + COM_ERR_LIBPATH= + COM_ERR_LDADD= +fi AC_SUBST([COM_ERR_LIBPATH]) AC_SUBST([COM_ERR_LDADD])]) Index: dbprim/aclocal.m4 diff -u dbprim/aclocal.m4:1.2 dbprim/aclocal.m4:1.3 --- dbprim/aclocal.m4:1.2 Tue Mar 2 23:50:39 2004 +++ dbprim/aclocal.m4 Sat Sep 25 07:37:41 2004 @@ -32,15 +32,20 @@ AC_DEFUN(KLM_COM_ERR_LIB, [AC_REQUIRE([KLM_WITH_COM_ERR]) -t_LIBS=${LIBS} -LIBS="${LIBS} -L${klm_cv_path_com_err}/lib" +if test "x$COM_ERR" = "xtrue"; then + t_LIBS=${LIBS} + LIBS="${LIBS} -L${klm_cv_path_com_err}/lib" -AC_CHECK_LIB(com_err, com_err, , -[AC_MSG_ERROR([Unable to find com_err libraries])]) + AC_CHECK_LIB(com_err, com_err, , + [AC_MSG_ERROR([Unable to find com_err libraries])]) -LIBS=${t_LIBS} -COM_ERR_LIBPATH="${klm_cv_path_com_err}/lib" -COM_ERR_LDADD="-L${COM_ERR_LIBPATH} -lcom_err" + LIBS=${t_LIBS} + COM_ERR_LIBPATH="${klm_cv_path_com_err}/lib" + COM_ERR_LDADD="-L${COM_ERR_LIBPATH} -lcom_err" +else + COM_ERR_LIBPATH= + COM_ERR_LDADD= +fi AC_SUBST([COM_ERR_LIBPATH]) AC_SUBST([COM_ERR_LDADD])]) Index: dbprim/configure diff -u dbprim/configure:1.5 dbprim/configure:1.6 --- dbprim/configure:1.5 Sat Sep 25 07:17:21 2004 +++ dbprim/configure Sat Sep 25 07:37:41 2004 @@ -18487,8 +18487,9 @@ -t_LIBS=${LIBS} -LIBS="${LIBS} -L${klm_cv_path_com_err}/lib" +if test "x$COM_ERR" = "xtrue"; then + t_LIBS=${LIBS} + LIBS="${LIBS} -L${klm_cv_path_com_err}/lib" echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5 @@ -18559,9 +18560,13 @@ fi -LIBS=${t_LIBS} -COM_ERR_LIBPATH="${klm_cv_path_com_err}/lib" -COM_ERR_LDADD="-L${COM_ERR_LIBPATH} -lcom_err" + LIBS=${t_LIBS} + COM_ERR_LIBPATH="${klm_cv_path_com_err}/lib" + COM_ERR_LDADD="-L${COM_ERR_LIBPATH} -lcom_err" +else + COM_ERR_LIBPATH= + COM_ERR_LDADD= +fi ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2004-09-25 14:36:14
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2004-09-25 14:36:07 UTC Modified files: tests/test-harness.h Log message: Try to get -ko flags on this file.. ---------------------- diff included ---------------------- Index: dbprim/tests/test-harness.h diff -u dbprim/tests/test-harness.h:1.2 dbprim/tests/test-harness.h:1.3 --- dbprim/tests/test-harness.h:1.2 Mon Sep 20 22:00:16 2004 +++ dbprim/tests/test-harness.h Sat Sep 25 07:35:56 2004 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id$ +** @(#)$Id: test-harness.h,v 1.1 2004/09/25 14:32:29 klmitch Exp $ */ #ifndef __include_test_harness_h__ #define __include_test_harness_h__ ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2004-09-25 14:17:59
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2004-09-25 14:17:34 UTC Modified files: ChangeLog configure configure.ac doc/html/doxygen.css doc/html/group__dbprim.html doc/html/group__dbprim__hash.html doc/html/group__dbprim__link.html doc/html/group__dbprim__rbtree.html doc/html/group__dbprim__smat.html doc/html/index.html doc/html/modules.html doc/latex/Makefile doc/latex/doxygen.sty doc/latex/group__dbprim.tex doc/latex/group__dbprim__hash.tex doc/latex/group__dbprim__link.tex doc/latex/group__dbprim__rbtree.tex doc/latex/group__dbprim__smat.tex doc/latex/index.tex doc/latex/refman.tex doc/man/man3/dbprim.3 doc/man/man3/dbprim_hash.3 doc/man/man3/dbprim_link.3 doc/man/man3/dbprim_rbtree.3 doc/man/man3/dbprim_smat.3 tests/t_redblack.c tests/test-harness.dat Log message: finish red-black tree unit tests; bump patch level for final public beta release; regenerate documentation ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.18 dbprim/ChangeLog:1.19 --- dbprim/ChangeLog:1.18 Thu Sep 23 12:41:31 2004 +++ dbprim/ChangeLog Sat Sep 25 07:17:21 2004 @@ -1,3 +1,12 @@ +2004-09-25 Kevin L Mitchell <kl...@mi...> + + * configure.ac: bump the patch level + + * tests/test-harness.dat: add test descriptions for red-black + trees + + * tests/t_redblack.c: finish writing red-black tree test suite + 2004-09-23 Kevin L Mitchell <kl...@mi...> * tests/t_redblack.c: add treecheck() function to verify that a Index: dbprim/configure diff -u dbprim/configure:1.4 dbprim/configure:1.5 --- dbprim/configure:1.4 Tue Mar 2 23:50:39 2004 +++ dbprim/configure Sat Sep 25 07:17:21 2004 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57 for Database Primitives Library 0.9.2. +# Generated by GNU Autoconf 2.57 for Database Primitives Library 0.9.3. # # Report bugs to <kl...@mi...>. # @@ -422,8 +422,8 @@ # Identity of this package. PACKAGE_NAME='Database Primitives Library' PACKAGE_TARNAME='dbprim' -PACKAGE_VERSION='0.9.2' -PACKAGE_STRING='Database Primitives Library 0.9.2' +PACKAGE_VERSION='0.9.3' +PACKAGE_STRING='Database Primitives Library 0.9.3' PACKAGE_BUGREPORT='kl...@mi...' ac_unique_file="dbprim_int.h" @@ -953,7 +953,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Database Primitives Library 0.9.2 to adapt to many kinds of systems. +\`configure' configures Database Primitives Library 0.9.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1019,7 +1019,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Database Primitives Library 0.9.2:";; + short | recursive ) echo "Configuration of Database Primitives Library 0.9.3:";; esac cat <<\_ACEOF @@ -1126,7 +1126,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -Database Primitives Library configure 0.9.2 +Database Primitives Library configure 0.9.3 generated by GNU Autoconf 2.57 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 @@ -1141,7 +1141,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Database Primitives Library $as_me 0.9.2, which was +It was created by Database Primitives Library $as_me 0.9.3, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ @@ -1751,7 +1751,7 @@ # Define the identity of the package. PACKAGE='dbprim' - VERSION='0.9.2' + VERSION='0.9.3' cat >>confdefs.h <<_ACEOF @@ -19218,7 +19218,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by Database Primitives Library $as_me 0.9.2, which was +This file was extended by Database Primitives Library $as_me 0.9.3, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19276,7 +19276,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -Database Primitives Library config.status 0.9.2 +Database Primitives Library config.status 0.9.3 configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Index: dbprim/configure.ac diff -u dbprim/configure.ac:1.6 dbprim/configure.ac:1.7 --- dbprim/configure.ac:1.6 Tue Mar 2 23:50:40 2004 +++ dbprim/configure.ac Sat Sep 25 07:17:22 2004 @@ -17,11 +17,11 @@ dnl Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, dnl MA 02111-1307, USA dnl -dnl @(#)$Id: configure.ac,v 1.6 2004/03/03 07:50:40 klmitch Exp $ +dnl @(#)$Id: configure.ac,v 1.7 2004/09/25 14:17:22 klmitch Exp $ dnl dnl Process this file with autoconf to produce a configure script. -AC_INIT([Database Primitives Library], 0.9.2, [kl...@mi...], [dbprim]) +AC_INIT([Database Primitives Library], 0.9.3, [kl...@mi...], [dbprim]) AC_CONFIG_SRCDIR([dbprim_int.h]) AM_INIT_AUTOMAKE Index: dbprim/doc/html/doxygen.css diff -u dbprim/doc/html/doxygen.css:1.1 dbprim/doc/html/doxygen.css:1.2 --- dbprim/doc/html/doxygen.css:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/html/doxygen.css Sat Sep 25 07:17:23 2004 @@ -1,21 +1,51 @@ -H1 { text-align: center; } +H1 { + text-align: center; + font-family: Arial, Helvetica, sans-serif; +} +H2 { + font-family: Geneva, Arial, Helvetica, sans-serif; +} CAPTION { font-weight: bold } -A.qindex {} -A.qindexRef {} +DIV.qindex { width: 100%; + background-color: #eeeeff; + border: 4px solid #eeeeff; + text-align: center; + margin-bottom: 2px +} +A.qindex { text-decoration: none; font-weight: bold; color: #0000ee } +A.qindex:visited { text-decoration: none; font-weight: bold; color: #0000ee } +A.qindex:hover { text-decoration: none; background-color: #ddddff } +A.qindexHL { text-decoration: none; font-weight: bold; + background-color: #6666cc; + color: #ffffff + } +A.qindexHL:hover { text-decoration: none; background-color: #6666cc; color: #ffffff } +A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } A.el { text-decoration: none; font-weight: bold } A.elRef { font-weight: bold } A.code { text-decoration: none; font-weight: normal; color: #4444ee } A.codeRef { font-weight: normal; color: #4444ee } A:hover { text-decoration: none; background-color: #f2f2ff } DL.el { margin-left: -1cm } -DIV.fragment { width: 100%; border: none; background-color: #eeeeee } +DIV.fragment { + width: 98%; + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + padding-left: 4px; + margin: 4px; +} DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } TD.md { background-color: #f2f2ff; font-weight: bold; } TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; } TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; } DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold } DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } -BODY { background: white } +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} TD.indexkey { background-color: #eeeeff; font-weight: bold; @@ -40,10 +70,100 @@ margin-top : 2px; margin-bottom : 2px } -span.keyword { color: #008000 } -span.keywordtype { color: #604020 } -span.keywordflow { color: #e08000 } -span.comment { color: #800000 } -span.preprocessor { color: #806020 } -span.stringliteral { color: #002080 } -span.charliteral { color: #008080 } +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { text-align: center; } +IMG.formulaDsp { } +IMG.formulaInl { vertical-align: middle; } +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +.mdTable { + border: 1px solid #868686; + background-color: #f2f2ff; +} +.mdRow { + padding: 8px 20px; +} +.mdescLeft { + font-size: smaller; + font-family: Arial, Helvetica, sans-serif; + background-color: #FAFAFA; + padding-left: 8px; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + font-size: smaller; + font-family: Arial, Helvetica, sans-serif; + font-style: italic; + background-color: #FAFAFA; + padding-left: 4px; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; + padding-bottom: 0px; + padding-right: 8px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-style: solid; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-family: Geneva, Arial, Helvetica, sans-serif; + font-size: 12px; +} +.memItemRight { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-style: solid; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-family: Geneva, Arial, Helvetica, sans-serif; + font-size: 13px; +} +.search { color: #0000ee; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #eeeeff; +} +TD.tiny { font-size: 75%; +} Index: dbprim/doc/html/group__dbprim.html diff -u dbprim/doc/html/group__dbprim.html:1.6 dbprim/doc/html/group__dbprim.html:1.7 --- dbprim/doc/html/group__dbprim.html:1.6 Wed Dec 10 22:33:58 2003 +++ dbprim/doc/html/group__dbprim.html Sat Sep 25 07:17:23 2004 @@ -1,34 +1,39 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>Database Primitives</title> +<title>Database Primitives Library: Database Primitives</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> -<!-- Generated by Doxygen 1.2.18 --> -<center> -<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> </center> -<hr><h1>Database Primitives</h1><hr><a name="_details"></a><h2>Detailed Description</h2> -This module describes interfaces common to all database modules--mainly the macros concerned with manipulating database keys and the definition of the key structure. +<!-- Generated by Doxygen 1.3.4 --> +<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a></div> +<h1>Database Primitives</h1><hr><a name="_details"></a><h2>Detailed Description</h2> +This module describes interfaces common to all database modules--mainly the macros concerned with manipulating database keys and the definition of the key structure.<p> +The key may be any arbitrary pointer, including a pointer to a string. Everything that handles a key either copies the contents of the <a class="el" href="group__dbprim.html#a0">db_key_t</a> structure or passes it to a user-defined function. If required, as in the case of a string, a length may also be represented in the key structure. <p> -The key may be any arbitrary pointer, including a pointer to a string. Everything that handles a key either copies the contents of the <a class="el" href="group__dbprim.html#a0">db_key_t</a> structure or passes it to a user-defined function. If required, as in the case of a string, a length may also be represented in the key structure. <table border=0 cellpadding=0 cellspacing=0> +<table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Defines</h2></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim.html#a1">DB_KEY_INIT</a>(key, size)</td></tr> -<tr><td> </td><td><font size=-1><em>Database key static initializer.</em> <a href="#a1"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim.html#a2">dk_key</a>(key)</td></tr> -<tr><td> </td><td><font size=-1><em>Database key accessor macro.</em> <a href="#a2"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim.html#a3">dk_len</a>(key)</td></tr> -<tr><td> </td><td><font size=-1><em>Database key length accessor macro.</em> <a href="#a3"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim.html#a4">DB_FLAG_REVERSE</a></td></tr> -<tr><td> </td><td><font size=-1><em>Reverse flag.</em> <a href="#a4"></a><em></em></font><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim.html#a1">DB_KEY_INIT</a>(key, size)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Database key static initializer. </em> <a href="#a1"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim.html#a2">dk_key</a>(key)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Database key accessor macro. </em> <a href="#a2"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim.html#a3">dk_len</a>(key)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Database key length accessor macro. </em> <a href="#a3"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim.html#a4">DB_FLAG_REVERSE</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Reverse flag. </em> <a href="#a4"></a><em><br><br></td></tr> <tr><td colspan=2><br><h2>Typedefs</h2></td></tr> -<tr><td nowrap align=right valign=top>typedef _db_key_s </td><td valign=bottom><a class="el" href="group__dbprim.html#a0">db_key_t</a></td></tr> -<tr><td> </td><td><font size=-1><em>Database key.</em> <a href="#a0"></a><em></em></font><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>typedef _db_key_s </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim.html#a0">db_key_t</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Database key. </em> <a href="#a0"></a><em><br><br></td></tr> </table> <hr><h2>Define Documentation</h2> -<a name="a4" doxytag="dbprim.h::DB_FLAG_REVERSE"></a><p> -<table width="100%" cellpadding="2" cellspacing="0" border="0"> +<a class="anchor" name="a4" doxytag="dbprim.h::DB_FLAG_REVERSE" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> - <td class="md"> + <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define DB_FLAG_REVERSE @@ -47,10 +52,10 @@ This flag can be passed to ordered iterations to reverse the order of the iterations. </td> </tr> </table> -<a name="a1" doxytag="dbprim.h::DB_KEY_INIT"></a><p> -<table width="100%" cellpadding="2" cellspacing="0" border="0"> +<a class="anchor" name="a1" doxytag="dbprim.h::DB_KEY_INIT" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> - <td class="md"> + <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define DB_KEY_INIT</td> @@ -59,8 +64,8 @@ <td></td> <td></td> <td class="md" nowrap>size </td> - <td class="mdname1" valign="top" nowrap> </td> - <td class="md" valign="top">) </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> <td class="md" nowrap> </table> </td> @@ -74,27 +79,27 @@ <td> <p> -This macro allows a <a class="el" href="group__dbprim.html#a0">db_key_t</a> to be initialized statically.<dl compact><dt><b>Parameters: </b></dt><dd> -<table border=0 cellspacing=2 cellpadding=0> -<tr><td valign=top><em>key</em> </td><td> -A pointer to the key. </td></tr> -<tr><td valign=top><em>size</em> </td><td> -Size of the key. </td></tr> -</table> -</dl> </td> +This macro allows a <a class="el" href="group__dbprim.html#a0">db_key_t</a> to be initialized statically.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>key</em> </td><td>A pointer to the key. </td></tr> + <tr><td valign=top><em>size</em> </td><td>Size of the key. </td></tr> + </table> +</dl> + </td> </tr> </table> -<a name="a2" doxytag="dbprim.h::dk_key"></a><p> -<table width="100%" cellpadding="2" cellspacing="0" border="0"> +<a class="anchor" name="a2" doxytag="dbprim.h::dk_key" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> - <td class="md"> + <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define dk_key</td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">key </td> - <td class="mdname1" valign="top" nowrap> </td> - <td class="md" valign="top">) </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> <td class="md" nowrap> </table> </td> @@ -108,26 +113,27 @@ <td> <p> -This macro allows access to the key field of a <a class="el" href="group__dbprim.html#a0">db_key_t</a>. It may be used as an lvalue in order to assign a key to a <a class="el" href="group__dbprim.html#a0">db_key_t</a>.<dl compact><dt><b>Parameters: </b></dt><dd> -<table border=0 cellspacing=2 cellpadding=0> -<tr><td valign=top><em>key</em> </td><td> -A pointer to a <a class="el" href="group__dbprim.html#a0">db_key_t</a>. </td></tr> -</table> -</dl><dl compact><dt><b>Returns: </b></dt><dd> -A pointer to a key (<code>void *</code>). </dl> </td> +This macro allows access to the key field of a <a class="el" href="group__dbprim.html#a0">db_key_t</a>. It may be used as an lvalue in order to assign a key to a <a class="el" href="group__dbprim.html#a0">db_key_t</a>.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>key</em> </td><td>A pointer to a <a class="el" href="group__dbprim.html#a0">db_key_t</a>. </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>A pointer to a key (<code>void *</code>). </dd></dl> + </td> </tr> </table> -<a name="a3" doxytag="dbprim.h::dk_len"></a><p> -<table width="100%" cellpadding="2" cellspacing="0" border="0"> +<a class="anchor" name="a3" doxytag="dbprim.h::dk_len" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> - <td class="md"> + <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define dk_len</td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">key </td> - <td class="mdname1" valign="top" nowrap> </td> - <td class="md" valign="top">) </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> <td class="md" nowrap> </table> </td> @@ -141,23 +147,24 @@ <td> <p> -This macro allows access to the key length field of a <a class="el" href="group__dbprim.html#a0">db_key_t</a>. It may be used as an lvalue in order to assign a length to a <a class="el" href="group__dbprim.html#a0">db_key_t</a>.<dl compact><dt><b>Parameters: </b></dt><dd> -<table border=0 cellspacing=2 cellpadding=0> -<tr><td valign=top><em>key</em> </td><td> -A pointer to a <a class="el" href="group__dbprim.html#a0">db_key_t</a>. </td></tr> -</table> -</dl><dl compact><dt><b>Returns: </b></dt><dd> -An <code>int</code> describing the length of the key. </dl> </td> +This macro allows access to the key length field of a <a class="el" href="group__dbprim.html#a0">db_key_t</a>. It may be used as an lvalue in order to assign a length to a <a class="el" href="group__dbprim.html#a0">db_key_t</a>.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>key</em> </td><td>A pointer to a <a class="el" href="group__dbprim.html#a0">db_key_t</a>. </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>An <code>int</code> describing the length of the key. </dd></dl> + </td> </tr> </table> <hr><h2>Typedef Documentation</h2> -<a name="a0" doxytag="dbprim.h::db_key_t"></a><p> -<table width="100%" cellpadding="2" cellspacing="0" border="0"> +<a class="anchor" name="a0" doxytag="dbprim.h::db_key_t" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> - <td class="md"> + <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> - <td class="md" nowrap valign="top"> typedef struct _db_key_s db_key_t + <td class="md" nowrap valign="top"> typedef struct _db_key_s <a class="el" href="dbprim_8h.html#a0">db_key_t</a> </table> </td> </tr> @@ -170,12 +177,12 @@ <td> <p> -This structure is a generic key containing a void * pointer and a length parameter. It should be accessed with * <a class="el" href="group__dbprim.html#a2">dk_key()</a> and <a class="el" href="group__dbprim.html#a3">dk_len()</a>. </td> +This structure is a generic key containing a void * pointer and a length parameter. It should be accessed with <a class="el" href="group__dbprim.html#a2">dk_key()</a> and <a class="el" href="group__dbprim.html#a3">dk_len()</a>. </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:24:36 2003 for Database Primitives Library by +<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 25 10:13:17 2004 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border=0 -width=110 height=53></a>1.2.18 </small></address> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 > +</a>1.3.4 </small></address> </body> </html> Index: dbprim/doc/html/group__dbprim__hash.html diff -u dbprim/doc/html/group__dbprim__hash.html:1.6 dbprim/doc/html/group__dbprim__hash.html:1.7 --- dbprim/doc/html/group__dbprim__hash.html:1.6 Wed Dec 10 22:33:58 2003 +++ dbprim/doc/html/group__dbprim__hash.html Sat Sep 25 07:17:23 2004 @@ -1,108 +1,146 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>Hash tables</title> +<title>Database Primitives Library: Hash tables</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> -<!-- Generated by Doxygen 1.2.18 --> -<center> -<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> </center> -<hr><h1>Hash tables</h1><hr><a name="_details"></a><h2>Detailed Description</h2> -Hash tables are a basic data structure used in building databases. Hash tables provide a means of storing data such that an arbitrary entry may be looked up efficiently. This library implements a hash table that may optionally grow and shrink to provide maximum efficiency. The implementation is with two kinds of caller-allocated structures--a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> structure that describes the table and a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> structure for each entry in the table. The library allocates a bucket array which must be released with the <a class="el" href="group__dbprim__hash.html#a14">ht_free()</a> function when the hash table has been emptied. Additionally, the hash table may be manually resized with the <a class="el" href="group__dbprim__hash.html#a13">ht_resize()</a> function. +<!-- Generated by Doxygen 1.3.4 --> +<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a></div> +<h1>Hash tables</h1><hr><a name="_details"></a><h2>Detailed Description</h2> +Hash tables are a basic data structure used in building databases. Hash tables provide a means of storing data such that an arbitrary entry may be looked up efficiently. This library implements a hash table that may optionally grow and shrink to provide maximum efficiency. The implementation is with two kinds of caller-allocated structures--a <a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> structure that describes the table and a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> structure for each entry in the table. The library allocates a bucket array which must be released with the <a class="el" href="group__dbprim__hash.html#a14">ht_free()</a> function when the hash table has been emptied. Additionally, the hash table may be manually resized with the <a class="el" href="group__dbprim__hash.html#a13">ht_resize()</a> function.<p> +Entries may be added to and removed from the table using the <a class="el" href="group__dbprim__hash.html#a7">ht_add()</a> and <a class="el" href="group__dbprim__hash.html#a9">ht_remove()</a> functions. Additionally, the key on a given entry may be changed using the <a class="el" href="group__dbprim__hash.html#a8">ht_move()</a> function. Of course, any given entry may be looked up using the <a class="el" href="group__dbprim__hash.html#a10">ht_find()</a> function, and <a class="el" href="group__dbprim__hash.html#a11">ht_iter()</a> will execute a user-defined function for each entry in the hash table (in an unspecified order). The <a class="el" href="group__dbprim__hash.html#a12">ht_flush()</a> function will remove all entries from the hash table, optionally executing a user-specified clean-up function. <p> -Entries may be added to and removed from the table using the <a class="el" href="group__dbprim__hash.html#a7">ht_add()</a> and <a class="el" href="group__dbprim__hash.html#a9">ht_remove()</a> functions. Additionally, the key on a given entry may be changed using the <a class="el" href="group__dbprim__hash.html#a8">ht_move()</a> function. Of course, any given entry may be looked up using the <a class="el" href="group__dbprim__hash.html#a10">ht_find()</a> function, and <a class="el" href="group__dbprim__hash.html#a11">ht_iter()</a> will execute a user-defined function for each entry in the hash table (in an unspecified order). The <a class="el" href="group__dbprim__hash.html#a12">ht_flush()</a> function will remove all entries from the hash table, optionally executing a user-specified clean-up function. <table border=0 cellpadding=0 cellspacing=0> +<table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Defines</h2></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a16">HASH_FLAG_AUTOGROW</a></td></tr> -<tr><td> </td><td><font size=-1><em>Flag permitting a hash table to automatically grow.</em> <a href="#a16"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a17">HASH_FLAG_AUTOSHRINK</a></td></tr> -<tr><td> </td><td><font size=-1><em>Flag permitting a hash table to automatically shrink.</em> <a href="#a17"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a18">HASH_TABLE_INIT</a>(flags, func, comp, resize, extra)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table static initializer.</em> <a href="#a18"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a19">ht_verify</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table verification macro.</em> <a href="#a19"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a20">ht_flags</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table flags.</em> <a href="#a20"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a21">ht_frozen</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Determine if a hash table is frozen.</em> <a href="#a21"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a22">ht_modulus</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table modulus.</em> <a href="#a22"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a23">ht_count</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table count.</em> <a href="#a23"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a24">ht_func</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table hash function.</em> <a href="#a24"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a25">ht_comp</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table comparison function.</em> <a href="#a25"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a26">ht_rsize</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table resize callback function.</em> <a href="#a26"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a27">ht_extra</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Extra pointer data in a hash table.</em> <a href="#a27"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a28">ht_size</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table memory size.</em> <a href="#a28"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a29">HASH_ENTRY_INIT</a>(value)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table entry static initializer.</em> <a href="#a29"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a30">he_verify</a>(entry)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table entry verification macro.</em> <a href="#a30"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a31">he_link</a>(entry)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table entry linked list element.</em> <a href="#a31"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a32">he_flags</a>(entry)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table entry flags.</em> <a href="#a32"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a33">he_table</a>(entry)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table entry table pointer.</em> <a href="#a33"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a34">he_hash</a>(entry)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table entry hash value.</em> <a href="#a34"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a35">he_key</a>(entry)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table entry key pointer.</em> <a href="#a35"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a36">he_value</a>(entry)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table entry value pointer.</em> <a href="#a36"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a37">st_rsize</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix table resize callback function.</em> <a href="#a37"></a><em></em></font><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a16">HASH_FLAG_AUTOGROW</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Flag permitting a hash table to automatically grow. </em> <a href="#a16"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a17">HASH_FLAG_AUTOSHRINK</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Flag permitting a hash table to automatically shrink. </em> <a href="#a17"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a18">HASH_TABLE_INIT</a>(flags, func, comp, resize, extra)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table static initializer. </em> <a href="#a18"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a19">ht_verify</a>(table)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table verification macro. </em> <a href="#a19"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a20">ht_flags</a>(table)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table flags. </em> <a href="#a20"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a21">ht_frozen</a>(table)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Determine if a hash table is frozen. </em> <a href="#a21"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a22">ht_modulus</a>(table)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table modulus. </em> <a href="#a22"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a23">ht_count</a>(table)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table count. </em> <a href="#a23"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a24">ht_func</a>(table)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table hash function. </em> <a href="#a24"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a25">ht_comp</a>(table)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table comparison function. </em> <a href="#a25"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a26">ht_rsize</a>(table)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table resize callback function. </em> <a href="#a26"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a27">ht_extra</a>(table)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Extra pointer data in a hash table. </em> <a href="#a27"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a28">ht_size</a>(table)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table memory size. </em> <a href="#a28"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a29">HASH_ENTRY_INIT</a>(value)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table entry static initializer. </em> <a href="#a29"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a30">he_verify</a>(entry)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table entry verification macro. </em> <a href="#a30"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a31">he_link</a>(entry)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table entry linked list element. </em> <a href="#a31"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a32">he_flags</a>(entry)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table entry flags. </em> <a href="#a32"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a33">he_table</a>(entry)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table entry table pointer. </em> <a href="#a33"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a34">he_hash</a>(entry)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table entry hash value. </em> <a href="#a34"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a35">he_key</a>(entry)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table entry key pointer. </em> <a href="#a35"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a36">he_value</a>(entry)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table entry value pointer. </em> <a href="#a36"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>#define </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a37">st_rsize</a>(table)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Sparse matrix table resize callback function. </em> <a href="#a37"></a><em><br><br></td></tr> <tr><td colspan=2><br><h2>Typedefs</h2></td></tr> -<tr><td nowrap align=right valign=top>typedef _hash_table_s </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a></td></tr> -<tr><td> </td><td><font size=-1><em>Hash table.</em> <a href="#a0"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>typedef _hash_entry_s </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a></td></tr> -<tr><td> </td><td><font size=-1><em>Hash table entry.</em> <a href="#a1"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>typedef unsigned long(* </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a2">hash_iter_t</a> )(<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *, <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> *, void *)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table iteration callback.</em> <a href="#a2"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>typedef unsigned long(* </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a3">hash_func_t</a> )(<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *, <a class="el" href="group__dbprim.html#a0">db_key_t</a> *)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash function callback.</em> <a href="#a3"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>typedef unsigned long(* </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a4">hash_comp_t</a> )(<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *, <a class="el" href="group__dbprim.html#a0">db_key_t</a> *, <a class="el" href="group__dbprim.html#a0">db_key_t</a> *)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table comparison callback.</em> <a href="#a4"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>typedef unsigned long(* </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a5">hash_resize_t</a> )(<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *, unsigned long)</td></tr> -<tr><td> </td><td><font size=-1><em>Hash table resize callback.</em> <a href="#a5"></a><em></em></font><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>typedef _hash_table_s </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table. </em> <a href="#a0"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>typedef _hash_entry_s </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table entry. </em> <a href="#a1"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>typedef unsigned long(* </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a2">hash_iter_t</a> )(<a class="el" href="dbprim_8h.html#a0">hash_table_t</a> *, <a class="el" href="dbprim_8h.html#a1">hash_entry_t</a> *, void *)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table iteration callback. </em> <a href="#a2"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>typedef unsigned long(* </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a3">hash_func_t</a> )(<a class="el" href="dbprim_8h.html#a0">hash_table_t</a> *, <a class="el" href="dbprim_8h.html#a0">db_key_t</a> *)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash function callback. </em> <a href="#a3"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>typedef unsigned long(* </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a4">hash_comp_t</a> )(<a class="el" href="dbprim_8h.html#a0">hash_table_t</a> *, <a class="el" href="dbprim_8h.html#a0">db_key_t</a> *, <a class="el" href="dbprim_8h.html#a0">db_key_t</a> *)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table comparison callback. </em> <a href="#a4"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>typedef unsigned long(* </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a5">hash_resize_t</a> )(<a class="el" href="dbprim_8h.html#a0">hash_table_t</a> *, unsigned long)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Hash table resize callback. </em> <a href="#a5"></a><em><br><br></td></tr> <tr><td colspan=2><br><h2>Functions</h2></td></tr> -<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a6">ht_init</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, unsigned long flags, <a class="el" href="group__dbprim__hash.html#a3">hash_func_t</a> func, <a class="el" href="group__dbprim__hash.html#a4">hash_comp_t</a> comp, <a class="el" href="group__dbprim__hash.html#a5">hash_resize_t</a> resize, void *extra, unsigned long init_mod)</td></tr> -<tr><td> </td><td><font size=-1><em>Dynamically initialize a hash table.</em> <a href="#a6"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a7">ht_add</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> *entry, <a class="el" href="group__dbprim.html#a0">db_key_t</a> *key)</td></tr> -<tr><td> </td><td><font size=-1><em>Add an entry to a hash table.</em> <a href="#a7"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a8">ht_move</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> *entry, <a class="el" href="group__dbprim.html#a0">db_key_t</a> *key)</td></tr> -<tr><td> </td><td><font size=-1><em>Move an entry in the hash table.</em> <a href="#a8"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a9">ht_remove</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> *entry)</td></tr> -<tr><td> </td><td><font size=-1><em>Remove an element from a hash table.</em> <a href="#a9"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a10">ht_find</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> **entry_p, <a class="el" href="group__dbprim.html#a0">db_key_t</a> *key)</td></tr> -<tr><td> </td><td><font size=-1><em>Find an entry in a hash table.</em> <a href="#a10"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a11">ht_iter</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#a2">hash_iter_t</a> iter_func, void *extra)</td></tr> -<tr><td> </td><td><font size=-1><em>Iterate over each entry in a hash table.</em> <a href="#a11"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a12">ht_flush</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, <a class="el" href="group__dbprim__hash.html#a2">hash_iter_t</a> flush_func, void *extra)</td></tr> -<tr><td> </td><td><font size=-1><em>Flush a hash table.</em> <a href="#a12"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a13">ht_resize</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table, unsigned long new_size)</td></tr> -<tr><td> </td><td><font size=-1><em>Resize a hash table.</em> <a href="#a13"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a14">ht_free</a> (<a class="el" href="group__dbprim__hash.html#a0">hash_table_t</a> *table)</td></tr> -<tr><td> </td><td><font size=-1><em>Free memory used by an empty hash table.</em> <a href="#a14"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__hash.html#a15">he_init</a> (<a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a> *entry, void *value)</td></tr> -<tr><td> </td><td><font size=-1><em>Dynamically initialize a hash table entry.</em> <a href="#a15"></a><em></em></font><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a6">ht_init</a> (<a class="el" href="dbprim_8h.html#a0">hash_table_t</a> *table, unsigned long flags, <a class="el" href="dbprim_8h.html#a3">hash_func_t</a> func, <a class="el" href="dbprim_8h.html#a4">hash_comp_t</a> comp, <a class="el" href="dbprim_8h.html#a5">hash_resize_t</a> resize, void *extra, unsigned long init_mod)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Dynamically initialize a hash table. </em> <a href="#a6"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a7">ht_add</a> (<a class="el" href="dbprim_8h.html#a0">hash_table_t</a> *table, <a class="el" href="dbprim_8h.html#a1">hash_entry_t</a> *entry, <a class="el" href="dbprim_8h.html#a0">db_key_t</a> *key)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Add an entry to a hash table. </em> <a href="#a7"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a8">ht_move</a> (<a class="el" href="dbprim_8h.html#a0">hash_table_t</a> *table, <a class="el" href="dbprim_8h.html#a1">hash_entry_t</a> *entry, <a class="el" href="dbprim_8h.html#a0">db_key_t</a> *key)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Move an entry in the hash table. </em> <a href="#a8"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a9">ht_remove</a> (<a class="el" href="dbprim_8h.html#a0">hash_table_t</a> *table, <a class="el" href="dbprim_8h.html#a1">hash_entry_t</a> *entry)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove an element from a hash table. </em> <a href="#a9"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a10">ht_find</a> (<a class="el" href="dbprim_8h.html#a0">hash_table_t</a> *table, <a class="el" href="dbprim_8h.html#a1">hash_entry_t</a> **entry_p, <a class="el" href="dbprim_8h.html#a0">db_key_t</a> *key)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Find an entry in a hash table. </em> <a href="#a10"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a11">ht_iter</a> (<a class="el" href="dbprim_8h.html#a0">hash_table_t</a> *table, <a class="el" href="dbprim_8h.html#a2">hash_iter_t</a> iter_func, void *extra)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Iterate over each entry in a hash table. </em> <a href="#a11"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a12">ht_flush</a> (<a class="el" href="dbprim_8h.html#a0">hash_table_t</a> *table, <a class="el" href="dbprim_8h.html#a2">hash_iter_t</a> flush_func, void *extra)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Flush a hash table. </em> <a href="#a12"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a13">ht_resize</a> (<a class="el" href="dbprim_8h.html#a0">hash_table_t</a> *table, unsigned long new_size)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Resize a hash table. </em> <a href="#a13"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a14">ht_free</a> (<a class="el" href="dbprim_8h.html#a0">hash_table_t</a> *table)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Free memory used by an empty hash table. </em> <a href="#a14"></a><em><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long </td><td class="memItemRight" valign=bottom><a class="el" href="group__dbprim__hash.html#a15">he_init</a> (<a class="el" href="dbprim_8h.html#a1">hash_entry_t</a> *entry, void *value)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Dynamically initialize a hash table entry. </em> <a href="#a15"></a><em><br><br></td></tr> </table> <hr><h2>Define Documentation</h2> -<a name="a29" doxytag="dbprim.h::HASH_ENTRY_INIT"></a><p> -<table width="100%" cellpadding="2" cellspacing="0" border="0"> +<a class="anchor" name="a29" doxytag="dbprim.h::HASH_ENTRY_INIT" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> - <td class="md"> + <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define HASH_ENTRY_INIT</td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">value </td> - <td class="mdname1" valign="top" nowrap> </td> - <td class="md" valign="top">) </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> <td class="md" nowrap> </table> </td> @@ -116,18 +154,19 @@ <td> <p> -This macro statically initializes a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a>.<dl compact><dt><b>Parameters: </b></dt><dd> -<table border=0 cellspacing=2 cellpadding=0> -<tr><td valign=top><em>value</em> </td><td> -A pointer to <code>void</code> representing the object associated with the entry. </td></tr> -</table> -</dl> </td> +This macro statically initializes a <a class="el" href="group__dbprim__hash.html#a1">hash_entry_t</a>.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>value</em> </td><td>A pointer to <code>void</code> representing the object associated with the entry. </td></tr> + </table> +</dl> + </td> </tr> </table> -<a name="a16" doxytag="dbprim.h::HASH_FLAG_AUTOGROW"></a><p> -<table width="100%" cellpadding="2" cellspacing="0" border="0"> +<a class="anchor" name="a16" doxytag="dbprim.h::HASH_FLAG_AUTOGROW" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> - <td class="md"> + <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define HASH_FLAG_AUTOGROW @@ -146,10 +185,10 @@ If passed in to <a class="el" href="group__dbprim__hash.html#a18">HASH_TABLE_INIT()</a> or <a class="el" href="group__dbprim__hash.html#a6">ht_init()</a>, allows the hash table to grow automatically. </td> </tr> </table> -<a name="a17" doxytag="dbprim.h::HASH_FLAG_AUTOSHRINK"></a><p> -<table width="100%" cellpadding="2" cellspacing="0" border="0"> +<a class="anchor" name="a17" doxytag="dbprim.h::HASH_FLAG_AUTOSHRINK" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> - <td class="md"> + <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define HASH_FLAG_AUTOSHRINK @@ -168,10 +207,10 @@ If passed in to <a class="el" href="group__dbprim__hash.html#a18">HASH_TABLE_INIT()</a> or <a class="el" href="group__dbprim__hash.html#a6">ht_init()</a>, allows the hash table to shrink automatically. </td> </tr> </table> -<a name="a18" doxytag="dbprim.h::HASH_TABLE_INIT"></a><p> -<table width="100%" cellpadding="2" cellspacing="0" border="0"> +<a class="anchor" name="a18" doxytag="dbprim.h::HASH_TABLE_INIT" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> - <td class="md"> + <td... [truncated message content] |
From: Kevin L. M. <kl...@us...> - 2004-09-23 19:41:49
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2004-09-23 19:41:41 UTC Modified files: ChangeLog _rb_locate.c rt_remove.c tests/t_redblack.c Log message: fix an argument ordering bug in _rb_locate() (which calls the user's comparison function); rewrite rt_remove() to only remove the desired node and to not corrupt the red-black property of the tree; add treecheck() function to t_redblack test program to test if a tree really has the red-black property ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.17 dbprim/ChangeLog:1.18 --- dbprim/ChangeLog:1.17 Tue Sep 21 20:25:48 2004 +++ dbprim/ChangeLog Thu Sep 23 12:41:31 2004 @@ -1,3 +1,14 @@ +2004-09-23 Kevin L Mitchell <kl...@mi...> + + * tests/t_redblack.c: add treecheck() function to verify that a + tree really is a red-black tree + + * rt_remove.c: rewrote rt_remove() to correctly remove nodes and + properly balance tree + + * _rb_locate.c: swap order of arguments to comparison function to + order tree correctly + 2004-09-21 Kevin L Mitchell <kl...@mi...> * tests/test-harness.dat: add sparse matrices test cases Index: dbprim/_rb_locate.c diff -u dbprim/_rb_locate.c:1.1 dbprim/_rb_locate.c:1.2 --- dbprim/_rb_locate.c:1.1 Sat Jun 28 11:48:21 2003 +++ dbprim/_rb_locate.c Thu Sep 23 12:41:31 2004 @@ -16,12 +16,12 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: _rb_locate.c,v 1.1 2003/06/28 18:48:21 klmitch Exp $ +** @(#)$Id: _rb_locate.c,v 1.2 2004/09/23 19:41:31 klmitch Exp $ */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: _rb_locate.c,v 1.1 2003/06/28 18:48:21 klmitch Exp $"); +RCSTAG("@(#)$Id: _rb_locate.c,v 1.2 2004/09/23 19:41:31 klmitch Exp $"); /* Locate a given node, placing the given node if necessary */ rb_node_t * @@ -42,8 +42,8 @@ tree->rt_count++; /* keep a count of the number of nodes in the tree */ } return node; - } else if (!(comp = (*tree->rt_comp)(tree, rn_key(tmp = tree->rt_root), - key))) + } else if (!(comp = (*tree->rt_comp)(tree, key, + rn_key(tmp = tree->rt_root)))) return tree->rt_root; /* Oh, the root of the tree matches the key */ while (1) /* Search for the key in the tree... */ @@ -51,15 +51,15 @@ if (!tmp->rn_left) { tmp->rn_left = node; /* add the node here */ break; /* We're done with the loop... */ - } else if (!(comp = (*tree->rt_comp)(tree, rn_key(tmp = tmp->rn_left), - key))) + } else if (!(comp = (*tree->rt_comp)(tree, key, + rn_key(tmp = tmp->rn_left)))) return tmp; /* found the node in the tree, return it */ } else { /* desired node is to the right */ if (!tmp->rn_right) { tmp->rn_right = node; /* add the node here */ break; /* We're done with the loop... */ - } else if (!(comp = (*tree->rt_comp)(tree, rn_key(tmp = tmp->rn_right), - key))) + } else if (!(comp = (*tree->rt_comp)(tree, key, + rn_key(tmp = tmp->rn_right)))) return tmp; /* found the node in the tree, return it */ } Index: dbprim/rt_remove.c diff -u dbprim/rt_remove.c:1.1 dbprim/rt_remove.c:1.2 --- dbprim/rt_remove.c:1.1 Sat Jun 28 11:48:21 2003 +++ dbprim/rt_remove.c Thu Sep 23 12:41:31 2004 @@ -16,12 +16,48 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: rt_remove.c,v 1.1 2003/06/28 18:48:21 klmitch Exp $ +** @(#)$Id: rt_remove.c,v 1.2 2004/09/23 19:41:31 klmitch Exp $ */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: rt_remove.c,v 1.1 2003/06/28 18:48:21 klmitch Exp $"); +RCSTAG("@(#)$Id: rt_remove.c,v 1.2 2004/09/23 19:41:31 klmitch Exp $"); + +/* Clear a node... */ +#define _rn_clear(node) \ +do { \ + (node)->rn_color = RB_COLOR_NONE; /* no color... */ \ + (node)->rn_tree = 0; /* no tree... */ \ + (node)->rn_parent = 0; /* no parent... */ \ + (node)->rn_left = 0; /* and no children */ \ + (node)->rn_right = 0; \ +} while (0) + +/* update a node's parent to point to the new node */ +#define _rt_update_parent(tree, node, new) \ +do { \ + if (!(node)->rn_parent) /* node must be at root of tree... */ \ + (tree)->rt_root = (new); /* so update the root */ \ + else if (rn_isleft(node)) /* maybe it's a left child? */ \ + (node)->rn_parent->rn_left = (new); /* OK, save new value there */ \ + else \ + (node)->rn_parent->rn_right = (new); /* OK, right child, save tere */ \ +} while (0) + +/* is the node <n> the left child of the parent node <par>? */ +#define isleft(par, n) ((par)->rn_left == (n)) + +/* select the right node if condition <t> is true */ +#define sel_lr(t, n) ((t) ? (n)->rn_right : (n)->rn_left) + +/* Locate sibling of the given node */ +#define sibling(par, n) (sel_lr(isleft((par), (n)), (par))) + +/* Locate "closer" nephew of the given node */ +#define l_neph(par, n) (sel_lr(!isleft((par), (n)), sibling((par), (n)))) + +/* Locate "further" nephew of the given node */ +#define r_neph(par, n) (sel_lr(isleft((par), (n)), sibling((par), (n)))) /** \ingroup dbprim_rbtree * \brief Remove a node from a red-black tree. @@ -41,7 +77,7 @@ rt_remove(rb_tree_t *tree, rb_node_t *node) { rb_color_t col; - rb_node_t *t1, *t2, *t2p = 0; + rb_node_t *nchild, *nparent; initialize_dbpr_error_table(); /* initialize error table */ @@ -56,117 +92,99 @@ if (tree->rt_flags & RBT_FLAG_FREEZE) /* don't remove from frozen trees */ return DB_ERR_FROZEN; - /* OK, this logic is tricky--first, let's remove the node */ - if (!node->rn_left || !node->rn_right) - t1 = node; /* node to be deleted has only one child */ - else - for (t1 = node->rn_right; t1->rn_left; t1 = t1->rn_left) - ; /* Find the left-most node of the right child of deleted node */ - - t2 = t1->rn_left ? t1->rn_left : t1->rn_right; /* child of node... */ - - if (t2) - t2->rn_parent = t1->rn_parent; /* update the parent pointer */ - else - t2p = t1->rn_parent; /* must remember the parent for rebalancing */ - - if (t1->rn_parent) { /* update the parent of node... */ - if (rn_isleft(t1)) - t1->rn_parent->rn_left = t2; - else - t1->rn_parent->rn_right = t2; - } else /* it's at the root of the tree... */ - tree->rt_root = t2; - - col = t1->rn_color; /* cache the color... */ - - if (t1 != node) { /* t1 replaces the node to be deleted */ - t1->rn_color = node->rn_color; - t1->rn_parent = node->rn_parent; - t1->rn_left = node->rn_left; - t1->rn_right = node->rn_right; - if (node->rn_parent) { /* OK, update the parent's pointer... */ - if (rn_isleft(node)) - t1->rn_parent->rn_left = t1; - else - t1->rn_parent->rn_right = t1; - } else /* it was at the root of the tree... */ - tree->rt_root = t1; + if (tree->rt_count == 1) { /* only the one node... */ + _rn_clear(node); /* clear the node */ + + tree->rt_root = 0; /* clear the root pointer... */ + tree->rt_count--; /* update the node count */ + + return 0; /* and we're done...gee, that was simple */ } - /* OK, now we rebalance the tree if necessary. t2parent is a special - * macro to select either t2->rn_parent or t2p, if t2 is 0. + /* If the node has both children, swap it with one of its great-* + * grandchildren that has only one child. */ -#define t2parent (t2 ? t2->rn_parent : t2p) - if (col == RB_COLOR_BLACK) { - while (t2parent && rn_isblack(t2)) /* while balancing neccessary... */ - if (t2 && rn_isleft(t2)) { /* node is a left child... */ - t1 = t2parent->rn_right; - if (rn_isred(t1)) { - t1->rn_color = RB_COLOR_BLACK; /* recolor the nodes... */ - t2parent->rn_color = RB_COLOR_RED; - _rb_rotate(tree, t2parent->rn_right); /* move the right child up */ - t1 = t2parent->rn_right; - } - - /* If both children are black... */ - if (rn_isblack(t1->rn_left) && rn_isblack(t1->rn_right)) { - t1->rn_color = RB_COLOR_RED; /* recolor the node red */ - t2 = t2parent; /* move up the tree a bit */ - } else { - if (rn_isblack(t1->rn_right)) { - t1->rn_left->rn_color = RB_COLOR_BLACK; /* recolor nodes... */ - t1->rn_color = RB_COLOR_RED; - _rb_rotate(tree, t1->rn_left); /* move left child up a level */ - t1 = t2parent->rn_right; /* and move to other child of t2 */ - } - - t1->rn_color = t2parent->rn_color; /* recolor nodes... */ - t2parent->rn_color = RB_COLOR_BLACK; - t1->rn_right->rn_color = RB_COLOR_BLACK; - _rb_rotate(tree, t2parent->rn_right); /* move child up a level */ - t2 = tree->rt_root; - } - } else { /* node is a right child... */ - t1 = t2parent->rn_left; - if (rn_isred(t1)) { - t1->rn_color = RB_COLOR_BLACK; /* recolor the nodes... */ - t2parent->rn_color = RB_COLOR_RED; - _rb_rotate(tree, t2parent->rn_left); /* move the left child up */ - t1 = t2parent->rn_left; - } - - /* If both children are black... */ - if (rn_isblack(t1->rn_right) && rn_isblack(t1->rn_left)) { - t1->rn_color = RB_COLOR_RED; /* recolor the node red */ - t2 = t2parent; /* move up the tree a bit */ - } else { - if (rn_isblack(t1->rn_left)) { - t1->rn_right->rn_color = RB_COLOR_BLACK; /* recolor nodes... */ - t1->rn_color = RB_COLOR_RED; - _rb_rotate(tree, t1->rn_right); /* move right child up a level */ - t1 = t2parent->rn_left; /* and move to other child of t2 */ - } - - t1->rn_color = t2parent->rn_color; /* recolor nodes... */ - t2parent->rn_color = RB_COLOR_BLACK; - t1->rn_left->rn_color = RB_COLOR_BLACK; - _rb_rotate(tree, t2parent->rn_left); /* move child up a level */ - t2 = tree->rt_root; - } + if (node->rn_left && node->rn_right) { + rb_node_t *ggchild; + + for (ggchild = node->rn_right; ggchild->rn_left; + ggchild = ggchild->rn_left) + ; /* find the left-most great-* grandchild on the right subtree */ + + /* remember that node's parent... */ + nparent = (ggchild->rn_parent == node) ? ggchild : ggchild->rn_parent; + nchild = ggchild->rn_right; /* ...child... */ + col = ggchild->rn_color; /* ...and color */ + + /* next, groom great-* grandchild to replace node */ + ggchild->rn_left = node->rn_left; + ggchild->rn_right = node->rn_right == ggchild ? 0 : node->rn_right; + ggchild->rn_parent = node->rn_parent; + ggchild->rn_color = node->rn_color; + + /* let's update the node's parent to point at great-* grandchild */ + _rt_update_parent(tree, node, ggchild); + + ggchild->rn_left->rn_parent = ggchild; /* ...and its children... */ + if (ggchild->rn_right) + ggchild->rn_right->rn_parent = ggchild; + + /* Then update great-* grandchild's original parent... */ + if (nparent != ggchild) + nparent->rn_left = nchild; /* it's by definition a left child */ + else + nparent->rn_right = nchild; /* don't lose the thing! */ + } else { /* it's already an external node, so remove it... */ + nparent = node->rn_parent; /* remember node's parent... */ + nchild = node->rn_left ? node->rn_left : node->rn_right; /* ...child... */ + col = node->rn_color; /* ...and color */ + + /* update node's parent to point at node's child */ + _rt_update_parent(tree, node, nchild); + } + + if (nchild) /* now, if there was a child... */ + nchild->rn_parent = nparent; /* update its parent pointer */ + + if (col == RB_COLOR_BLACK) { /* removed a black node, gotta rebalance... */ + /* work our way up the tree, stopping on the first red node */ + while (nparent && rn_isblack(nchild)) { + /* If the sibling is red... */ + if (rn_isred(sibling(nparent, nchild))) { + _rb_rotate(tree, sibling(nparent, nchild)); /* move it up... */ + nparent->rn_color = RB_COLOR_RED; /* and recolor the nodes */ + nparent->rn_parent->rn_color = RB_COLOR_BLACK; /* old sibling */ + } + + /* Sibling is black, are the nephews? */ + if (rn_isblack(l_neph(nparent, nchild)) && + rn_isblack(r_neph(nparent, nchild))) { + sibling(nparent, nchild)->rn_color = RB_COLOR_RED; /* recolor sib... */ + nchild = nparent; /* then move up the tree... */ + nparent = nparent->rn_parent; + continue; /* go through loop once more... */ } - if (t2) /* recolor node... */ - t2->rn_color = RB_COLOR_BLACK; + /* OK, one or the other (or both!) of the nephews is red. */ + if (rn_isred(l_neph(nparent, nchild))) /* is the closer one red? */ + _rb_rotate(tree, l_neph(nparent, nchild)); /* then rotate it up */ + _rb_rotate(tree, sibling(nparent, nchild)); /* now rotate sibling up */ + + /* set old sibling color to be the same as parent. */ + nparent->rn_parent->rn_color = nparent->rn_color; + nparent->rn_color = RB_COLOR_BLACK; /* set parent black... */ + /* now set the parent's new sibling black */ + sibling(nparent->rn_parent, nparent)->rn_color = RB_COLOR_BLACK; + break; /* this is a terminal case; we're done. */ + } + + if (rn_isred(nchild)) /* if we hit a red node, turn it black */ + nchild->rn_color = RB_COLOR_BLACK; } - node->rn_color = RB_COLOR_NONE; /* clear the node */ - node->rn_tree = 0; - node->rn_parent = 0; - node->rn_left = 0; - node->rn_right = 0; + _rn_clear(node); /* clear the node */ tree->rt_count--; /* update the node count */ - return 0; + return 0; /* and we're done...gee, that was simple */ } Index: dbprim/tests/t_redblack.c diff -u dbprim/tests/t_redblack.c:1.1 dbprim/tests/t_redblack.c:1.2 --- dbprim/tests/t_redblack.c:1.1 Tue Sep 21 20:25:48 2004 +++ dbprim/tests/t_redblack.c Thu Sep 23 12:41:31 2004 @@ -16,8 +16,9 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: t_redblack.c,v 1.1 2004/09/22 03:25:48 klmitch Exp $ +** @(#)$Id: t_redblack.c,v 1.2 2004/09/23 19:41:31 klmitch Exp $ */ +#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -28,7 +29,7 @@ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: t_redblack.c,v 1.1 2004/09/22 03:25:48 klmitch Exp $"); +RCSTAG("@(#)$Id: t_redblack.c,v 1.2 2004/09/23 19:41:31 klmitch Exp $"); TEST_PROG(t_redblack, "Test red-black tree functionality") @@ -120,6 +121,99 @@ return 0; /* OK, everything's fine. */ } +/* handy macro to generate the arguments for identifying nodes in printf's */ +#define n_debargs(node) (void *)(node), (node) ? dk_len(rn_key(node)) : -1, \ + rn_isblack(node) ? "BLACK" : \ + (rn_isred(node) ? "RED" : "NO COLOR") + +/* check that a tree really is a red-black tree */ +static int +treecheck(rb_node_t *node, rb_node_t *parent, int bh, int *tbhp) +{ + int init_bh = -1; /* tree black height */ + + if (!node) /* an empty tree is a red-black tree... */ + return 1; + + /* First, check parental referential integrity... */ + if (node->rn_parent != parent) { + fprintf(stderr, "Node %p/%d (%s) thinks its a child of %p/%d (%s) " + "rather than of %p/%d (%s)\n", n_debargs(node), + n_debargs(node->rn_parent), n_debargs(parent)); + return 0; + } + + /* Next, make sure it has a reasonable color... */ + if (!rn_isred(node) && !rn_isblack(node)) { + fprintf(stderr, "Node %p/%d (%s) is neither red nor black\n", + n_debargs(node)); + return 0; + } + + /* Now, if it's at the root of the tree, it'd better be black */ + if (!parent && !rn_isblack(node)) { + fprintf(stderr, "Node %p/%d (%s) is a non-black root node\n", + n_debargs(node->rn_parent)); + return 0; + } + + /* No red node may have a red parent */ + if (rn_isred(parent) && rn_isred(node)) { + fprintf(stderr, "Node %p/%d (%s) is a red node with a red parent " + "%p/%d (%s)\n", n_debargs(node), n_debargs(parent)); + return 0; + } + + if (!tbhp) /* need a pointer to the total black height... */ + tbhp = &init_bh; /* so use ours */ + + if (parent && rn_isblack(node)) /* increment black height (for children) */ + bh++; + + /* Check that the left node is part of a red-black tree */ + if (node->rn_left) { + /* First, double-check node ordering... */ + if (dk_len(rn_key(node->rn_left)) >= dk_len(rn_key(node))) { + fprintf(stderr, "Node %p/%d (%s) is less than its left child, " + "%p/%d (%s)", n_debargs(node), n_debargs(node->rn_left)); + return 0; + } else if (!treecheck(node->rn_left, node, bh, tbhp)) + return 0; + } else if (*tbhp < 0) /* hit an external node for the first time... */ + *tbhp = bh + 1; /* store the black height */ + else if ((bh + 1) != *tbhp) { /* verify that black heights are consistent */ + fprintf(stderr, "Node %p/%d (%s) left child is leaf with bh %d " + "(expected %d)\n", n_debargs(node), bh + 1, *tbhp); + return 0; + } + + /* Check that the right node is part of a red-black tree */ + if (node->rn_right) { + /* First, double-check node ordering... */ + if (dk_len(rn_key(node)) >= dk_len(rn_key(node->rn_right))) { + fprintf(stderr, "Node %p/%d (%s) is greater than its right child, " + "%p/%d (%s)", n_debargs(node), n_debargs(node->rn_left)); + return 0; + } else if (!treecheck(node->rn_right, node, bh, tbhp)) + return 0; + } else if (*tbhp < 0) /* hit an external node for the first time... */ + *tbhp = bh + 1; /* store the black height */ + else if ((bh + 1) != *tbhp) { /* verify that black heights are consistent */ + fprintf(stderr, "Node %p/%d (%s) right child is leaf with bh %d " + "(expected %d)\n", n_debargs(node), bh + 1, *tbhp); + return 0; + } + + /* at this point, if we're the root, the black height had better be set */ + assert(parent || *tbhp > 0); + + /* Informational message... */ + if (!parent) + fprintf(stderr, "Tree black height: %d\n", *tbhp); + + return 1; /* it's a red-black tree. */ +} + /* simple comparison function for testing... */ static long t_comp(rb_tree_t *tree, db_key_t *key1, db_key_t *key2) @@ -159,6 +253,9 @@ for (dk_len(&key) = 0; dk_len(&key) < RBT_ELEM_CNT; dk_len(&key)++) if ((err = rt_add(&tree, &nodes[dk_len(&key)], &key))) FAIL(TEST_NAME(rt_add), FATAL(0), "rt_add() failed with error %lu", err); + else if (!treecheck(rt_root(&tree), 0, 0, 0)) + FAIL(TEST_NAME(rt_add), FATAL(0), "rt_add() corrupted tree's " + "red-black property"); PASS(TEST_NAME(rt_add), "rt_add() calls successful"); /* Next, try a few rt_find()s... */ @@ -190,6 +287,9 @@ if ((err = rt_remove(&tree, &nodes[tmp]))) FAIL(TEST_NAME(rt_remove), FATAL(0), "rt_remove() failed with error %lu", err); + else if (!treecheck(rt_root(&tree), 0, 0, 0)) + FAIL(TEST_NAME(rt_remove), FATAL(0), "rt_remove() corrupted tree's " + "red-black property"); } /* Now see if we can still locate elements in the tree... */ for (visited = RBT_ELEM_MASK; visited; ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2004-09-22 03:26:14
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2004-09-22 03:25:59 UTC Modified files: ChangeLog dbprim.h tests/Makefile.am tests/Makefile.in tests/t_hashtab.c tests/test-harness.dat Added files: tests/t_redblack.c tests/t_smat.c Log message: add test programs for sparse matrices and red-black trees...the latter of which ferretted out a bug in rt_remove() ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.16 dbprim/ChangeLog:1.17 --- dbprim/ChangeLog:1.16 Mon Sep 20 22:00:15 2004 +++ dbprim/ChangeLog Tue Sep 21 20:25:48 2004 @@ -1,5 +1,20 @@ 2004-09-21 Kevin L Mitchell <kl...@mi...> + * tests/test-harness.dat: add sparse matrices test cases + + * tests/t_smat.c: add test program for sparse matrices + + * tests/t_redblack.c: add the first part of the red-black tree + test suite...which has, unfortunately, discovered a bug in + rt_remove() that I haven't been able to squash yet + + * tests/t_hashtab.c (main): flip order of FAIL() message to be + more consistent + + * tests/Makefile.am (check_PROGRAMS): add t_smat and t_redblack + + * dbprim.h: fix a grammatical error in a doc comment + * tests/test-harness.h: update test-harness.h header to set output buffering Index: dbprim/dbprim.h diff -u dbprim/dbprim.h:1.7 dbprim/dbprim.h:1.8 --- dbprim/dbprim.h:1.7 Mon Sep 20 12:15:34 2004 +++ dbprim/dbprim.h Tue Sep 21 20:25:48 2004 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: dbprim.h,v 1.7 2004/09/20 19:15:34 klmitch Exp $ +** @(#)$Id: dbprim.h,v 1.8 2004/09/22 03:25:48 klmitch Exp $ */ #ifndef __include_dbprim_h__ #define __include_dbprim_h__ @@ -1475,7 +1475,7 @@ /** \ingroup dbprim_smat * \brief Object associated with an entry in a sparse matrix list. * - * This macro retrieves a pointer to one of the object represented by + * This macro retrieves a pointer to one of the objects represented by * the entry. It may be used as an lvalue to change the object * pointed to. Care should be taken when using this feature. * Index: dbprim/tests/Makefile.am diff -u dbprim/tests/Makefile.am:1.7 dbprim/tests/Makefile.am:1.8 --- dbprim/tests/Makefile.am:1.7 Mon Sep 20 22:00:15 2004 +++ dbprim/tests/Makefile.am Tue Sep 21 20:25:48 2004 @@ -15,7 +15,7 @@ ## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ## MA 02111-1307, USA ## -## @(#)$Id: Makefile.am,v 1.7 2004/09/21 05:00:15 klmitch Exp $ +## @(#)$Id: Makefile.am,v 1.8 2004/09/22 03:25:48 klmitch Exp $ ## ## Process this file with automake to generate Makefile.in @@ -28,7 +28,9 @@ check_PROGRAMS = test-harness \ \ t_linklists \ - t_hashtab + t_hashtab \ + t_smat \ + t_redblack test_harness_SOURCES = test-harness.c test-harness.h test_harness_LDADD = Index: dbprim/tests/Makefile.in diff -u dbprim/tests/Makefile.in:1.4 dbprim/tests/Makefile.in:1.5 --- dbprim/tests/Makefile.in:1.4 Mon Sep 20 22:00:15 2004 +++ dbprim/tests/Makefile.in Tue Sep 21 20:25:48 2004 @@ -151,7 +151,9 @@ check_PROGRAMS = test-harness \ \ t_linklists \ - t_hashtab + t_hashtab \ + t_smat \ + t_redblack test_harness_SOURCES = test-harness.c test-harness.h @@ -167,7 +169,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = check_PROGRAMS = test-harness$(EXEEXT) t_linklists$(EXEEXT) \ - t_hashtab$(EXEEXT) + t_hashtab$(EXEEXT) t_smat$(EXEEXT) t_redblack$(EXEEXT) t_hashtab_SOURCES = t_hashtab.c t_hashtab_OBJECTS = t_hashtab.$(OBJEXT) t_hashtab_LDADD = $(LDADD) @@ -178,6 +180,16 @@ t_linklists_LDADD = $(LDADD) t_linklists_DEPENDENCIES = $(top_builddir)/libdbprim.la t_linklists_LDFLAGS = +t_redblack_SOURCES = t_redblack.c +t_redblack_OBJECTS = t_redblack.$(OBJEXT) +t_redblack_LDADD = $(LDADD) +t_redblack_DEPENDENCIES = $(top_builddir)/libdbprim.la +t_redblack_LDFLAGS = +t_smat_SOURCES = t_smat.c +t_smat_OBJECTS = t_smat.$(OBJEXT) +t_smat_LDADD = $(LDADD) +t_smat_DEPENDENCIES = $(top_builddir)/libdbprim.la +t_smat_LDFLAGS = am_test_harness_OBJECTS = test-harness.$(OBJEXT) test_harness_OBJECTS = $(am_test_harness_OBJECTS) test_harness_DEPENDENCIES = @@ -187,6 +199,7 @@ am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/t_hashtab.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/t_linklists.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/t_redblack.Po ./$(DEPDIR)/t_smat.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/test-harness.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -195,9 +208,10 @@ CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DIST_SOURCES = t_hashtab.c t_linklists.c $(test_harness_SOURCES) +DIST_SOURCES = t_hashtab.c t_linklists.c t_redblack.c t_smat.c \ + $(test_harness_SOURCES) DIST_COMMON = $(srcdir)/Makefile.in Makefile.am -SOURCES = t_hashtab.c t_linklists.c $(test_harness_SOURCES) +SOURCES = t_hashtab.c t_linklists.c t_redblack.c t_smat.c $(test_harness_SOURCES) all: all-am @@ -221,6 +235,12 @@ t_linklists$(EXEEXT): $(t_linklists_OBJECTS) $(t_linklists_DEPENDENCIES) @rm -f t_linklists$(EXEEXT) $(LINK) $(t_linklists_LDFLAGS) $(t_linklists_OBJECTS) $(t_linklists_LDADD) $(LIBS) +t_redblack$(EXEEXT): $(t_redblack_OBJECTS) $(t_redblack_DEPENDENCIES) + @rm -f t_redblack$(EXEEXT) + $(LINK) $(t_redblack_LDFLAGS) $(t_redblack_OBJECTS) $(t_redblack_LDADD) $(LIBS) +t_smat$(EXEEXT): $(t_smat_OBJECTS) $(t_smat_DEPENDENCIES) + @rm -f t_smat$(EXEEXT) + $(LINK) $(t_smat_LDFLAGS) $(t_smat_OBJECTS) $(t_smat_LDADD) $(LIBS) test-harness$(EXEEXT): $(test_harness_OBJECTS) $(test_harness_DEPENDENCIES) @rm -f test-harness$(EXEEXT) $(LINK) $(test_harness_LDFLAGS) $(test_harness_OBJECTS) $(test_harness_LDADD) $(LIBS) @@ -233,6 +253,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_hashtab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_linklists.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_redblack.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_smat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-harness.Po@am__quote@ .c.o: Index: dbprim/tests/t_hashtab.c diff -u dbprim/tests/t_hashtab.c:1.1 dbprim/tests/t_hashtab.c:1.2 --- dbprim/tests/t_hashtab.c:1.1 Mon Sep 20 22:00:15 2004 +++ dbprim/tests/t_hashtab.c Tue Sep 21 20:25:48 2004 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: t_hashtab.c,v 1.1 2004/09/21 05:00:15 klmitch Exp $ +** @(#)$Id: t_hashtab.c,v 1.2 2004/09/22 03:25:48 klmitch Exp $ */ #include <stdio.h> #include <stdlib.h> @@ -28,7 +28,7 @@ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: t_hashtab.c,v 1.1 2004/09/21 05:00:15 klmitch Exp $"); +RCSTAG("@(#)$Id: t_hashtab.c,v 1.2 2004/09/22 03:25:48 klmitch Exp $"); TEST_PROG(t_hashtab, "Test hash table functionality") @@ -215,7 +215,7 @@ err); else if (he != &ents[tmp]) FAIL(TEST_NAME(ht_find), FATAL(0), "ht_find() found wrong entry; " - "returned %d expected %d", he ? -1 : he - ents, tmp); + "expected %d returned %d", tmp, he ? -1 : he - ents); } PASS(TEST_NAME(ht_find), "ht_find() calls successful"); Index: dbprim/tests/t_redblack.c diff -u /dev/null dbprim/tests/t_redblack.c:1.1 --- /dev/null Tue Sep 21 20:25:59 2004 +++ dbprim/tests/t_redblack.c Tue Sep 21 20:25:48 2004 @@ -0,0 +1,210 @@ +/* +** Copyright (C) 2004 by Kevin L. Mitchell <kl...@mi...> +** +** This library is free software; you can redistribute it and/or +** modify it under the terms of the GNU Library General Public +** License as published by the Free Software Foundation; either +** version 2 of the License, or (at your option) any later version. +** +** This library is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** Library General Public License for more details. +** +** You should have received a copy of the GNU Library General Public +** License along with this library; if not, write to the Free +** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +** MA 02111-1307, USA +** +** @(#)$Id: t_redblack.c,v 1.1 2004/09/22 03:25:48 klmitch Exp $ +*/ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + +#include "test-harness.h" + +#include "dbprim.h" +#include "dbprim_int.h" + +RCSTAG("@(#)$Id: t_redblack.c,v 1.1 2004/09/22 03:25:48 klmitch Exp $"); + +TEST_PROG(t_redblack, "Test red-black tree functionality") + +#define RBT_ELEM_CNT 32 + +/* this is so complicated because RBT_ELEM_CNT is likely the maximum number + * of bits representable in an unsigned long, so we have to look out for + * overflows. + */ +#define RBT_ELEM_MASK ((((0x01lu << (RBT_ELEM_CNT - 1)) - 1) << 1) | 0x01lu) + +/* recursive routine for obtaining pre-order list... */ +static void +_make_pre(rb_node_t *node, int *order, int *idx, int reverse, + unsigned long *visited) +{ + order[(*idx)++] = (int)rn_value(node); /* store node... */ + if (reverse && rn_right(node)) /* recurse down the right if reversed */ + _make_pre(rn_right(node), order, idx, reverse, visited); + if (rn_left(node)) /* recurse down the left */ + _make_pre(rn_left(node), order, idx, reverse, visited); + if (!reverse && rn_right(node)) /* recurse down the right if not reversed */ + _make_pre(rn_right(node), order, idx, reverse, visited); + + *visited &= ~(0x01ul << (int)rn_value(node)); +} + +/* recursive routine for obtaining in-order list... */ +static void +_make_in(rb_node_t *node, int *order, int *idx, int reverse, + unsigned long *visited) +{ +#define selnode(n, rev) ((rev) ? rn_right(n) : rn_left(n)) + if (selnode(node, reverse)) /* recurse down one subtree... */ + _make_in(selnode(node, reverse), order, idx, reverse, visited); + order[(*idx)++] = (int)rn_value(node); /* store node... */ + if (selnode(node, !reverse)) /* recurse down other subtree... */ + _make_in(selnode(node, !reverse), order, idx, reverse, visited); + + *visited &= ~(0x01ul << (int)rn_value(node)); +} + +/* recursive routine for obtaining post-order list... */ +static void +_make_post(rb_node_t *node, int *order, int *idx, int reverse, + unsigned long *visited) +{ + if (reverse && rn_right(node)) /* recurse down the right if reversed */ + _make_post(rn_right(node), order, idx, reverse, visited); + if (rn_left(node)) /* recurse down the left */ + _make_post(rn_left(node), order, idx, reverse, visited); + if (!reverse && rn_right(node)) /* recurse down the right if not reversed */ + _make_post(rn_right(node), order, idx, reverse, visited); + order[(*idx)++] = (int)rn_value(node); /* store node... */ + + *visited &= ~(0x01ul << (int)rn_value(node)); +} + +/* calculate the order of nodes in the traversal of an redblack tree */ +static void +make_order(rb_tree_t *tree, int *order, unsigned long flags, + unsigned long *visited) +{ + int idx = 0; + + switch (flags & RBT_ORDER_MASK) { + case RBT_ORDER_PRE: /* get the pre-order list */ + _make_pre(rt_root(tree), order, &idx, flags & DB_FLAG_REVERSE, visited); + break; + case RBT_ORDER_IN: /* get the in-order list */ + _make_in(rt_root(tree), order, &idx, flags & DB_FLAG_REVERSE, visited); + break; + case RBT_ORDER_POST: /* get the post-order list */ + _make_post(rt_root(tree), order, &idx, flags & DB_FLAG_REVERSE, visited); + break; + } +} + +/* compare two sets of orders... */ +static int +comp_order(int *o1, int *o2) +{ + int i; + + for (i = 0; i < RBT_ELEM_CNT; i++) /* walk through all the elements */ + if (o1[i] != o2[i]) + return 1; /* oops, mismatch... */ + + return 0; /* OK, everything's fine. */ +} + +/* simple comparison function for testing... */ +static long +t_comp(rb_tree_t *tree, db_key_t *key1, db_key_t *key2) +{ + return dk_len(key1) - dk_len(key2); /* difference of the lengths */ +} + +int +main(int argc, char **argv) +{ + unsigned long err; + rb_tree_t tree; /* a red-black tree to play with... */ + rb_node_t nodes[RBT_ELEM_CNT]; + rb_node_t *n = 0; + db_key_t key = DB_KEY_INIT(0, 0); + int i, tmp; + unsigned long visited, visit_init; + + srand(time(0)); /* seed random number generator */ + + /* Let's test rt_init() first... */ + TEST(t_redblack, rt_init, "Test that rt_init() may be called", + (!(err = rt_init(&tree, t_comp, 0))), FATAL(0), + ("rt_init() call successful"), + ("rt_init() call failed with error %lu", err)); + + /* Now try some rn_init()s... */ + TEST_DECL(t_redblack, rn_init, "Test that rn_init() may be called") + for (i = 0; i < RBT_ELEM_CNT; i++) + if ((err = rn_init(&nodes[i], (void *)i))) + FAIL(TEST_NAME(rn_init), FATAL(0), "rn_init() failed with error %lu", + err); + PASS(TEST_NAME(rn_init), "rn_init() calls successful"); + + /* OK, now we gotta add some nodes to the tree with rt_add()... */ + TEST_DECL(t_redblack, rt_add, "Test that rt_add() adds entries to the tree") + for (dk_len(&key) = 0; dk_len(&key) < RBT_ELEM_CNT; dk_len(&key)++) + if ((err = rt_add(&tree, &nodes[dk_len(&key)], &key))) + FAIL(TEST_NAME(rt_add), FATAL(0), "rt_add() failed with error %lu", err); + PASS(TEST_NAME(rt_add), "rt_add() calls successful"); + + /* Next, try a few rt_find()s... */ + TEST_DECL(t_redblack, rt_find, "Test that rt_find() finds entries in tree") + for (visited = RBT_ELEM_MASK; visited; + visited &= ~(0x01lu << dk_len(&key))) { + dk_len(&key) = rand() % RBT_ELEM_CNT; /* select an entry at random... */ + fprintf(stderr, "Looking up entry %d . . .\n", dk_len(&key)); + if ((err = rt_find(&tree, &n, &key))) + FAIL(TEST_NAME(rt_find), FATAL(0), "rt_find() failed with error %lu", + err); + else if (n != &nodes[dk_len(&key)]) + FAIL(TEST_NAME(rt_find), FATAL(0), "rt_find() found wrong entry; " + "expected %d returned %d", dk_len(&key), n ? -1 : n - nodes); + } + PASS(TEST_NAME(rt_find), "rt_find() calls successful"); + + /* Let's try removing some nodes with rt_remove()... */ + TEST_DECL(t_redblack, rt_remove, "Test that rt_remove() removes nodes") + for (visit_init = RBT_ELEM_MASK; rt_count(&tree) > RBT_ELEM_CNT / 2; + visit_init &= ~(0x01lu << tmp)) { + tmp = rand() % RBT_ELEM_CNT; /* select an entry at random... */ + + if (!(visit_init & (0x01lu << tmp))) /* already removed... */ + continue; /* so skip it */ + + fprintf(stderr, "Removing element %d . . .\n", tmp); + + if ((err = rt_remove(&tree, &nodes[tmp]))) + FAIL(TEST_NAME(rt_remove), FATAL(0), "rt_remove() failed with error %lu", + err); + } + /* Now see if we can still locate elements in the tree... */ + for (visited = RBT_ELEM_MASK; visited; + visited &= ~(0x01lu << dk_len(&key))) { + dk_len(&key) = rand() % RBT_ELEM_CNT; /* select an entry at random... */ + fprintf(stderr, "Looking up entry %d . . .%s\n", dk_len(&key), + (visit_init & (0x01lu << dk_len(&key))) ? "" : "[removed]"); + + err = rt_find(&tree, &n, &key); /* look up the node */ + + if (err != ((visit_init & (0x01lu << dk_len(&key))) ? 0 : DB_ERR_NOENTRY)) + FAIL(TEST_NAME(rt_remove), FATAL(0), "rt_remove() (probably) corrupted " + "the tree bad enough that rt_find() returned error %lu", err); + } + PASS(TEST_NAME(rt_remove), "rt_remove() calls successful"); + + return 0; +} Index: dbprim/tests/t_smat.c diff -u /dev/null dbprim/tests/t_smat.c:1.1 --- /dev/null Tue Sep 21 20:25:59 2004 +++ dbprim/tests/t_smat.c Tue Sep 21 20:25:48 2004 @@ -0,0 +1,196 @@ +/* +** Copyright (C) 2004 by Kevin L. Mitchell <kl...@mi...> +** +** This library is free software; you can redistribute it and/or +** modify it under the terms of the GNU Library General Public +** License as published by the Free Software Foundation; either +** version 2 of the License, or (at your option) any later version. +** +** This library is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** Library General Public License for more details. +** +** You should have received a copy of the GNU Library General Public +** License along with this library; if not, write to the Free +** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +** MA 02111-1307, USA +** +** @(#)$Id: t_smat.c,v 1.1 2004/09/22 03:25:48 klmitch Exp $ +*/ +#include <stdio.h> +#include <stdlib.h> +#include <time.h> + +#include "test-harness.h" + +#include "dbprim.h" +#include "dbprim_int.h" + +RCSTAG("@(#)$Id: t_smat.c,v 1.1 2004/09/22 03:25:48 klmitch Exp $"); + +TEST_PROG(t_smat, "Test sparse matrix functionality") + +#define SMAT_HEAD_CNT 32 + +/* this is so complicated because SMAT_HEAD_CNT is likely the maximum number + * of bits representable in an unsigned long, so we have to look out for + * overflows. + */ +#define SMAT_HEAD_MASK ((((0x01lu << (SMAT_HEAD_CNT - 1)) - 1) << 1) | 0x01lu) + +static smat_head_t rows[SMAT_HEAD_CNT]; +static smat_head_t columns[SMAT_HEAD_CNT]; +static struct assoc_s { + unsigned long assoc[SMAT_HEAD_CNT]; +} associations; + +#define SMAT_ASSOC_CNT (32 * 4) + +/* Set all bits in the struct assoc_s to one... */ +static void +set_ones(struct assoc_s *assoc) +{ + int i; + + for (i = 0; i < SMAT_HEAD_CNT; i++) /* walk through them all... */ + assoc->assoc[i] = SMAT_HEAD_MASK; /* set the bits */ +} + +/* Clear all bits in the struct assoc_s... */ +static void +set_zeros(struct assoc_s *assoc) +{ + int i; + + for (i = 0; i < SMAT_HEAD_CNT; i++) /* walk through them all... */ + assoc->assoc[i] = 0; /* set the bits */ +} + +/* is everything zeroed? */ +static int +check_zeros(struct assoc_s *assoc) +{ + int i; + + for (i = 0; i < SMAT_HEAD_CNT; i++) /* walk through them all... */ + if (assoc->assoc[i]) /* if an element's not zero... */ + return 0; + + return 1; /* everything is zeroed. */ +} + +/* macros to diddle individual bits in the association tracker */ +#define set_assoc(ass, row, column) \ + ((ass)->assoc[(row)] |= (0x01lu << (column))) +#define clr_assoc(ass, row, column) \ + ((ass)->assoc[(row)] &= ~(0x01lu << (column))) +#define chk_assoc(ass, row, column) \ + ((ass)->assoc[(row)] & (0x01lu << (column))) + +int +main(int argc, char **argv) +{ + unsigned long err; + smat_table_t tab; /* a sparse matrix table to play with... */ + smat_entry_t *se = 0; + int i, rt, ct; + struct assoc_s visited; + + srand(time(0)); /* seed random number generator */ + + /* Let's test st_init first... */ + TEST(t_smat, st_init, "Test that st_init() may be called", + (!(err = st_init(&tab, 0, 0, 0, 6)) && + st_modulus(&tab) == 7), FATAL(0), + ("st_init() call successful"), + ("st_init() call failed with error %lu modulus %lu", err, + st_modulus(&tab))); + + /* Now try some sh_inits... */ + TEST_DECL(t_smat, sh_init, "Test that sh_init() may be called") + for (i = 0; i < SMAT_HEAD_CNT; i++) + if ((err = sh_init(&rows[i], SMAT_LOC_FIRST, (void *)i)) || + (err = sh_init(&columns[i], SMAT_LOC_SECOND, (void *)i))) + FAIL(TEST_NAME(sh_init), FATAL(0), "sh_init() failed with error %lu", + err); + PASS(TEST_NAME(sh_init), "sh_init() calls successful"); + + /* OK, create some associations... */ + TEST_DECL(t_smat, st_add, "Test that st_add() adds elements to a sparse " + "matrix") + set_zeros(&associations); /* clear the associations */ + for (i = 0; i < SMAT_ASSOC_CNT; i++) { + rt = rand() % SMAT_HEAD_CNT; /* select row and column elements... */ + ct = rand() % SMAT_HEAD_CNT; + + if (chk_assoc(&associations, rt, ct)) + continue; /* only create unique associations */ + + fprintf(stderr, "Creating association %d<->%d\n", rt, ct); + + /* add the association; note that ll_add()'s been tested, so + * we don't have to test with other LINK_LOC_* values. (Well, + * perhaps we should, but it's tough to do it here...) + */ + if ((err = st_add(&tab, 0, &rows[rt], LINK_LOC_HEAD, 0, &columns[ct], + LINK_LOC_HEAD, 0))) + FAIL(TEST_NAME(st_add), FATAL(0), "st_add() failed with error %lu", err); + + set_assoc(&associations, rt, ct); /* remember the association */ + } + PASS(TEST_NAME(st_add), "st_add() added associations properly"); + + /* Can we look them up? */ + TEST_DECL(t_smat, st_find, "Test that st_find() can locate elements in a " + "sparse matrix") + for (set_ones(&visited); !check_zeros(&visited); + clr_assoc(&visited, rt, ct)) { + rt = rand() % SMAT_HEAD_CNT; /* select row and column elements... */ + ct = rand() % SMAT_HEAD_CNT; + + fprintf(stderr, "Looking up association %d<->%d\n", rt, ct); + + /* look up the association */ + err = st_find(&tab, &se, &rows[rt], &columns[ct]); + + /* check the error value... */ + if (err != (chk_assoc(&associations, rt, ct) ? 0 : DB_ERR_NOENTRY)) + FAIL(TEST_NAME(st_find), FATAL(0), "st_find() failed with error %lu", + err); + if (!err && ((int)se_object(se, SMAT_LOC_FIRST) != rt || + (int)se_object(se, SMAT_LOC_SECOND) != ct)) + FAIL(TEST_NAME(st_find), FATAL(0), "st_find() found wrong entry; " + "expected %d/%d, found %d/%d", rt, ct, + (int)se_object(se, SMAT_LOC_FIRST), + (int)se_object(se, SMAT_LOC_SECOND)); + + fprintf(stderr, err ? "No such association\n" : "Found association\n"); + } + PASS(TEST_NAME(st_find), "st_find() calls successful"); + + /* Now try to remove some entries... */ + TEST_DECL(t_smat, st_remove, "Test that st_remove() can remove elements in " + "a sparse matrix") + while (st_count(&tab) > SMAT_ASSOC_CNT / 2) { + rt = rand() % SMAT_HEAD_CNT; /* select row and column elements... */ + ct = rand() % SMAT_HEAD_CNT; + + if (!chk_assoc(&associations, rt, ct)) + continue; /* only try to remove associations that exist */ + + fprintf(stderr, "Looking up association %d<->%d for removal\n", rt, ct); + + if ((err = st_find(&tab, &se, &rows[rt], &columns[ct])) || + (err = st_remove(&tab, se))) + FAIL(TEST_NAME(st_remove), FATAL(0), "st_find() failed to find " + "association %d/%d or st_remove() failed to remove it", rt, ct); + + fprintf(stderr, "Association removed\n"); + + clr_assoc(&associations, rt, ct); + } + PASS(TEST_NAME(st_remove), "st_remove() calls successful"); + + return 0; +} Index: dbprim/tests/test-harness.dat diff -u dbprim/tests/test-harness.dat:1.5 dbprim/tests/test-harness.dat:1.6 --- dbprim/tests/test-harness.dat:1.5 Mon Sep 20 22:00:15 2004 +++ dbprim/tests/test-harness.dat Tue Sep 21 20:25:48 2004 @@ -15,7 +15,7 @@ # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA # -# @(#)$Id: test-harness.dat,v 1.5 2004/09/21 05:00:15 klmitch Exp $ +# @(#)$Id: test-harness.dat,v 1.6 2004/09/22 03:25:48 klmitch Exp $ program t_linklists t_linklists \ "Test linked list functionality" @@ -69,3 +69,21 @@ "Test that ht_remove() automatically shrinks the table" test ht_find_autoshrink t_hashtab PASS \ "Test that ht_find() can still find entries for autoshrink" + +program t_smat t_smat \ + "Test sparse matrix functionality" +t_smat: t_linklists t_hashtab + +test st_init t_smat PASS \ + "Test that st_init() may be called" +test sh_init t_smat PASS \ + "Test that sh_init() may be called" +test st_add t_smat PASS \ + "Test that st_add() adds elements to a sparse matrix" +test st_find t_smat PASS \ + "Test that st_find() can locate elements in a sparse matrix" +test st_remove t_smat PASS \ + "Test that st_remove() can remove elements in a sparse matrix" + +# Pretty much everything else is so simple and straightforward that it +# should just work. If you do find a bug, write a test case for it :) ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2004-09-21 05:00:37
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2004-09-21 05:00:26 UTC Modified files: ChangeLog Makefile.in _smat_hash.c ht_add.c ht_free.c ht_remove.c tests/Makefile.am tests/Makefile.in tests/t_linklists.c tests/test-harness.dat tests/test-harness.h Added files: tests/t_hashtab.c Log message: fix a couple of bugs with autogrowth and autoshrinkage discovered while creating new test program for hash tables; other miscellaneous stuff. ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.15 dbprim/ChangeLog:1.16 --- dbprim/ChangeLog:1.15 Mon Sep 20 12:15:34 2004 +++ dbprim/ChangeLog Mon Sep 20 22:00:15 2004 @@ -1,5 +1,32 @@ +2004-09-21 Kevin L Mitchell <kl...@mi...> + + * tests/test-harness.h: update test-harness.h header to set output + buffering + + * tests/test-harness.dat: change some whitespace and add the + necessary information for t_hashtab.c + + * tests/t_hashtab.c: test program for hash tables + + * tests/Makefile.am (check_PROGRAMS): add t_hashtab + + * ht_remove.c (ht_remove): move the table shrinkage to before the + ll_remove(), so that if ht_resize() fails, we can bail out before + removing the element + + * ht_free.c (ht_free): must zero rollover and rollunder + + * ht_add.c (ht_add): make the element count increment the last + thing done after the ll_add() + 2004-09-20 Kevin L Mitchell <kl...@mi...> + * _smat_hash.c (_smat_hash): uh, oops--type mismatch + + * tests/t_linklists.c: put ChkOrder macro in a more reasonable + location + (ChkOrder): don't let a test fail twice... + * tests/test-harness.h: new test-harness header file defining some macros which are useful for unit tests Index: dbprim/Makefile.in diff -u dbprim/Makefile.in:1.5 dbprim/Makefile.in:1.6 --- dbprim/Makefile.in:1.5 Mon Sep 20 12:15:34 2004 +++ dbprim/Makefile.in Mon Sep 20 22:00:15 2004 @@ -357,8 +357,7 @@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = tests/Makefile doc/Doxyfile comp_et-sh \ - dbprim-config dbprim.spec +CONFIG_CLEAN_FILES = doc/Doxyfile comp_et-sh dbprim-config dbprim.spec LTLIBRARIES = $(lib_LTLIBRARIES) am_libdbprim_la_OBJECTS = dbprim_version.lo _hash_prime.lo he_init.lo \ @@ -454,8 +453,6 @@ $(ACLOCAL_M4): configure.ac acinclude.m4 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -tests/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/Makefile.in - cd $(top_builddir) && $(SHELL) ./config.status $@ doc/Doxyfile: $(top_builddir)/config.status $(top_srcdir)/doc/Doxyfile.in cd $(top_builddir) && $(SHELL) ./config.status $@ comp_et-sh: $(top_builddir)/config.status comp_et-sh.in @@ -818,7 +815,7 @@ distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkinstalldirs) $(distdir)/. $(distdir)/doc $(distdir)/tests + $(mkinstalldirs) $(distdir)/. $(distdir)/doc @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ Index: dbprim/_smat_hash.c diff -u dbprim/_smat_hash.c:1.3 dbprim/_smat_hash.c:1.4 --- dbprim/_smat_hash.c:1.3 Sat Nov 22 10:26:36 2003 +++ dbprim/_smat_hash.c Mon Sep 20 22:00:15 2004 @@ -16,18 +16,18 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: _smat_hash.c,v 1.3 2003/11/22 18:26:36 klmitch Exp $ +** @(#)$Id: _smat_hash.c,v 1.4 2004/09/21 05:00:15 klmitch Exp $ */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: _smat_hash.c,v 1.3 2003/11/22 18:26:36 klmitch Exp $"); +RCSTAG("@(#)$Id: _smat_hash.c,v 1.4 2004/09/21 05:00:15 klmitch Exp $"); unsigned long _smat_hash(hash_table_t *table, db_key_t *key) { int i, j; - unsigned int hash = 0; + unsigned long hash = 0; void **objects; unsigned char *c; Index: dbprim/ht_add.c diff -u dbprim/ht_add.c:1.2 dbprim/ht_add.c:1.3 --- dbprim/ht_add.c:1.2 Wed Jun 11 18:10:04 2003 +++ dbprim/ht_add.c Mon Sep 20 22:00:15 2004 @@ -16,12 +16,12 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: ht_add.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $ +** @(#)$Id: ht_add.c,v 1.3 2004/09/21 05:00:15 klmitch Exp $ */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: ht_add.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $"); +RCSTAG("@(#)$Id: ht_add.c,v 1.3 2004/09/21 05:00:15 klmitch Exp $"); /** \ingroup dbprim_hash * \brief Add an entry to a hash table. @@ -71,10 +71,10 @@ if (!ht_find(table, 0, key)) /* don't permit duplicates */ return DB_ERR_DUPLICATE; - /* increment element count and grow the table if necessary and allowed */ - if (++table->ht_count > table->ht_rollover && + /* grow the table if necessary and allowed */ + if ((table->ht_count + 1) > table->ht_rollover && (table->ht_flags & HASH_FLAG_AUTOGROW) && - (retval = ht_resize(table, 0))) + (retval = ht_resize(table, _hash_fuzz(table->ht_count + 1)))) return retval; /* Force the link element to point to the entry */ @@ -89,10 +89,10 @@ /* Now add the entry to the table... */ if ((retval = ll_add(&table->ht_table[entry->he_hash], &entry->he_elem, - LINK_LOC_HEAD, 0))) { - table->ht_count--; /* decrement the count--don't worry about shrinking */ + LINK_LOC_HEAD, 0))) return retval; - } + + table->ht_count++; /* OK, now increment element count */ entry->he_table = table; /* point entry at table */ Index: dbprim/ht_free.c diff -u dbprim/ht_free.c:1.2 dbprim/ht_free.c:1.3 --- dbprim/ht_free.c:1.2 Wed Jun 11 18:10:04 2003 +++ dbprim/ht_free.c Mon Sep 20 22:00:15 2004 @@ -16,14 +16,14 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: ht_free.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $ +** @(#)$Id: ht_free.c,v 1.3 2004/09/21 05:00:15 klmitch Exp $ */ #include <stdlib.h> #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: ht_free.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $"); +RCSTAG("@(#)$Id: ht_free.c,v 1.3 2004/09/21 05:00:15 klmitch Exp $"); /** \ingroup dbprim_hash * \brief Free memory used by an empty hash table. @@ -57,6 +57,8 @@ free(table->ht_table); /* free allocated memory */ table->ht_modulus = 0; /* zero the table and modulus */ + table->ht_rollover = 0; /* must also zero the rollover/rollunder */ + table->ht_rollunder = 0; table->ht_table = 0; return 0; Index: dbprim/ht_remove.c diff -u dbprim/ht_remove.c:1.3 dbprim/ht_remove.c:1.4 --- dbprim/ht_remove.c:1.3 Tue Jan 20 21:23:16 2004 +++ dbprim/ht_remove.c Mon Sep 20 22:00:15 2004 @@ -16,12 +16,12 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: ht_remove.c,v 1.3 2004/01/21 05:23:16 klmitch Exp $ +** @(#)$Id: ht_remove.c,v 1.4 2004/09/21 05:00:15 klmitch Exp $ */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: ht_remove.c,v 1.3 2004/01/21 05:23:16 klmitch Exp $"); +RCSTAG("@(#)$Id: ht_remove.c,v 1.4 2004/09/21 05:00:15 klmitch Exp $"); /** \ingroup dbprim_hash * \brief Remove an element from a hash table. @@ -58,16 +58,19 @@ if (table->ht_flags & HASH_FLAG_FREEZE) /* don't remove from frozen tables */ return DB_ERR_FROZEN; + /* try to shrink the table if necessary... */ + if ((table->ht_count - 1) < table->ht_rollunder && + (table->ht_flags & HASH_FLAG_AUTOSHRINK) && + (retval = ht_resize(table, table->ht_count - 1))) + return retval; /* if we try to shrink and it won't, error out */ + /* remove the entry from the table */ if ((retval = ll_remove(&table->ht_table[entry->he_hash], &entry->he_elem))) return retval; entry->he_table = 0; /* reset the table */ - /* decrement element count and shrink the table if necessary and allowed */ - if (--table->ht_count < table->ht_rollunder && - (table->ht_flags & HASH_FLAG_AUTOSHRINK)) - retval = ht_resize(table, table->ht_count); + table->ht_count--; /* decrement element count */ return retval; } Index: dbprim/tests/Makefile.am diff -u dbprim/tests/Makefile.am:1.6 dbprim/tests/Makefile.am:1.7 --- dbprim/tests/Makefile.am:1.6 Mon Sep 20 12:15:35 2004 +++ dbprim/tests/Makefile.am Mon Sep 20 22:00:15 2004 @@ -15,7 +15,7 @@ ## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ## MA 02111-1307, USA ## -## @(#)$Id: Makefile.am,v 1.6 2004/09/20 19:15:35 klmitch Exp $ +## @(#)$Id: Makefile.am,v 1.7 2004/09/21 05:00:15 klmitch Exp $ ## ## Process this file with automake to generate Makefile.in @@ -27,7 +27,8 @@ check_PROGRAMS = test-harness \ \ - t_linklists + t_linklists \ + t_hashtab test_harness_SOURCES = test-harness.c test-harness.h test_harness_LDADD = Index: dbprim/tests/Makefile.in diff -u dbprim/tests/Makefile.in:1.3 dbprim/tests/Makefile.in:1.4 --- dbprim/tests/Makefile.in:1.3 Mon Sep 20 12:15:35 2004 +++ dbprim/tests/Makefile.in Mon Sep 20 22:00:15 2004 @@ -150,7 +150,8 @@ check_PROGRAMS = test-harness \ \ - t_linklists + t_linklists \ + t_hashtab test_harness_SOURCES = test-harness.c test-harness.h @@ -165,7 +166,13 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = -check_PROGRAMS = test-harness$(EXEEXT) t_linklists$(EXEEXT) +check_PROGRAMS = test-harness$(EXEEXT) t_linklists$(EXEEXT) \ + t_hashtab$(EXEEXT) +t_hashtab_SOURCES = t_hashtab.c +t_hashtab_OBJECTS = t_hashtab.$(OBJEXT) +t_hashtab_LDADD = $(LDADD) +t_hashtab_DEPENDENCIES = $(top_builddir)/libdbprim.la +t_hashtab_LDFLAGS = t_linklists_SOURCES = t_linklists.c t_linklists_OBJECTS = t_linklists.$(OBJEXT) t_linklists_LDADD = $(LDADD) @@ -178,7 +185,8 @@ DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/t_linklists.Po \ +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/t_hashtab.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/t_linklists.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/test-harness.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -187,9 +195,9 @@ CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DIST_SOURCES = t_linklists.c $(test_harness_SOURCES) +DIST_SOURCES = t_hashtab.c t_linklists.c $(test_harness_SOURCES) DIST_COMMON = $(srcdir)/Makefile.in Makefile.am -SOURCES = t_linklists.c $(test_harness_SOURCES) +SOURCES = t_hashtab.c t_linklists.c $(test_harness_SOURCES) all: all-am @@ -207,6 +215,9 @@ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done +t_hashtab$(EXEEXT): $(t_hashtab_OBJECTS) $(t_hashtab_DEPENDENCIES) + @rm -f t_hashtab$(EXEEXT) + $(LINK) $(t_hashtab_LDFLAGS) $(t_hashtab_OBJECTS) $(t_hashtab_LDADD) $(LIBS) t_linklists$(EXEEXT): $(t_linklists_OBJECTS) $(t_linklists_DEPENDENCIES) @rm -f t_linklists$(EXEEXT) $(LINK) $(t_linklists_LDFLAGS) $(t_linklists_OBJECTS) $(t_linklists_LDADD) $(LIBS) @@ -220,6 +231,7 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_hashtab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_linklists.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-harness.Po@am__quote@ Index: dbprim/tests/t_hashtab.c diff -u /dev/null dbprim/tests/t_hashtab.c:1.1 --- /dev/null Mon Sep 20 22:00:27 2004 +++ dbprim/tests/t_hashtab.c Mon Sep 20 22:00:15 2004 @@ -0,0 +1,469 @@ +/* +** Copyright (C) 2004 by Kevin L. Mitchell <kl...@mi...> +** +** This library is free software; you can redistribute it and/or +** modify it under the terms of the GNU Library General Public +** License as published by the Free Software Foundation; either +** version 2 of the License, or (at your option) any later version. +** +** This library is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** Library General Public License for more details. +** +** You should have received a copy of the GNU Library General Public +** License along with this library; if not, write to the Free +** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +** MA 02111-1307, USA +** +** @(#)$Id: t_hashtab.c,v 1.1 2004/09/21 05:00:15 klmitch Exp $ +*/ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + +#include "test-harness.h" + +#include "dbprim.h" +#include "dbprim_int.h" + +RCSTAG("@(#)$Id: t_hashtab.c,v 1.1 2004/09/21 05:00:15 klmitch Exp $"); + +TEST_PROG(t_hashtab, "Test hash table functionality") + +#define FLUSH_THRESHOLD 10 + +/* calculate the hamming weight... */ +static unsigned long +hamming(unsigned long bits) +{ +#define _hw(n, m, s) (((n) & (m)) + (((n) >> (s)) & (m))) + bits = _hw(bits, 0x55555555, 1); + bits = _hw(bits, 0x33333333, 2); + bits = _hw(bits, 0x0f0f0f0f, 4); + bits = _hw(bits, 0x00ff00ff, 8); + bits = _hw(bits, 0x0000ffff, 16); + + return bits; +} + +/* simple hash function for testing... */ +static unsigned long +t_hash(hash_table_t *tab, db_key_t *key) +{ + unsigned long hash = 0; + unsigned char *kv = dk_key(key); + int i; + + if (dk_len(key) < 0) /* if no length... */ + dk_len(key) = strlen((char *)dk_key(key)); /* set one! */ + + for (i = dk_len(key); i; i--) /* hash the string */ + hash += hash * 257 + kv[i]; + + return hash; /* return the hash value */ +} + +/* simple hash comparison function for testing... */ +static unsigned long +t_comp(hash_table_t *tab, db_key_t *key1, db_key_t *key2) +{ + if (dk_len(key1) < 0) /* first, fix up the lengths... */ + dk_len(key1) = strlen((char *)dk_key(key1)); + if (dk_len(key2) < 0) + dk_len(key2) = strlen((char *)dk_key(key2)); + + if (dk_len(key1) != dk_len(key2)) /* if lengths don't match... */ + return 1; /* then the entries can't possibly match */ + + /* use memcmp to do the actual comparison */ + return memcmp(dk_key(key1), dk_key(key2), dk_len(key1)); +} + +static unsigned int rsize_flags = 0; + +#define RSF_INHIBIT 0x0001 +#define RSF_RESIZE 0x0002 + +static unsigned long rsize_new = 0; +static unsigned long rsize_err = 44; + +/* simple resize callback function for testing */ +static unsigned long +t_resize(hash_table_t *tab, unsigned long new) +{ + rsize_new = new; /* save new table size... */ + rsize_flags |= RSF_RESIZE; /* mark that it's been resized */ + + /* should we inhibit resize? */ + return rsize_flags & RSF_INHIBIT ? rsize_err : 0; +} + +static db_key_t keys[] = { + DB_KEY_INIT("one", -1), DB_KEY_INIT("two", -1), + DB_KEY_INIT("three", -1), DB_KEY_INIT("four", -1), + DB_KEY_INIT("five", -1), DB_KEY_INIT("six", -1), + DB_KEY_INIT("seven", -1), DB_KEY_INIT("eight", -1), + DB_KEY_INIT("nine", -1), DB_KEY_INIT("ten", -1), + DB_KEY_INIT("eleven", -1), DB_KEY_INIT("twelve", -1), + DB_KEY_INIT("thirteen", -1), DB_KEY_INIT("fourteen", -1), + DB_KEY_INIT("fifteen", -1), DB_KEY_INIT("sixteen", -1), + DB_KEY_INIT("seventeen", -1), DB_KEY_INIT("eighteen", -1), + DB_KEY_INIT("nineteen", -1), DB_KEY_INIT("twenty", -1), + DB_KEY_INIT("twenty-one", -1), DB_KEY_INIT("twenty-two", -1), + DB_KEY_INIT("twenty-three", -1), DB_KEY_INIT("twenty-four", -1), + DB_KEY_INIT("twenty-five", -1), DB_KEY_INIT("twenty-six", -1), + DB_KEY_INIT("twenty-seven", -1), DB_KEY_INIT("twenty-eight", -1), + DB_KEY_INIT("twenty-nine", -1), DB_KEY_INIT("thirty", -1) +}; + +#define HASH_ENT_CNT (sizeof(keys) / sizeof(db_key_t)) + +static struct moves_s { + int elem; + db_key_t key; +} moves[] = { + { 3, DB_KEY_INIT("thirty-one", -1) }, + { 14, DB_KEY_INIT("thirty-two", -1) }, + { 6, DB_KEY_INIT("thirty-three", -1) }, + { 11, DB_KEY_INIT("thirty-four", -1) }, + { 1, DB_KEY_INIT("thirty-five", -1) }, + { 4, DB_KEY_INIT("thirty-six", -1) }, + { 27, DB_KEY_INIT("thirty-seven", -1) }, + { 24, DB_KEY_INIT("thirty-eight", -1) }, + { 18, DB_KEY_INIT("thirty-nine", -1) }, + { 15, DB_KEY_INIT("forty", -1) } +}; + +#define HASH_MOVE_CNT (sizeof(moves) / sizeof(struct moves_s)) + +static int removes[] = { 5, 7, 24, 21, 13, 8, 22 }; + +#define HASH_REMOVE_CNT (sizeof(removes) / sizeof(int)) + +struct iter_s { + int elem; + unsigned long err; + unsigned long visited; +}; + +#define VISIT_INIT ((1 << HASH_ENT_CNT) - 1) + +static unsigned long +t_iter(hash_table_t *tab, hash_entry_t *ent, struct iter_s *iter) +{ + if (iter->elem == (int)he_value(ent)) /* If this is the one we error on... */ + return iter->err; /* then error out, dude! */ + + /* must be after the error return because the element we're looking at + * might actually be the last element anyway, so if we turned off the + * bit, iter->visited would be zero, and the test would unexpectedly + * fail. + */ + iter->visited &= ~(1 << (int)he_value(ent)); + + return 0; +} + +int +main(int argc, char **argv) +{ + unsigned long err; + hash_table_t tab; /* a hash table to play with... */ + hash_entry_t ents[HASH_ENT_CNT]; /* some entries to operate on... */ + hash_entry_t *he = 0; + int i, tmp; + unsigned long visited = VISIT_INIT, visit_init = VISIT_INIT; + unsigned long oldsize = 0, newsize = 0; + struct iter_s iter_tmp = { 0, 88, 0 }; + int resize_successful = 0; + + srand(time(0)); /* seed random number generator */ + + /* OK, let's test ht_init first... */ + TEST(t_hashtab, ht_init, "Test that ht_init() may be called", + (!(err = ht_init(&tab, 0, t_hash, t_comp, t_resize, 0, 6)) && + ht_modulus(&tab) == 7), FATAL(0), + ("ht_init() call successful"), + ("ht_init() call failed with error %lu modulus %lu", err, + ht_modulus(&tab))); + + /* Now let's try some he_init()s... */ + TEST_DECL(t_hashtab, he_init, "Test that he_init() may be called") + for (i = 0; i < HASH_ENT_CNT; i++) + if ((err = he_init(&ents[i], (void *)i))) + FAIL(TEST_NAME(he_init), FATAL(0), "he_init() failed with error %lu", + err); + PASS(TEST_NAME(he_init), "he_init() calls successful"); + + /* All right, let's add the entries to the hash table. */ + TEST_DECL(t_hashtab, ht_add, "Test that ht_add() adds entries to hash table") + for (i = 0; i < HASH_ENT_CNT; i++) + if ((err = ht_add(&tab, &ents[i], &keys[i]))) + FAIL(TEST_NAME(ht_add), FATAL(0), "ht_add() failed with error %lu", err); + PASS(TEST_NAME(ht_add), "ht_add() calls successful"); + + /* Now let's try a few ht_find() trials... */ + TEST_DECL(t_hashtab, ht_find, "Test that ht_find() finds entries in hash " + "table") + for (visited = VISIT_INIT; visited; visited &= ~(1 << tmp)) { + tmp = rand() % HASH_ENT_CNT; /* select an entry at random */ + fprintf(stderr, "Looking up entry %d . . .\n", tmp); + if ((err = ht_find(&tab, &he, &keys[tmp]))) + FAIL(TEST_NAME(ht_find), FATAL(0), "ht_find() failed with error %lu", + err); + else if (he != &ents[tmp]) + FAIL(TEST_NAME(ht_find), FATAL(0), "ht_find() found wrong entry; " + "returned %d expected %d", he ? -1 : he - ents, tmp); + } + PASS(TEST_NAME(ht_find), "ht_find() calls successful"); + + /* OK, let's do some ht_move() tests now... */ + TEST_DECL(t_hashtab, ht_move, "Test that ht_move() moves entries around") + for (i = 0; i < HASH_MOVE_CNT; i++) + if ((err = ht_move(&tab, &ents[moves[i].elem], &moves[i].key))) + FAIL(TEST_NAME(ht_move), FATAL(0), "ht_move() failed with error %lu", + err); + PASS(TEST_NAME(ht_move), "ht_move() calls successful"); + + /* Now move on to ht_remove()... */ + TEST_DECL(t_hashtab, ht_remove, "Test that ht_remove() removes entries") + for (i = 0; i < HASH_REMOVE_CNT; i++) { + if ((err = ht_remove(&tab, &ents[removes[i]]))) + FAIL(TEST_NAME(ht_remove), FATAL(0), "ht_remove() failed with error %lu", + err); + visit_init &= ~(1 << removes[i]); /* keep track of what's removed */ + } + PASS(TEST_NAME(ht_remove), "ht_remove() calls successful"); + + /* OK, let's try some ht_iter() tests */ + TEST_DECL(t_hashtab, ht_iter, "Test that ht_iter() iterates properly") + for (visited = VISIT_INIT; visited; visited &= ~(1 << iter_tmp.elem)) { + iter_tmp.elem = rand() % HASH_ENT_CNT; + iter_tmp.visited = visit_init; + + fprintf(stderr, "Iterating, ending on element %d (visited 0x%08lx; " + "element mask 0x%08lx)%s\n", iter_tmp.elem, iter_tmp.visited, + (0x01lu << iter_tmp.elem), + !(visit_init & (1 << iter_tmp.elem)) ? " [missing]" : ""); + + err = ht_iter(&tab, (hash_iter_t)t_iter, (void *)&iter_tmp); + + fprintf(stderr, "Visited elements 0x%08lx; returned error %lu\n", + iter_tmp.visited, err); + + /* check error return... */ + if (err != ((visit_init & (1 << iter_tmp.elem)) ? iter_tmp.err : 0)) { + FAIL(TEST_NAME(ht_iter), 0, "ht_iter() returned unexpected error " + "code %lu", err); + goto iter_fail; /* yeah, yeah, I know; this is just the easiest way */ + /* to get out of this loop and avoid calling PASS */ + /* that I can think of... */ + } + + /* Now check visited elements... */ + if ((err ? (iter_tmp.visited == 0) : (iter_tmp.visited != 0))) { + FAIL(TEST_NAME(ht_iter), 0, "ht_iter() failed to visit expected items; " + "visited 0x%08lx %c= 0", iter_tmp.visited, err ? '!' : '='); + goto iter_fail; /* yeah, yeah, I know; this is just the easiest way */ + /* to get out of this loop and avoid calling PASS */ + /* that I can think of... */ + } + } + PASS(TEST_NAME(ht_iter), "ht_iter() calls successful"); + iter_fail: + + /* Now let's check ht_resize()... */ + TEST(t_hashtab, ht_resize, "Test that ht_resize() may be called", + (!(err = ht_resize(&tab, 20)) && ht_modulus(&tab) == 23), 0, + ("ht_resize() call successful"), + ("ht_resize() call failed with error %lu modulus %lu", err, + ht_modulus(&tab))); + + /* remember if ht_resize worked... */ + if (!err && ht_modulus(&tab) == 23) + resize_successful = 1; + + /* OK, let's try some flushing... */ + TEST_DECL(t_hashtab, ht_flush, "Test that ht_flush() flushes the table") + for (visited = visit_init; visited; ) { + iter_tmp.elem = rand() % HASH_ENT_CNT; /* select an element */ + + /* are we ready to actually clean the whole thing? */ + if (!(visited & (1 << iter_tmp.elem)) && + hamming(visited) >= FLUSH_THRESHOLD) + continue; /* select another element */ + + iter_tmp.visited = visited; /* figure out what we visited... */ + + fprintf(stderr, "Flushing, ending on element %d (visited 0x%08lx; " + "element mask 0x%08lx; hamming %lu)%s\n", iter_tmp.elem, + iter_tmp.visited, (0x01lu << iter_tmp.elem), + hamming(iter_tmp.visited), + !(visited & (1 << iter_tmp.elem)) ? " [missing]" : ""); + + err = ht_flush(&tab, (hash_iter_t)t_iter, (void *)&iter_tmp); + + fprintf(stderr, "Visited elements 0x%08lx; returned error %lu\n", + iter_tmp.visited, err); + + /* check error return... */ + if (err != ((visited & (1 << iter_tmp.elem)) ? iter_tmp.err : 0)) + FAIL(TEST_NAME(ht_flush), FATAL(0), "ht_flush() returned unexpected " + "error code %lu", err); + if (err ? (iter_tmp.visited == 0) : (iter_tmp.visited != 0)) + FAIL(TEST_NAME(ht_flush), FATAL(0), "ht_flush() failed to visit " + "expected items; visited 0x%08lx %c= 0", iter_tmp.visited, + err ? '!' : '='); + + /* update what's been flushed out... */ + visited &= iter_tmp.visited & ~(1 << iter_tmp.elem); + } + if (ht_count(&tab) == 0) + PASS(TEST_NAME(ht_flush), "ht_flush() properly flushed the table"); + else + FAIL(TEST_NAME(ht_flush), FATAL(0), "ht_flush() seems to have left " + "items?"); + + TEST(t_hashtab, ht_free, "Test that ht_free() may be called", + (!(err = ht_free(&tab)) && !tab.ht_table), FATAL(0), + ("ht_free() call successful"), + ("ht_free() call failed with error %lu", err)); + + if (!resize_successful) /* if resize didn't succeed... */ + return 0; /* well, there's no point testing AUTOGROW/AUTOSHRINK */ + + /* allow automatic growing/shrinking */ + ht_flags(&tab) |= HASH_FLAG_AUTOGROW | HASH_FLAG_AUTOSHRINK; + + /* OK, do some tests with auto-growing... */ + TEST_DECL(t_hashtab, ht_add_autogrow, "Test that ht_add() automatically " + "grows the table") + for (i = 0; i < HASH_ENT_CNT; i++) { + oldsize = ht_modulus(&tab); /* save old size... */ + rsize_flags = RSF_INHIBIT; /* inhibit the growth... */ + + fprintf(stderr, "Adding element %d\n", i); + + err = ht_add(&tab, &ents[i], &keys[i]); /* add the entry */ + + /* Now, check for errors... */ + if (ht_modulus(&tab) != oldsize) + FAIL(TEST_NAME(ht_add_autogrow), FATAL(0), "ht_add() grew the table " + "when callback prohibited it"); + if (err != ((rsize_flags & RSF_RESIZE) ? rsize_err : 0)) + FAIL(TEST_NAME(ht_add_autogrow), FATAL(0), "ht_add() failed with error " + "code %lu", err); + + if (rsize_flags & RSF_RESIZE) { /* ok, resize callback called... */ + fprintf(stderr, "Element %d: ht_add() autogrow to %lu\n", i, rsize_new); + if (rsize_new <= oldsize) /* size make sense? */ + FAIL(TEST_NAME(ht_add_autogrow), FATAL(0), "ht_add() wants to " + "shrink the table? (New size %lu, old size %lu)", rsize_new, + oldsize); + + rsize_flags = 0; /* turn off inhibition */ + newsize = rsize_new; /* save new size */ + + if ((err = ht_add(&tab, &ents[i], &keys[i]))) /* try now... */ + FAIL(TEST_NAME(ht_add_autogrow), FATAL(0), "ht_add() failed with " + "error code %lu during autogrow", err); + + /* OK, check the size... */ + if (ht_modulus(&tab) != newsize) + FAIL(TEST_NAME(ht_add_autogrow), FATAL(0), "ht_add() tried to resize " + "to a random value; expecting %lu, got %lu (original %lu, " + "callback %lu)", + newsize, ht_modulus(&tab), oldsize, rsize_new); + } + } + PASS(TEST_NAME(ht_add_autogrow), "ht_add() autogrows the table properly"); + + /* Do some more ht_find() trials to make certain the table makes sense */ + TEST_DECL(t_hashtab, ht_find_autogrow, "Test that ht_find() can still " + "find entries for autogrow") + for (visited = VISIT_INIT; visited; visited &= ~(1 << tmp)) { + tmp = rand() % HASH_ENT_CNT; /* select an entry at random */ + fprintf(stderr, "Looking up entry %d . . .\n", tmp); + if ((err = ht_find(&tab, &he, &keys[tmp]))) + FAIL(TEST_NAME(ht_find_autogrow), FATAL(0), "ht_find() failed with " + "error %lu", err); + else if (he != &ents[tmp]) + FAIL(TEST_NAME(ht_find_autogrow), FATAL(0), "ht_find() found wrong " + "entry; returned %d expected %d", he ? -1 : he - ents, tmp); + } + PASS(TEST_NAME(ht_find_autogrow), "ht_find() calls successful on " + "automatically grown table"); + + /* Now, do some ht_remove() trials with autoshrink enabled... */ + TEST_DECL(t_hashtab, ht_remove_autoshrink, "Test that ht_remove() " + "automatically shrinks the table") + for (visit_init = VISIT_INIT; ht_count(&tab) > HASH_ENT_CNT / 2; + visit_init &= ~(1 << tmp)) { + tmp = rand() % HASH_ENT_CNT; + + if (!(visit_init & (1 << tmp))) /* element's already been removed */ + continue; + + oldsize = ht_modulus(&tab); /* save old size... */ + rsize_flags = RSF_INHIBIT; /* inhibit the growth... */ + + fprintf(stderr, "Removing element %d\n", tmp); + + err = ht_remove(&tab, &ents[tmp]); /* remove the entry */ + + /* Now, check for errors... */ + if (ht_modulus(&tab) != oldsize) + FAIL(TEST_NAME(ht_remove_autoshrink), FATAL(0), "ht_remove() shrank the " + "table when callback prohibited it"); + if (err != ((rsize_flags & RSF_RESIZE) ? rsize_err : 0)) + FAIL(TEST_NAME(ht_remove_autoshrink), FATAL(0), "ht_remove() failed " + "with error code %lu", err); + + if (rsize_flags & RSF_RESIZE) { /* ok, resize callback called... */ + fprintf(stderr, "Element %d: ht_remove() autoshrink to %lu\n", tmp, + rsize_new); + if (rsize_new >= oldsize) /* size make sense? */ + FAIL(TEST_NAME(ht_remove_autoshrink), FATAL(0), "ht_remove() wants to " + "grow the table? (New size %lu, old size %lu)", rsize_new, + oldsize); + + rsize_flags = 0; /* turn off inhibition */ + newsize = rsize_new; /* save new size */ + + if ((err = ht_remove(&tab, &ents[tmp]))) /* try now... */ + FAIL(TEST_NAME(ht_remove_autogrow), FATAL(0), "ht_remove() failed " + "with error code %lu during autoshrink", err); + + /* OK, check the size... */ + if (ht_modulus(&tab) != newsize) + FAIL(TEST_NAME(ht_remove_autoshrink), FATAL(0), "ht_remove() tried " + "to resize to a random value; expecting %lu, got %lu " + "(original %lu, callback %lu)", newsize, ht_modulus(&tab), + oldsize, rsize_new); + } + } + PASS(TEST_NAME(ht_remove_autoshrink), "ht_remove() autoshrinks the table " + "properly"); + + /* And last, but certainly not least, do some more ht_find() trials */ + TEST_DECL(t_hashtab, ht_find_autoshrink, "Test that ht_find() can still " + "find entries for autoshrink") + for (visited = visit_init; visited; visited &= ~(1 << tmp)) { + tmp = rand() % HASH_ENT_CNT; /* select an entry at random */ + if (!(visit_init & (1 << tmp))) /* if it's been removed... */ + continue; /* well, skip it! */ + fprintf(stderr, "Looking up entry %d . . .\n", tmp); + if ((err = ht_find(&tab, &he, &keys[tmp]))) + FAIL(TEST_NAME(ht_find_autoshrink), FATAL(0), "ht_find() failed with " + "error %lu", err); + else if (he != &ents[tmp]) + FAIL(TEST_NAME(ht_find_autoshrink), FATAL(0), "ht_find() found wrong " + "entry; returned %d expected %d", he ? -1 : he - ents, tmp); + } + PASS(TEST_NAME(ht_find_autoshrink), "ht_find() calls successful on " + "automatically shrunk table"); + + return 0; +} Index: dbprim/tests/t_linklists.c diff -u dbprim/tests/t_linklists.c:1.1 dbprim/tests/t_linklists.c:1.2 --- dbprim/tests/t_linklists.c:1.1 Mon Sep 20 12:15:35 2004 +++ dbprim/tests/t_linklists.c Mon Sep 20 22:00:15 2004 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: t_linklists.c,v 1.1 2004/09/20 19:15:35 klmitch Exp $ +** @(#)$Id: t_linklists.c,v 1.2 2004/09/21 05:00:15 klmitch Exp $ */ #include <stdio.h> @@ -25,7 +25,7 @@ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: t_linklists.c,v 1.1 2004/09/20 19:15:35 klmitch Exp $"); +RCSTAG("@(#)$Id: t_linklists.c,v 1.2 2004/09/21 05:00:15 klmitch Exp $"); TEST_PROG(t_linklists, "Test linked list functionality") @@ -66,28 +66,6 @@ int order_remove[] = { 5, 1, 4, -1 }; -#define ChkOrder(name, order, fatal, go) \ -do { \ - int _err = 0; \ - char *_name = TEST_NAME(name); \ - int *_order = (order); \ - link_elem_t *_le = ll_first(&head), *_ple = ll_first(&head); \ - for (; *_order >= 0 && _le; _order++, _ple = _le, _le = le_next(_le)) \ - if (_le != &elems[*_order]) { \ - _err++; \ - fprintf(stderr, "%s ordering error: Expected %d, got %d\n", _name, \ - *_order, _le - elems); \ - } \ - if (_err) { \ - FAIL(_name, (fatal), "Ordering failure: %d errors", _err); \ - go \ - } \ - if (*_order != -1 || _le != 0 || _ple != ll_last(&head)) { \ - FAIL(_name, (fatal), "List incorrectly terminated"); \ - go \ - } \ -} while (0) - static unsigned long t_comp(db_key_t *key, void *comp) { @@ -136,6 +114,27 @@ #define LINK_FLUSH_CNT (sizeof(desc_flush) / sizeof(struct iter_desc)) +#define ChkOrder(name, order, fatal, go) \ +do { \ + int _err = 0; \ + char *_name = TEST_NAME(name); \ + int *_order = (order); \ + link_elem_t *_le = ll_first(&head), *_ple = ll_first(&head); \ + for (; *_order >= 0 && _le; _order++, _ple = _le, _le = le_next(_le)) \ + if (_le != &elems[*_order]) { \ + _err++; \ + fprintf(stderr, "%s ordering error: Expected %d, got %d\n", _name, \ + *_order, _le - elems); \ + } \ + if (_err) { \ + FAIL(_name, (fatal), "Ordering failure: %d errors", _err); \ + go \ + } else if (*_order != -1 || _le != 0 || _ple != ll_last(&head)) { \ + FAIL(_name, (fatal), "List incorrectly terminated"); \ + go \ + } \ +} while (0) + int main(int argc, char **argv) { Index: dbprim/tests/test-harness.dat diff -u dbprim/tests/test-harness.dat:1.4 dbprim/tests/test-harness.dat:1.5 --- dbprim/tests/test-harness.dat:1.4 Mon Sep 20 12:15:36 2004 +++ dbprim/tests/test-harness.dat Mon Sep 20 22:00:15 2004 @@ -15,24 +15,57 @@ # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA # -# @(#)$Id: test-harness.dat,v 1.4 2004/09/20 19:15:36 klmitch Exp $ +# @(#)$Id: test-harness.dat,v 1.5 2004/09/21 05:00:15 klmitch Exp $ program t_linklists t_linklists \ "Test linked list functionality" -test ll_init t_linklists PASS \ +test ll_init t_linklists PASS \ "Test that ll_init() may be called" -test le_init t_linklists PASS \ +test le_init t_linklists PASS \ "Test that le_init() may be called" -test ll_add t_linklists PASS \ +test ll_add t_linklists PASS \ "Test that ll_add() works properly" -test ll_move t_linklists PASS \ +test ll_move t_linklists PASS \ "Test that ll_move() works properly" -test ll_remove t_linklists PASS \ +test ll_remove t_linklists PASS \ "Test that ll_remove() works properly" -test ll_find t_linklists PASS \ +test ll_find t_linklists PASS \ "Test that ll_find() works properly" -test ll_iter t_linklists PASS \ +test ll_iter t_linklists PASS \ "Test that ll_iter() works properly" -test ll_flush t_linklists PASS \ +test ll_flush t_linklists PASS \ "Test that ll_flush() works properly" + +program t_hashtab t_hashtab \ + "Test hash table functionality" +t_hashtab: t_linklists + +test ht_init t_hashtab PASS \ + "Test that ht_init() may be called" +test he_init t_hashtab PASS \ + "Test that he_init() may be called" +test ht_add t_hashtab PASS \ + "Test that ht_add() adds entries to hash table" +test ht_find t_hashtab PASS \ + "Test that ht_find() finds entries in hash table" +test ht_move t_hashtab PASS \ + "Test that ht_move() moves entries around" +test ht_remove t_hashtab PASS \ + "Test that ht_remove() removes entries" +test ht_iter t_hashtab PASS \ + "Test that ht_iter() iterates properly" +test ht_resize t_hashtab PASS \ + "Test that ht_resize() may be called" +test ht_flush t_hashtab PASS \ + "Test that ht_flush() flushes the table" +test ht_free t_hashtab PASS \ + "Test that ht_free() may be called" +test ht_add_autogrow t_hashtab PASS \ + "Test that ht_add() automatically grows the table" +test ht_find_autogrow t_hashtab PASS \ + "Test that ht_find() can still find entries for autogrow" +test ht_remove_autoshrink t_hashtab PASS \ + "Test that ht_remove() automatically shrinks the table" +test ht_find_autoshrink t_hashtab PASS \ + "Test that ht_find() can still find entries for autoshrink" Index: dbprim/tests/test-harness.h diff -u dbprim/tests/test-harness.h:1.1 dbprim/tests/test-harness.h:1.2 --- dbprim/tests/test-harness.h:1.1 Mon Sep 20 12:15:36 2004 +++ dbprim/tests/test-harness.h Mon Sep 20 22:00:16 2004 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: test-harness.h,v 1.1 2004/09/20 19:15:36 klmitch Exp $ +** @(#)$Id: test-harness.h,v 1.2 2004/09/21 05:00:16 klmitch Exp $ */ #ifndef __include_test_harness_h__ #define __include_test_harness_h__ @@ -54,6 +54,7 @@ _th_report(enum _th_status status, const char *test, const char *fmt, va_list vp) { + static int init = 0; char *codes[] = { #define _THSC(code) #code _TH_STATCODES, 0 @@ -61,6 +62,11 @@ }; char buf[512]; + if (!init) { /* set output buffering... */ + setvbuf(stdout, 0, _IONBF, 0); + init++; + } + if (status != TR_PASS && status != TR_FAIL) return; /* status in bounds? */ ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2004-09-21 00:25:13
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : webpage Commit time: 2004-09-21 00:25:00 UTC Modified files: admin.php comment.php dbprim.css documentation.php download.php htmlfunc.inc index.php news.php template.inc Log message: Convert DOS line endings to UNIX; update download page to match current reality... ---------------------- diff included ---------------------- Index: webpage/admin.php diff -u webpage/admin.php:1.2 webpage/admin.php:1.3 --- webpage/admin.php:1.2 Fri Oct 31 21:10:55 2003 +++ webpage/admin.php Mon Sep 20 17:24:49 2004 @@ -1,79 +1,79 @@ -<?php - require(dirname(__FILE__) . '/template.inc'); - - // Config - $Config = parse_ini_file("../login.ini"); - - // Check login function - $cookiedate = $_COOKIE["Time"]; - $cookieMD5 = $_COOKIE["Pass"]; - - // Timestamp must be within one hour of logging in. - if ($cookiedate <> "" && $cookiedate < (time()+(60*60)) && $cookieMD5 == md5($Config["password"] . $cookiedate)) - { $login = 1;} - else - { $login = 0;} - - if ($_REQUEST['action'] == "logout") - { - setcookie ("Time", ''); - setcookie ("Pass", ''); - $text = 'Logged out'; - } - else if ($_REQUEST['action'] == "login") - { - if ($_POST['username'] == $Config["username"] && $_POST['password'] == $Config["password"]) - { - $text = 'You have logged in'; - - // lets make something safer than login=yes - // MD5 of password and the current time. - $cookiedate = time(); //date('d m Y h i'); - setcookie ("Time", $cookiedate); - setcookie ("Pass", md5($Config["password"] . $cookiedate)); - $text .= '<p>'; - $text .= "Valid from " . date ("M d Y H:i:s", $cookiedate) . ' until ' . date ("M d Y H:i:s", $cookiedate + (60*60)); - } - else - { - $text = "You shall not pass!"; - } - } - - print getHead(); - - print getMenu('About'); - - if (!$GLOBALS["login"] && $_REQUEST['action'] <> 'login') - { - $text = '<form action="admin.php" method="post">' . - '<INPUT TYPE="HIDDEN" NAME="action" VALUE="login">' . - 'Username: <BR>' . - '<INPUT TYPE="TEXT" SIZE="35" NAME="username" value=""><BR><BR>' . - 'Password: <BR>' . - '<INPUT TYPE="PASSWORD" SIZE="35" NAME="password" value=""><BR><BR>' . - '<INPUT TYPE="SUBMIT" VALUE="Login" NAME="Login">' . - '</FORM>'; - } - else - if ($GLOBALS["login"] && $_REQUEST['deleteentry'] <> '') - { - $text = 'really delete? <a href="?deleteyes=' . $_REQUEST['deleteentry'] . '">yes</a>'; - } - else - if ($GLOBALS["login"] && $_REQUEST['deleteyes'] <> '') - { - /* Connecting, selecting database */ - $link = mysql_connect("localhost", "chat", "chat") or die("Could not connect"); - mysql_select_db("chat") or die("Could not select database"); - - $query = 'DELETE FROM chat WHERE ID = ' . $_REQUEST['deleteyes']; - $result = mysql_query($query) or die ("Query failed: $query"); - $text = 'deleted'; - - mysql_close($link); - } - - print getBody(createSection('Admin', $text)); - print getFoot(); -?> +<?php + require(dirname(__FILE__) . '/template.inc'); + + // Config + $Config = parse_ini_file("../login.ini"); + + // Check login function + $cookiedate = $_COOKIE["Time"]; + $cookieMD5 = $_COOKIE["Pass"]; + + // Timestamp must be within one hour of logging in. + if ($cookiedate <> "" && $cookiedate < (time()+(60*60)) && $cookieMD5 == md5($Config["password"] . $cookiedate)) + { $login = 1;} + else + { $login = 0;} + + if ($_REQUEST['action'] == "logout") + { + setcookie ("Time", ''); + setcookie ("Pass", ''); + $text = 'Logged out'; + } + else if ($_REQUEST['action'] == "login") + { + if ($_POST['username'] == $Config["username"] && $_POST['password'] == $Config["password"]) + { + $text = 'You have logged in'; + + // lets make something safer than login=yes + // MD5 of password and the current time. + $cookiedate = time(); //date('d m Y h i'); + setcookie ("Time", $cookiedate); + setcookie ("Pass", md5($Config["password"] . $cookiedate)); + $text .= '<p>'; + $text .= "Valid from " . date ("M d Y H:i:s", $cookiedate) . ' until ' . date ("M d Y H:i:s", $cookiedate + (60*60)); + } + else + { + $text = "You shall not pass!"; + } + } + + print getHead(); + + print getMenu('About'); + + if (!$GLOBALS["login"] && $_REQUEST['action'] <> 'login') + { + $text = '<form action="admin.php" method="post">' . + '<INPUT TYPE="HIDDEN" NAME="action" VALUE="login">' . + 'Username: <BR>' . + '<INPUT TYPE="TEXT" SIZE="35" NAME="username" value=""><BR><BR>' . + 'Password: <BR>' . + '<INPUT TYPE="PASSWORD" SIZE="35" NAME="password" value=""><BR><BR>' . + '<INPUT TYPE="SUBMIT" VALUE="Login" NAME="Login">' . + '</FORM>'; + } + else + if ($GLOBALS["login"] && $_REQUEST['deleteentry'] <> '') + { + $text = 'really delete? <a href="?deleteyes=' . $_REQUEST['deleteentry'] . '">yes</a>'; + } + else + if ($GLOBALS["login"] && $_REQUEST['deleteyes'] <> '') + { + /* Connecting, selecting database */ + $link = mysql_connect("localhost", "chat", "chat") or die("Could not connect"); + mysql_select_db("chat") or die("Could not select database"); + + $query = 'DELETE FROM chat WHERE ID = ' . $_REQUEST['deleteyes']; + $result = mysql_query($query) or die ("Query failed: $query"); + $text = 'deleted'; + + mysql_close($link); + } + + print getBody(createSection('Admin', $text)); + print getFoot(); +?> Index: webpage/comment.php diff -u webpage/comment.php:1.2 webpage/comment.php:1.3 --- webpage/comment.php:1.2 Fri Oct 31 21:10:55 2003 +++ webpage/comment.php Mon Sep 20 17:24:49 2004 @@ -1,204 +1,204 @@ -<?php - require(dirname(__FILE__) . '/template.inc'); - require(dirname(__FILE__) . '/htmlfunc.inc'); - - // Read Config - $Config = parse_ini_file("../login.ini"); - - /* Connecting, selecting database */ - $link = mysql_connect($Config["host"], $Config["dbuser"], $Config["dbpassword"]) or die("Could not connect"); - mysql_select_db($Config["db"]) or die("Could not select database"); - - print getHead(); - print getMenu('Documentation'); - - - // Check login function - $cookiedate = $_COOKIE["Time"]; - $cookieMD5 = $_COOKIE["Pass"]; - - // Timestamp must be within one hour of logging in. - if ($cookiedate <> "" && $cookiedate < (time()+(60*60)) && $cookieMD5 == md5($Config["password"] . $cookiedate)) - { $login = 1;} - else - { $login = 0;} - - function FindChatChildren ($parent = 0) - { - $query = 'select ID, title, author_name, author_text, date_format(posted_date, "%b %D %Y - %H:%i") as date from chat where category=0 and parent=' . $parent . ' ORDER BY posted_date asc Limit 10'; - $result = mysql_query($query) or die("Query failed: $query"); - - if (mysql_num_rows($result) <> 0) - { - while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) - { - $text .= '<div class="text2"><div class="menutitle">"' . $line["title"] . '" by ' . $line["author_name"] . ' at ' . $line["date"] . '</div>'; - $text .= '<div class="menuitems">' . addlinesplits($line["author_text"]); - $text .= '<br>[ <a href="comment.php?replyto=' . $line["ID"] . '">reply</a>'; - $text .= ', <a href="comment.php?article=' . $line["ID"] . '">link</a>'; - - if ($GLOBALS["login"]) - { $text .= ', <a href="admin.php?deleteentry=' . $line["ID"] . '">delete</a>'; } - - $text .= ']</div>'; - $text .= '' . FindChatChildren($line["ID"]); - $text .= '</div>'; - } - $text = $text; - } - return $text; - } - - function FindChatItems ($parent = 0) - { - $query = 'select *, date_format(posted_date, "%b %D %Y - %H:%i") as date from chat where category=0 and id=' . $parent . ' ORDER BY posted_date asc Limit 10'; - $result = mysql_query($query) or die("Query failed: $query"); - - if (mysql_num_rows($result) <> 0) - { - while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) - { - $text .= '<h3>"' . $line["title"] . '" by ' . $line["author_name"] . ' at ' . $line["date"] . '</h3>'; - $text .= '<p>' . addlinesplits($line["author_text"]) . "</p>"; - - $text .= '[ <a href="comment.php?replyto=' . $line["ID"] . '">reply</a>'; - - if ($GLOBALS["login"]) - { $text .= ', <a href="admin.php?deleteentry=' . $line["ID"] . '">delete</a>'; } - - if ($line["parent"] == "0") - { $text .= ', <a href="comment.php">return to parent</a>'; } - else - { $text .= ', <a href="comment.php?article=' . $line["parent"] . '">return to parent</a>'; } - - $text .= ' ]'; - - $text .= FindChatChildren($line["ID"]); - } - } - return $text; - } - - function makeIndex($parent = 0) - { - $query = 'select *, date_format(posted_date, "%b %D %Y - %H:%i") as date from chat where category=0 and parent=' . $parent . ' ORDER BY posted_date desc Limit 10'; - $result = mysql_query($query) or die("Query failed: $query"); - - if (mysql_num_rows($result) <> 0) - { - while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) - { - $text .= '<li><a href="comment?article=' . $line["ID"]. '">"' . $line["title"] . '"</a> by ' . $line["author_name"] . ' at ' . $line["date"] . '<br>'; - } - } - - if ($GLOBALS["login"]) - { $text .= '<p>[ <a href="?replyto=' . $parent . '">Add toplevel comment</a> ]'; } - - return $text; - } - - function getTitle($id = 0) - { - $query = 'select title from chat where ID=' . $id; - $result = mysql_query($query) or die("Query failed: $query"); - - if (mysql_num_rows($result) <> 0) - { - $line = mysql_fetch_array($result, MYSQL_ASSOC); - $text = $line["title"]; - } - return $text; - } - - function addentry() - { - $name = safehtml($_POST['Name'], true); - - $email = safehtml($_POST['EMail'], true); - - $title = safehtml(addlinesplits($_POST['Title']), false); - $comment = htmlclean(addlinesplits($_POST['Entry'])); - - if ($GLOBALS["htmlerr"] <> "") - { $GLOBALS["htmlerr"] .= " are not allowed"; } - - // Only allow toplevel posts if logged in as admin - if (!$GLOBALS["login"] && $_POST['addentry'] == '0') - { - $text .= 'Only Admin is allowed to post toplevel posts'; - } - // News items - else if (!$GLOBALS["login"] && $_POST['addentry'] == '-1') - { - $text .= 'Only Admin is allowed to post news items'; - } - // Need name - else if ($_POST['Name'] == "") - { - $text .= 'Comment could not be added: Name needed.'; - } - // Error in entry - else if ($GLOBALS["htmlerr"] <> "") - { - $text .= 'Comment could not be added: ' . $GLOBALS["htmlerr"] . "<p>Only <b>, <i>, <pre>, <u> and <a href=\"\"> are allowed"; - } - // Phu. Lets post this shit now - else - { - // Newsitems - if ($_POST['addentry'] == '-1') - { $commentType = 1; } - // Regular comment - else - { $commentType = 0; } - - $query = 'INSERT INTO chat (ID, author_name, author_email, parent, author_text, posted_date, category, title) ' . - 'VALUES (0, ' . - '"' . $name . '", ' . - '"' . $email . '", ' . - '"' . $_POST['addentry'] . '", ' . - '"' . $comment . '", ' . - 'now(), ' . - $commentType .',' . - '"' . $title . '"' . - ')'; - - $result = mysql_query($query) or die ("Query failed: $query"); - $text = 'Comment was added succesfully. You can <a href="?article=' . $_POST['addentry'] . '">return to the post</a> you commented upon.'; - } - - return $text; - } - - if ($_REQUEST['replyto'] <> "") - { - $deftitle = GetTitle($_REQUEST['replyto']); - - if ($deftitle <> '') - {$deftitle = "re: " . $deftitle; } - - $text = '<form action="comment.php" method="post">' . - '<INPUT TYPE="HIDDEN" NAME="addentry" VALUE="' . $_REQUEST['replyto'] . '">' . - '<table>' . - '<tr><td>Name:</td><td> <INPUT class="form" TYPE="TEXT" SIZE="35" NAME="Name"></td></tr>' . - '<tr><td>EMail:</td><td> <INPUT class="form" TYPE="TEXT" SIZE="35" NAME="EMail"></td></tr>' . - '<tr><td>Title:</td><td> <INPUT class="form" TYPE="TEXT" SIZE="35" NAME="Title" value="' .$deftitle . '"></td></tr>' . - '<tr><td valign="top">Comment:</td><td> <TEXTAREA class="form" NAME="Entry" ROWS="10" COLS="40"></TEXTAREA></td></tr>' . - '</table>' . - '<INPUT class="form" TYPE="SUBMIT" VALUE="Add comment" NAME="Add comment"></form>'; - -} - else if ($_REQUEST['addentry'] <> "") - { $text = addentry(); } - else if ($_REQUEST['article'] <> "") - { $text = FindChatItems($_REQUEST['article'], 1); } - else - { $text = 'Current examples/articles:<br>' . makeIndex ();} - - print getBody(createSection('Examples', $text )); - - print getFoot(); - - mysql_close($link); -?> +<?php + require(dirname(__FILE__) . '/template.inc'); + require(dirname(__FILE__) . '/htmlfunc.inc'); + + // Read Config + $Config = parse_ini_file("../login.ini"); + + /* Connecting, selecting database */ + $link = mysql_connect($Config["host"], $Config["dbuser"], $Config["dbpassword"]) or die("Could not connect"); + mysql_select_db($Config["db"]) or die("Could not select database"); + + print getHead(); + print getMenu('Documentation'); + + + // Check login function + $cookiedate = $_COOKIE["Time"]; + $cookieMD5 = $_COOKIE["Pass"]; + + // Timestamp must be within one hour of logging in. + if ($cookiedate <> "" && $cookiedate < (time()+(60*60)) && $cookieMD5 == md5($Config["password"] . $cookiedate)) + { $login = 1;} + else + { $login = 0;} + + function FindChatChildren ($parent = 0) + { + $query = 'select ID, title, author_name, author_text, date_format(posted_date, "%b %D %Y - %H:%i") as date from chat where category=0 and parent=' . $parent . ' ORDER BY posted_date asc Limit 10'; + $result = mysql_query($query) or die("Query failed: $query"); + + if (mysql_num_rows($result) <> 0) + { + while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) + { + $text .= '<div class="text2"><div class="menutitle">"' . $line["title"] . '" by ' . $line["author_name"] . ' at ' . $line["date"] . '</div>'; + $text .= '<div class="menuitems">' . addlinesplits($line["author_text"]); + $text .= '<br>[ <a href="comment.php?replyto=' . $line["ID"] . '">reply</a>'; + $text .= ', <a href="comment.php?article=' . $line["ID"] . '">link</a>'; + + if ($GLOBALS["login"]) + { $text .= ', <a href="admin.php?deleteentry=' . $line["ID"] . '">delete</a>'; } + + $text .= ']</div>'; + $text .= '' . FindChatChildren($line["ID"]); + $text .= '</div>'; + } + $text = $text; + } + return $text; + } + + function FindChatItems ($parent = 0) + { + $query = 'select *, date_format(posted_date, "%b %D %Y - %H:%i") as date from chat where category=0 and id=' . $parent . ' ORDER BY posted_date asc Limit 10'; + $result = mysql_query($query) or die("Query failed: $query"); + + if (mysql_num_rows($result) <> 0) + { + while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) + { + $text .= '<h3>"' . $line["title"] . '" by ' . $line["author_name"] . ' at ' . $line["date"] . '</h3>'; + $text .= '<p>' . addlinesplits($line["author_text"]) . "</p>"; + + $text .= '[ <a href="comment.php?replyto=' . $line["ID"] . '">reply</a>'; + + if ($GLOBALS["login"]) + { $text .= ', <a href="admin.php?deleteentry=' . $line["ID"] . '">delete</a>'; } + + if ($line["parent"] == "0") + { $text .= ', <a href="comment.php">return to parent</a>'; } + else + { $text .= ', <a href="comment.php?article=' . $line["parent"] . '">return to parent</a>'; } + + $text .= ' ]'; + + $text .= FindChatChildren($line["ID"]); + } + } + return $text; + } + + function makeIndex($parent = 0) + { + $query = 'select *, date_format(posted_date, "%b %D %Y - %H:%i") as date from chat where category=0 and parent=' . $parent . ' ORDER BY posted_date desc Limit 10'; + $result = mysql_query($query) or die("Query failed: $query"); + + if (mysql_num_rows($result) <> 0) + { + while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) + { + $text .= '<li><a href="comment?article=' . $line["ID"]. '">"' . $line["title"] . '"</a> by ' . $line["author_name"] . ' at ' . $line["date"] . '<br>'; + } + } + + if ($GLOBALS["login"]) + { $text .= '<p>[ <a href="?replyto=' . $parent . '">Add toplevel comment</a> ]'; } + + return $text; + } + + function getTitle($id = 0) + { + $query = 'select title from chat where ID=' . $id; + $result = mysql_query($query) or die("Query failed: $query"); + + if (mysql_num_rows($result) <> 0) + { + $line = mysql_fetch_array($result, MYSQL_ASSOC); + $text = $line["title"]; + } + return $text; + } + + function addentry() + { + $name = safehtml($_POST['Name'], true); + + $email = safehtml($_POST['EMail'], true); + + $title = safehtml(addlinesplits($_POST['Title']), false); + $comment = htmlclean(addlinesplits($_POST['Entry'])); + + if ($GLOBALS["htmlerr"] <> "") + { $GLOBALS["htmlerr"] .= " are not allowed"; } + + // Only allow toplevel posts if logged in as admin + if (!$GLOBALS["login"] && $_POST['addentry'] == '0') + { + $text .= 'Only Admin is allowed to post toplevel posts'; + } + // News items + else if (!$GLOBALS["login"] && $_POST['addentry'] == '-1') + { + $text .= 'Only Admin is allowed to post news items'; + } + // Need name + else if ($_POST['Name'] == "") + { + $text .= 'Comment could not be added: Name needed.'; + } + // Error in entry + else if ($GLOBALS["htmlerr"] <> "") + { + $text .= 'Comment could not be added: ' . $GLOBALS["htmlerr"] . "<p>Only <b>, <i>, <pre>, <u> and <a href=\"\"> are allowed"; + } + // Phu. Lets post this shit now + else + { + // Newsitems + if ($_POST['addentry'] == '-1') + { $commentType = 1; } + // Regular comment + else + { $commentType = 0; } + + $query = 'INSERT INTO chat (ID, author_name, author_email, parent, author_text, posted_date, category, title) ' . + 'VALUES (0, ' . + '"' . $name . '", ' . + '"' . $email . '", ' . + '"' . $_POST['addentry'] . '", ' . + '"' . $comment . '", ' . + 'now(), ' . + $commentType .',' . + '"' . $title . '"' . + ')'; + + $result = mysql_query($query) or die ("Query failed: $query"); + $text = 'Comment was added succesfully. You can <a href="?article=' . $_POST['addentry'] . '">return to the post</a> you commented upon.'; + } + + return $text; + } + + if ($_REQUEST['replyto'] <> "") + { + $deftitle = GetTitle($_REQUEST['replyto']); + + if ($deftitle <> '') + {$deftitle = "re: " . $deftitle; } + + $text = '<form action="comment.php" method="post">' . + '<INPUT TYPE="HIDDEN" NAME="addentry" VALUE="' . $_REQUEST['replyto'] . '">' . + '<table>' . + '<tr><td>Name:</td><td> <INPUT class="form" TYPE="TEXT" SIZE="35" NAME="Name"></td></tr>' . + '<tr><td>EMail:</td><td> <INPUT class="form" TYPE="TEXT" SIZE="35" NAME="EMail"></td></tr>' . + '<tr><td>Title:</td><td> <INPUT class="form" TYPE="TEXT" SIZE="35" NAME="Title" value="' .$deftitle . '"></td></tr>' . + '<tr><td valign="top">Comment:</td><td> <TEXTAREA class="form" NAME="Entry" ROWS="10" COLS="40"></TEXTAREA></td></tr>' . + '</table>' . + '<INPUT class="form" TYPE="SUBMIT" VALUE="Add comment" NAME="Add comment"></form>'; + +} + else if ($_REQUEST['addentry'] <> "") + { $text = addentry(); } + else if ($_REQUEST['article'] <> "") + { $text = FindChatItems($_REQUEST['article'], 1); } + else + { $text = 'Current examples/articles:<br>' . makeIndex ();} + + print getBody(createSection('Examples', $text )); + + print getFoot(); + + mysql_close($link); +?> Index: webpage/dbprim.css diff -u webpage/dbprim.css:1.1 webpage/dbprim.css:1.2 --- webpage/dbprim.css:1.1 Fri Oct 31 08:48:41 2003 +++ webpage/dbprim.css Mon Sep 20 17:24:49 2004 @@ -1,99 +1,99 @@ - - body { - margin-top: 0px; - margin-right: 40px; - margin-left: 40px; - background: url('images/logobg.png'); - background-repeat: repeat-x; - background-color: #B3C19F; - font-family: Verdana; - padding: 0px;} - - #title { - width: 100%; - font-size: 180%; - text-align: center; - } - - H2 { display: inline; } - - H3 { font-weight: bold; - display: inline; - font-size: 100%; } - - H4 { display: block; - font-size: x-small; - background-color: #B5A87B; - width: 100%;} - - #content { display: block; - Padding-left: 4px; - Padding-right: 4px; - border: 1px solid #6D7D57; - background-color: #A7B593; - margin-left: 20px; - width: 65%; - float: left; } - - #menu { - display: block; - width: 25%; - font-size: 80%; - background-color: #A7B593; - border: 1px solid #6D7D57; - float: left; - margin: 0px; padding: 0px; - } - - .menutitle { - display: block; - width: 100%; - text-align: center; - font-weight: bold; - background-color: #98A783; - border-bottom: 1px solid #6D7D57; - background: url('images/bac.png'); - } - - .menuitems { - display: block; - padding: 4px; - } - - .img1 { - background-image: url('images/arrow.png'); - background-repeat: no-repeat; - background-position: 0px 2px; - padding-left: 12px; } - - .img1:hover { - background-image: url('images/arrow2.png'); - background-repeat: no-repeat; - background-position: 1px 2px; - padding-left: 12px;} - - .img2 { - background-image: url('images/arrow3.png'); - background-repeat: no-repeat; - background-position: 0px 2px; - padding-left: 12px;} - - .text { margin-left: 20px; padding: 2px; } - - .text2 { - margin-left: 15px; - padding: 0px; - margin-top: 5px; - margin-bottom: 5px; - margin-right: 4px; - font-size: small; - border: 1px solid #6D7D57; -} - - .form { - border: 1px solid #6D7D57; -} - - li { - font-size: small; - } + + body { + margin-top: 0px; + margin-right: 40px; + margin-left: 40px; + background: url('images/logobg.png'); + background-repeat: repeat-x; + background-color: #B3C19F; + font-family: Verdana; + padding: 0px;} + + #title { + width: 100%; + font-size: 180%; + text-align: center; + } + + H2 { display: inline; } + + H3 { font-weight: bold; + display: inline; + font-size: 100%; } + + H4 { display: block; + font-size: x-small; + background-color: #B5A87B; + width: 100%;} + + #content { display: block; + Padding-left: 4px; + Padding-right: 4px; + border: 1px solid #6D7D57; + background-color: #A7B593; + margin-left: 20px; + width: 65%; + float: left; } + + #menu { + display: block; + width: 25%; + font-size: 80%; + background-color: #A7B593; + border: 1px solid #6D7D57; + float: left; + margin: 0px; padding: 0px; + } + + .menutitle { + display: block; + width: 100%; + text-align: center; + font-weight: bold; + background-color: #98A783; + border-bottom: 1px solid #6D7D57; + background: url('images/bac.png'); + } + + .menuitems { + display: block; + padding: 4px; + } + + .img1 { + background-image: url('images/arrow.png'); + background-repeat: no-repeat; + background-position: 0px 2px; + padding-left: 12px; } + + .img1:hover { + background-image: url('images/arrow2.png'); + background-repeat: no-repeat; + background-position: 1px 2px; + padding-left: 12px;} + + .img2 { + background-image: url('images/arrow3.png'); + background-repeat: no-repeat; + background-position: 0px 2px; + padding-left: 12px;} + + .text { margin-left: 20px; padding: 2px; } + + .text2 { + margin-left: 15px; + padding: 0px; + margin-top: 5px; + margin-bottom: 5px; + margin-right: 4px; + font-size: small; + border: 1px solid #6D7D57; +} + + .form { + border: 1px solid #6D7D57; +} + + li { + font-size: small; + } Index: webpage/documentation.php diff -u webpage/documentation.php:1.1 webpage/documentation.php:1.2 --- webpage/documentation.php:1.1 Fri Oct 31 08:48:41 2003 +++ webpage/documentation.php Mon Sep 20 17:24:49 2004 @@ -1,14 +1,14 @@ -<?php - require(dirname(__FILE__) . '/template.inc'); - - print getHead('Documentation'); - - print getMenu('Documentation'); - - print getBody( - createSection('Documentation', -'<a href="http://dbprim.sourceforge.net/htmldocs/">Doxygen</a><br> -<a href="comment.php">Examples</a>')); - - print getFoot(); -?> +<?php + require(dirname(__FILE__) . '/template.inc'); + + print getHead('Documentation'); + + print getMenu('Documentation'); + + print getBody( + createSection('Documentation', +'<a href="http://dbprim.sourceforge.net/htmldocs/">Doxygen</a><br> +<a href="comment.php">Examples</a>')); + + print getFoot(); +?> Index: webpage/download.php diff -u webpage/download.php:1.1 webpage/download.php:1.2 --- webpage/download.php:1.1 Fri Oct 31 08:48:41 2003 +++ webpage/download.php Mon Sep 20 17:24:49 2004 @@ -1,27 +1,35 @@ -<?php - require(dirname(__FILE__) . '/template.inc'); - - print getHead('Download'); - - print getMenu('Download'); - - print getBody( - createSection('Download', -'<a href="http://sourceforge.net/project/showfiles.php?group_id=88549">Sourceforge download site</a> -<br> - -<p> -<b>Version 0.9.0 - latest</b><br> -<ul> -<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.0.tar.gz?download">tar.gz source</a> -<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.0-1.i386.rpm?download">rpm</a> -<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.0-1.src.rpm?download">source rpm</a> -</ul> -<b>CVS</b> -<ul> -<li><a href="http://cvs.sourceforge.net/viewcvs.py/dbprim">Browse the CVS</a> -</ul> -')); - - print getFoot(); -?> +<?php + require(dirname(__FILE__) . '/template.inc'); + + print getHead('Download'); + + print getMenu('Download'); + + print getBody( + createSection('Download', +'<a href="http://sourceforge.net/project/showfiles.php?group_id=88549">Sourceforge download site</a> +<br> + +<p> +<b>Version 0.9.1 - latest</b><br> +<ul> +<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.1.tar.gz?download">Source (.tar.gz)</a> +<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.1-1.i386.rpm?download">RPM</a> +<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-devel-0.9.1-1.i386.rpm?download">Development RPM</a> +<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.1-1.src.rpm?download">Source RPM</a> +</ul> +<b>Version 0.9.0</b><br> +<ul> +<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.0.tar.gz?download">Source (.tar.gz)</a> +<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.0-1.i386.rpm?download">RPM</a> +<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-devel-0.9.0-1.i386.rpm?download">Development RPM</a> +<li><a href="http://prdownloads.sourceforge.net/dbprim/dbprim-0.9.0-1.src.rpm?download">Source RPM</a> +</ul> +<b>CVS</b> +<ul> +<li><a href="http://cvs.sourceforge.net/viewcvs.py/dbprim">Browse the CVS</a> +</ul> +')); + + print getFoot(); +?> Index: webpage/htmlfunc.inc diff -u webpage/htmlfunc.inc:1.1 webpage/htmlfunc.inc:1.2 --- webpage/htmlfunc.inc:1.1 Fri Oct 31 08:52:24 2003 +++ webpage/htmlfunc.inc Mon Sep 20 17:24:49 2004 @@ -1,179 +1,179 @@ -<?php - - // ***************************************************************************************** - // sqlString : safeguard a string and add qoutes - // ***************************************************************************************** - function sqlString ($str) - { - return '"' . mysql_escape_string($str) . '"'; - } - - // ***************************************************************************************** - // Remove unwanted HTML tags - // ***************************************************************************************** - - function safehtml ($str, $notags) - { - $istag = false; - for ($i = 0; $i <= strlen($str); $i++) - { - if ($str[$i] == '<') - { $tag = "<"; $istag = true; } - else - if ($str[$i] == '>') - { $tag .= ">"; - if ($notags) - {} - else { $str2 .= testtag($tag); } - $istag = false; } - else - { - if ($istag) - { $tag .= $str[$i]; } - else {$str2 .= $str[$i];} - } - } - return $str2; - } - - // ***************************************************************************************** - // Change < and > into html entities - // ***************************************************************************************** - - function removeht($str) - { - return str_replace("<", "<", str_replace(">", ">", $str)); - } - - // ***************************************************************************************** - // Change & into & - // ***************************************************************************************** - - function removeamp($str) - { - return str_replace("&", "&"); - } - - // ***************************************************************************************** - // addlinesplits: change linefeeds to <br> - // ***************************************************************************************** - function addlinesplits ($str) - { - return str_replace("\r\n", "<br>", $str); - } - - // ***************************************************************************************** - // allowed: Check for allowed tags - // ***************************************************************************************** - function allowed($link) - { - // do something about /'es - switch (strtolower($link)) - { - case 'i': - case 'b': - case 'u': - case '/i': - case '/b': - case '/u': - case '/a': - case 'a': - case 'br': - case 'pre': - case '/pre': - return 1; - break; - } - - if ($link[0] == 'a' || $link[1] == 'a') - { return 1; }; - - return 0; - } - - // ***************************************************************************************** - // htmlclean: Better HTML checking facilities - // * Set $GLOBALS["htmlerr"] if Something we don't want is in the text - // ***************************************************************************************** - function htmlclean($html) - { - // split into "text" - "tag" - $parsed = preg_split ("/[<>]/", $html); - - // array of seen tags - $tagarr = array(); - - // Output - $output = ""; - - // loop through our array of data. - foreach ($parsed as $text => $tag) - { - // Every 2nd entry is a tag, otherwise it's plain text - if ($text % 2) - { - // is this tag allowed? - if (allowed($tag)) - { - // is it an end tag? - if ($tag[0] == '/') - { - // Have we any unended tags of this type? - if ($tagarr[substr($tag, 1, 10)] > 0) - { - // Yessir! Add tag to output and ... - $output .= "<". $tag . ">"; - - // ... remove one entry from the array of tags - // special case for <a ..></a> - if ($tag[0] == 'a') - { $tagarr['a'] = 1; } - else - { $tagarr[substr($tag, 1, 4)]--; } - } - } - // Not an end tag, stick it in - else - { - $output .= "<". $tag . ">"; - - // Count tags - // hack for <a href=""></a> <-- see? </a> != </a href=""> - if ($tag[0] == 'a') - { - $tagarr['a'] = 1; - } - else - { - $tagarr[$tag]++; - } - }; - } - else - { - // smallish hack to allow us to see if we broke the rules - $GLOBALS["htmlerr"] .= removeht("<$tag>") . ", "; - } - } - else - { - // Plain text - $output .= $tag; - }; - } - - // add missing tags - foreach ($tagarr as $text => $link) - { - //these have no end tags - if ($text[0] == 'a') - { if ($link > 0) { $output .= "</a>"; }; } - else if ($text == 'br') - { } - else - { if ($link > 0) { $output .= "</$text>"; }; } - } - return $output;// . '<p>' . $log; - } - +<?php + + // ***************************************************************************************** + // sqlString : safeguard a string and add qoutes + // ***************************************************************************************** + function sqlString ($str) + { + return '"' . mysql_escape_string($str) . '"'; + } + + // ***************************************************************************************** + // Remove unwanted HTML tags + // ***************************************************************************************** + + function safehtml ($str, $notags) + { + $istag = false; + for ($i = 0; $i <= strlen($str); $i++) + { + if ($str[$i] == '<') + { $tag = "<"; $istag = true; } + else + if ($str[$i] == '>') + { $tag .= ">"; + if ($notags) + {} + else { $str2 .= testtag($tag); } + $istag = false; } + else + { + if ($istag) + { $tag .= $str[$i]; } + else {$str2 .= $str[$i];} + } + } + return $str2; + } + + // ***************************************************************************************** + // Change < and > into html entities + // ***************************************************************************************** + + function removeht($str) + { + return str_replace("<", "<", str_replace(">", ">", $str)); + } + + // ***************************************************************************************** + // Change & into & + // ***************************************************************************************** + + function removeamp($str) + { + return str_replace("&", "&"); + } + + // ***************************************************************************************** + // addlinesplits: change linefeeds to <br> + // ***************************************************************************************** + function addlinesplits ($str) + { + return str_replace("\r\n", "<br>", $str); + } + + // ***************************************************************************************** + // allowed: Check for allowed tags + // ***************************************************************************************** + function allowed($link) + { + // do something about /'es + switch (strtolower($link)) + { + case 'i': + case 'b': + case 'u': + case '/i': + case '/b': + case '/u': + case '/a': + case 'a': + case 'br': + case 'pre': + case '/pre': + return 1; + break; + } + + if ($link[0] == 'a' || $link[1] == 'a') + { return 1; }; + + return 0; + } + + // ***************************************************************************************** + // htmlclean: Better HTML checking facilities + // * Set $GLOBALS["htmlerr"] if Something we don't want is in the text + // ***************************************************************************************** + function htmlclean($html) + { + // split into "text" - "tag" + $parsed = preg_split ("/[<>]/", $html); + + // array of seen tags + $tagarr = array(); + + // Output + $output = ""; + + // loop through our array of data. + foreach ($parsed as $text => $tag) + { + // Every 2nd entry is a tag, otherwise it's plain text + if ($text % 2) + { + // is this tag allowed? + if (allowed($tag)) + { + // is it an end tag? + if ($tag[0] == '/') + { + // Have we any unended tags of this type? + if ($tagarr[substr($tag, 1, 10)] > 0) + { + // Yessir! Add tag to output and ... + $output .= "<". $tag . ">"; + + // ... remove one entry from the array of tags + // special case for <a ..></a> + if ($tag[0] == 'a') + { $tagarr['a'] = 1; } + else + { $tagarr[substr($tag, 1, 4)]--; } + } + } + // Not an end tag, stick it in + else + { + $output .= "<". $tag . ">"; + + // Count tags + // hack for <a href=""></a> <-- see? </a> != </a href=""> + if ($tag[0] == 'a') + { + $tagarr['a'] = 1; + } + else + { + $tagarr[$tag]++; + } + }; + } + else + { + // smallish hack to allow us to see if we broke the rules + $GLOBALS["htmlerr"] .= removeht("<$tag>") . ", "; + } + } + else + { + // Plain text + $output .= $tag; + }; + } + + // add missing tags + foreach ($tagarr as $text => $link) + { + //these have no end tags + if ($text[0] == 'a') + { if ($link > 0) { $output .= "</a>"; }; } + else if ($text == 'br') + { } + else + { if ($link > 0) { $output .= "</$text>"; }; } + } + return $output;// . '<p>' . $log; + } + ?> \ No newline at end of file Index: webpage/index.php diff -u webpage/index.php:1.1 webpage/index.php:1.2 --- webpage/index.php:1.1 Fri Oct 31 08:28:24 2003 +++ webpage/index.php Mon Sep 20 17:24:49 2004 @@ -1,23 +1,23 @@ -<?php - require(dirname(__FILE__) . '/template.inc'); - - print getHead('About'); - - print getMenu('About'); - - print getBody( - createSection('About', -'DBPrim is a library providing basic building blocks for creating in-memory databases. -<p> -You can find us on <a href="http://sourceforge.net/projects/dbprim/">Sourceforge.net</a>. -<p> -Existing components of DBPrim: -<ul> -<li>Linked lists -<li>Hash tables with optional auto-resize -<li>Memory-efficient sparse matrices built on hash tables -<li>Red-black trees. -</ul>')); - - print getFoot(); -?> +<?php + require(dirname(__FILE__) . '/template.inc'); + + print getHead('About'); + + print getMenu('About'); + + print getBody( + createSection('About', +'DBPrim is a library providing basic building blocks for creating in-memory databases. +<p> +You can find us on <a href="http://sourceforge.net/projects/dbprim/">Sourceforge.net</a>. +<p> +Existing components of DBPrim: +<ul> +<li>Linked lists +<li>Hash tables with optional auto-resize +<li>Memory-efficient sparse matrices built on hash tables +<li>Red-black trees. +</ul>')); + + print getFoot(); +?> Index: webpage/news.php diff -u webpage/news.php:1.2 webpage/news.php:1.3 --- webpage/news.php:1.2 Fri Oct 31 21:10:55 2003 +++ webpage/news.php Mon Sep 20 17:24:49 2004 @@ -1,41 +1,41 @@ -<?php - require(dirname(__FILE__) . '/template.inc'); - - // Read Config - $Config = parse_ini_file("../login.ini"); - - /* Connecting, selecting database */ - $link = mysql_connect($Config["host"], $Config["dbuser"], $Config["dbpassword"]) or die("Could not connect"); - mysql_select_db($Config["db"]) or die("Could not select database"); - - // Check login function - $cookiedate = $_COOKIE["Time"]; - $cookieMD5 = $_COOKIE["Pass"]; - - // Timestamp must be within one hour of logging in. - if ($cookiedate <> "" && $cookiedate < (time()+(60*60)) && $cookieMD5 == md5($Config["password"] . $cookiedate)) - { $login = 1;} - else - { $login = 0;} - - print getHead('News'); - print getMenu('News'); - - $query = 'select *, date_format(posted_date, "%b %D %Y - %H:%i") as date from chat where category=1 ORDER BY posted_date desc Limit 10'; - - $result = mysql_query($query) or die("Query failed"); - - $events = array (); - - while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) - { - $newstext .= '<h3>' . $line["title"] . ' at ' . $line["date"] . '</h3><p>' . $line["author_text"] . '</p>'; - } - - if ($GLOBALS["login"]) - { $newstext .= '[ <a href="comment.php?replyto=-1">Add newsitem</a> ]'; } - - print getBody(createSection('News', $newstext)); - - print getFoot(); -?> +<?php + require(dirname(__FILE__) . '/template.inc'); + + // Read Config + $Config = parse_ini_file("../login.ini"); + + /* Connecting, selecting database */ + $link = mysql_connect($Config["host"], $Config["dbuser"], $Config["dbpassword"]) or die("Could not connect"); + mysql_select_db($Config["db"]) or die("Could not select database"); + + // Check login function + $cookiedate = $_COOKIE["Time"]; + $cookieMD5 = $_COOKIE["Pass"]; + + // Timestamp must be within one hour of logging in. + if ($cookiedate <> "" && $cookiedate < (time()+(60*60)) && $cookieMD5 == md5($Config["password"] . $cookiedate)) + { $login = 1;} + else + { $login = 0;} + + print getHead('News'); + print getMenu('News'); + + $query = 'select *, date_format(posted_date, "%b %D %Y - %H:%i") as date from chat where category=1 ORDER BY posted_date desc Limit 10'; + + $result = mysql_query($query) or die("Query failed"); + + $events = array (); + + while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) + { + $newstext .= '<h3>' . $line["title"] . ' at ' . $line["date"] . '</h3><p>' . $line["author_text"] . '</p>'; + } + + if ($GLOBALS["login"]) + { $newstext .= '[ <a href="comment.php?replyto=-1">Add newsitem</a> ]'; } + + print getBody(createSection('News', $newstext)); + + print getFoot(); +?> Index: webpage/template.inc diff -u webpage/template.inc:1.2 webpage/template.inc:1.3 --- webpage/template.inc:1.2 Fri Oct 31 21:10:55 2003 +++ webpage/template.inc Mon Sep 20 17:24:50 2004 @@ -1,96 +1,96 @@ -<?php - -// Five important functions for creating out page - -// Page header: getHead(<name of page>); -// Menus: getMenu(<Selected menu>); -// Body: getBody(<body sections>); -// Body sections: createSection(<section name>, <section html>); -// Page Footer: getFoot(); - -function getHead($title = "") -{ - if ($title <> '') { $title = ': ' . $title; }; - - return '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> - -<html> - <head> - <title>DBPrim' . $title . '</title> - <link rel="stylesheet" type="text/css" href="dbprim.css"> - <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> - </head> -<body> - -<div id="title"><a href="index.php"><img src="images/logo.png" border="0" alt="dbprim"></a></div>'; -} - -function createMenu($link, $class, $text) -{ - return '<a href="'. $link . '" class="' . $class . '">' . $text . '</a><br>'; -} - -function getMenu($selected) -{ - - function parseMenu ($menu, $selected) - { - foreach ($menu as $text => $link) - { - if (is_array($menu[$text])) - { - $ret .= '<div style="margin-left: 7px">' . parseMenu($menu[$text], $selected) . '</div>'; - } - else - if ($text == $selected) - { - $ret .= createMenu($link, "img2", $text); - } - else - { - $ret .= createMenu($link, "img1", $text); - } - } - return $ret; - } - - $menuitems = array("About" => "index.php", - "News" => "news.php", - "Download" => "download.php", - "Documentation" => "documentation.php"); - - // NB: Make array or something so we can detect when Comments is chosen (Docu -> Comments) - if ($selected == "Documentation") - { - array_push($menuitems, array("Doxygen" => "http://dbprim.sourceforge.net/htmldocs/", - "Examples" => "comment.php")); - } - - $ret .= parseMenu($menuitems, $selected); - - return '<div id="menu">' . - '<div class="menutitle">navigation:</div><div class="menuitems">' . $ret . '</div>' . - //Logo - '<br><center><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=88549&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a><p>' . - '</center>' . - '</div>'; -} - -function createSection ($title, $text) -{ - return '<h2>' . $title . '</h2><p><div class="text">' . $text . '</div>'; -} - -function getBody($text) -{ - return '<div id="content">' . $text . '</div>'; -} - -function getFoot() -{ -return "</body> -</html>"; -} - - +<?php + +// Five important functions for creating out page + +// Page header: getHead(<name of page>); +// Menus: getMenu(<Selected menu>); +// Body: getBody(<body sections>); +// Body sections: createSection(<section name>, <section html>); +// Page Footer: getFoot(); + +function getHead($title = "") +{ + if ($title <> '') { $title = ': ' . $title; }; + + return '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> + +<html> + <head> + <title>DBPrim' . $title . '</title> + <link rel="stylesheet" type="text/css" href="dbprim.css"> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> + </head> +<body> + +<div id="title"><a href="index.php"><img src="images/logo.png" border="0" alt="dbprim"></a></div>'; +} + +function createMenu($link, $class, $text) +{ + return '<a href="'. $link . '" class="' . $class . '">' . $text . '</a><br>'; +} + +function getMenu($selected) +{ + + function parseMenu ($menu, $selected) + { + foreach ($menu as $text => $link) + { + if (is_array($menu[$text])) + { + $ret .= '<div style="margin-left: 7px">' . parseMenu($menu[$text], $selected) . '</div>'; + } + else + if ($text == $selected) + { + $ret .= createMenu($link, "img2", $text); + } + else + { + $ret .= createMenu($link, "img1", $text); + } + } + return $ret; + } + + $menuitems = array("About" => "index.php", + "News" => "news.php", + "Download" => "download.php", + "Documentation" => "documentation.php"); + + // NB: Make array or something so we can detect when Comments is chosen (Docu -> Comments) + if ($selected == "Documentation") + { + array_push($menuitems, array("Doxygen" => "http://dbprim.sourceforge.net/htmldocs/", + "Examples" => "comment.php")); + } + + $ret .= parseMenu($menuitems, $selected); + + return '<div id="menu">' . + '<div class="menutitle">navigation:</div><div class="menuitems">' . $ret . '</div>' . + //Logo + '<br><center><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=88549&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a><p>' . + '</center>' . + '</div>'; +} + +function createSection ($title, $text) +{ + return '<h2>' . $title . '</h2><p><div class="text">' . $text . '</div>'; +} + +function getBody($text) +{ + return '<div id="content">' . $text . '</div>'; +} + +function getFoot() +{ +return "</body> +</html>"; +} + + ?> \ No newline at end of file ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2004-09-20 19:16:04
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2004-09-20 19:15:46 UTC Modified files: ChangeLog Makefile.in dbprim.h le_init.c tests/.cvsignore tests/Makefile.am tests/Makefile.in tests/test-harness.dat Added files: tests/t_linklists.c tests/test-harness.h Removed files: tests/t_he_init.c tests/t_ht_addfind.c tests/t_ht_flush.c tests/t_ht_free.c tests/t_ht_init.c tests/t_ht_iter.c tests/t_ht_move.c tests/t_ht_remove.c tests/t_ht_resize.c tests/t_le_init.c tests/t_ll_add.c tests/t_ll_find.c tests/t_ll_flush.c tests/t_ll_init.c tests/t_ll_iter.c tests/t_ll_move.c tests/t_ll_remove.c tests/t_st_init.c Log message: diddle up the test suite into something a little easier... ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.14 dbprim/ChangeLog:1.15 --- dbprim/ChangeLog:1.14 Tue Mar 2 23:50:39 2004 +++ dbprim/ChangeLog Mon Sep 20 12:15:34 2004 @@ -1,3 +1,19 @@ +2004-09-20 Kevin L Mitchell <kl...@mi...> + + * tests/test-harness.h: new test-harness header file defining some + macros which are useful for unit tests + + * tests/test-harness.dat: update for new test suite + + * tests/t_linklists.c: test program for linked lists + + * tests/Makefile.am: update for new test suite + + * tests/*.c: remove old tests to replace with a new, hopefully + simpler test suite + + * le_init.c (le_init): allow object to be NULL + 2004-03-03 Kevin L Mitchell <kl...@mi...> * tests/t_st_init.c: include dbprim_err.h and dbprim_version.h Index: dbprim/Makefile.in diff -u dbprim/Makefile.in:1.4 dbprim/Makefile.in:1.5 --- dbprim/Makefile.in:1.4 Tue Mar 2 23:50:39 2004 +++ dbprim/Makefile.in Mon Sep 20 12:15:34 2004 @@ -357,7 +357,8 @@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = doc/Doxyfile comp_et-sh dbprim-config dbprim.spec +CONFIG_CLEAN_FILES = tests/Makefile doc/Doxyfile comp_et-sh \ + dbprim-config dbprim.spec LTLIBRARIES = $(lib_LTLIBRARIES) am_libdbprim_la_OBJECTS = dbprim_version.lo _hash_prime.lo he_init.lo \ @@ -453,6 +454,8 @@ $(ACLOCAL_M4): configure.ac acinclude.m4 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +tests/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/Makefile.in + cd $(top_builddir) && $(SHELL) ./config.status $@ doc/Doxyfile: $(top_builddir)/config.status $(top_srcdir)/doc/Doxyfile.in cd $(top_builddir) && $(SHELL) ./config.status $@ comp_et-sh: $(top_builddir)/config.status comp_et-sh.in @@ -815,7 +818,7 @@ distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkinstalldirs) $(distdir)/. $(distdir)/doc + $(mkinstalldirs) $(distdir)/. $(distdir)/doc $(distdir)/tests @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ Index: dbprim/dbprim.h diff -u dbprim/dbprim.h:1.6 dbprim/dbprim.h:1.7 --- dbprim/dbprim.h:1.6 Tue Mar 2 23:50:40 2004 +++ dbprim/dbprim.h Mon Sep 20 12:15:34 2004 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: dbprim.h,v 1.6 2004/03/03 07:50:40 klmitch Exp $ +** @(#)$Id: dbprim.h,v 1.7 2004/09/20 19:15:34 klmitch Exp $ */ #ifndef __include_dbprim_h__ #define __include_dbprim_h__ @@ -218,10 +218,10 @@ * \brief Database key. * * This structure is a generic key containing a void * pointer and a - * length parameter. It should be accessed with * dk_key() and + * length parameter. It should be accessed with dk_key() and * dk_len(). */ -typedef struct _db_key_s db_key_t; +typedef struct _db_key_s db_key_t; /** \ingroup dbprim_link * \brief Linked list head. Index: dbprim/le_init.c diff -u dbprim/le_init.c:1.2 dbprim/le_init.c:1.3 --- dbprim/le_init.c:1.2 Wed Jun 11 18:10:04 2003 +++ dbprim/le_init.c Mon Sep 20 12:15:34 2004 @@ -16,12 +16,12 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: le_init.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $ +** @(#)$Id: le_init.c,v 1.3 2004/09/20 19:15:34 klmitch Exp $ */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: le_init.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $"); +RCSTAG("@(#)$Id: le_init.c,v 1.3 2004/09/20 19:15:34 klmitch Exp $"); /** \ingroup dbprim_link * \brief Dynamically initialize a linked list element. @@ -31,7 +31,7 @@ * \param elem A pointer to a #link_elem_t to be initialized. * \param object * A pointer to \c void used to represent the object - * associated with the element. May not be \c NULL. + * associated with the element. * * \retval DB_ERR_BADARGS A \c NULL pointer was passed for \p * elem or \p object. @@ -41,7 +41,7 @@ { initialize_dbpr_error_table(); /* initialize error table */ - if (!elem || !object) /* verify arguments */ + if (!elem) /* verify arguments */ return DB_ERR_BADARGS; elem->le_next = 0; /* initialize the element */ Index: dbprim/tests/.cvsignore diff -u dbprim/tests/.cvsignore:1.3 dbprim/tests/.cvsignore:1.4 --- dbprim/tests/.cvsignore:1.3 Sat Aug 23 14:03:43 2003 +++ dbprim/tests/.cvsignore Mon Sep 20 12:15:35 2004 @@ -1,23 +1,7 @@ .deps .libs Makefile -t_he_init -t_ht_addfind -t_ht_flush -t_ht_free -t_ht_init -t_ht_iter -t_ht_move -t_ht_remove -t_ht_resize -t_le_init -t_ll_add -t_ll_find -t_ll_flush -t_ll_init -t_ll_iter -t_ll_move -t_ll_remove -t_st_init +t_linklists test-harness test-harness.log +*.o Index: dbprim/tests/Makefile.am diff -u dbprim/tests/Makefile.am:1.5 dbprim/tests/Makefile.am:1.6 --- dbprim/tests/Makefile.am:1.5 Tue Mar 2 23:50:40 2004 +++ dbprim/tests/Makefile.am Mon Sep 20 12:15:35 2004 @@ -1,6 +1,4 @@ -## Prefered emacs editing mode: -*- Makefile -*- -## -## Copyright (C) 2002 by Kevin L. Mitchell <kl...@mi...> +## Copyright (C) 2004 by Kevin L. Mitchell <kl...@mi...> ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public @@ -17,99 +15,25 @@ ## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ## MA 02111-1307, USA ## -## @(#)$Id: Makefile.am,v 1.5 2004/03/03 07:50:40 klmitch Exp $ +## @(#)$Id: Makefile.am,v 1.6 2004/09/20 19:15:35 klmitch Exp $ ## ## Process this file with automake to generate Makefile.in AUTOMAKE_OPTIONS = foreign -AM_CPPFLAGS = -D__DBPRIM_LIBRARY__ -I.. -I$(srcdir)/.. +AM_CPPFLAGS = -D__DBPRIM_LIBRARY__ -I$(top_builddir) -I$(top_srcdir) +LDADD = $(top_builddir)/libdbprim.la @COM_ERR_LDADD@ +AM_LDFLAGS = -static check_PROGRAMS = test-harness \ \ - t_ll_init t_ll_add t_ll_move t_ll_remove t_ll_find \ - t_ll_iter t_ll_flush t_le_init \ - \ - t_ht_init t_ht_addfind t_ht_move t_ht_remove t_ht_iter \ - t_ht_flush t_ht_resize t_ht_free t_he_init \ - \ - t_st_init + t_linklists -test_harness_SOURCES = test-harness.c +test_harness_SOURCES = test-harness.c test-harness.h +test_harness_LDADD = +test_harness_LDFLAGS = TEST_OPTIONS = -t_ll_init_SOURCES = t_ll_init.c -t_ll_init_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_init_LDFLAGS = -static - -t_ll_add_SOURCES = t_ll_add.c -t_ll_add_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_add_LDFLAGS = -static - -t_ll_move_SOURCES = t_ll_move.c -t_ll_move_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_move_LDFLAGS = -static - -t_ll_remove_SOURCES = t_ll_remove.c -t_ll_remove_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_remove_LDFLAGS = -static - -t_ll_find_SOURCES = t_ll_find.c -t_ll_find_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_find_LDFLAGS = -static - -t_ll_iter_SOURCES = t_ll_iter.c -t_ll_iter_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_iter_LDFLAGS = -static - -t_ll_flush_SOURCES = t_ll_flush.c -t_ll_flush_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_flush_LDFLAGS = -static - -t_le_init_SOURCES = t_le_init.c -t_le_init_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_le_init_LDFLAGS = -static - -t_ht_init_SOURCES = t_ht_init.c -t_ht_init_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_init_LDFLAGS = -static - -t_ht_addfind_SOURCES = t_ht_addfind.c -t_ht_addfind_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_addfind_LDFLAGS = -static - -t_ht_move_SOURCES = t_ht_move.c -t_ht_move_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_move_LDFLAGS = -static - -t_ht_remove_SOURCES = t_ht_remove.c -t_ht_remove_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_remove_LDFLAGS = -static - -t_ht_iter_SOURCES = t_ht_iter.c -t_ht_iter_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_iter_LDFLAGS = -static - -t_ht_flush_SOURCES = t_ht_flush.c -t_ht_flush_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_flush_LDFLAGS = -static - -t_ht_resize_SOURCES = t_ht_resize.c -t_ht_resize_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_resize_LDFLAGS = -static - -t_ht_free_SOURCES = t_ht_free.c -t_ht_free_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_free_LDFLAGS = -static - -t_he_init_SOURCES = t_he_init.c -t_he_init_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_he_init_LDFLAGS = -static - -t_st_init_SOURCES = t_st_init.c -t_st_init_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_st_init_LDFLAGS = -static - EXTRA_DIST = test-harness.dat DISTCLEANFILES = test-harness.log Index: dbprim/tests/Makefile.in diff -u dbprim/tests/Makefile.in:1.2 dbprim/tests/Makefile.in:1.3 --- dbprim/tests/Makefile.in:1.2 Tue Mar 2 23:50:40 2004 +++ dbprim/tests/Makefile.in Mon Sep 20 12:15:35 2004 @@ -144,94 +144,20 @@ AUTOMAKE_OPTIONS = foreign -AM_CPPFLAGS = -D__DBPRIM_LIBRARY__ -I.. -I$(srcdir)/.. +AM_CPPFLAGS = -D__DBPRIM_LIBRARY__ -I$(top_builddir) -I$(top_srcdir) +LDADD = $(top_builddir)/libdbprim.la @COM_ERR_LDADD@ +AM_LDFLAGS = -static check_PROGRAMS = test-harness \ \ - t_ll_init t_ll_add t_ll_move t_ll_remove t_ll_find \ - t_ll_iter t_ll_flush t_le_init \ - \ - t_ht_init t_ht_addfind t_ht_move t_ht_remove t_ht_iter \ - t_ht_flush t_ht_resize t_ht_free t_he_init \ - \ - t_st_init + t_linklists -test_harness_SOURCES = test-harness.c +test_harness_SOURCES = test-harness.c test-harness.h +test_harness_LDADD = +test_harness_LDFLAGS = TEST_OPTIONS = -t_ll_init_SOURCES = t_ll_init.c -t_ll_init_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_init_LDFLAGS = -static - -t_ll_add_SOURCES = t_ll_add.c -t_ll_add_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_add_LDFLAGS = -static - -t_ll_move_SOURCES = t_ll_move.c -t_ll_move_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_move_LDFLAGS = -static - -t_ll_remove_SOURCES = t_ll_remove.c -t_ll_remove_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_remove_LDFLAGS = -static - -t_ll_find_SOURCES = t_ll_find.c -t_ll_find_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_find_LDFLAGS = -static - -t_ll_iter_SOURCES = t_ll_iter.c -t_ll_iter_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_iter_LDFLAGS = -static - -t_ll_flush_SOURCES = t_ll_flush.c -t_ll_flush_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ll_flush_LDFLAGS = -static - -t_le_init_SOURCES = t_le_init.c -t_le_init_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_le_init_LDFLAGS = -static - -t_ht_init_SOURCES = t_ht_init.c -t_ht_init_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_init_LDFLAGS = -static - -t_ht_addfind_SOURCES = t_ht_addfind.c -t_ht_addfind_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_addfind_LDFLAGS = -static - -t_ht_move_SOURCES = t_ht_move.c -t_ht_move_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_move_LDFLAGS = -static - -t_ht_remove_SOURCES = t_ht_remove.c -t_ht_remove_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_remove_LDFLAGS = -static - -t_ht_iter_SOURCES = t_ht_iter.c -t_ht_iter_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_iter_LDFLAGS = -static - -t_ht_flush_SOURCES = t_ht_flush.c -t_ht_flush_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_flush_LDFLAGS = -static - -t_ht_resize_SOURCES = t_ht_resize.c -t_ht_resize_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_resize_LDFLAGS = -static - -t_ht_free_SOURCES = t_ht_free.c -t_ht_free_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_ht_free_LDFLAGS = -static - -t_he_init_SOURCES = t_he_init.c -t_he_init_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_he_init_LDFLAGS = -static - -t_st_init_SOURCES = t_st_init.c -t_st_init_LDADD = ../libdbprim.la @COM_ERR_LDADD@ -t_st_init_LDFLAGS = -static - EXTRA_DIST = test-harness.dat DISTCLEANFILES = test-harness.log @@ -239,86 +165,20 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = -check_PROGRAMS = test-harness$(EXEEXT) t_ll_init$(EXEEXT) \ - t_ll_add$(EXEEXT) t_ll_move$(EXEEXT) t_ll_remove$(EXEEXT) \ - t_ll_find$(EXEEXT) t_ll_iter$(EXEEXT) t_ll_flush$(EXEEXT) \ - t_le_init$(EXEEXT) t_ht_init$(EXEEXT) t_ht_addfind$(EXEEXT) \ - t_ht_move$(EXEEXT) t_ht_remove$(EXEEXT) t_ht_iter$(EXEEXT) \ - t_ht_flush$(EXEEXT) t_ht_resize$(EXEEXT) t_ht_free$(EXEEXT) \ - t_he_init$(EXEEXT) t_st_init$(EXEEXT) -am_t_he_init_OBJECTS = t_he_init.$(OBJEXT) -t_he_init_OBJECTS = $(am_t_he_init_OBJECTS) -t_he_init_DEPENDENCIES = ../libdbprim.la -am_t_ht_addfind_OBJECTS = t_ht_addfind.$(OBJEXT) -t_ht_addfind_OBJECTS = $(am_t_ht_addfind_OBJECTS) -t_ht_addfind_DEPENDENCIES = ../libdbprim.la -am_t_ht_flush_OBJECTS = t_ht_flush.$(OBJEXT) -t_ht_flush_OBJECTS = $(am_t_ht_flush_OBJECTS) -t_ht_flush_DEPENDENCIES = ../libdbprim.la -am_t_ht_free_OBJECTS = t_ht_free.$(OBJEXT) -t_ht_free_OBJECTS = $(am_t_ht_free_OBJECTS) -t_ht_free_DEPENDENCIES = ../libdbprim.la -am_t_ht_init_OBJECTS = t_ht_init.$(OBJEXT) -t_ht_init_OBJECTS = $(am_t_ht_init_OBJECTS) -t_ht_init_DEPENDENCIES = ../libdbprim.la -am_t_ht_iter_OBJECTS = t_ht_iter.$(OBJEXT) -t_ht_iter_OBJECTS = $(am_t_ht_iter_OBJECTS) -t_ht_iter_DEPENDENCIES = ../libdbprim.la -am_t_ht_move_OBJECTS = t_ht_move.$(OBJEXT) -t_ht_move_OBJECTS = $(am_t_ht_move_OBJECTS) -t_ht_move_DEPENDENCIES = ../libdbprim.la -am_t_ht_remove_OBJECTS = t_ht_remove.$(OBJEXT) -t_ht_remove_OBJECTS = $(am_t_ht_remove_OBJECTS) -t_ht_remove_DEPENDENCIES = ../libdbprim.la -am_t_ht_resize_OBJECTS = t_ht_resize.$(OBJEXT) -t_ht_resize_OBJECTS = $(am_t_ht_resize_OBJECTS) -t_ht_resize_DEPENDENCIES = ../libdbprim.la -am_t_le_init_OBJECTS = t_le_init.$(OBJEXT) -t_le_init_OBJECTS = $(am_t_le_init_OBJECTS) -t_le_init_DEPENDENCIES = ../libdbprim.la -am_t_ll_add_OBJECTS = t_ll_add.$(OBJEXT) -t_ll_add_OBJECTS = $(am_t_ll_add_OBJECTS) -t_ll_add_DEPENDENCIES = ../libdbprim.la -am_t_ll_find_OBJECTS = t_ll_find.$(OBJEXT) -t_ll_find_OBJECTS = $(am_t_ll_find_OBJECTS) -t_ll_find_DEPENDENCIES = ../libdbprim.la -am_t_ll_flush_OBJECTS = t_ll_flush.$(OBJEXT) -t_ll_flush_OBJECTS = $(am_t_ll_flush_OBJECTS) -t_ll_flush_DEPENDENCIES = ../libdbprim.la -am_t_ll_init_OBJECTS = t_ll_init.$(OBJEXT) -t_ll_init_OBJECTS = $(am_t_ll_init_OBJECTS) -t_ll_init_DEPENDENCIES = ../libdbprim.la -am_t_ll_iter_OBJECTS = t_ll_iter.$(OBJEXT) -t_ll_iter_OBJECTS = $(am_t_ll_iter_OBJECTS) -t_ll_iter_DEPENDENCIES = ../libdbprim.la -am_t_ll_move_OBJECTS = t_ll_move.$(OBJEXT) -t_ll_move_OBJECTS = $(am_t_ll_move_OBJECTS) -t_ll_move_DEPENDENCIES = ../libdbprim.la -am_t_ll_remove_OBJECTS = t_ll_remove.$(OBJEXT) -t_ll_remove_OBJECTS = $(am_t_ll_remove_OBJECTS) -t_ll_remove_DEPENDENCIES = ../libdbprim.la -am_t_st_init_OBJECTS = t_st_init.$(OBJEXT) -t_st_init_OBJECTS = $(am_t_st_init_OBJECTS) -t_st_init_DEPENDENCIES = ../libdbprim.la +check_PROGRAMS = test-harness$(EXEEXT) t_linklists$(EXEEXT) +t_linklists_SOURCES = t_linklists.c +t_linklists_OBJECTS = t_linklists.$(OBJEXT) +t_linklists_LDADD = $(LDADD) +t_linklists_DEPENDENCIES = $(top_builddir)/libdbprim.la +t_linklists_LDFLAGS = am_test_harness_OBJECTS = test-harness.$(OBJEXT) test_harness_OBJECTS = $(am_test_harness_OBJECTS) -test_harness_LDADD = $(LDADD) test_harness_DEPENDENCIES = -test_harness_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/t_he_init.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/t_ht_addfind.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/t_ht_flush.Po ./$(DEPDIR)/t_ht_free.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/t_ht_init.Po ./$(DEPDIR)/t_ht_iter.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/t_ht_move.Po ./$(DEPDIR)/t_ht_remove.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/t_ht_resize.Po ./$(DEPDIR)/t_le_init.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/t_ll_add.Po ./$(DEPDIR)/t_ll_find.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/t_ll_flush.Po ./$(DEPDIR)/t_ll_init.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/t_ll_iter.Po ./$(DEPDIR)/t_ll_move.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/t_ll_remove.Po ./$(DEPDIR)/t_st_init.Po \ +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/t_linklists.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/test-harness.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -327,16 +187,9 @@ CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DIST_SOURCES = $(t_he_init_SOURCES) $(t_ht_addfind_SOURCES) \ - $(t_ht_flush_SOURCES) $(t_ht_free_SOURCES) $(t_ht_init_SOURCES) \ - $(t_ht_iter_SOURCES) $(t_ht_move_SOURCES) \ - $(t_ht_remove_SOURCES) $(t_ht_resize_SOURCES) \ - $(t_le_init_SOURCES) $(t_ll_add_SOURCES) $(t_ll_find_SOURCES) \ - $(t_ll_flush_SOURCES) $(t_ll_init_SOURCES) $(t_ll_iter_SOURCES) \ - $(t_ll_move_SOURCES) $(t_ll_remove_SOURCES) \ - $(t_st_init_SOURCES) $(test_harness_SOURCES) +DIST_SOURCES = t_linklists.c $(test_harness_SOURCES) DIST_COMMON = $(srcdir)/Makefile.in Makefile.am -SOURCES = $(t_he_init_SOURCES) $(t_ht_addfind_SOURCES) $(t_ht_flush_SOURCES) $(t_ht_free_SOURCES) $(t_ht_init_SOURCES) $(t_ht_iter_SOURCES) $(t_ht_move_SOURCES) $(t_ht_remove_SOURCES) $(t_ht_resize_SOURCES) $(t_le_init_SOURCES) $(t_ll_add_SOURCES) $(t_ll_find_SOURCES) $(t_ll_flush_SOURCES) $(t_ll_init_SOURCES) $(t_ll_iter_SOURCES) $(t_ll_move_SOURCES) $(t_ll_remove_SOURCES) $(t_st_init_SOURCES) $(test_harness_SOURCES) +SOURCES = t_linklists.c $(test_harness_SOURCES) all: all-am @@ -354,60 +207,9 @@ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done -t_he_init$(EXEEXT): $(t_he_init_OBJECTS) $(t_he_init_DEPENDENCIES) - @rm -f t_he_init$(EXEEXT) - $(LINK) $(t_he_init_LDFLAGS) $(t_he_init_OBJECTS) $(t_he_init_LDADD) $(LIBS) -t_ht_addfind$(EXEEXT): $(t_ht_addfind_OBJECTS) $(t_ht_addfind_DEPENDENCIES) - @rm -f t_ht_addfind$(EXEEXT) - $(LINK) $(t_ht_addfind_LDFLAGS) $(t_ht_addfind_OBJECTS) $(t_ht_addfind_LDADD) $(LIBS) -t_ht_flush$(EXEEXT): $(t_ht_flush_OBJECTS) $(t_ht_flush_DEPENDENCIES) - @rm -f t_ht_flush$(EXEEXT) - $(LINK) $(t_ht_flush_LDFLAGS) $(t_ht_flush_OBJECTS) $(t_ht_flush_LDADD) $(LIBS) -t_ht_free$(EXEEXT): $(t_ht_free_OBJECTS) $(t_ht_free_DEPENDENCIES) - @rm -f t_ht_free$(EXEEXT) - $(LINK) $(t_ht_free_LDFLAGS) $(t_ht_free_OBJECTS) $(t_ht_free_LDADD) $(LIBS) -t_ht_init$(EXEEXT): $(t_ht_init_OBJECTS) $(t_ht_init_DEPENDENCIES) - @rm -f t_ht_init$(EXEEXT) - $(LINK) $(t_ht_init_LDFLAGS) $(t_ht_init_OBJECTS) $(t_ht_init_LDADD) $(LIBS) -t_ht_iter$(EXEEXT): $(t_ht_iter_OBJECTS) $(t_ht_iter_DEPENDENCIES) - @rm -f t_ht_iter$(EXEEXT) - $(LINK) $(t_ht_iter_LDFLAGS) $(t_ht_iter_OBJECTS) $(t_ht_iter_LDADD) $(LIBS) -t_ht_move$(EXEEXT): $(t_ht_move_OBJECTS) $(t_ht_move_DEPENDENCIES) - @rm -f t_ht_move$(EXEEXT) - $(LINK) $(t_ht_move_LDFLAGS) $(t_ht_move_OBJECTS) $(t_ht_move_LDADD) $(LIBS) -t_ht_remove$(EXEEXT): $(t_ht_remove_OBJECTS) $(t_ht_remove_DEPENDENCIES) - @rm -f t_ht_remove$(EXEEXT) - $(LINK) $(t_ht_remove_LDFLAGS) $(t_ht_remove_OBJECTS) $(t_ht_remove_LDADD) $(LIBS) -t_ht_resize$(EXEEXT): $(t_ht_resize_OBJECTS) $(t_ht_resize_DEPENDENCIES) - @rm -f t_ht_resize$(EXEEXT) - $(LINK) $(t_ht_resize_LDFLAGS) $(t_ht_resize_OBJECTS) $(t_ht_resize_LDADD) $(LIBS) -t_le_init$(EXEEXT): $(t_le_init_OBJECTS) $(t_le_init_DEPENDENCIES) - @rm -f t_le_init$(EXEEXT) - $(LINK) $(t_le_init_LDFLAGS) $(t_le_init_OBJECTS) $(t_le_init_LDADD) $(LIBS) -t_ll_add$(EXEEXT): $(t_ll_add_OBJECTS) $(t_ll_add_DEPENDENCIES) - @rm -f t_ll_add$(EXEEXT) - $(LINK) $(t_ll_add_LDFLAGS) $(t_ll_add_OBJECTS) $(t_ll_add_LDADD) $(LIBS) -t_ll_find$(EXEEXT): $(t_ll_find_OBJECTS) $(t_ll_find_DEPENDENCIES) - @rm -f t_ll_find$(EXEEXT) - $(LINK) $(t_ll_find_LDFLAGS) $(t_ll_find_OBJECTS) $(t_ll_find_LDADD) $(LIBS) -t_ll_flush$(EXEEXT): $(t_ll_flush_OBJECTS) $(t_ll_flush_DEPENDENCIES) - @rm -f t_ll_flush$(EXEEXT) - $(LINK) $(t_ll_flush_LDFLAGS) $(t_ll_flush_OBJECTS) $(t_ll_flush_LDADD) $(LIBS) -t_ll_init$(EXEEXT): $(t_ll_init_OBJECTS) $(t_ll_init_DEPENDENCIES) - @rm -f t_ll_init$(EXEEXT) - $(LINK) $(t_ll_init_LDFLAGS) $(t_ll_init_OBJECTS) $(t_ll_init_LDADD) $(LIBS) -t_ll_iter$(EXEEXT): $(t_ll_iter_OBJECTS) $(t_ll_iter_DEPENDENCIES) - @rm -f t_ll_iter$(EXEEXT) - $(LINK) $(t_ll_iter_LDFLAGS) $(t_ll_iter_OBJECTS) $(t_ll_iter_LDADD) $(LIBS) -t_ll_move$(EXEEXT): $(t_ll_move_OBJECTS) $(t_ll_move_DEPENDENCIES) - @rm -f t_ll_move$(EXEEXT) - $(LINK) $(t_ll_move_LDFLAGS) $(t_ll_move_OBJECTS) $(t_ll_move_LDADD) $(LIBS) -t_ll_remove$(EXEEXT): $(t_ll_remove_OBJECTS) $(t_ll_remove_DEPENDENCIES) - @rm -f t_ll_remove$(EXEEXT) - $(LINK) $(t_ll_remove_LDFLAGS) $(t_ll_remove_OBJECTS) $(t_ll_remove_LDADD) $(LIBS) -t_st_init$(EXEEXT): $(t_st_init_OBJECTS) $(t_st_init_DEPENDENCIES) - @rm -f t_st_init$(EXEEXT) - $(LINK) $(t_st_init_LDFLAGS) $(t_st_init_OBJECTS) $(t_st_init_LDADD) $(LIBS) +t_linklists$(EXEEXT): $(t_linklists_OBJECTS) $(t_linklists_DEPENDENCIES) + @rm -f t_linklists$(EXEEXT) + $(LINK) $(t_linklists_LDFLAGS) $(t_linklists_OBJECTS) $(t_linklists_LDADD) $(LIBS) test-harness$(EXEEXT): $(test_harness_OBJECTS) $(test_harness_DEPENDENCIES) @rm -f test-harness$(EXEEXT) $(LINK) $(test_harness_LDFLAGS) $(test_harness_OBJECTS) $(test_harness_LDADD) $(LIBS) @@ -418,24 +220,7 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_he_init.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ht_addfind.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ht_flush.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ht_free.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ht_init.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ht_iter.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ht_move.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ht_remove.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ht_resize.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_le_init.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ll_add.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ll_find.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ll_flush.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ll_init.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ll_iter.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ll_move.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_ll_remove.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_st_init.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t_linklists.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-harness.Po@am__quote@ .c.o: Index: dbprim/tests/t_he_init.c diff -u dbprim/tests/t_he_init.c:1.3 dbprim/tests/t_he_init.c:removed --- dbprim/tests/t_he_init.c:1.3 Tue Mar 2 23:50:40 2004 +++ dbprim/tests/t_he_init.c Mon Sep 20 12:15:49 2004 @@ -1,118 +0,0 @@ -/* -** Copyright (C) 2002 by Kevin L. Mitchell <kl...@mi...> -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Library General Public -** License as published by the Free Software Foundation; either -** version 2 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Library General Public License for more details. -** -** You should have received a copy of the GNU Library General Public -** License along with this library; if not, write to the Free -** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -** MA 02111-1307, USA -** -** @(#)$Id: t_he_init.c,v 1.3 2004/03/03 07:50:40 klmitch Exp $ -*/ -#include <stdio.h> -#include <stdlib.h> - -#include "dbprim.h" -#include "dbprim_err.h" -#include "dbprim_version.h" - -#define OBJECT (void *)0x91827364 -#define DEADINT 0xdeadbeef -#define DEADPTR (void *)0xdeadbeef - -static void -check_init(hash_entry_t *entry, char *how) -{ - if (entry->he_magic != HASH_ENTRY_MAGIC) /* Verify magic was set */ - printf("FAIL/%s_magic:Initialization failed to set magic number\n", how); - else - printf("PASS/%s_magic:Initialization set magic number properly\n", how); - - if (!le_verify(&entry->he_elem)) /* verify element was initialized */ - printf("FAIL/%s_elem:Initialization failed to initialize linked list " - "element\n", how); - else - printf("PASS/%s_elem:Initialization initialized linked list element\n", - how); - - if (entry->he_table != 0) /* verify table was cleared */ - printf("FAIL/%s_table:Initialization failed to clear table\n", how); - else - printf("PASS/%s_table:Initialization set table to 0\n", how); - - if (entry->he_hash != 0) /* verify hash value was cleared */ - printf("FAIL/%s_hash:Initialization failed to clear hash value\n", how); - else - printf("PASS/%s_hash:Initialization set hash value to 0\n", how); - - if (dk_key(&entry->he_key) != 0) /* verify key value was cleared */ - printf("FAIL/%s_key:Initialization failed to clear database key\n", how); - else - printf("PASS/%s_key:Initialization set database key to 0\n", how); - - if (dk_len(&entry->he_key) != 0) /* verify key length was cleared */ - printf("FAIL/%s_keylen:Initialization failed to clear database key " - "length\n", how); - else - printf("PASS/%s_keylen:Initialization set database key length to 0\n", - how); - - if (entry->he_value != OBJECT) /* verify value was set properly */ - printf("FAIL/%s_value:Initialization failed to set value\n", how); - else - printf("PASS/%s_value:Initialization set value properly\n", how); -} - -/* Check return value of operation and report PASS/FAIL */ -static void -check_result(unsigned long result, unsigned long expected, char *test, - char *info, int die) -{ - if (result != expected) { - printf("FAIL/%s:%s incorrectly returned %lu (expected %lu)\n", test, info, - result, expected); - if (die) - exit(0); - } else - printf("PASS/%s:%s correctly returned %lu\n", test, info, result); -} - -int -main(int argc, char **argv) -{ - hash_entry_t entry = HASH_ENTRY_INIT(OBJECT); - - /* Check that the static initializer produces a passable structure */ - check_init(&entry, "he_static"); - - /* now, check what he_init does with bad arguments */ - check_result(he_init(0, 0), DB_ERR_BADARGS, "he_init_noargs", - "he_init() with no valid arguments", 0); - - /* Scramble the structure */ - entry.he_magic = DEADINT; - entry.he_elem.le_magic = DEADINT; - entry.he_table = DEADPTR; - entry.he_hash = DEADINT; - entry.he_key.dk_key = DEADPTR; - entry.he_key.dk_len = DEADINT; - entry.he_value = DEADPTR; - - /* Now try to initialize our structure and see what happens */ - check_result(he_init(&entry, OBJECT), 0, "he_dynamic", - "he_init() to dynamically initialize hash entry", 0); - - /* Finally, verify initialization */ - check_init(&entry, "he_dynamic"); - - return 0; -} Index: dbprim/tests/t_ht_addfind.c diff -u dbprim/tests/t_ht_addfind.c:1.2 dbprim/tests/t_ht_addfind.c:removed --- dbprim/tests/t_ht_addfind.c:1.2 Wed Jun 11 18:10:11 2003 +++ dbprim/tests/t_ht_addfind.c Mon Sep 20 12:15:50 2004 @@ -1,177 +0,0 @@ -/* -** Copyright (C) 2002 by Kevin L. Mitchell <kl...@mi...> -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Library General Public -** License as published by the Free Software Foundation; either -** version 2 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Library General Public License for more details. -** -** You should have received a copy of the GNU Library General Public -** License along with this library; if not, write to the Free -** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -** MA 02111-1307, USA -** -** @(#)$Id: t_ht_addfind.c,v 1.2 2003/06/12 01:10:11 klmitch Exp $ -*/ -#include <stdio.h> -#include <stdlib.h> - -#include "dbprim.h" -#include "dbprim_int.h" - -#define TABLE0 (void *)0x76543210 -#define TABLE1 (void *)0x87654321 - -#define OBJECT0 (void *)0x01234567 -#define OBJECT1 (void *)0x12345678 -#define OBJECT2 (void *)0x23456789 -#define OBJECT3 (void *)0x3456789a -#define OBJECT4 (void *)0x456789ab -#define OBJECT5 (void *)0x56789abc - -#define DEADINT 0xdeadbeef -#define DEADPTR (void *)0xdeadbeef - -/* Check return value of add operation and report PASS/FAIL */ -static void -check_result(unsigned long result, unsigned long expected, char *test, - char *info, int die) -{ - if (result != expected) { - printf("FAIL/%s:%s incorrectly returned %lu (expected %lu)\n", test, info, - result, expected); - if (die) - exit(0); - } else - printf("PASS/%s:%s correctly returned %lu\n", test, info, result); -} - -static unsigned long -check_func(hash_table_t *table, db_key_t *key) -{ - return dk_len(key); -} - -static unsigned long -check_comp(hash_table_t *table, db_key_t *key1, db_key_t *key2) -{ - return (!(dk_len(key1) == dk_len(key2) && dk_key(key1) == dk_key(key2))); -} - -int -main(int argc, char **argv) -{ - hash_table_t table[] = { /* some tables to operate on */ - HASH_TABLE_INIT(0, check_func, check_comp, 0, TABLE0), - HASH_TABLE_INIT(0, check_func, check_comp, 0, TABLE1), - { DEADINT, DEADINT, DEADINT, DEADINT, DEADINT, DEADINT, DEADPTR, - (hash_func_t)DEADPTR, (hash_comp_t)DEADPTR, (hash_resize_t)DEADPTR, - DEADPTR } /* table[2] */ - }; - hash_entry_t entry[] = { /* some entries to operate on */ - HASH_ENTRY_INIT(OBJECT0), - HASH_ENTRY_INIT(OBJECT1), - HASH_ENTRY_INIT(OBJECT2), - HASH_ENTRY_INIT(OBJECT3), - HASH_ENTRY_INIT(OBJECT4), - HASH_ENTRY_INIT(OBJECT5), - { DEADINT, { DEADINT, DEADPTR, DEADPTR, DEADPTR, DEADPTR, DEADINT }, - DEADPTR, DEADINT, { DEADPTR, DEADINT }, DEADPTR } /* entry[6] */ - }; - hash_entry_t *entry_p; - db_key_t key[] = { /* some keys... */ - DB_KEY_INIT("obj0", 0), - DB_KEY_INIT("obj1", 1), - DB_KEY_INIT("obj2", 2), - DB_KEY_INIT("obj3", 3), - DB_KEY_INIT("obj4", 4), - DB_KEY_INIT("obj5", 5), - DB_KEY_INIT("obj6", 6) - }; - - /* initialize the tables with a size */ - if (ht_init(&table[0], 0, check_func, check_comp, 0, TABLE0, 7) || - ht_init(&table[1], 0, check_func, check_comp, 0, TABLE1, 7)) - return -1; /* failed to initialize test */ - - /* Check ht_find()'s handling of bad arguments */ - check_result(ht_find(0, 0, 0), DB_ERR_BADARGS, "ht_find_noargs", - "ht_find() with no valid arguments", 0); - check_result(ht_find(&table[2], 0, &key[6]), DB_ERR_BADARGS, - "ht_find_badtable", "ht_find() with bad table", 0); - check_result(ht_find(&table[0], 0, 0), DB_ERR_BADARGS, - "ht_find_badkey", "ht_find() with bad key", 0); - - /* Check if empty tables return DB_ERR_NOENTRY */ - check_result(ht_find(&table[0], 0, &key[6]), DB_ERR_NOENTRY, - "ht_find_emptytable", "ht_find() with empty table", 1); - - /* Check ht_add()'s handling of bad arguments */ - check_result(ht_add(0, 0, 0), DB_ERR_BADARGS, "ht_add_noargs", - "ht_add() with no valid arguments", 0); - check_result(ht_add(&table[2], &entry[0], &key[0]), DB_ERR_BADARGS, - "ht_add_badtable", "ht_add() with bad table", 1); - check_result(ht_add(&table[0], &entry[6], &key[6]), DB_ERR_BADARGS, - "ht_add_badentry", "ht_add() with bad entry", 1); - check_result(ht_add(&table[0], &entry[0], 0), DB_ERR_BADARGS, "ht_add_nokey", - "ht_add() with no key", 1); - - /* Freeze the table temporarily */ - ht_flags(&table[0]) |= HASH_FLAG_FREEZE; - /* Check adds to frozen tables */ - check_result(ht_add(&table[0], &entry[0], &key[0]), DB_ERR_FROZEN, - "ht_add_frozen", "ht_add() on frozen table", 1); - /* Unfreeze the table */ - ht_flags(&table[0]) &= ~HASH_FLAG_FREEZE; - - /* Add an element to a hash table */ - check_result(ht_add(&table[1], &entry[5], &key[5]), 0, "ht_add_t1e5", - "Add entry 5 to table 1", 1); - - /* Now try to add the same element to another hash table */ - check_result(ht_add(&table[0], &entry[5], &key[5]), DB_ERR_BUSY, - "ht_add_busy", "Add busy entry 5 to table 0", 1); - - /* Try ht_find() to see if it can find elements */ - check_result(ht_find(&table[1], &entry_p, &key[5]), 0, "ht_find_t1e5", - "Look up entry 5 in table 1", 1); - if (entry_p != &entry[5]) { - printf("FAIL/ht_find_t1e5_entry:Attempt to look up entry 5 retrieved " - "%p (correct answer is %p)\n", (void *)entry_p, (void *)&entry[5]); - return 0; - } else - printf("PASS/ht_find_t1e5_entry:Retrieved correct entry %p\n", - (void *)entry_p); - - /* Try looking up an element that isn't there in a populated table */ - check_result(ht_find(&table[1], 0, &key[6]), DB_ERR_NOENTRY, - "ht_find_t1e6", "Look up non-existant entry 5 in table 1", 1); - - /* Now we know that ht_find() works properly--finish testing ht_add() */ - check_result(ht_add(&table[1], &entry[0], &key[5]), DB_ERR_DUPLICATE, - "ht_add_duplicate", "Attempt to add duplicate entry to table", - 1); - - /* Now try adding several entries to the table */ - check_result(ht_add(&table[0], &entry[0], &key[0]), 0, "ht_add_t0e0", - "Add entry 0 to table 0", 1); - check_result(ht_add(&table[0], &entry[1], &key[1]), 0, "ht_add_t0e1", - "Add entry 1 to table 0", 1); - check_result(ht_add(&table[0], &entry[2], &key[2]), 0, "ht_add_t0e2", - "Add entry 2 to table 0", 1); - check_result(ht_add(&table[0], &entry[3], &key[3]), 0, "ht_add_t0e3", - "Add entry 3 to table 0", 1); - check_result(ht_add(&table[0], &entry[4], &key[4]), 0, "ht_add_t0e4", - "Add entry 4 to table 0", 1); - - /* Check to see if an element can be found */ - check_result(ht_find(&table[0], 0, &key[2]), 0, "ht_find_t0e2", - "Find entry 2 in table 0", 1); - - return 0; -} Index: dbprim/tests/t_ht_flush.c diff -u dbprim/tests/t_ht_flush.c:1.2 dbprim/tests/t_ht_flush.c:removed --- dbprim/tests/t_ht_flush.c:1.2 Wed Jun 11 18:10:11 2003 +++ dbprim/tests/t_ht_flush.c Mon Sep 20 12:15:50 2004 @@ -1,204 +0,0 @@ -/* -** Copyright (C) 2002 by Kevin L. Mitchell <kl...@mi...> -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Library General Public -** License as published by the Free Software Foundation; either -** version 2 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Library General Public License for more details. -** -** You should have received a copy of the GNU Library General Public -** License along with this library; if not, write to the Free -** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -** MA 02111-1307, USA -** -** @(#)$Id: t_ht_flush.c,v 1.2 2003/06/12 01:10:11 klmitch Exp $ -*/ -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> - -#include "dbprim.h" -#include "dbprim_int.h" - -#define TABLE0 (void *)0x76543210 -#define TABLE1 (void *)0x87654321 - -#define OBJECT0 (void *)0x01234567 -#define OBJECT1 (void *)0x12345678 -#define OBJECT2 (void *)0x23456789 -#define OBJECT3 (void *)0x3456789a -#define OBJECT4 (void *)0x456789ab -#define OBJECT5 (void *)0x56789abc -#define OBJECT6 (void *)0x6789abcd -#define OBJECT7 (void *)0x789abcde - -#define DEADINT 0xdeadbeef -#define DEADPTR (void *)0xdeadbeef - -struct flushcheck { - hash_table_t *ent_table; - hash_entry_t *ent_array; - unsigned int ent_mask; -}; - -#define BIT(n) (1 << (n)) -#define BITMASK 0x0000000f - -/* Check return value of add operation and report PASS/FAIL */ -static void -check_result(unsigned long result, unsigned long expected, char *test, - char *info, int die) -{ - if (result != expected) { - printf("FAIL/%s:%s incorrectly returned %lu (expected %lu)\n", test, info, - result, expected); - if (die) - exit(0); - } else - printf("PASS/%s:%s correctly returned %lu\n", test, info, result); -} - -static unsigned long -check_func(hash_table_t *table, db_key_t *key) -{ - return dk_len(key); -} - -static unsigned long -check_comp(hash_table_t *table, db_key_t *key1, db_key_t *key2) -{ - return (!(dk_len(key1) == dk_len(key2) && dk_key(key1) == dk_key(key2))); -} - -static unsigned long -check_flush(hash_table_t *table, hash_entry_t *ent, void *extra) -{ - struct flushcheck *itcheck; - - itcheck = extra; - - /* OK, verify that the hash table is the same as the one we expect */ - if (table != itcheck->ent_table) - printf("FAIL/ht_flush_functab_e%d:Hash tables do not match\n", - dk_len(he_key(ent))); - else - printf("PASS/ht_flush_functab_e%d:Hash tables match\n", - dk_len(he_key(ent))); - - /* Now verify that everything matches up... */ - if (ent != &itcheck->ent_array[dk_len(he_key(ent))]) - printf("FAIL/ht_flush_funcent_e%d:Entries do not match\n", - dk_len(he_key(ent))); - else - printf("PASS/ht_flush_funcent_e%d:Entries match\n", dk_len(he_key(ent))); - - /* Finally, set the visited bitmask */ - itcheck->ent_mask |= BIT(dk_len(he_key(ent))); - - return (itcheck->ent_mask & ~BIT(dk_len(he_key(ent)))) ? 0 : EINVAL; -} - -static void -check_count(hash_table_t *tab, unsigned long count, char *test, char *comment) -{ - if (ht_count(tab) != count) - printf("FAIL/%s:%s (count %ld, supposed to be %ld)\n", test, comment, - ht_count(tab), count); - else - printf("PASS/%s:%s (count %ld)\n", test, comment, count); -} - -int -main(int argc, char **argv) -{ - int i; - hash_table_t table[] = { /* some tables to operate on */ - HASH_TABLE_INIT(0, check_func, check_comp, 0, TABLE0), - HASH_TABLE_INIT(0, check_func, check_comp, 0, TABLE1), - { DEADINT, DEADINT, DEADINT, DEADINT, DEADINT, DEADINT, DEADPTR, - (hash_func_t)DEADPTR, (hash_comp_t)DEADPTR, (hash_resize_t)DEADPTR, - DEADPTR } /* table[2] */ - }; - hash_entry_t entry[] = { /* some entries to operate on */ - HASH_ENTRY_INIT(OBJECT0), - HASH_ENTRY_INIT(OBJECT1), - HASH_ENTRY_INIT(OBJECT2), - HASH_ENTRY_INIT(OBJECT3), - HASH_ENTRY_INIT(OBJECT4), - HASH_ENTRY_INIT(OBJECT5), - HASH_ENTRY_INIT(OBJECT6), - HASH_ENTRY_INIT(OBJECT7), - }; - db_key_t key[] = { /* some keys... */ - DB_KEY_INIT("obj0", 0), - DB_KEY_INIT("obj1", 1), - DB_KEY_INIT("obj2", 2), - DB_KEY_INIT("obj3", 3), - DB_KEY_INIT("obj4", 4), - DB_KEY_INIT("obj5", 5), - DB_KEY_INIT("obj6", 6), - DB_KEY_INIT("obj7", 7) - }; - struct flushcheck itcheck = { 0, 0, 0 }; - - /* initialize the tables with a size */ - if (ht_init(&table[0], 0, check_func, check_comp, 0, TABLE0, 4) || - ht_init(&table[1], 0, check_func, check_comp, 0, TABLE1, 4)) - return -1; /* failed to initialize test */ - - /* Add some entries to various hash tables */ - for (i = 0; i < 4; i++) - if (ht_add(&table[0], &entry[i], &key[i]) || - ht_add(&table[1], &entry[i + 4], &key[i + 4])) - return -1; /* failed to initialize test */ - - /* Check handling of bad arguments */ - check_result(ht_flush(0, 0, 0), DB_ERR_BADARGS, "ht_flush_noargs", - "ht_flush() with no valid arguments", 0); - check_result(ht_flush(&table[2], check_flush, &itcheck), DB_ERR_BADARGS, - "ht_flush_badtable", "ht_flush() with bad table", 0); - - /* Freeze the table temporarily */ - ht_flags(&table[0]) |= HASH_FLAG_FREEZE; - /* check if frozen tables are excluded */ - check_result(ht_flush(&table[0], check_flush, &itcheck), DB_ERR_FROZEN, - "ht_flush_frozen", "ht_flush() on frozen table", 0); - /* Unfreeze the table */ - ht_flags(&table[0]) &= ~HASH_FLAG_FREEZE; - - /* Check to see if ht_flush() operates properly with no flush function */ - check_result(ht_flush(&table[1], 0, 0), 0, "ht_flush_nofunc", - "ht_flush() with no flush function", 0); - check_count(&table[1], 0, "ht_flush_nofunc_count", - "Check count after flush with no flush function"); - - /* Check to see if ht_flush() returns what the iter function returns */ - itcheck.ent_table = &table[0]; - itcheck.ent_array = entry; - itcheck.ent_mask = 0; - check_result(ht_flush(&table[0], check_flush, &itcheck), EINVAL, - "ht_flush_funcreturn", - "ht_flush() returning flush function return value", 0); - check_count(&table[0], 3, "ht_flush_funcreturn_count", - "Check count after flush with flush function returning error"); - - /* Now iterate through the list */ - check_result(ht_flush(&table[0], check_flush, &itcheck), 0, - "ht_flush_function", "ht_flush() flush", 0); - check_count(&table[0], 0, "ht_flush_function_count", - "Check count after flush with flush function"); - - /* Did it iterate through them all? */ - if (itcheck.ent_mask == BITMASK) - printf("PASS/ht_flush_func_mask:ht_flush() visited all items\n"); - else - printf("FAIL/ht_flush_func_mask:ht_flush() visited only items in bitmask " - "0x%02x\n", itcheck.ent_mask); - - return 0; -} Index: dbprim/tests/t_ht_free.c diff -u dbprim/tests/t_ht_free.c:1.2 dbprim/tests/t_ht_free.c:removed --- dbprim/tests/t_ht_free.c:1.2 Wed Jun 11 18:10:11 2003 +++ dbprim/tests/t_ht_free.c Mon Sep 20 12:15:50 2004 @@ -1,131 +0,0 @@ -/* -** Copyright (C) 2002 by Kevin L. Mitchell <kl...@mi...> -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Library General Public -** License as published by the Free Software Foundation; either -** version 2 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Library General Public License for more details. -** -** You should have received a copy of the GNU Library General Public -** License along with this library; if not, write to the Free -** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -** MA 02111-1307, USA -** -** @(#)$Id: t_ht_free.c,v 1.2 2003/06/12 01:10:11 klmitch Exp $ -*/ -#include <stdio.h> -#include <stdlib.h> - -#include "dbprim.h" -#include "dbprim_int.h" - -#define TABLE0 (void *)0x76543210 -#define TABLE1 (void *)0x87654321 - -#define OBJECT0 (void *)0x01234567 -#define OBJECT1 (void *)0x12345678 -#define OBJECT2 (void *)0x23456789 -#define OBJECT3 (void *)0x3456789a -#define OBJECT4 (void *)0x456789ab - -#define DEADINT 0xdeadbeef -#define DEADPTR (void *)0xdeadbeef - -/* Check return value of add operation and report PASS/FAIL */ -static void -check_result(unsigned long result, unsigned long expected, char *test, - char *info, int die) -{ - if (result != expected) { - printf("FAIL/%s:%s incorrectly returned %lu (expected %lu)\n", test, info, - result, expected); - if (die) - exit(0); - } else - printf("PASS/%s:%s correctly returned %lu\n", test, info, result); -} - -static unsigned long -check_func(hash_table_t *table, db_key_t *key) -{ - return dk_len(key); -} - -static unsigned long -check_comp(hash_table_t *table, db_key_t *key1, db_key_t *key2) -{ - return (!(dk_len(key1) == dk_len(key2) && dk_key(key1) == dk_key(key2))); -} - -int -main(int argc, char **argv) -{ - int i; - hash_table_t table[] = { /* some tables to operate on */ - HASH_TABLE_INIT(0, check_func, check_comp, 0, TABLE0), - HASH_TABLE_INIT(0, check_func, check_comp, 0, TABLE1), - { DEADINT, DEADINT, DEADINT, DEADINT, DEADINT, DEADINT, DEADPTR, - (hash_func_t)DEADPTR, (hash_comp_t)DEADPTR, (hash_resize_t)DEADPTR, - DEADPTR } /* table[2] */ - }; - hash_entry_t entry[] = { /* some entries to operate on */ - HASH_ENTRY_INIT(OBJECT0), - HASH_ENTRY_INIT(OBJECT1), - HASH_ENTRY_INIT(OBJECT2), - HASH_ENTRY_INIT(OBJECT3), - HASH_ENTRY_INIT(OBJECT4), - }; - db_key_t key[] = { /* some keys... */ - DB_KEY_INIT("obj0", 0), - DB_KEY_INIT("obj1", 1), - DB_KEY_INIT("obj2", 2), - DB_KEY_INIT("obj3", 3), - DB_KEY_INIT("obj4", 4), - }; - - /* initialize the tables with a size */ - if (ht_init(&table[0], 0, check_func, check_comp, 0, TABLE0, 7) || - ht_init(&table[1], 0, check_func, check_comp, 0, TABLE1, 7) || - !table[0].ht_table || !table[1].ht_table) - return -1; /* failed to initialize test */ - - /* Add some entries to various hash tables */ - for (i = 0; i < 5; i++) - if (ht_add(&table[0], &entry[i], &key[i])) - return -1; /* failed to initialize test */ - - /* Check handling of bad arguments */ - check_result(ht_free(0), DB_ERR_BADARGS, "ht_free_noargs", - "ht_free() with no valid arguments", 0); - check_result(ht_free(&table[2]), DB_ERR_BADARGS, "ht_free_badtable", - "ht_free() with bad table", 0); - - /* Freeze the table temporarily */ - ht_flags(&table[1]) |= HASH_FLAG_FREEZE; - /* check if frozen tables are excluded */ - check_result(ht_free(&table[1]), DB_ERR_FROZEN, "ht_free_frozen", - "ht_free() on frozen table", 1); - /* Unfreeze the table */ - ht_flags(&table[1]) &= ~HASH_FLAG_FREEZE; - - /* Check if non-empty tables are excluded */ - check_result(ht_free(&table[0]), DB_ERR_NOTEMPTY, "ht_free_nonempty", - "ht_free() on non-empty table", 0); - - /* OK, now try to free the table */ - check_result(ht_free(&table[1]), 0, "ht_free_t0", "ht_free() on empty table", - 1); - - /* Verify that table pointer is now 0 */ - if (table[1].ht_table != 0) - printf("FAIL/ht_free_t0_table:Table not cleared properly\n"); - else - printf("PASS/ht_free_t0_table:Table properly cleared\n"); - - return 0; -} Index: dbprim/tests/t_ht_init.c diff -u dbprim/tests/t_ht_init.c:1.3 dbprim/tests/t_ht_init.c:removed --- dbprim/tests/t_ht_init.c:1.3 Tue Mar 2 23:50:40 2004 +++ dbprim/tests/t_ht_init.c Mon Sep 20 12:15:50 2004 @@ -1,201 +0,0 @@ -/* -** Copyright (C) 2002 by Kevin L. Mitchell <kl...@mi...> -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Library General Public -** License as published by the Free Software Foundation; either -** version 2 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Library General Public License for more details. -** -** You should have received a copy of the GNU Library General Public -** License along with this library; if not, write to the Free -** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -** MA 02111-1307, USA -** -** @(#)$Id: t_ht_init.c,v 1.3 2004/03/03 07:50:40 klmitch Exp $ -*/ -#include <stdio.h> -#include <stdlib.h> - -#include "dbprim.h" -#include "dbprim_err.h" -#include "dbprim_version.h" - -#define DEADINT 0xdeadbeef -#define DEADPTR (void *)0xdeadbeef - -static void -check_init(hash_table_t *table, unsigned long flags, unsigned long mod, - unsigned long over, unsigned long under, hash_func_t func, - hash_comp_t comp, void *extra, char *how) -{ - if (table->ht_magic != HASH_TABLE_MAGIC) /* Verify magic was set */ - printf("FAIL/%s_magic:Initialization failed to set magic number\n", how); - else - printf("PASS/%s_magic:Initialization set magic number properly\n", how); - - if (table->ht_flags != flags) /* verify flags were set */ - printf("FAIL/%s_flags:Initialization failed to set flags\n", how); - else - printf("PASS/%s_flags:Initialization set flags properly\n", how); - - if (table->ht_modulus != mod) /* verify modulus was set */ - printf("FAIL/%s_modulus:Initialization failed to set modulus to %ld " - "(%ld instead)\n", how, mod, table->ht_modulus); - else - printf("PASS/%s_modulus:Initialization set modulus to %ld\n", how, mod); - - if (table->ht_count != 0) /* verify count was set */ - printf("FAIL/%s_count:Initialization failed to clear count\n", how); - else - printf("PASS/%s_count:Initialization set count to 0\n", how); - - if (table->ht_rollover != over) /* verify rollover was set */ - printf("FAIL/%s_rollover:Initialization failed to set rollover to %ld " - "(%ld instead)\n", how, over, table->ht_rollover); - else - printf("PASS/%s_rollover:Initialization set rollover to %ld\n", how, over); - - if (table->ht_rollunder != under) /* verify rollunder was set */ - printf("FAIL/%s_rollunder:Initialization failed to set rollunder to %ld " - "(%ld instead)\n", how, under, table->ht_rollunder); - else - printf("PASS/%s_rollunder:Initialization set rollunder to %ld\n", how, - under); - - if (table->ht_func != func) /* verify func was set */ - printf("FAIL/%s_func:Initialization failed to set func\n", how); - else - printf("PASS/%s_func:Initialization set func properly\n", how); - - if (table->ht_comp != comp) /* verify comp was set */ - printf("FAIL/%s_comp:Initialization failed to set comp\n", how); - else - printf("PASS/%s_comp:Initialization set comp properly\n", how); - - if (table->ht_resize != 0) /* verify resize was set */ - printf("FAIL/%s_rsize:Initialization failed to set resize\n", how); - else - printf("PASS/%s_rsize:Initialization set resize properly\n", how); - - if (table->ht_extra != extra) /* verify extra was set */ - printf("FAIL/%s_extra:Initialization failed to set extra\n", how); - else - printf("PASS/%s_extra:Initialization set extra properly\n", how); - - if (mod == 0) { - if (table->ht_table != 0) /* verify that table was not allocated */ - printf("FAIL/%s_table:Initialization failed to clear table\n", how); - else - printf("PASS/%s_table:Initialization set table to 0\n", how); - } else { - int i; - - if (table->ht_table == 0) /* verify that table was not allocated */ - printf("FAIL/%s_table:Initialization failed to set table\n", how); - else - printf("PASS/%s_table:Initialization set table properly\n", how); - - for (i = 0; i < mod; i++) /* verify buckets initialized */ - if (table->ht_table == 0 || i >= table->ht_modulus || - !ll_verify(&table->ht_table[i])) - printf("FAIL/%s_bucket%d:Initialization failed to initialize " - "bucket %d\n", how, i, i); - else - printf("PASS/%s_bucket%d:Initialization initialized bucket " - "%d properly\n", how, i, i); - } -} - -/* Check return value of operation and report PASS/FAIL */ -static void -check_result(unsigned long result, unsigned long expected, char *test, - char *info, int die) -{ - if (result != expected) { - printf("FAIL/%s:%s incorrectly returned %lu (expected %lu)\n", test, info, - result, expected); - if (die) - exit(0); - } else - printf("PASS/%s:%s correctly returned %lu\n", test, info, result); -} - -/* Scramble the table */ -static void -scramble(hash_table_t *table) -{ - table->ht_magic = DEADINT; - table->ht_flags = DEADINT; - table->ht_modulus = DEADINT; - table->ht_count = DEADINT; - table->ht_rollover = DEADINT; - table->ht_rollunder = DEADINT; - table->ht_table = DEADPTR; - table->ht_func = (hash_func_t)DEADPTR; - table->ht_comp = (hash_comp_t)DEADPTR; - table->ht_extra = DEADPTR; -} - -static unsigned long -check_func(hash_table_t *table, db_key_t *key) -{ - return 0; -} - -static unsigned long -check_comp(hash_table_t *table, db_key_t *key1, db_key_t *key2) -{ - return 0; -} - -int -main(int argc, char **argv) -{ - unsigned long mod; - hash_table_t table = HASH_TABLE_INIT(0x80010000 | HASH_FLAG_AUTOGROW, - check_func, check_comp, 0, 0); - - /* Check that the static initializer produces a passable structure */ - check_init(&table, HASH_FLAG_AUTOGROW, 0, 0, 0, check_func, check_comp, - 0, "ht_static"); - - /* now, check what ht_init does with bad arguments */ - check_result(ht_init(0, 0, 0, 0, 0, 0, 0), DB_ERR_BADARGS, "ht_init_noargs", - "ht_init() with no valid arguments", 0); - check_result(ht_init(0, 0, check_func, check_comp, 0, 0, 0), DB_ERR_BADARGS, - "ht_init_notable", "ht_init() with no table", 0); - check_result(ht_init(&table, 0, 0, check_comp, 0, 0, 0), DB_ERR_BADARGS, - "ht_init_nofunc", "ht_init() with no hash function", 0); - check_result(ht_init(&table, 0, check_func, 0, 0, 0, 0), DB_ERR_BADARGS, - "ht_init_nocomp", "ht_init() with no comparison function", 0); - - /* Scramble the structure */ - scramble(&table); - - /* Now try to initialize our structure with a 0 mod and see what happens */ - check_result(ht_init(&table, 0x80010000 | HASH_FLAG_AUTOGROW, check_func, - check_comp, 0, 0, 0), 0, "ht_dynamic_nomod", - "ht_init() with zero modulus", 0); - check_init(&table, HASH_FLAG_AUTOGROW, 0, 0, 0, check_func, check_comp, - 0, "ht_dynamic_nomod"); - - /* Scramble the structure again */ - scramble(&table); - - /* Now try to initialize our structure with a non-0 mod and see what - * happens - */ - check_result(ht_init(&table, 0x80010000 | HASH_FLAG_AUTOGROW, check_func, - check_comp, 0, 0, 6), 0, "ht_dynamic_mod6", - "ht_init() with non-zero modulus", 0); - mod = 7; /* next prime after 6 */ - check_init(&table, HASH_FLAG_AUTOGROW, mod, (mod * 4) / 3, (mod * 3) / 4, - check_func, check_comp, 0, "ht_dynamic_mod6"); - - return 0; -} Index: dbprim/tests/t_ht_iter.c diff -u dbprim/tests/t_ht_iter.c:1.2 dbprim/tests/t_ht_iter.c:removed --- dbprim/tests/t_ht_iter.c:1.2 Wed Jun 11 18:10:11 2003 +++ dbprim/tests/t_ht_iter.c Mon Sep 20 12:15:50 2004 @@ -1,186 +0,0 @@ -/* -** Copyright (C) 2002 by Kevin L. Mitchell <kl...@mi...> -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Library General Public -** License as published by the Free Software Foundation; either -** version 2 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Library General Public License for more details. -** -** You should have received a copy of the GNU Library General Public -** License along with this library; if not, write to the Free -** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, -** MA 02111-1307, USA -** -** @(#)$Id: t_ht_iter.c,v 1.2 2003/06/12 01:10:11 klmitch Exp $ -*/ -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> - -#include "dbprim.h" -#include "dbprim_int.h" - -#define TABLE0 (void *)0x76543210 - -#define OBJECT0 (void *)0x01234567 -#define OBJECT1 (void *)0x12345678 -#define OBJECT2 (void *)0x23456789 -#define OBJECT3 (void *)0x3456789a -#define OBJECT4 (void *)0x456789ab -#define OBJECT5 (void *)0x56789abc -#define OBJECT6 (void *)0x6789abcd -#define OBJECT7 (void *)0x789abcde - -#define DEADINT 0xdeadbeef -#define DEADPTR (void *)0xdeadbeef - -struct itercheck { - hash_table_t *ent_table; - hash_entry_t *ent_array; - unsigned int ent_mask; -}; - -#define BIT(n) (1 << (n)) -#define BITMASK 0x000000ff - -/* Check return value of add operation and report PASS/FAIL */ -static void -check_result(unsigned long result, unsigned long expected, char *test, - char *info, int die) -{ - if (result != expected) { - printf("FAIL/%s:%s incorrectly returned %lu (expected %lu)\n", test, info, - result, expected); - if (die) - exit(0); - } else - printf("PASS/%s:%s correctly returned %lu\n", test, info, result); -} - -static unsigned long -check_func(hash_table_t *table, db_key_t *key) -{ - return dk_len(key); -} - -static unsigned long -check_comp(hash_table_t *table, db_key_t *key1, db_key_t *key2) -{ - return (!(dk_len(key1) == dk_len(key2) && dk_key(key1) == dk_key(key2))); -} - -static unsigned long -check_iter(hash_table_t *table, hash_entry_t *ent, void *extra) -{ - struct itercheck *itcheck; - - itcheck = extra; - - /* If we were told to return an error, return one */ - if (!itcheck->ent_array) - return EINVAL; - - /* OK, verify that the hash table is the same as the one we expect */ - if (table != itcheck->ent_table) - printf("FAIL/ht_iter_functab_e%d:Hash tables do not match\n", - dk_len(he_key(ent))); - else - printf("PASS/ht_iter_functab_e%d:Hash tables match\n", - dk_len(he_key(ent))); - - /* Now verify that everything matches up... */ - if (ent != &itcheck->ent_array[dk_len(he_key(ent))]) - printf("FAIL/ht_iter_funcent_e%d:Entries do not match\n", - dk_len(he_key(ent))); - else - printf("PASS/ht_iter_funcent_e%d:Entries match\n", dk_len(he_key(ent))); - - /* Finally, set the visited bitmask */ - itcheck->ent_mask |= BIT(dk_len(he_key(ent))); - - return 0; -} - -int -main(int argc, char **argv) -{ - int i; - hash_table_t table[] = { /* some tables to operate on */ - HASH_TABLE_INIT(0, check_func, check_comp, 0, TABLE0), - { DEADINT, DEADINT, DEADINT, DEADINT, DEADINT, DEADINT, DEADPTR, - (hash_func_t)DEADPTR, (hash_comp_t)DEADPTR, (hash_resize_t)DEADPTR, - DEADPTR } /* table[1] */ - }; - hash_entry_t entry[] = { /* some entries to operate on */ - HASH_ENTRY_INIT(OBJECT0), - HASH_ENTRY_INIT(OBJECT1), - HASH_ENTRY_INIT(OBJECT2), - HASH_ENTRY_INIT(OBJECT3), - HASH_ENTRY_INIT(OBJECT4), - HASH_ENTRY_INIT(OBJECT5), - HASH_ENTRY_INIT(OBJECT6), - HASH_ENTRY_INIT(OBJECT7), - }; - db_key_t key[] = { /* some keys... */ - DB_KEY_INIT("obj0", 0), - DB_KEY_INIT("obj1", 1), - DB_KEY_INIT("obj2", 2), - DB_KEY_INIT("obj3", 3), - DB_KEY_INIT("obj4", 4), - DB_KEY_INIT("obj5", 5), - DB_KEY_INIT("obj6", 6), - DB_KEY_INIT("obj7", 7) - }; - struct itercheck itcheck = { 0, 0, 0 }; - - /* initialize the tables with a size */ - if (ht_init(&table[0], 0, check_func, check_comp, 0, TABLE0, 8)) - return -1; /* failed to initialize test */ - - /* Add some entries to various hash tables */ - for (i = 0; i < 8; i++) - if (ht_add(&table[0], &entry[i], &key[i])) - return -1; /* failed to initialize test */ - - /* Check handling of bad arguments */ - check_result(ht_iter(0, 0, 0), DB_ERR_BADARGS, "ht_iter_noargs", - "ht_iter() with no valid arguments", 0); - check_result(ht_iter(&table[1], check_iter, &itcheck), DB_ERR_BADARGS, - "ht_iter_badtable", "ht_iter() with bad table", 0); - check_result(ht_iter(&table[0], 0, &itcheck), DB_ERR_BADARGS, - "ht_iter_baditer", "ht_iter() with bad iteration function", 0); - - /* Freeze the table temporarily */ - ht_flags(&table[0]) |= HASH_FLAG_FREEZE; - /* check if frozen tables are excluded */ - check_result(ht_iter(&table[0], check_iter, &itcheck), DB_ERR_FROZEN, - "ht_iter_frozen", "ht_iter() on frozen table", 0); - /* Unfreeze the table */ - ht_flags(&table[0]) &= ~HASH_FLAG_FREEZE; - - /* Check to see if ht_iter() returns what the iter function returns */ - check_result(ht_iter(&table[0], check_iter, &itcheck), EINVAL, - "ht_iter_funcreturn", - "ht_iter() returning iteration function return value", 0); - - /* Now iterate through the list */ - itcheck.ent_table = &table[0]; - itcheck.ent_array = entry; - itcheck.ent_mask = 0; - check_result(ht_iter(&table[0], check_iter, &itcheck), 0, "ht_iter_function", - "ht_iter() iteration", 0); - - /* Did it iterate through them all? */ - if (itcheck.ent_mask == BITMASK) - printf("PASS/ht_iter_func_mask:ht_iter() visited all items\n"); - else - printf("FAIL/ht_iter_func_mask:ht_iter() visited only items in bitmask " - "0x%02x\n", itcheck.ent_mask); - - return 0; -} Index: dbprim/tests/t_ht_move.c diff -u dbprim/tests/t_ht_move.c:1.2 dbpri... [truncated message content] |
From: Kevin L. M. <kl...@us...> - 2004-01-21 05:23:27
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2004-01-21 05:23:26 UTC Modified files: ChangeLog dbprim.h ht_remove.c Log message: Try to remove a CPU-sucker in ht_remove() reported by mbuna; add 'extern "C"' to the header file. ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.12 dbprim/ChangeLog:1.13 --- dbprim/ChangeLog:1.12 Wed Dec 10 22:20:51 2003 +++ dbprim/ChangeLog Tue Jan 20 21:23:16 2004 @@ -1,3 +1,11 @@ +2004-01-21 Kevin L Mitchell <kl...@mi...> + + * dbprim.h: add 'extern "C"' support so that hopefully this thing + can be used with C++... + + * ht_remove.c (ht_remove): apply a fix to (hopefully) prevent a + CPU-sucker condition for autoshrinking hash tables... + 2003-12-11 Kevin L Mitchell <kl...@mi...> * configure.ac: update version number Index: dbprim/dbprim.h diff -u dbprim/dbprim.h:1.4 dbprim/dbprim.h:1.5 --- dbprim/dbprim.h:1.4 Sat Nov 22 10:26:36 2003 +++ dbprim/dbprim.h Tue Jan 20 21:23:16 2004 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: dbprim.h,v 1.4 2003/11/22 18:26:36 klmitch Exp $ +** @(#)$Id: dbprim.h,v 1.5 2004/01/21 05:23:16 klmitch Exp $ */ #ifndef __include_dbprim_h__ #define __include_dbprim_h__ @@ -205,6 +205,10 @@ * ordering, if you wish. */ +#ifdef __cplusplus +extern "C" { +#endif + #include <dbprim_err.h> #include <dbprim_version.h> @@ -1819,4 +1823,8 @@ unsigned long rn_init(rb_node_t *node, void *value); +#ifdef __cplusplus +} +#endif + #endif /* __include_dbprim_h__ */ Index: dbprim/ht_remove.c diff -u dbprim/ht_remove.c:1.2 dbprim/ht_remove.c:1.3 --- dbprim/ht_remove.c:1.2 Wed Jun 11 18:10:04 2003 +++ dbprim/ht_remove.c Tue Jan 20 21:23:16 2004 @@ -16,12 +16,12 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: ht_remove.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $ +** @(#)$Id: ht_remove.c,v 1.3 2004/01/21 05:23:16 klmitch Exp $ */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: ht_remove.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $"); +RCSTAG("@(#)$Id: ht_remove.c,v 1.3 2004/01/21 05:23:16 klmitch Exp $"); /** \ingroup dbprim_hash * \brief Remove an element from a hash table. @@ -67,7 +67,7 @@ /* decrement element count and shrink the table if necessary and allowed */ if (--table->ht_count < table->ht_rollunder && (table->ht_flags & HASH_FLAG_AUTOSHRINK)) - retval = ht_resize(table, 0); + retval = ht_resize(table, table->ht_count); return retval; } ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2003-12-11 06:34:10
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2003-12-11 06:34:09 UTC Modified files: Makefile.am Makefile.in doc/html/group__dbprim.html doc/html/group__dbprim__hash.html doc/html/group__dbprim__link.html doc/html/group__dbprim__rbtree.html doc/html/group__dbprim__smat.html doc/html/index.html doc/html/modules.html doc/latex/doxygen.sty doc/latex/refman.tex Removed files: doc/man/man3/SMAT_TABLE_INIT.3 Log message: Bah. ---------------------- diff included ---------------------- Index: dbprim/Makefile.am diff -u dbprim/Makefile.am:1.8 dbprim/Makefile.am:1.9 --- dbprim/Makefile.am:1.8 Sat Aug 23 15:15:50 2003 +++ dbprim/Makefile.am Wed Dec 10 22:33:58 2003 @@ -17,7 +17,7 @@ ## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ## MA 02111-1307, USA ## -## @(#)$Id: Makefile.am,v 1.8 2003/08/23 22:15:50 klmitch Exp $ +## @(#)$Id: Makefile.am,v 1.9 2003/12/11 06:33:58 klmitch Exp $ ## ## Process this file with automake to generate Makefile.in @@ -193,7 +193,6 @@ $(docmandir)/smat_iter_t.3 \ $(docmandir)/smat_loc_t.3 \ $(docmandir)/smat_resize_t.3 \ - $(docmandir)/SMAT_TABLE_INIT.3 \ $(docmandir)/smat_table_t.3 \ $(docmandir)/st_add.3 \ $(docmandir)/st_count.3 \ Index: dbprim/Makefile.in diff -u dbprim/Makefile.in:1.2 dbprim/Makefile.in:1.3 --- dbprim/Makefile.in:1.2 Sat Aug 23 15:15:50 2003 +++ dbprim/Makefile.in Wed Dec 10 22:33:58 2003 @@ -268,7 +268,6 @@ $(docmandir)/smat_iter_t.3 \ $(docmandir)/smat_loc_t.3 \ $(docmandir)/smat_resize_t.3 \ - $(docmandir)/SMAT_TABLE_INIT.3 \ $(docmandir)/smat_table_t.3 \ $(docmandir)/st_add.3 \ $(docmandir)/st_count.3 \ Index: dbprim/doc/html/group__dbprim.html diff -u dbprim/doc/html/group__dbprim.html:1.5 dbprim/doc/html/group__dbprim.html:1.6 --- dbprim/doc/html/group__dbprim.html:1.5 Wed Dec 10 22:20:51 2003 +++ dbprim/doc/html/group__dbprim.html Wed Dec 10 22:33:58 2003 @@ -173,7 +173,7 @@ This structure is a generic key containing a void * pointer and a length parameter. It should be accessed with * <a class="el" href="group__dbprim.html#a2">dk_key()</a> and <a class="el" href="group__dbprim.html#a3">dk_len()</a>. </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:24:36 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/group__dbprim__hash.html diff -u dbprim/doc/html/group__dbprim__hash.html:1.5 dbprim/doc/html/group__dbprim__hash.html:1.6 --- dbprim/doc/html/group__dbprim__hash.html:1.5 Wed Dec 10 22:20:51 2003 +++ dbprim/doc/html/group__dbprim__hash.html Wed Dec 10 22:33:58 2003 @@ -1569,7 +1569,7 @@ </dl> </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:24:36 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/group__dbprim__link.html diff -u dbprim/doc/html/group__dbprim__link.html:1.5 dbprim/doc/html/group__dbprim__link.html:1.6 --- dbprim/doc/html/group__dbprim__link.html:1.5 Wed Dec 10 22:20:51 2003 +++ dbprim/doc/html/group__dbprim__link.html Wed Dec 10 22:33:58 2003 @@ -1165,7 +1165,7 @@ </dl> </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:24:36 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/group__dbprim__rbtree.html diff -u dbprim/doc/html/group__dbprim__rbtree.html:1.5 dbprim/doc/html/group__dbprim__rbtree.html:1.6 --- dbprim/doc/html/group__dbprim__rbtree.html:1.5 Wed Dec 10 22:20:51 2003 +++ dbprim/doc/html/group__dbprim__rbtree.html Wed Dec 10 22:33:58 2003 @@ -1577,7 +1577,7 @@ </dl> </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:24:36 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/group__dbprim__smat.html diff -u dbprim/doc/html/group__dbprim__smat.html:1.5 dbprim/doc/html/group__dbprim__smat.html:1.6 --- dbprim/doc/html/group__dbprim__smat.html:1.5 Wed Dec 10 22:20:52 2003 +++ dbprim/doc/html/group__dbprim__smat.html Wed Dec 10 22:33:58 2003 @@ -2061,7 +2061,7 @@ </dl> </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:24:36 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/index.html diff -u dbprim/doc/html/index.html:1.5 dbprim/doc/html/index.html:1.6 --- dbprim/doc/html/index.html:1.5 Wed Dec 10 22:20:52 2003 +++ dbprim/doc/html/index.html Wed Dec 10 22:33:58 2003 @@ -12,7 +12,7 @@ <p> This library contains a set of database primitives. The primitives defined by this library include a powerful linked list abstraction, a hash table with optional automatic resizing, a powerful and efficient sparse matrix implementation, and a red-black tree with iterative traversals. All of the necessary declarations for using this library are found in the header file dbprim.h. For more information about the components of this library, see the module list. <p> -<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:18:59 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:24:36 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/modules.html diff -u dbprim/doc/html/modules.html:1.5 dbprim/doc/html/modules.html:1.6 --- dbprim/doc/html/modules.html:1.5 Wed Dec 10 22:20:52 2003 +++ dbprim/doc/html/modules.html Wed Dec 10 22:33:58 2003 @@ -13,7 +13,7 @@ <li><a class="el" href="group__dbprim__smat.html">Sparse matrices</a> <li><a class="el" href="group__dbprim__rbtree.html">Red-black trees</a> </ul> -<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:24:36 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/latex/doxygen.sty diff -u dbprim/doc/latex/doxygen.sty:1.5 dbprim/doc/latex/doxygen.sty:1.6 --- dbprim/doc/latex/doxygen.sty:1.5 Wed Dec 10 22:20:52 2003 +++ dbprim/doc/latex/doxygen.sty Wed Dec 10 22:33:58 2003 @@ -12,8 +12,8 @@ {\fancyplain{}{\bfseries\rightmark}} \rhead[\fancyplain{}{\bfseries\leftmark}] {\fancyplain{}{\bfseries\thepage}} -\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by Doxygen }]{} -\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by Doxygen }} +\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Thu Dec 11 01:24:36 2003 for Database Primitives Library by Doxygen }]{} +\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Thu Dec 11 01:24:36 2003 for Database Primitives Library by Doxygen }} \cfoot{} \newenvironment{CompactList} {\begin{list}{}{ Index: dbprim/doc/latex/refman.tex diff -u dbprim/doc/latex/refman.tex:1.5 dbprim/doc/latex/refman.tex:1.6 --- dbprim/doc/latex/refman.tex:1.5 Wed Dec 10 22:20:52 2003 +++ dbprim/doc/latex/refman.tex Wed Dec 10 22:33:58 2003 @@ -31,7 +31,7 @@ \vspace*{1cm} {\large Generated by Doxygen 1.2.18}\\ \vspace*{0.5cm} -{\small Thu Dec 11 01:18:59 2003}\\ +{\small Thu Dec 11 01:24:36 2003}\\ \end{center} \end{titlepage} \clearemptydoublepage Index: dbprim/doc/man/man3/SMAT_TABLE_INIT.3 diff -u dbprim/doc/man/man3/SMAT_TABLE_INIT.3:1.1 dbprim/doc/man/man3/SMAT_TABLE_INIT.3:removed --- dbprim/doc/man/man3/SMAT_TABLE_INIT.3:1.1 Sat Aug 23 13:46:24 2003 +++ dbprim/doc/man/man3/SMAT_TABLE_INIT.3 Wed Dec 10 22:34:09 2003 @@ -1 +0,0 @@ -.so man3/dbprim_smat.3 ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2003-12-11 06:21:03
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2003-12-11 06:21:02 UTC Modified files: ChangeLog configure configure.ac smat_freelist.c doc/html/group__dbprim.html doc/html/group__dbprim__hash.html doc/html/group__dbprim__link.html doc/html/group__dbprim__rbtree.html doc/html/group__dbprim__smat.html doc/html/index.html doc/html/modules.html doc/latex/doxygen.sty doc/latex/refman.tex doc/man/man3/dbprim.3 doc/man/man3/dbprim_hash.3 doc/man/man3/dbprim_link.3 doc/man/man3/dbprim_rbtree.3 doc/man/man3/dbprim_smat.3 Log message: fix a couple of things and release 0.9.1 ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.11 dbprim/ChangeLog:1.12 --- dbprim/ChangeLog:1.11 Sat Nov 22 10:26:36 2003 +++ dbprim/ChangeLog Wed Dec 10 22:20:51 2003 @@ -1,3 +1,10 @@ +2003-12-11 Kevin L Mitchell <kl...@mi...> + + * configure.ac: update version number + + * smat_freelist.c (_smat_alloc): force entry to point to smat + entry + 2003-11-22 Kevin L Mitchell <kl...@mi...> * tests/test-harness.dat (t_st_init): remove static initializer Index: dbprim/configure diff -u dbprim/configure:1.2 dbprim/configure:1.3 --- dbprim/configure:1.2 Sun Aug 31 23:23:18 2003 +++ dbprim/configure Wed Dec 10 22:20:51 2003 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57 for Database Primitives Library 0.9.0. +# Generated by GNU Autoconf 2.57 for Database Primitives Library 0.9.1. # # Report bugs to <kl...@mi...>. # @@ -427,8 +427,8 @@ # Identity of this package. PACKAGE_NAME='Database Primitives Library' PACKAGE_TARNAME='dbprim' -PACKAGE_VERSION='0.9.0' -PACKAGE_STRING='Database Primitives Library 0.9.0' +PACKAGE_VERSION='0.9.1' +PACKAGE_STRING='Database Primitives Library 0.9.1' PACKAGE_BUGREPORT='kl...@mi...' ac_unique_file="dbprim_int.h" @@ -938,7 +938,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Database Primitives Library 0.9.0 to adapt to many kinds of systems. +\`configure' configures Database Primitives Library 0.9.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1004,7 +1004,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Database Primitives Library 0.9.0:";; + short | recursive ) echo "Configuration of Database Primitives Library 0.9.1:";; esac cat <<\_ACEOF @@ -1100,7 +1100,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -Database Primitives Library configure 0.9.0 +Database Primitives Library configure 0.9.1 generated by GNU Autoconf 2.57 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 @@ -1115,7 +1115,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Database Primitives Library $as_me 0.9.0, which was +It was created by Database Primitives Library $as_me 0.9.1, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ @@ -1706,7 +1706,7 @@ # Define the identity of the package. PACKAGE=dbprim - VERSION=0.9.0 + VERSION=0.9.1 cat >>confdefs.h <<_ACEOF @@ -8557,7 +8557,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by Database Primitives Library $as_me 0.9.0, which was +This file was extended by Database Primitives Library $as_me 0.9.1, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8615,7 +8615,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -Database Primitives Library config.status 0.9.0 +Database Primitives Library config.status 0.9.1 configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Index: dbprim/configure.ac diff -u dbprim/configure.ac:1.4 dbprim/configure.ac:1.5 --- dbprim/configure.ac:1.4 Sun Aug 31 23:23:19 2003 +++ dbprim/configure.ac Wed Dec 10 22:20:51 2003 @@ -17,11 +17,11 @@ dnl Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, dnl MA 02111-1307, USA dnl -dnl @(#)$Id: configure.ac,v 1.4 2003/09/01 06:23:19 klmitch Exp $ +dnl @(#)$Id: configure.ac,v 1.5 2003/12/11 06:20:51 klmitch Exp $ dnl dnl Process this file with autoconf to produce a configure script. -AC_INIT([Database Primitives Library], 0.9.0, [kl...@mi...], [dbprim]) +AC_INIT([Database Primitives Library], 0.9.1, [kl...@mi...], [dbprim]) AC_CONFIG_SRCDIR([dbprim_int.h]) AM_INIT_AUTOMAKE Index: dbprim/doc/html/group__dbprim.html diff -u dbprim/doc/html/group__dbprim.html:1.4 dbprim/doc/html/group__dbprim.html:1.5 --- dbprim/doc/html/group__dbprim.html:1.4 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/html/group__dbprim.html Wed Dec 10 22:20:51 2003 @@ -173,7 +173,7 @@ This structure is a generic key containing a void * pointer and a length parameter. It should be accessed with * <a class="el" href="group__dbprim.html#a2">dk_key()</a> and <a class="el" href="group__dbprim.html#a3">dk_len()</a>. </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Sat Nov 22 13:21:50 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/group__dbprim__hash.html diff -u dbprim/doc/html/group__dbprim__hash.html:1.4 dbprim/doc/html/group__dbprim__hash.html:1.5 --- dbprim/doc/html/group__dbprim__hash.html:1.4 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/html/group__dbprim__hash.html Wed Dec 10 22:20:51 2003 @@ -1569,7 +1569,7 @@ </dl> </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Sat Nov 22 13:21:50 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/group__dbprim__link.html diff -u dbprim/doc/html/group__dbprim__link.html:1.4 dbprim/doc/html/group__dbprim__link.html:1.5 --- dbprim/doc/html/group__dbprim__link.html:1.4 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/html/group__dbprim__link.html Wed Dec 10 22:20:51 2003 @@ -1165,7 +1165,7 @@ </dl> </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Sat Nov 22 13:21:50 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/group__dbprim__rbtree.html diff -u dbprim/doc/html/group__dbprim__rbtree.html:1.4 dbprim/doc/html/group__dbprim__rbtree.html:1.5 --- dbprim/doc/html/group__dbprim__rbtree.html:1.4 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/html/group__dbprim__rbtree.html Wed Dec 10 22:20:51 2003 @@ -1577,7 +1577,7 @@ </dl> </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Sat Nov 22 13:21:50 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/group__dbprim__smat.html diff -u dbprim/doc/html/group__dbprim__smat.html:1.4 dbprim/doc/html/group__dbprim__smat.html:1.5 --- dbprim/doc/html/group__dbprim__smat.html:1.4 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/html/group__dbprim__smat.html Wed Dec 10 22:20:52 2003 @@ -2061,7 +2061,7 @@ </dl> </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Sat Nov 22 13:21:50 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/index.html diff -u dbprim/doc/html/index.html:1.4 dbprim/doc/html/index.html:1.5 --- dbprim/doc/html/index.html:1.4 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/html/index.html Wed Dec 10 22:20:52 2003 @@ -8,11 +8,11 @@ <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> </center> <hr><h1>Database Primitives Library</h1> <p> -<h3 align="center">Version 0.9.0</h3> +<h3 align="center">Version 0.9.1</h3> <p> This library contains a set of database primitives. The primitives defined by this library include a powerful linked list abstraction, a hash table with optional automatic resizing, a powerful and efficient sparse matrix implementation, and a red-black tree with iterative traversals. All of the necessary declarations for using this library are found in the header file dbprim.h. For more information about the components of this library, see the module list. <p> -<hr><address style="align: right;"><small>Generated on Sat Nov 22 13:21:50 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:18:59 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/modules.html diff -u dbprim/doc/html/modules.html:1.4 dbprim/doc/html/modules.html:1.5 --- dbprim/doc/html/modules.html:1.4 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/html/modules.html Wed Dec 10 22:20:52 2003 @@ -13,7 +13,7 @@ <li><a class="el" href="group__dbprim__smat.html">Sparse matrices</a> <li><a class="el" href="group__dbprim__rbtree.html">Red-black trees</a> </ul> -<hr><address style="align: right;"><small>Generated on Sat Nov 22 13:21:50 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/latex/doxygen.sty diff -u dbprim/doc/latex/doxygen.sty:1.4 dbprim/doc/latex/doxygen.sty:1.5 --- dbprim/doc/latex/doxygen.sty:1.4 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/latex/doxygen.sty Wed Dec 10 22:20:52 2003 @@ -12,8 +12,8 @@ {\fancyplain{}{\bfseries\rightmark}} \rhead[\fancyplain{}{\bfseries\leftmark}] {\fancyplain{}{\bfseries\thepage}} -\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Sat Nov 22 13:21:50 2003 for Database Primitives Library by Doxygen }]{} -\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Sat Nov 22 13:21:50 2003 for Database Primitives Library by Doxygen }} +\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by Doxygen }]{} +\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Thu Dec 11 01:19:00 2003 for Database Primitives Library by Doxygen }} \cfoot{} \newenvironment{CompactList} {\begin{list}{}{ Index: dbprim/doc/latex/refman.tex diff -u dbprim/doc/latex/refman.tex:1.4 dbprim/doc/latex/refman.tex:1.5 --- dbprim/doc/latex/refman.tex:1.4 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/latex/refman.tex Wed Dec 10 22:20:52 2003 @@ -27,11 +27,11 @@ \begin{titlepage} \vspace*{7cm} \begin{center} -{\Large Database Primitives Library Reference Manual\\[1ex]\large Version 0.9.0}\\ +{\Large Database Primitives Library Reference Manual\\[1ex]\large Version 0.9.1}\\ \vspace*{1cm} {\large Generated by Doxygen 1.2.18}\\ \vspace*{0.5cm} -{\small Sat Nov 22 13:21:50 2003}\\ +{\small Thu Dec 11 01:18:59 2003}\\ \end{center} \end{titlepage} \clearemptydoublepage Index: dbprim/doc/man/man3/dbprim.3 diff -u dbprim/doc/man/man3/dbprim.3:1.3 dbprim/doc/man/man3/dbprim.3:1.4 --- dbprim/doc/man/man3/dbprim.3:1.3 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/man/man3/dbprim.3 Wed Dec 10 22:20:52 2003 @@ -1,4 +1,4 @@ -.TH "Database Primitives" 3 "22 Nov 2003" "Database Primitives Library" \" -*- nroff -*- +.TH "Database Primitives" 3 "11 Dec 2003" "Database Primitives Library" \" -*- nroff -*- .ad l .nh .SH NAME Index: dbprim/doc/man/man3/dbprim_hash.3 diff -u dbprim/doc/man/man3/dbprim_hash.3:1.3 dbprim/doc/man/man3/dbprim_hash.3:1.4 --- dbprim/doc/man/man3/dbprim_hash.3:1.3 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/man/man3/dbprim_hash.3 Wed Dec 10 22:20:52 2003 @@ -1,4 +1,4 @@ -.TH "Hash tables" 3 "22 Nov 2003" "Database Primitives Library" \" -*- nroff -*- +.TH "Hash tables" 3 "11 Dec 2003" "Database Primitives Library" \" -*- nroff -*- .ad l .nh .SH NAME Index: dbprim/doc/man/man3/dbprim_link.3 diff -u dbprim/doc/man/man3/dbprim_link.3:1.3 dbprim/doc/man/man3/dbprim_link.3:1.4 --- dbprim/doc/man/man3/dbprim_link.3:1.3 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/man/man3/dbprim_link.3 Wed Dec 10 22:20:52 2003 @@ -1,4 +1,4 @@ -.TH "Linked lists" 3 "22 Nov 2003" "Database Primitives Library" \" -*- nroff -*- +.TH "Linked lists" 3 "11 Dec 2003" "Database Primitives Library" \" -*- nroff -*- .ad l .nh .SH NAME Index: dbprim/doc/man/man3/dbprim_rbtree.3 diff -u dbprim/doc/man/man3/dbprim_rbtree.3:1.3 dbprim/doc/man/man3/dbprim_rbtree.3:1.4 --- dbprim/doc/man/man3/dbprim_rbtree.3:1.3 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/man/man3/dbprim_rbtree.3 Wed Dec 10 22:20:52 2003 @@ -1,4 +1,4 @@ -.TH "Red-black trees" 3 "22 Nov 2003" "Database Primitives Library" \" -*- nroff -*- +.TH "Red-black trees" 3 "11 Dec 2003" "Database Primitives Library" \" -*- nroff -*- .ad l .nh .SH NAME Index: dbprim/doc/man/man3/dbprim_smat.3 diff -u dbprim/doc/man/man3/dbprim_smat.3:1.3 dbprim/doc/man/man3/dbprim_smat.3:1.4 --- dbprim/doc/man/man3/dbprim_smat.3:1.3 Sat Nov 22 10:26:36 2003 +++ dbprim/doc/man/man3/dbprim_smat.3 Wed Dec 10 22:20:52 2003 @@ -1,4 +1,4 @@ -.TH "Sparse matrices" 3 "22 Nov 2003" "Database Primitives Library" \" -*- nroff -*- +.TH "Sparse matrices" 3 "11 Dec 2003" "Database Primitives Library" \" -*- nroff -*- .ad l .nh .SH NAME Index: dbprim/smat_freelist.c diff -u dbprim/smat_freelist.c:1.2 dbprim/smat_freelist.c:1.3 --- dbprim/smat_freelist.c:1.2 Wed Jun 11 18:10:04 2003 +++ dbprim/smat_freelist.c Wed Dec 10 22:20:51 2003 @@ -16,14 +16,14 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: smat_freelist.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $ +** @(#)$Id: smat_freelist.c,v 1.3 2003/12/11 06:20:51 klmitch Exp $ */ #include <stdlib.h> #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: smat_freelist.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $"); +RCSTAG("@(#)$Id: smat_freelist.c,v 1.3 2003/12/11 06:20:51 klmitch Exp $"); static link_head_t _smat_freelist = LINK_HEAD_INIT(0); @@ -61,6 +61,9 @@ _smat_free(smat_entry_t *entry) { entry->se_magic = 0; /* clear magic number to prevent use */ + + /* Force the link element to point to the *smat* entry */ + le_object(_se_link(entry)) = entry; /* Add the entry to the free list */ if (ll_add(&_smat_freelist, _se_link(entry), LINK_LOC_HEAD, 0)) ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2003-11-22 18:26:50
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2003-11-22 18:26:47 UTC Modified files: ChangeLog _smat_hash.c dbprim.h st_init.c doc/html/group__dbprim.html doc/html/group__dbprim__hash.html doc/html/group__dbprim__link.html doc/html/group__dbprim__rbtree.html doc/html/group__dbprim__smat.html doc/html/index.html doc/html/modules.html doc/latex/doxygen.sty doc/latex/group__dbprim__link.tex doc/latex/group__dbprim__rbtree.tex doc/latex/group__dbprim__smat.tex doc/latex/refman.tex doc/man/man3/dbprim.3 doc/man/man3/dbprim_hash.3 doc/man/man3/dbprim_link.3 doc/man/man3/dbprim_rbtree.3 doc/man/man3/dbprim_smat.3 tests/t_st_init.c tests/test-harness.dat Log message: fix _smat_hash(); make hash table extra point to smat table; fix test that broke when st_extra was changed; remove SMAT_TABLE_INIT() since a static initializer can't be used here; remove static initializer tests; update documentation ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.10 dbprim/ChangeLog:1.11 --- dbprim/ChangeLog:1.10 Sat Nov 22 06:46:51 2003 +++ dbprim/ChangeLog Sat Nov 22 10:26:36 2003 @@ -1,5 +1,23 @@ 2003-11-22 Kevin L Mitchell <kl...@mi...> + * tests/test-harness.dat (t_st_init): remove static initializer + tests + + * tests/t_st_init.c (main): remove static initializer check + + * dbprim.h: SMAT_TABLE_INIT() won't work, because the hash table + must point up to the smat_table, which can't be done in a static + initializer + + * tests/t_st_init.c (check_init): fix test--test st_extra instead + of ht_extra + + * st_init.c (st_init): bah, make the table extra be the table + pointer + + * _smat_hash.c (_smat_hash): change "<" to "<=" (reported by + mbuna); coerce object pointer into an unsigned string + * _smat_comp.c (_smat_comp): change "<" to "<=" (reported by mbuna) Index: dbprim/_smat_hash.c diff -u dbprim/_smat_hash.c:1.2 dbprim/_smat_hash.c:1.3 --- dbprim/_smat_hash.c:1.2 Wed Jun 11 18:10:04 2003 +++ dbprim/_smat_hash.c Sat Nov 22 10:26:36 2003 @@ -16,12 +16,12 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: _smat_hash.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $ +** @(#)$Id: _smat_hash.c,v 1.3 2003/11/22 18:26:36 klmitch Exp $ */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: _smat_hash.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $"); +RCSTAG("@(#)$Id: _smat_hash.c,v 1.3 2003/11/22 18:26:36 klmitch Exp $"); unsigned long _smat_hash(hash_table_t *table, db_key_t *key) @@ -37,8 +37,8 @@ objects = dk_key(key); /* get the key--a pair of pointers */ /* walk through both elements in the array... */ - for (i = SMAT_LOC_FIRST; i < SMAT_LOC_SECOND; i++) { - c = objects[i]; /* get a char pointer to the pointer value */ + for (i = SMAT_LOC_FIRST; i <= SMAT_LOC_SECOND; i++) { + c = (unsigned char *)&objects[i]; /* get a char pointer to pointer value */ for (j = 0; j < sizeof(void *); j++) /* step through each character */ hash = (hash * 257) + c[j]; } Index: dbprim/dbprim.h diff -u dbprim/dbprim.h:1.3 dbprim/dbprim.h:1.4 --- dbprim/dbprim.h:1.3 Sat Nov 22 06:46:51 2003 +++ dbprim/dbprim.h Sat Nov 22 10:26:36 2003 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: dbprim.h,v 1.3 2003/11/22 14:46:51 klmitch Exp $ +** @(#)$Id: dbprim.h,v 1.4 2003/11/22 18:26:36 klmitch Exp $ */ #ifndef __include_dbprim_h__ #define __include_dbprim_h__ @@ -1037,25 +1037,6 @@ }; #define SMAT_TABLE_MAGIC 0x2f92a7b1 - -/** \ingroup dbprim_smat - * \brief Sparse matrix table static initializer. - * - * This macro statically initializes a #smat_table_t. - * - * \param flags A bit-wise OR of #HASH_FLAG_AUTOGROW and - * #HASH_FLAG_AUTOSHRINK. If neither behavior is - * desired, use 0. - * \param resize - * A #smat_resize_t function pointer for determining - * whether resizing is permitted and/or for notification - * of the resize. - * \param extra Extra pointer data that should be associated with the - * sparse matrix. - */ -#define SMAT_TABLE_INIT(flags, resize, extra) \ - { SMAT_TABLE_MAGIC, (resize), (extra), \ - HASH_TABLE_INIT((flags), _smat_hash, _smat_comp, _smat_resize, 0) } /** \ingroup dbprim_smat * \brief Sparse matrix table verification macro. Index: dbprim/doc/html/group__dbprim.html diff -u dbprim/doc/html/group__dbprim.html:1.3 dbprim/doc/html/group__dbprim.html:1.4 --- dbprim/doc/html/group__dbprim.html:1.3 Sun Aug 31 23:23:19 2003 +++ dbprim/doc/html/group__dbprim.html Sat Nov 22 10:26:36 2003 @@ -173,7 +173,7 @@ This structure is a generic key containing a void * pointer and a length parameter. It should be accessed with * <a class="el" href="group__dbprim.html#a2">dk_key()</a> and <a class="el" href="group__dbprim.html#a3">dk_len()</a>. </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Sun Aug 31 19:35:47 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Sat Nov 22 13:21:50 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/group__dbprim__hash.html diff -u dbprim/doc/html/group__dbprim__hash.html:1.3 dbprim/doc/html/group__dbprim__hash.html:1.4 --- dbprim/doc/html/group__dbprim__hash.html:1.3 Sun Aug 31 23:23:19 2003 +++ dbprim/doc/html/group__dbprim__hash.html Sat Nov 22 10:26:36 2003 @@ -1569,7 +1569,7 @@ </dl> </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Sun Aug 31 19:35:47 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Sat Nov 22 13:21:50 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/group__dbprim__link.html diff -u dbprim/doc/html/group__dbprim__link.html:1.3 dbprim/doc/html/group__dbprim__link.html:1.4 --- dbprim/doc/html/group__dbprim__link.html:1.3 Sun Aug 31 23:23:19 2003 +++ dbprim/doc/html/group__dbprim__link.html Sat Nov 22 10:26:36 2003 @@ -50,10 +50,10 @@ <tr><td nowrap align=right valign=top>typedef enum <a class="el" href="group__dbprim__link.html#a26">_link_loc_e</a> </td><td valign=bottom><a class="el" href="group__dbprim__link.html#a4">link_loc_t</a></td></tr> <tr><td> </td><td><font size=-1><em>Linked list location.</em> <a href="#a4"></a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Enumerations</h2></td></tr> -<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__dbprim__link.html#a26">_link_loc_e</a> { <a class="el" href="group__dbprim__link.html#a26a132">LINK_LOC_HEAD</a>, -<a class="el" href="group__dbprim__link.html#a26a133">LINK_LOC_TAIL</a>, -<a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_BEFORE</a>, -<a class="el" href="group__dbprim__link.html#a26a135">LINK_LOC_AFTER</a> +<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__dbprim__link.html#a26">_link_loc_e</a> { <a class="el" href="group__dbprim__link.html#a26a131">LINK_LOC_HEAD</a>, +<a class="el" href="group__dbprim__link.html#a26a132">LINK_LOC_TAIL</a>, +<a class="el" href="group__dbprim__link.html#a26a133">LINK_LOC_BEFORE</a>, +<a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_AFTER</a> }</td></tr> <tr><td> </td><td><font size=-1><em>Linked list location.</em> <a href="#a26">More...</a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Functions</h2></td></tr> @@ -641,13 +641,13 @@ <p> This enumeration is used to specify where an element in a linked list should be placed. It should be referenced by the typedef <a class="el" href="group__dbprim__link.html#a4">link_loc_t</a>. <dl compact><dt><b>Enumeration values: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> -<tr><td valign=top><em><a name="a26a132" doxytag="LINK_LOC_HEAD"></a><em>LINK_LOC_HEAD</em></em> </td><td> +<tr><td valign=top><em><a name="a26a131" doxytag="LINK_LOC_HEAD"></a><em>LINK_LOC_HEAD</em></em> </td><td> Element should be inserted at head of list. </td></tr> -<tr><td valign=top><em><a name="a26a133" doxytag="LINK_LOC_TAIL"></a><em>LINK_LOC_TAIL</em></em> </td><td> +<tr><td valign=top><em><a name="a26a132" doxytag="LINK_LOC_TAIL"></a><em>LINK_LOC_TAIL</em></em> </td><td> Element should be inserted at tail of list. </td></tr> -<tr><td valign=top><em><a name="a26a134" doxytag="LINK_LOC_BEFORE"></a><em>LINK_LOC_BEFORE</em></em> </td><td> +<tr><td valign=top><em><a name="a26a133" doxytag="LINK_LOC_BEFORE"></a><em>LINK_LOC_BEFORE</em></em> </td><td> Element should be inserted before specified element. </td></tr> -<tr><td valign=top><em><a name="a26a135" doxytag="LINK_LOC_AFTER"></a><em>LINK_LOC_AFTER</em></em> </td><td> +<tr><td valign=top><em><a name="a26a134" doxytag="LINK_LOC_AFTER"></a><em>LINK_LOC_AFTER</em></em> </td><td> Element should be inserted after specified element. </td></tr> </table> </dl> @@ -761,7 +761,7 @@ <tr><td valign=top><em>loc</em> </td><td> A <a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> indicating where the entry should be added. </td></tr> <tr><td valign=top><em>elem</em> </td><td> -A pointer to a <a class="el" href="group__dbprim__link.html#a1">link_elem_t</a> describing another element in the list if <code>loc</code> is <a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_BEFORE</a> or <a class="el" href="group__dbprim__link.html#a26a135">LINK_LOC_AFTER</a>.</td></tr> +A pointer to a <a class="el" href="group__dbprim__link.html#a1">link_elem_t</a> describing another element in the list if <code>loc</code> is <a class="el" href="group__dbprim__link.html#a26a133">LINK_LOC_BEFORE</a> or <a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_AFTER</a>.</td></tr> </table> </dl><dl compact><dt><b>Return values: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> @@ -1095,7 +1095,7 @@ <tr><td valign=top><em>loc</em> </td><td> A <a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> indicating where the entry should be moved to. </td></tr> <tr><td valign=top><em>elem</em> </td><td> -A pointer to a <a class="el" href="group__dbprim__link.html#a1">link_elem_t</a> describing another element in the list if <code>loc</code> is <a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_BEFORE</a> or <a class="el" href="group__dbprim__link.html#a26a135">LINK_LOC_AFTER</a>.</td></tr> +A pointer to a <a class="el" href="group__dbprim__link.html#a1">link_elem_t</a> describing another element in the list if <code>loc</code> is <a class="el" href="group__dbprim__link.html#a26a133">LINK_LOC_BEFORE</a> or <a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_AFTER</a>.</td></tr> </table> </dl><dl compact><dt><b>Return values: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> @@ -1165,7 +1165,7 @@ </dl> </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Sun Aug 31 19:35:47 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Sat Nov 22 13:21:50 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/group__dbprim__rbtree.html diff -u dbprim/doc/html/group__dbprim__rbtree.html:1.3 dbprim/doc/html/group__dbprim__rbtree.html:1.4 --- dbprim/doc/html/group__dbprim__rbtree.html:1.3 Sun Aug 31 23:23:19 2003 +++ dbprim/doc/html/group__dbprim__rbtree.html Sat Nov 22 10:26:36 2003 @@ -74,9 +74,9 @@ <tr><td nowrap align=right valign=top>typedef enum <a class="el" href="group__dbprim__rbtree.html#a38">_rb_color_e</a> </td><td valign=bottom><a class="el" href="group__dbprim__rbtree.html#a4">rb_color_t</a></td></tr> <tr><td> </td><td><font size=-1><em>Red-black tree node color.</em> <a href="#a4"></a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Enumerations</h2></td></tr> -<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__dbprim__rbtree.html#a38">_rb_color_e</a> { <a class="el" href="group__dbprim__rbtree.html#a38a138">RB_COLOR_NONE</a>, -<a class="el" href="group__dbprim__rbtree.html#a38a139">RB_COLOR_RED</a>, -<a class="el" href="group__dbprim__rbtree.html#a38a140">RB_COLOR_BLACK</a> +<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__dbprim__rbtree.html#a38">_rb_color_e</a> { <a class="el" href="group__dbprim__rbtree.html#a38a137">RB_COLOR_NONE</a>, +<a class="el" href="group__dbprim__rbtree.html#a38a138">RB_COLOR_RED</a>, +<a class="el" href="group__dbprim__rbtree.html#a38a139">RB_COLOR_BLACK</a> }</td></tr> <tr><td> </td><td><font size=-1><em>Red-black tree node color.</em> <a href="#a38">More...</a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Functions</h2></td></tr> @@ -1013,11 +1013,11 @@ <p> This enumeration is used to specify the color of a node of a red-black tree. <dl compact><dt><b>Enumeration values: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> -<tr><td valign=top><em><a name="a38a138" doxytag="RB_COLOR_NONE"></a><em>RB_COLOR_NONE</em></em> </td><td> +<tr><td valign=top><em><a name="a38a137" doxytag="RB_COLOR_NONE"></a><em>RB_COLOR_NONE</em></em> </td><td> Node is uncolored as of yet. </td></tr> -<tr><td valign=top><em><a name="a38a139" doxytag="RB_COLOR_RED"></a><em>RB_COLOR_RED</em></em> </td><td> +<tr><td valign=top><em><a name="a38a138" doxytag="RB_COLOR_RED"></a><em>RB_COLOR_RED</em></em> </td><td> Node is red. </td></tr> -<tr><td valign=top><em><a name="a38a140" doxytag="RB_COLOR_BLACK"></a><em>RB_COLOR_BLACK</em></em> </td><td> +<tr><td valign=top><em><a name="a38a139" doxytag="RB_COLOR_BLACK"></a><em>RB_COLOR_BLACK</em></em> </td><td> Node is black. </td></tr> </table> </dl> @@ -1577,7 +1577,7 @@ </dl> </td> </tr> </table> -<hr><address style="align: right;"><small>Generated on Sun Aug 31 19:35:47 2003 for Database Primitives Library by +<hr><address style="align: right;"><small>Generated on Sat Nov 22 13:21:50 2003 for Database Primitives Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> Index: dbprim/doc/html/group__dbprim__smat.html diff -u dbprim/doc/html/group__dbprim__smat.html:1.3 dbprim/doc/html/group__dbprim__smat.html:1.4 --- dbprim/doc/html/group__dbprim__smat.html:1.3 Sun Aug 31 23:23:19 2003 +++ dbprim/doc/html/group__dbprim__smat.html Sat Nov 22 10:26:36 2003 @@ -15,65 +15,63 @@ <p> The <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> contains the hash table. Only one of these need be allocated per type of association--for instance, in the above example, only one <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a> needs to be allocated to represent the manager-employee relationship. <p> -The <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> contains the linked list. There are actually two kinds of these structures--one is <a class="el" href="group__dbprim__smat.html#a48a136">SMAT_LOC_FIRST</a>, which could be regarded as a ``row,'' and the other is <a class="el" href="group__dbprim__smat.html#a48a137">SMAT_LOC_SECOND</a>, which could be regarded as a ``column.'' Which one is used for which type of data is irrelevant, as long as consistency is maintained. For the above example, a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> for a manager may be <a class="el" href="group__dbprim__smat.html#a48a136">SMAT_LOC_FIRST</a>, and one for an employee must then be <a class="el" href="group__dbprim__smat.html#a48a137">SMAT_LOC_SECOND</a>. (These values are set when initializing the <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> structure.) +The <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> contains the linked list. There are actually two kinds of these structures--one is <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a>, which could be regarded as a ``row,'' and the other is <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a>, which could be regarded as a ``column.'' Which one is used for which type of data is irrelevant, as long as consistency is maintained. For the above example, a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> for a manager may be <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a>, and one for an employee must then be <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a>. (These values are set when initializing the <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> structure.) <p> An association may be created with the <a class="el" href="group__dbprim__smat.html#a10">st_add()</a> function, which allows an arbitrary ordering in the associated linked lists by the same mechanism as for the linked list component of the library. An association may be removed with <a class="el" href="group__dbprim__smat.html#a11">st_remove()</a>, or looked up with <a class="el" href="group__dbprim__smat.html#a12">st_find()</a>. If iteration over all associations is desired, use the <a class="el" href="group__dbprim__smat.html#a13">st_iter()</a> function. Removing all associations from a table may be performed with <a class="el" href="group__dbprim__smat.html#a14">st_flush()</a>, which optionally calls a user-defined clean-up function. The associated hash table may be resized with <a class="el" href="group__dbprim__smat.html#a15">st_resize()</a>, and the bucket table may be released with <a class="el" href="group__dbprim__smat.html#a16">st_free()</a>. <p> An association may also be reordered within the linked lists using the <a class="el" href="group__dbprim__smat.html#a18">sh_move()</a> function. If a particular entry is desired, use the <a class="el" href="group__dbprim__smat.html#a19">sh_find()</a> function with a user-defined comparison function to locate it. Iteration may be performed with the <a class="el" href="group__dbprim__smat.html#a20">sh_iter()</a> function, and all entries in a given linked list may be removed with the sh_flush() function, which again may optionally call a user-defined clean-up function. <table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Defines</h2></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a21">SMAT_TABLE_INIT</a>(flags, resize, extra)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix table static initializer.</em> <a href="#a21"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a22">st_verify</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix table verification macro.</em> <a href="#a22"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a23">st_flags</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix table flags.</em> <a href="#a23"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a24">st_frozen</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Determine if a sparse matrix is frozen.</em> <a href="#a24"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a25">st_modulus</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix table modulus.</em> <a href="#a25"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a26">st_count</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix table count.</em> <a href="#a26"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a27">st_extra</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Extra pointer data in a sparse matrix table.</em> <a href="#a27"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a28">st_size</a>(table)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix table memory size.</em> <a href="#a28"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a29">SMAT_HEAD_INIT</a>(elem, object)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix list head static initializer.</em> <a href="#a29"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a30">sh_verify</a>(head)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix list head verification macro.</em> <a href="#a30"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a31">sh_elem</a>(head)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix list head element macro.</em> <a href="#a31"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a32">sh_table</a>(head)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix list head table pointer.</em> <a href="#a32"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a33">sh_frozen</a>(head)</td></tr> -<tr><td> </td><td><font size=-1><em>Determine if a sparse matrix is frozen.</em> <a href="#a33"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a34">sh_count</a>(head)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix list count.</em> <a href="#a34"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a35">sh_first</a>(head)</td></tr> -<tr><td> </td><td><font size=-1><em>First element in sparse matrix list.</em> <a href="#a35"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a36">sh_last</a>(head)</td></tr> -<tr><td> </td><td><font size=-1><em>Last element in sparse matrix list.</em> <a href="#a36"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a37">sh_object</a>(head)</td></tr> -<tr><td> </td><td><font size=-1><em>Object represented by a sparse matrix list head.</em> <a href="#a37"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a38">sh_size</a>(head)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix list memory size.</em> <a href="#a38"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a39">se_verify</a>(entry)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix entry verification macro.</em> <a href="#a39"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a40">se_table</a>(entry)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix entry table.</em> <a href="#a40"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a42">se_flags</a>(entry)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix entry flags.</em> <a href="#a42"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a43">se_hash</a>(entry)</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix table entry hash value.</em> <a href="#a43"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a44">se_next</a>(entry, n)</td></tr> -<tr><td> </td><td><font size=-1><em>Next element in sparse matrix list.</em> <a href="#a44"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a45">se_prev</a>(entry, n)</td></tr> -<tr><td> </td><td><font size=-1><em>Previous element in sparse matrix list.</em> <a href="#a45"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a46">se_lflags</a>(entry, n)</td></tr> -<tr><td> </td><td><font size=-1><em>Flags associated with an entry in a sparse matrix list.</em> <a href="#a46"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a47">se_object</a>(entry, n)</td></tr> -<tr><td> </td><td><font size=-1><em>Object associated with an entry in a sparse matrix list.</em> <a href="#a47"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a21">st_verify</a>(table)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix table verification macro.</em> <a href="#a21"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a22">st_flags</a>(table)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix table flags.</em> <a href="#a22"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a23">st_frozen</a>(table)</td></tr> +<tr><td> </td><td><font size=-1><em>Determine if a sparse matrix is frozen.</em> <a href="#a23"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a24">st_modulus</a>(table)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix table modulus.</em> <a href="#a24"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a25">st_count</a>(table)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix table count.</em> <a href="#a25"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a26">st_extra</a>(table)</td></tr> +<tr><td> </td><td><font size=-1><em>Extra pointer data in a sparse matrix table.</em> <a href="#a26"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a27">st_size</a>(table)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix table memory size.</em> <a href="#a27"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a28">SMAT_HEAD_INIT</a>(elem, object)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix list head static initializer.</em> <a href="#a28"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a29">sh_verify</a>(head)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix list head verification macro.</em> <a href="#a29"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a30">sh_elem</a>(head)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix list head element macro.</em> <a href="#a30"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a31">sh_table</a>(head)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix list head table pointer.</em> <a href="#a31"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a32">sh_frozen</a>(head)</td></tr> +<tr><td> </td><td><font size=-1><em>Determine if a sparse matrix is frozen.</em> <a href="#a32"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a33">sh_count</a>(head)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix list count.</em> <a href="#a33"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a34">sh_first</a>(head)</td></tr> +<tr><td> </td><td><font size=-1><em>First element in sparse matrix list.</em> <a href="#a34"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a35">sh_last</a>(head)</td></tr> +<tr><td> </td><td><font size=-1><em>Last element in sparse matrix list.</em> <a href="#a35"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a36">sh_object</a>(head)</td></tr> +<tr><td> </td><td><font size=-1><em>Object represented by a sparse matrix list head.</em> <a href="#a36"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a37">sh_size</a>(head)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix list memory size.</em> <a href="#a37"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a38">se_verify</a>(entry)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix entry verification macro.</em> <a href="#a38"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a39">se_table</a>(entry)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix entry table.</em> <a href="#a39"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a41">se_flags</a>(entry)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix entry flags.</em> <a href="#a41"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a42">se_hash</a>(entry)</td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix table entry hash value.</em> <a href="#a42"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a43">se_next</a>(entry, n)</td></tr> +<tr><td> </td><td><font size=-1><em>Next element in sparse matrix list.</em> <a href="#a43"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a44">se_prev</a>(entry, n)</td></tr> +<tr><td> </td><td><font size=-1><em>Previous element in sparse matrix list.</em> <a href="#a44"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a45">se_lflags</a>(entry, n)</td></tr> +<tr><td> </td><td><font size=-1><em>Flags associated with an entry in a sparse matrix list.</em> <a href="#a45"></a><em></em></font><br><br></td></tr> +<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a46">se_object</a>(entry, n)</td></tr> +<tr><td> </td><td><font size=-1><em>Object associated with an entry in a sparse matrix list.</em> <a href="#a46"></a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Typedefs</h2></td></tr> <tr><td nowrap align=right valign=top>typedef _smat_table_s </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a></td></tr> <tr><td> </td><td><font size=-1><em>Sparse matrix table.</em> <a href="#a0"></a><em></em></font><br><br></td></tr> @@ -87,13 +85,13 @@ <tr><td> </td><td><font size=-1><em>Sparse matrix iteration callback.</em> <a href="#a4"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>typedef unsigned long(* </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a5">smat_comp_t</a> )(<a class="el" href="group__dbprim.html#a0">db_key_t</a> *, <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> *)</td></tr> <tr><td> </td><td><font size=-1><em>Sparse matrix comparison callback.</em> <a href="#a5"></a><em></em></font><br><br></td></tr> -<tr><td nowrap align=right valign=top>typedef enum <a class="el" href="group__dbprim__smat.html#a48">_smat_loc_e</a> </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a6">smat_loc_t</a></td></tr> +<tr><td nowrap align=right valign=top>typedef enum <a class="el" href="group__dbprim__smat.html#a47">_smat_loc_e</a> </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a6">smat_loc_t</a></td></tr> <tr><td> </td><td><font size=-1><em>Sparse matrix location.</em> <a href="#a6"></a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Enumerations</h2></td></tr> -<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a48">_smat_loc_e</a> { <a class="el" href="group__dbprim__smat.html#a48a136">SMAT_LOC_FIRST</a>, -<a class="el" href="group__dbprim__smat.html#a48a137">SMAT_LOC_SECOND</a> +<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a47">_smat_loc_e</a> { <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a>, +<a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> }</td></tr> -<tr><td> </td><td><font size=-1><em>Sparse matrix location.</em> <a href="#a48">More...</a><em></em></font><br><br></td></tr> +<tr><td> </td><td><font size=-1><em>Sparse matrix location.</em> <a href="#a47">More...</a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Functions</h2></td></tr> <tr><td nowrap align=right valign=top>unsigned long </td><td valign=bottom><a class="el" href="group__dbprim__smat.html#a7">smat_cleanup</a> (void)</td></tr> <tr><td> </td><td><font size=-1><em>Clean up the smat free list.</em> <a href="#a7"></a><em></em></font><br><br></td></tr> @@ -124,7 +122,7 @@ <tr><td> </td><td><font size=-1><em>Iterate over each entry in a row or column of a sparse matrix.</em> <a href="#a20"></a><em></em></font><br><br></td></tr> </table> <hr><h2>Define Documentation</h2> -<a name="a42" doxytag="dbprim.h::se_flags"></a><p> +<a name="a41" doxytag="dbprim.h::se_flags"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -157,7 +155,7 @@ An <code>unsigned long</code> containing the flags associated with the entry. </dl> </td> </tr> </table> -<a name="a43" doxytag="dbprim.h::se_hash"></a><p> +<a name="a42" doxytag="dbprim.h::se_hash"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -190,7 +188,7 @@ An <code>unsigned long</code> containing the hash code for the entry. </dl> </td> </tr> </table> -<a name="a46" doxytag="dbprim.h::se_lflags"></a><p> +<a name="a45" doxytag="dbprim.h::se_lflags"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -222,13 +220,13 @@ <tr><td valign=top><em>entry</em> </td><td> A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </td></tr> <tr><td valign=top><em>n</em> </td><td> -One of <a class="el" href="group__dbprim__smat.html#a48a136">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a48a137">SMAT_LOC_SECOND</a> to specify which list thread is desired.</td></tr> +One of <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> to specify which list thread is desired.</td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> An <code>unsigned long</code> containing the flags associated with the entry. </dl> </td> </tr> </table> -<a name="a44" doxytag="dbprim.h::se_next"></a><p> +<a name="a43" doxytag="dbprim.h::se_next"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -263,13 +261,13 @@ <tr><td valign=top><em>entry</em> </td><td> A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </td></tr> <tr><td valign=top><em>n</em> </td><td> -One of <a class="el" href="group__dbprim__smat.html#a48a136">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a48a137">SMAT_LOC_SECOND</a> to specify which list thread is desired.</td></tr> +One of <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> to specify which list thread is desired.</td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </dl> </td> </tr> </table> -<a name="a47" doxytag="dbprim.h::se_object"></a><p> +<a name="a46" doxytag="dbprim.h::se_object"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -301,13 +299,13 @@ <tr><td valign=top><em>entry</em> </td><td> A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </td></tr> <tr><td valign=top><em>n</em> </td><td> -One of <a class="el" href="group__dbprim__smat.html#a48a136">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a48a137">SMAT_LOC_SECOND</a> to specify which list thread is desired.</td></tr> +One of <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> to specify which list thread is desired.</td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> A pointer to <code>void</code> representing the object. </dl> </td> </tr> </table> -<a name="a45" doxytag="dbprim.h::se_prev"></a><p> +<a name="a44" doxytag="dbprim.h::se_prev"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -342,13 +340,13 @@ <tr><td valign=top><em>entry</em> </td><td> A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </td></tr> <tr><td valign=top><em>n</em> </td><td> -One of <a class="el" href="group__dbprim__smat.html#a48a136">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a48a137">SMAT_LOC_SECOND</a> to specify which list thread is desired.</td></tr> +One of <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> to specify which list thread is desired.</td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </dl> </td> </tr> </table> -<a name="a40" doxytag="dbprim.h::se_table"></a><p> +<a name="a39" doxytag="dbprim.h::se_table"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -381,7 +379,7 @@ A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>. </dl> </td> </tr> </table> -<a name="a39" doxytag="dbprim.h::se_verify"></a><p> +<a name="a38" doxytag="dbprim.h::se_verify"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -417,7 +415,7 @@ Boolean true if <code>entry</code> is a valid sparse matrix entry or false otherwise. </dl> </td> </tr> </table> -<a name="a34" doxytag="dbprim.h::sh_count"></a><p> +<a name="a33" doxytag="dbprim.h::sh_count"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -450,7 +448,7 @@ An <code>unsigned long</code> containing a count of the number of elements in the sparse matrix list. </dl> </td> </tr> </table> -<a name="a31" doxytag="dbprim.h::sh_elem"></a><p> +<a name="a30" doxytag="dbprim.h::sh_elem"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -474,7 +472,7 @@ <td> <p> -This macro retrieves the position indicator for the sparse matrix head. It will return one of <a class="el" href="group__dbprim__smat.html#a48a136">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a48a137">SMAT_LOC_SECOND</a>.<dl compact><dt><b>Parameters: </b></dt><dd> +This macro retrieves the position indicator for the sparse matrix head. It will return one of <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a>.<dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>head</em> </td><td> A pointer to <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>.</td></tr> @@ -483,7 +481,7 @@ An <a class="el" href="group__dbprim__smat.html#a6">smat_loc_t</a>. </dl> </td> </tr> </table> -<a name="a35" doxytag="dbprim.h::sh_first"></a><p> +<a name="a34" doxytag="dbprim.h::sh_first"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -519,7 +517,7 @@ A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </dl> </td> </tr> </table> -<a name="a33" doxytag="dbprim.h::sh_frozen"></a><p> +<a name="a32" doxytag="dbprim.h::sh_frozen"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -552,7 +550,7 @@ A zero value if the matrix is not frozen or a non-zero value if the matrix is frozen. </dl> </td> </tr> </table> -<a name="a36" doxytag="dbprim.h::sh_last"></a><p> +<a name="a35" doxytag="dbprim.h::sh_last"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -588,7 +586,7 @@ A pointer to <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. </dl> </td> </tr> </table> -<a name="a37" doxytag="dbprim.h::sh_object"></a><p> +<a name="a36" doxytag="dbprim.h::sh_object"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -621,7 +619,7 @@ A pointer to <code>void</code>. </dl> </td> </tr> </table> -<a name="a38" doxytag="dbprim.h::sh_size"></a><p> +<a name="a37" doxytag="dbprim.h::sh_size"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -648,7 +646,7 @@ This macro returns the physical size of the memory allocated by the library for this sparse matrix list. <p> <dl compact><dt><b>Note: </b></dt><dd> -The <a class="el" href="group__dbprim__smat.html#a28">st_size()</a> macro already counts the memory for each list in the table. Summing the results of <a class="el" href="group__dbprim__smat.html#a38">sh_size()</a> and <a class="el" href="group__dbprim__smat.html#a28">st_size()</a> will over-count the amount of memory actually in use.</dl><dl compact><dt><b>Parameters: </b></dt><dd> +The <a class="el" href="group__dbprim__smat.html#a27">st_size()</a> macro already counts the memory for each list in the table. Summing the results of <a class="el" href="group__dbprim__smat.html#a37">sh_size()</a> and <a class="el" href="group__dbprim__smat.html#a27">st_size()</a> will over-count the amount of memory actually in use.</dl><dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>head</em> </td><td> A pointer to <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>.</td></tr> @@ -657,7 +655,7 @@ A <code>size_t</code>. </dl> </td> </tr> </table> -<a name="a32" doxytag="dbprim.h::sh_table"></a><p> +<a name="a31" doxytag="dbprim.h::sh_table"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -690,7 +688,7 @@ A pointer to <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>. </dl> </td> </tr> </table> -<a name="a30" doxytag="dbprim.h::sh_verify"></a><p> +<a name="a29" doxytag="dbprim.h::sh_verify"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -726,7 +724,7 @@ Boolean true if <code>head</code> is a valid sparse matrix head or false otherwise. </dl> </td> </tr> </table> -<a name="a29" doxytag="dbprim.h::SMAT_HEAD_INIT"></a><p> +<a name="a28" doxytag="dbprim.h::SMAT_HEAD_INIT"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -756,56 +754,14 @@ This macro statically initializes a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a>.<dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>elem</em> </td><td> -One of <a class="el" href="group__dbprim__smat.html#a48a136">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a48a137">SMAT_LOC_SECOND</a> specifing whether the object is a member of the set of rows or columns. </td></tr> +One of <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> specifing whether the object is a member of the set of rows or columns. </td></tr> <tr><td valign=top><em>object</em> </td><td> A pointer to <code>void</code> representing the object associated with the list head. </td></tr> </table> </dl> </td> </tr> </table> -<a name="a21" doxytag="dbprim.h::SMAT_TABLE_INIT"></a><p> -<table width="100%" cellpadding="2" cellspacing="0" border="0"> - <tr> - <td class="md"> - <table cellpadding="0" cellspacing="0" border="0"> - <tr> - <td class="md" nowrap valign="top"> #define SMAT_TABLE_INIT</td> - <td class="md" valign="top">( </td> - <td class="md" nowrap valign="top">flags, <tr> - <td></td> - <td></td> - <td class="md" nowrap>resize, <tr> - <td></td> - <td></td> - <td class="md" nowrap>extra </td> - <td class="mdname1" valign="top" nowrap> </td> - <td class="md" valign="top">) </td> - <td class="md" nowrap> - </table> - </td> - </tr> -</table> -<table cellspacing=5 cellpadding=0 border=0> - <tr> - <td> - - </td> - <td> - -<p> -This macro statically initializes a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>.<dl compact><dt><b>Parameters: </b></dt><dd> -<table border=0 cellspacing=2 cellpadding=0> -<tr><td valign=top><em>flags</em> </td><td> -A bit-wise OR of <a class="el" href="group__dbprim__hash.html#a16">HASH_FLAG_AUTOGROW</a> and <a class="el" href="group__dbprim__hash.html#a17">HASH_FLAG_AUTOSHRINK</a>. If neither behavior is desired, use 0. </td></tr> -<tr><td valign=top><em>resize</em> </td><td> -A <a class="el" href="group__dbprim__smat.html#a3">smat_resize_t</a> function pointer for determining whether resizing is permitted and/or for notification of the resize. </td></tr> -<tr><td valign=top><em>extra</em> </td><td> -Extra pointer data that should be associated with the sparse matrix. </td></tr> -</table> -</dl> </td> - </tr> -</table> -<a name="a26" doxytag="dbprim.h::st_count"></a><p> +<a name="a25" doxytag="dbprim.h::st_count"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -838,7 +794,7 @@ An <code>unsigned long</code> containing a count of the number of items in the sparse matrix table. </dl> </td> </tr> </table> -<a name="a27" doxytag="dbprim.h::st_extra"></a><p> +<a name="a26" doxytag="dbprim.h::st_extra"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -871,7 +827,7 @@ A pointer to <code>void</code>. </dl> </td> </tr> </table> -<a name="a23" doxytag="dbprim.h::st_flags"></a><p> +<a name="a22" doxytag="dbprim.h::st_flags"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -904,7 +860,7 @@ An <code>unsigned long</code> containing the flags for the sparse matrix table. </dl> </td> </tr> </table> -<a name="a24" doxytag="dbprim.h::st_frozen"></a><p> +<a name="a23" doxytag="dbprim.h::st_frozen"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -937,7 +893,7 @@ A zero value if the matrix is not frozen or a non-zero value if the matrix is frozen. </dl> </td> </tr> </table> -<a name="a25" doxytag="dbprim.h::st_modulus"></a><p> +<a name="a24" doxytag="dbprim.h::st_modulus"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -970,7 +926,7 @@ An <code>unsigned long</code> containing the number of buckets allocated for the sparse matrix table. </dl> </td> </tr> </table> -<a name="a28" doxytag="dbprim.h::st_size"></a><p> +<a name="a27" doxytag="dbprim.h::st_size"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -997,7 +953,7 @@ This macro returns the physical size of the memory allocated by the library for this sparse matrix table. <p> <dl compact><dt><b>Note: </b></dt><dd> -The <a class="el" href="group__dbprim__smat.html#a28">st_size()</a> macro already counts the memory for each list in the table. Summing the results of <a class="el" href="group__dbprim__smat.html#a38">sh_size()</a> and <a class="el" href="group__dbprim__smat.html#a28">st_size()</a> will over-count the amount of memory actually in use.</dl><dl compact><dt><b>Parameters: </b></dt><dd> +The <a class="el" href="group__dbprim__smat.html#a27">st_size()</a> macro already counts the memory for each list in the table. Summing the results of <a class="el" href="group__dbprim__smat.html#a37">sh_size()</a> and <a class="el" href="group__dbprim__smat.html#a27">st_size()</a> will over-count the amount of memory actually in use.</dl><dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>table</em> </td><td> A pointer to a <a class="el" href="group__dbprim__smat.html#a0">smat_table_t</a>.</td></tr> @@ -1006,7 +962,7 @@ A <code>size_t</code>. </dl> </td> </tr> </table> -<a name="a22" doxytag="dbprim.h::st_verify"></a><p> +<a name="a21" doxytag="dbprim.h::st_verify"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -1137,7 +1093,7 @@ <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> - <td class="md" nowrap valign="top"> typedef enum <a class="el" href="group__dbprim__smat.html#a48">_smat_loc_e</a> smat_loc_t + <td class="md" nowrap valign="top"> typedef enum <a class="el" href="group__dbprim__smat.html#a47">_smat_loc_e</a> smat_loc_t </table> </td> </tr> @@ -1150,7 +1106,7 @@ <td> <p> -See the documentation for the enumeration <a class="el" href="group__dbprim__smat.html#a48">_smat_loc_e</a>. </td> +See the documentation for the enumeration <a class="el" href="group__dbprim__smat.html#a47">_smat_loc_e</a>. </td> </tr> </table> <a name="a3" doxytag="dbprim.h::smat_resize_t"></a><p> @@ -1198,7 +1154,7 @@ </tr> </table> <hr><h2>Enumeration Type Documentation</h2> -<a name="a48" doxytag="dbprim.h::_smat_loc_e"></a><p> +<a name="a47" doxytag="dbprim.h::_smat_loc_e"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> @@ -1219,9 +1175,9 @@ <p> This enumeration is used to specify whether an element is a row or column element. It should be referenced by the typedef <a class="el" href="group__dbprim__smat.html#a6">smat_loc_t</a>. <dl compact><dt><b>Enumeration values: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> -<tr><td valign=top><em><a name="a48a136" doxytag="SMAT_LOC_FIRST"></a><em>SMAT_LOC_FIRST</em></em> </td><td> +<tr><td valign=top><em><a name="a47a135" doxytag="SMAT_LOC_FIRST"></a><em>SMAT_LOC_FIRST</em></em> </td><td> First entry (``row''). </td></tr> -<tr><td valign=top><em><a name="a48a137" doxytag="SMAT_LOC_SECOND"></a><em>SMAT_LOC_SECOND</em></em> </td><td> +<tr><td valign=top><em><a name="a47a136" doxytag="SMAT_LOC_SECOND"></a><em>SMAT_LOC_SECOND</em></em> </td><td> Second entry (``column''). </td></tr> </table> </dl> @@ -1348,12 +1304,12 @@ <td> <p> -This function dynamically initializes a sparse matrix row or column linked list head. The <code>elem</code> argument specifies whether the object is to be associated with a <a class="el" href="group__dbprim__smat.html#a48a136">SMAT_LOC_FIRST</a> list or a <a class="el" href="group__dbprim__smat.html#a48a137">SMAT_LOC_SECOND</a> list.<dl compact><dt><b>Parameters: </b></dt><dd> +This function dynamically initializes a sparse matrix row or column linked list head. The <code>elem</code> argument specifies whether the object is to be associated with a <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> list or a <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> list.<dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>head</em> </td><td> A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> to be initialized. </td></tr> <tr><td valign=top><em>elem</em> </td><td> -Either <a class="el" href="group__dbprim__smat.html#a48a136">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a48a137">SMAT_LOC_SECOND</a>. </td></tr> +Either <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> or <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a>. </td></tr> <tr><td valign=top><em>object</em> </td><td> A pointer to the object containing the sparse matrix row or column head.</td></tr> </table> @@ -1497,7 +1453,7 @@ <tr><td valign=top><em>loc</em> </td><td> A <a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> indicating where the entry should be moved to. </td></tr> <tr><td valign=top><em>elem2</em> </td><td> -A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> describing another entry in the list if <code>loc</code> is <a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_BEFORE</a> or <a class="el" href="group__dbprim__link.html#a26a135">LINK_LOC_AFTER</a>.</td></tr> +A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> describing another entry in the list if <code>loc</code> is <a class="el" href="group__dbprim__link.html#a26a133">LINK_LOC_BEFORE</a> or <a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_AFTER</a>.</td></tr> </table> </dl><dl compact><dt><b>Return values: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> @@ -1652,17 +1608,17 @@ <tr><td valign=top><em>entry_p</em> </td><td> A pointer to a pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a>. This is a result parameter. If <code>NULL</code> is passed, the addition will be performed and an appropriate error code returned. </td></tr> <tr><td valign=top><em>head1</em> </td><td> -A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> representing a <a class="el" href="group__dbprim__smat.html#a48a136">SMAT_LOC_FIRST</a> sparse matrix list. </td></tr> +A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> representing a <a class="el" href="group__dbprim__smat.html#a47a135">SMAT_LOC_FIRST</a> sparse matrix list. </td></tr> <tr><td valign=top><em>loc1</em> </td><td> A <a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> indicating where the entry should be added for <code>head1</code>. </td></tr> <tr><td valign=top><em>ent1</em> </td><td> -A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> describing another element in the list represented by <code>head1</code> if <code>loc1</code> is <a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_BEFORE</a> or <a class="el" href="group__dbprim__link.html#a26a135">LINK_LOC_AFTER</a>. </td></tr> +A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> describing another element in the list represented by <code>head1</code> if <code>loc1</code> is <a class="el" href="group__dbprim__link.html#a26a133">LINK_LOC_BEFORE</a> or <a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_AFTER</a>. </td></tr> <tr><td valign=top><em>head2</em> </td><td> -A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> representing a <a class="el" href="group__dbprim__smat.html#a48a137">SMAT_LOC_SECOND</a> sparse matrix list. </td></tr> +A pointer to a <a class="el" href="group__dbprim__smat.html#a1">smat_head_t</a> representing a <a class="el" href="group__dbprim__smat.html#a47a136">SMAT_LOC_SECOND</a> sparse matrix list. </td></tr> <tr><td valign=top><em>loc2</em> </td><td> A <a class="el" href="group__dbprim__link.html#a4">link_loc_t</a> indicating where the entry should be added for <code>head2</code>. </td></tr> <tr><td valign=top><em>ent2</em> </td><td> -A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> describing another element in the list represented by <code>head2</code> if <code>loc2</code> is <a class="el" href="group__dbprim__link.html#a26a134">LINK_LOC_BEFORE</a> or <a class="el" href="group__dbprim__link.html#a26a135">LINK_LOC_AFTER</a>.</td></tr> +A pointer to a <a class="el" href="group__dbprim__smat.html#a2">smat_entry_t</a> describing another element in the list repres... [truncated message content] |
From: Kevin L. M. <kl...@us...> - 2003-11-22 14:47:44
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : dbprim Commit time: 2003-11-22 14:47:02 UTC Modified files: ChangeLog _smat_comp.c dbprim.h st_add.c st_init.c Log message: Fix some bugs reported by mbuna. ---------------------- diff included ---------------------- Index: dbprim/ChangeLog diff -u dbprim/ChangeLog:1.9 dbprim/ChangeLog:1.10 --- dbprim/ChangeLog:1.9 Sun Aug 31 23:23:18 2003 +++ dbprim/ChangeLog Sat Nov 22 06:46:51 2003 @@ -1,3 +1,16 @@ +2003-11-22 Kevin L Mitchell <kl...@mi...> + + * _smat_comp.c (_smat_comp): change "<" to "<=" (reported by + mbuna) + + * dbprim.h: add st_extra element to smat_table_t and use it + + * st_init.c (st_init): use an "extra" pointer in a smat_table_t + instead of the hash_table_t + + * st_add.c (st_add): only set *entry_p if it's *not* NULL--bah + (reported by mbuna) + 2003-08-31 Kevin L Mitchell <kl...@mi...> * configure.ac: update version to beta release number 0.9.0 Index: dbprim/_smat_comp.c diff -u dbprim/_smat_comp.c:1.2 dbprim/_smat_comp.c:1.3 --- dbprim/_smat_comp.c:1.2 Wed Jun 11 18:10:04 2003 +++ dbprim/_smat_comp.c Sat Nov 22 06:46:51 2003 @@ -16,12 +16,12 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: _smat_comp.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $ +** @(#)$Id: _smat_comp.c,v 1.3 2003/11/22 14:46:51 klmitch Exp $ */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: _smat_comp.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $"); +RCSTAG("@(#)$Id: _smat_comp.c,v 1.3 2003/11/22 14:46:51 klmitch Exp $"); unsigned long _smat_comp(hash_table_t *table, db_key_t *key1, db_key_t *key2) @@ -36,7 +36,7 @@ objects2 = dk_key(key2); /* walk through the elements in the array and compare them */ - for (i = SMAT_LOC_FIRST; i < SMAT_LOC_SECOND; i++) + for (i = SMAT_LOC_FIRST; i <= SMAT_LOC_SECOND; i++) if (objects1[i] != objects2[i]) return 1; /* they don't match */ Index: dbprim/dbprim.h diff -u dbprim/dbprim.h:1.2 dbprim/dbprim.h:1.3 --- dbprim/dbprim.h:1.2 Fri Aug 22 21:44:57 2003 +++ dbprim/dbprim.h Sat Nov 22 06:46:51 2003 @@ -16,7 +16,7 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: dbprim.h,v 1.2 2003/08/23 04:44:57 klmitch Exp $ +** @(#)$Id: dbprim.h,v 1.3 2003/11/22 14:46:51 klmitch Exp $ */ #ifndef __include_dbprim_h__ #define __include_dbprim_h__ @@ -1032,6 +1032,7 @@ struct _smat_table_s { unsigned long st_magic; /* magic number */ smat_resize_t st_resize; /* function pointer for resize callback */ + void *st_extra; /* extra data pointer */ hash_table_t st_table; /* hash table */ }; @@ -1053,9 +1054,8 @@ * sparse matrix. */ #define SMAT_TABLE_INIT(flags, resize, extra) \ - { SMAT_TABLE_MAGIC, (resize), \ - HASH_TABLE_INIT((flags), _smat_hash, _smat_comp, _smat_resize, \ - (extra)) } + { SMAT_TABLE_MAGIC, (resize), (extra), \ + HASH_TABLE_INIT((flags), _smat_hash, _smat_comp, _smat_resize, 0) } /** \ingroup dbprim_smat * \brief Sparse matrix table verification macro. @@ -1152,7 +1152,7 @@ * * \return A pointer to \c void. */ -#define st_extra(table) ((table)->st_table.ht_extra) +#define st_extra(table) ((table)->st_extra) /** \ingroup dbprim_smat * \brief Sparse matrix table memory size. Index: dbprim/st_add.c diff -u dbprim/st_add.c:1.2 dbprim/st_add.c:1.3 --- dbprim/st_add.c:1.2 Wed Jun 11 18:10:04 2003 +++ dbprim/st_add.c Sat Nov 22 06:46:51 2003 @@ -16,14 +16,14 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: st_add.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $ +** @(#)$Id: st_add.c,v 1.3 2003/11/22 14:46:51 klmitch Exp $ */ #include <errno.h> #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: st_add.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $"); +RCSTAG("@(#)$Id: st_add.c,v 1.3 2003/11/22 14:46:51 klmitch Exp $"); /** \ingroup dbprim_smat * \brief Add an entry to a sparse matrix. @@ -130,7 +130,7 @@ head1->sh_table = head2->sh_table = table; /* remember our table */ se->se_table = table; - if (!entry_p) /* user wants to know which entry it is */ + if (entry_p) /* user wants to know which entry it is */ *entry_p = se; return 0; /* all done! */ Index: dbprim/st_init.c diff -u dbprim/st_init.c:1.2 dbprim/st_init.c:1.3 --- dbprim/st_init.c:1.2 Wed Jun 11 18:10:04 2003 +++ dbprim/st_init.c Sat Nov 22 06:46:51 2003 @@ -16,12 +16,12 @@ ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ** MA 02111-1307, USA ** -** @(#)$Id: st_init.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $ +** @(#)$Id: st_init.c,v 1.3 2003/11/22 14:46:51 klmitch Exp $ */ #include "dbprim.h" #include "dbprim_int.h" -RCSTAG("@(#)$Id: st_init.c,v 1.2 2003/06/12 01:10:04 klmitch Exp $"); +RCSTAG("@(#)$Id: st_init.c,v 1.3 2003/11/22 14:46:51 klmitch Exp $"); /** \ingroup dbprim_smat * @@ -56,11 +56,12 @@ if (!table) /* verify arguments */ return DB_ERR_BADARGS; + table->st_extra = extra; table->st_resize = resize; /* initialize the hash table */ if ((retval = ht_init(&table->st_table, flags, _smat_hash, _smat_comp, - _smat_resize, extra, init_mod))) + _smat_resize, 0, init_mod))) return retval; table->st_magic = SMAT_TABLE_MAGIC; /* initialize the rest of the table */ ----------------------- End of diff ----------------------- |
From: Kevin L. M. <kl...@us...> - 2003-11-14 17:24:07
|
Committer : klmitch CVSROOT : /cvsroot/dbprim Module : webpage Commit time: 2003-11-14 17:24:05 UTC Removed files: index.html Log message: Activate the new page... ---------------------- diff included ---------------------- Index: webpage/index.html diff -u webpage/index.html:1.2 webpage/index.html:removed --- webpage/index.html:1.2 Sat Aug 23 19:42:17 2003 +++ webpage/index.html Fri Nov 14 09:24:05 2003 @@ -1,17 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - <meta http-equiv="content-type" - content="text/html; charset=ISO-8859-1"> - <title>Database Primitives Library</title> -</head> -<body link="#ff0000" alink="#ffff00" vlink="#ff00ff" - style="color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);"> -<p>This is a place-holder web page. The <a - href="http://www.sourceforge.net/projects/dbprim">dbprim</a> project -is looking for web designers and testers.</p> -<p>In the mean time, here is the <a href="htmldocs">documentation</a> -for -the Database Primitives Library.</p> -</body> -</html> ----------------------- End of diff ----------------------- |