very much with XEmacs code and funny C syntax (I'm not a real C
programmer...).
From: Martin Buchholz <martin(a)xemacs.org>
Subject: Re: gdbm support of database.c
Date: Sun, 3 Jan 1999 21:49:31 -0800 (PST)
Please post patches to xemacs-patches.
Sorry :-p I will never forget this time.
Mikio> New `print_database' print properly GDBM flag for
opening database.
Mikio> Is it possible to print further database properties to an extent of
Mikio> gdbm functions?
Traditionally, print_FOO prints out the most important properties of a
Lisp object type, but usually not all. So it's a matter of judgment
how many properties to print out. I'm not sure what the right answer
is here. Think about it some more. Compare with print_buffer:
(current-buffer)
==> #<buffer "reply to Mikio Nakajima">
Hmmm. Forget about implementing database-properties for now. Think
some more about it later, after implementing your other changes.
I suggested database-properties by analogy with other Lisp object
types, like event-properties and extent-properties.
The following lines are forms and their evaluated results;
(setq test (open-database "~/test" 'gdbm))
--> #<database "/home/minakaji/test" (gdbm/nil/readwrite(create))
0x465b>
(set-database-property test 'fastmode t)
--> nil
test
--> #<database "/home/minakaji/test" (gdbm/nil/readwrite(create,
fastmode)) 0x465b>
(set-database-property test 'fastmode nil)
--> nil
test
--> #<database "/home/minakaji/test" (gdbm/nil/readwrite(create))
0x465b>
`set-database-property' changes fastmode option of TEST database and
we can find out by simply evaluating database object.
One of the properties we cannot see is cachesize of the database (but
we cannot get it by using a gdbm function. How to get it?). What
else properties are to be seen (either by simply evaluating object or
using a new Emacs C primitive)? This is what I want to know, but not
how to get (that is a next question). Does Berkeley db have a special
options (properties) can be set and can be seen.
Mikio Nakajima <minakaji(a)osaka.email.ne.jp>
http://www.asahi-net.or.jp/~gy2m-nkjm/