Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!uwvax!dave From: dave@rsch.wisc.edu (Dave Cohrs) Newsgroups: net.unix-wizards Subject: Re: -ltermcap Message-ID: <2565@rsch.wisc.edu> Date: Sun, 3-Aug-86 13:29:54 EDT Article-I.D.: rsch.2565 Posted: Sun Aug 3 13:29:54 1986 Date-Received: Mon, 4-Aug-86 00:54:42 EDT References: <2773@mit-eddie.MIT.EDU> Sender: news@rsch.wisc.edu Reply-To: dave@rsch.wisc.edu (Dave Cohrs) Organization: U of Wisconsin CS Dept Lines: 32 In article <2773@mit-eddie.MIT.EDU> shawn@mit-eddie.MIT.EDU (Shawn F. Mckay) writes: >One would think I could say something like: > >char buff[20]; > > tgetstr ("cl", buff); Read the termcap(3) man page more carefully. The declaration for tgetstr is: char * tgetstr(id, area) char *id, **area; Note the '**area'. So you want to do: { char buff[20]; char *bufptr = buff; (void) tgetstr("cl", &bufptr); } The man page also says 'it advances area', which is why you must assign buff to bufptr. -- Dave Cohrs (608) 262-1204 ..!{harvard,ihnp4,seismo,topaz}!uwvax!dave dave@rsch.wisc.edu