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[] = "@(#)fullname.c	5.1 (Berkeley) 6/7/85";
   9: #endif not lint
  10: 
  11: # define    reg register
  12: 
  13: /*
  14:  *	This routine fills in "def" with the full name of the terminal.
  15:  * This is assumed to be the last name in the list of aliases.
  16:  *
  17:  */
  18: char *
  19: fullname(bp, def)
  20: reg char    *bp, *def;
  21: {
  22: 
  23:     reg char    *cp;
  24: 
  25:     *def = 0;           /* in case no name */
  26: 
  27:     while (*bp && *bp != ':') {
  28:         cp = def;       /* start of answer */
  29:         while (*bp && *bp != ':' && *bp != '|') {
  30:             *cp++ = *bp++;  /* copy name over */
  31:         }
  32:         *cp = 0;        /* zero end of name */
  33:         if (*bp == '|') {
  34:             bp++;       /* skip over '|' if that is case */
  35:         }
  36:     }
  37:     return(def);
  38: }

Defined functions

fullname defined in line 18; never used

Defined variables

sccsid defined in line 8; never used

Defined macros

reg defined in line 11; used 2 times
Last modified: 1985-06-07
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 638
Valid CSS Valid XHTML 1.0 Strict