Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!newsfeed.internetmci.com!news.sprintlink.net!news.promedia.net!pm5.cwo.com!jack From: jack@iserve.rds.net (Jack Alexander) Newsgroups: comp.unix.bsd.netbsd.misc,comp.unix.bsd.misc Subject: dbm programming question Date: Tue, 23 Jan 1996 00:17:59 Organization: Site 1 Lines: 19 Message-ID: <jack.12.00004CC9@iserve.rds.net> NNTP-Posting-Host: 205.162.123.15 X-Newsreader: Trumpet for Windows [Version 1.0 Rev A] Xref: euryale.cc.adfa.oz.au comp.unix.bsd.netbsd.misc:2105 comp.unix.bsd.misc:474 Hello! I am doing some programming using the dbm routines on a BSDI box, and have noticed a few wierd things that I was wondering someone has encountered, tackled, or researched them before. I'm using btree format. I noticed that the way the password files are set up under BSD exhibit similar "problems". (1) I can't get an ordered (i.e., alphabetical) list of the keyed fields. I go to the top, ask for the next, and they come back out of order. Just as when you do a "vipw" command to add a user by hand, they come back in a strange order. CAN I MAKE IT COME BACK IN ASCENDING OR DESCENDING ORDER??!! (2) I try to go to a specific place in the database, via a "fetch" command, then try to do a "next record", it doesn't seem to assign the cursor location to the record I just fetched. I notice that reading the (excuse for) the man page on "db" -- the only other helping document is in the /usr/include/ndbm.h file -- hardly a "man" page. Are there any good public domain programs that use the dbm-style interface to db that I can use as a reference?!! HELP!!!! PLEASE!!! --Jack Alexander