File:  [Research Unix] / researchv10no / libcurses / longname.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

# define	reg	register

/*
 *	This routine returns the long name of the terminal or "def"
 *	if none can be found.
 *
 * 5/15/81 (Berkeley) @(#)longname.c	1.2
 */
char *
longname(bp, def)
reg char	*bp, *def; {

	reg char	*cp;
	static char ttytype[20];
	char save;

	while (*bp && *bp != ':' && *bp != '|')
		bp++;
	if (*bp == '|') {
		bp++;
		cp = bp;
		while (*cp && *cp != ':' && *cp != '|')
			cp++;
		save = *cp;
		*cp = 0;
		strcpy(ttytype, bp);
		*cp = save;
		return ttytype;
	}
	strcpy(ttytype, def);
	return ttytype;
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.