man-db-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

man-db docs/ChangeLog docs/NEWS libdb/db_gdbm.c...


From: Colin Watson
Subject: man-db docs/ChangeLog docs/NEWS libdb/db_gdbm.c...
Date: Tue, 16 Sep 2003 17:37:57 -0400

CVSROOT:        /cvsroot/man-db
Module name:    man-db
Branch:         
Changes by:     Colin Watson <address@hidden>   03/09/16 17:37:57

Modified files:
        docs           : ChangeLog NEWS 
        libdb          : db_gdbm.c db_lookup.c mydbm.h 

Log message:
        Work around the fact that GDBM's firstkey/nextkey interface doesn't
        return ordered results.
        
        * libdb/db_gdbm.c (man_gdbm_open_wrapper): New function. Wraps the
        return value from gdbm_open() in a structure that remembers the
        file name.
        (parent_sortkey_hash_free, sortkey_hash_free): New functions to
        free hashtables used here.
        (sortkey_compare): New comparison function for qsort().
        (man_gdbm_firstkey): New function. Retrieve all keys using
        gdbm_firstkey() and gdbm_nextkey() in advance, sort them into an
        ordered hashtable, remember that hashtable for later, and return
        the first key.
        (man_gdbm_nextkey): New function. Find the previously remembered
        ordered hashtable and return the next element from it.
        (man_gdbm_close): New function. Clean up remembered data.
        * libdb/db_lookup.c (copy_datum): Define even if using GDBM.
        (gripe_lock): Explain why this isn't used for GDBM.
        * libdb/mydbm.h (man_gdbm_wrapper): New type.
        (man_gdbm_open_wrapper, man_gdbm_firstkey, man_gdbm_nextkey,
        man_gdbm_close): Add prototypes.
        (MYDBM_FILE): Change to man_gdbm_wrapper for GDBM. Adjust all
        other MYDBM_* macros to cope with this and use man_gdbm_*
        functions where necessary.
        (copy_datum): Declare for all database types. Remove __inline__.
        * docs/NEWS: Document this.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/man-db/man-db/docs/ChangeLog.diff?tr1=1.401&tr2=1.402&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/man-db/man-db/docs/NEWS.diff?tr1=1.34&tr2=1.35&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/man-db/man-db/libdb/db_gdbm.c.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/man-db/man-db/libdb/db_lookup.c.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/man-db/man-db/libdb/mydbm.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text





reply via email to

[Prev in Thread] Current Thread [Next in Thread]