Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!ANDREW.CMU.EDU!ghoti+ From: ghoti+@ANDREW.CMU.EDU (Adam Stoller) Newsgroups: comp.soft-sys.andrew Subject: Re: Want messages.FwdHeaders preference Message-ID: Date: 10 Apr 91 00:28:12 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 18 NSB Writes: > The good news is that, since you are indeed no longer in ATK-land, the > code you need to read preferences is really quite simple. Just use > getprofile, as in > > char *s = getprofile("fwdheaders"); I'm not positive, but I think that the getprofile() function returns a pointer to a centrally allocated string - which can be overwritten by any other call to getprofile - therefore you might want to malloc storage or assume some maximum length array to store the information in, so you don't have to make the call each time you forward a message. (depends on how you view the overhead of the function call with respect to the overhead of a newly malloc'd char * - presumably static and initialized to NULL so you can tell if you've already gotten the information.) --fish