franz/lam9.c
/*
/*	This routine will initialize the termcap for the lisp programs.
/*	If the termcap file is not found, or terminal type is undefined,
/*	it will print out an error mesg.				*/
This routine will initialize the termcap for the lisp programs.
If the termcap file is not found, or terminal type is undefined,
it will print out an error mesg.
This routine will initialize the termcap for the lisp programs . If the termcap file is not found or terminal type is undefined it will print out an error mesg .
lispval
Ltci()
{
char *cp = getenv("TERM");
char *pc;
int found;
struct sgttyb tty;
found = tgetent(bpbuf,cp);		
switch(found) {
      case -1: 	printf("\nError Termcap File not found \n");break;
      case 0 :	printf("\nError No Termcap Entry for this terminal \n");
		break;
      case 1 : {			
		gtty(1, &tty);
		ospeed = tty.sg_ospeed;
	        }
		break;
	}
cp = tstrbuf;
BC = tgetstr("bc", &cp);
UP = tgetstr("up", &cp);
pc = tgetstr("pc", &cp);
if (pc)
    PC = *pc;
return(nil);
}
lispval Ltci ( ) { char * cp = getenv ( " " ) ; char * pc ; int found ; struct sgttyb tty ; found = tgetent ( bpbuf , cp ) ; switch ( found ) { case -1 : printf ( " \n \n " ) ; break ; case 0 : printf ( " \n \n " ) ; break ; case 1 : { gtty ( 1 , & tty ) ; ospeed = tty . sg_ospeed ; } break ; } cp = tstrbuf ; BC = tgetstr ( " " , & cp ) ; UP = tgetstr ( " " , & cp ) ; pc = tgetstr ( " " , & cp ) ; if ( pc ) PC = * pc ; return ( nil ) ; }
This routine will initialize the termcap for the lisp programs.
This routine will initialize the termcap for the lisp programs .
/* open ther termcap file */ /* everything was ok	*/