delorie.com/djgpp/doc/libc/libc_831.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

ttyname

Syntax

 
#include <unistd.h>

char *ttyname(int file);

Description

Gives the name of the terminal associated with file.

Return Value

Returns "con" if file is a device, else NULL.

Portability

ANSI/ISO C No
POSIX 1003.2-1992; 1003.1-2001

Example

 
char *tty = ttyname(0);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004