BSD 4 development
[unix-history] / usr / src / lib / libcurses / longname.c
# define reg register
/*
* This routine fills in "def" with the long name of the terminal.
*/
char *
longname(bp, def)
reg char *bp, *def; {
reg char *cp;
while (*bp && *bp != ':' && *bp != '|')
bp++;
if (*bp == '|') {
bp++;
cp = bp;
while (*cp && *cp != ':' && *cp != '|')
cp++;
*cp = 0;
return bp;
}
return def;
}