BSD 4_4 development
[unix-history] / usr / share / man / cat3 / ttyslot.0
index f2535c6..ab04f37 100644 (file)
@@ -1,66 +1,58 @@
+TTYNAME(3)                  BSD Programmer's Manual                 TTYNAME(3)
 
 
+N\bNA\bAM\bME\bE
+     t\btt\bty\byn\bna\bam\bme\be, i\bis\bsa\bat\btt\bty\by, t\btt\bty\bys\bsl\blo\bot\bt - get name of associated terminal (tty) from
+     file descriptor
 
 
+S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
+     #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<u\bun\bni\bis\bst\btd\bd.\b.h\bh>\b>
 
 
-TTYNAME(3)                   1985                     TTYNAME(3)
-
+     _\bc_\bh_\ba_\br _\b*
+     t\btt\bty\byn\bna\bam\bme\be(_\bi_\bn_\bt _\bf_\bd);
 
 
+     _\bi_\bn_\bt
+     i\bis\bsa\bat\btt\bty\by(_\bi_\bn_\bt _\bf_\bd);
 
 
-N\bNA\bAM\bME\bE
-     ttyname, isatty, ttyslot - find name of a terminal
+     _\bi_\bn_\bt
+     t\btt\bty\bys\bsl\blo\bot\bt();
 
 
-S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
-     c\bch\bha\bar\br *\b*t\btt\bty\byn\bna\bam\bme\be(\b(f\bfi\bil\ble\bed\bde\bes\bs)\b)
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+     These functions operate on the system file descriptors for terminal type
+     devices. These descriptors are not related to the standard I/O FILE type-
+     def, but refer to the special device files found in _\b/_\bd_\be_\bv and named
+     _\b/_\bd_\be_\bv_\b/_\bt_\bt_\by_\bx_\bx and for which an entry exists in the initialization file
+     _\b/_\be_\bt_\bc_\b/_\bt_\bt_\by_\bs_\b. (See ttys(5).)
 
 
-     i\bis\bsa\bat\btt\bty\by(\b(f\bfi\bil\ble\bed\bde\bes\bs)\b)
+     The i\bis\bsa\bat\btt\bty\by() function determines if the file descriptor _\bf_\bd refers to a
+     valid terminal type device.
 
 
-     t\btt\bty\bys\bsl\blo\bot\bt(\b()\b)
+     The t\btt\bty\byn\bna\bam\bme\be() function gets the related device name of a file descriptor
+     for which i\bis\bsa\bat\btt\bty\by() is true
 
 
-D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-     _\bT_\bt_\by_\bn_\ba_\bm_\be returns a pointer to the null-terminated path name
-     of the terminal device associated with file descriptor
-     _\bf_\bi_\bl_\be_\bd_\be_\bs (this is a system file descriptor and has nothing to
-     do with the standard I/O FILE typedef).
+     The t\btt\bty\bys\bsl\blo\bot\bt() function fetches the current process' control terminal num-
+     ber from the ttys(5) file entry.
 
 
-     _\bI_\bs_\ba_\bt_\bt_\by returns 1 if _\bf_\bi_\bl_\be_\bd_\be_\bs is associated with a terminal
-     device, 0 otherwise.
+R\bRE\bET\bTU\bUR\bRN\bN V\bVA\bAL\bLU\bUE\bES\bS
+     The t\btt\bty\byn\bna\bam\bme\be() function returns the null terminated name if the device is
+     found and i\bis\bsa\bat\btt\bty\by() is true; otherwise a NULL pointer is returned.
 
 
-     _\bT_\bt_\by_\bs_\bl_\bo_\bt returns the number of the entry in the _\bt_\bt_\by_\bs(5) file
-     for the control terminal of the current process.
+     The t\btt\bty\bys\bsl\blo\bot\bt() function returns the unit number of the device file if
+     found; otherwise the value zero is returned.
 
 F\bFI\bIL\bLE\bES\bS
      /dev/*
      /etc/ttys
 
 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
 
 F\bFI\bIL\bLE\bES\bS
      /dev/*
      /etc/ttys
 
 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
-     ioctl(2), ttys(5)
+     ioctl(2),  ttys(5)
 
 
-D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
-     _\bT_\bt_\by_\bn_\ba_\bm_\be returns a null pointer (0) if _\bf_\bi_\bl_\be_\bd_\be_\bs does not
-     describe a terminal device in directory `/dev'.
-
-     _\bT_\bt_\by_\bs_\bl_\bo_\bt returns 0 if `/etc/ttys' is inaccessible or if it
-     cannot determine the control terminal.
+H\bHI\bIS\bST\bTO\bOR\bRY\bY
+     A i\bis\bsa\bat\btt\bty\by(), t\btt\bty\byn\bna\bam\bme\be(), and t\btt\bty\bys\bsl\blo\bot\bt() function appeared in Version 7 AT&T
+     UNIX.
 
 B\bBU\bUG\bGS\bS
 
 B\bBU\bUG\bGS\bS
-     The return value points to static data whose content is
-     overwritten by each call.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Printed 7/27/90                May                             1
-
-
+     The t\btt\bty\byn\bna\bam\bme\be() function leaves its result in an internal static object and
+     returns a pointer to that object. Subsequent calls to t\btt\bty\byn\bna\bam\bme\be() will mod-
+     ify the same object.
 
 
+4.4BSD                           June 4, 1993                                1