-ltermcap
    Dave Cohrs 
    dave at rsch.wisc.edu
       
    Mon Aug  4 03:29:54 AEST 1986
    
    
  
In article <2773 at mit-eddie.MIT.EDU>
shawn at 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 at rsch.wisc.edu
    
    
More information about the Comp.unix.wizards
mailing list