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:  *	@(#)isatty_.c	5.1	6/7/85
   7:  */
   8: 
   9: /*
  10:  * determine if stream is associated with a tty (async port)
  11:  *
  12:  * calling sequence:
  13:  *	logical	isatty, val
  14:  *	val = isatty (lunit)
  15:  * where:
  16:  *	val will be .TRUE. if lunit is associated with a 'tty'
  17:  */
  18: 
  19: #include    "../libI77/fiodefs.h"
  20: 
  21: extern unit units[];    /* logical units table from iolib */
  22: 
  23: long isatty_(u)
  24: long *u;
  25: {
  26:     int i;
  27:     unit    *lu;
  28: 
  29:     if (*u < 0 || *u >= MXUNIT)
  30:         return(0);
  31:     lu = &units[*u];
  32:     if (!lu->ufd)
  33:         return(0);
  34:     return((long)(isatty(fileno(lu->ufd)) != 0));
  35: }

Defined functions

isatty_ defined in line 23; never used
Last modified: 1987-02-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1868
Valid CSS Valid XHTML 1.0 Strict