Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!decvax!bellcore!ulysses!allegra!mit-eddie!genrad!panda!husc6!harvard!caip!lll-crg!lll-lcc!qantel!hplabs!sdcrdcf!psivax!quad1!jpm From: jpm@quad1.UUCP (John McMamee) Newsgroups: net.bugs.4bsd,net.news.b Subject: Re: Limits on 4.2BSD lseek(2)? Message-ID: <389@quad1.UUCP> Date: Thu, 15-May-86 13:14:38 EDT Article-I.D.: quad1.389 Posted: Thu May 15 13:14:38 1986 Date-Received: Mon, 19-May-86 20:02:53 EDT References: <717@smeagol.UUCP> Distribution: na Organization: Quadratron Systems Inc, Sherman Oaks Ca. Lines: 20 Xref: mit-eddie net.bugs.4bsd:1889 net.news.b:1055 > Here is a snatch of the code (from ./misc/article.c in the distribution): > > ... > content = dofetch(*argv); > if (content.dptr == 0) { > printf("%s: No such key\n", *argv); > continue; > } > if (lseek(fd, *(long *) content.dptr, 0) < 0) > continue; This looks like a problem I've had before. The dbm library does not align the data to a word boundary, thus you can't always access it directly. My solution has been to copy the data returned by dbm into my own structure or buffer and then use that. -- John P. McNamee Quadratron Systems Inc. UUCP: {sdcrdcf|ttdica|scgvaxd|mc0|bellcore|logico|ihnp4}!psivax!quad1!jpm ARPA: jpm@BNL.ARPA