isatty(stdin) usage

Rodolfo Mancisidor rodolfom at hplsla.HP.COM
Thu Feb 23 04:23:35 AEST 1989


>I am trying to use this invokation:
>
>          if (isatty (stdin))

isatty() expects a file descriptor (an integer) you are passing a file pointer
(FILE *) try:

	if (isatty(0))

   ___    ___    _________ 
  /_ /|  /_ /|  /_______ /|
 |##| | |##| | |########| |
 |##| |_|##| | |##| L|##| |
 |##|/__|##| | |##|/_|##| |   Rodolfo Mancisidor                Lake
 |#########| | |########|/    [ [ 1[206] ] 335 ] 2912          Stevens
 |##| | |##| | |##| |         8600 Soper Hill Road            Instruments
 |##| | |##| | |##| |         Everett, WA 98205-1298           Division
 |##|/  |##|/  |##|/          rodolfom%hplsla at hplabs.hp.com     (LSID)



More information about the Comp.unix.questions mailing list