🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.database
Article #17

Re: Multiple DBM databases?

#17
From: Jeffrey Jongeward
Date: Mon, 23 Sep 1985 22:28
19 lines
1685 bytes
> 
> I have an application where I'd like to set up 4 DBM type databases.
> However, from looking at the documentation, I assume I would have to
> deal with one at a time. Am I correct? Is there a way to 'talk' to
> 4 of these animals at once besides hacking dbm up?
> 
> UUCP: {ihnp4,uwvax!uwmacc}!uwmcsd1!dave
> ARPA: uwmcsd1!dave@wisc-rsch.arpa

There is no easy way because of the declaration of pagbuf and dirbuf in dbm.h 
(as character arrays), and becuase of a couple of static internal variables in 
dbm.c.  If you have the source, you can just change the declarations of pagebuf 
and dirbuf in dbm.h (to char pointers), change the static internals to external
unique variables, declare some per-database storage for pagebuf and dirbuf, then
switch from one dbm database to the other by saving and restoring the necessary 
variables w/in dbm.h + the (old) static internal variables.

I have a set of high-level routines that do just this if you want them (plus a 
diff script for dbm), however, it's really a trivial task to write your own.  
Technical Details
Message-ID: <233@ssc-vax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!ssc-vax!jeff
References: <542@uwmcsd1.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site ssc-vax.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!ssc-vax!jeff
From: jeff@ssc-vax.UUCP (Jeffrey Jongeward)
Newsgroups: net.database,net.unix
Subject: Re: Multiple DBM databases?
Message-ID: <233@ssc-vax.UUCP>
Date: Mon, 23-Sep-85 18:28:25 EDT
Article-I.D.: ssc-vax.233
Posted: Mon Sep 23 18:28:25 1985
Date-Received: Thu, 26-Sep-85 06:48:50 EDT
References: <542@uwmcsd1.UUCP>
Distribution: net
Organization: Boeing Aerospace Co., Seattle, WA
Lines: 19