Commit | Line | Data |
---|---|---|
87c6fcf8 DF |
1 | /* |
2 | * Copyright (c) 1980 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | */ | |
6 | ||
7 | #ifndef lint | |
8 | static char sccsid[] = "@(#)longname.c 5.1 (Berkeley) %G%"; | |
9 | #endif not lint | |
10 | ||
b089ee09 KA |
11 | # define reg register |
12 | ||
13 | /* | |
14 | * This routine fills in "def" with the long name of the terminal. | |
15 | * | |
b089ee09 KA |
16 | */ |
17 | char * | |
18 | longname(bp, def) | |
19 | reg char *bp, *def; { | |
20 | ||
21 | reg char *cp; | |
22 | ||
23 | while (*bp && *bp != ':' && *bp != '|') | |
24 | bp++; | |
25 | if (*bp == '|') { | |
26 | bp++; | |
62fc2477 JB |
27 | cp = def; |
28 | while (*bp && *bp != ':' && *bp != '|') | |
29 | *cp++ = *bp++; | |
b089ee09 | 30 | *cp = 0; |
b089ee09 KA |
31 | } |
32 | return def; | |
33 | } |