1: #if defined(LIBC_SCCS) && !defined(lint)
2: static char sccsid[] = "@(#)isatty.c 5.2 (Berkeley) 3/9/86";
3: #endif LIBC_SCCS and not lint
4:
5: /*
6: * Returns 1 iff file is a tty
7: */
8:
9: #include <sgtty.h>
10:
11: isatty(f)
12: {
13: struct sgttyb ttyb;
14:
15: if (ioctl(f, TIOCGETP, &ttyb) < 0)
16: return(0);
17: return(1);
18: }
Defined functions
isatty
defined in line
11; used 142 times
- in /usr/src/bin/adb/main.c line
79
- in /usr/src/bin/cp.c line
143
- in /usr/src/bin/csh/sh.c line
220,
229,
269-273(3),
498
- in /usr/src/bin/ls/ls.c line
83
- in /usr/src/bin/mail.c line
490
- in /usr/src/bin/mv.c line
132-135(2)
- in /usr/src/bin/od.c line
882
- in /usr/src/bin/rm.c line
26
- in /usr/src/bin/sh/service.c line
156
- in /usr/src/bin/tcsh/sh.c line
614,
620,
628-629(2),
637,
682-686(3),
1079,
1647-1649(2)
- in /usr/src/bin/tcsh/sh.exec.c line
183-184(2)
- in /usr/src/bin/tcsh/sh.misc.c line
276-277(2)
- in /usr/src/bin/tcsh/sh.sem.c line
523-525(2),
713
- in /usr/src/bin/tcsh/tc.os.c line
988-992(3)
- in /usr/src/bin/test/test.c line
412
- in /usr/src/games/hunt/hunt.c line
146
- in /usr/src/games/phantasia/main.c line
138
- in /usr/src/lib/libc/gen/ttyname.c line
29
- in /usr/src/lib/libc/net/ruserpass.c line
754-758(3)
- in /usr/src/lib/libc/stdio/flsbuf.c line
62
- in /usr/src/libexec/identd/src/identd.c line
294
- in /usr/src/local/afio/afio.c line
1861
- in /usr/src/local/cxref/cxref.c line
236,
264
- in /usr/src/local/less/main.c line
82,
282
- in /usr/src/local/qterm/qterm.c line
428
- in /usr/src/new/OLD/apl/src/a0.c line
39,
150
- in /usr/src/new/OLD/apl/src/a9.c line
59
- in /usr/src/new/OLD/apl/src/aplcvt.c line
117(2)
- in /usr/src/new/PORT/B/src/bint/b3fil.c line
183
- in /usr/src/new/PORT/B/src/bsmall/b2fil.c line
177
- in /usr/src/new/PORT/apl/src/a0.c line
39,
150
- in /usr/src/new/PORT/apl/src/a9.c line
59
- in /usr/src/new/PORT/apl/src/aplcvt.c line
117(2)
- in /usr/src/new/kermit5.188/ckucmd.c line
1881-1884(2)
- in /usr/src/new/kermit5.188/ckufio.c line
601
- in /usr/src/new/kermit5.188/ckutio.c line
1159(2),
1232,
1275(3),
2685,
3000,
3896(2),
5122,
5194,
5278,
5371,
5453
- in /usr/src/new/kermit5.188/ckuus7.c line
1325
- in /usr/src/new/kermit5.188/ckuusy.c line
100,
197
- in /usr/src/new/nntp/server/access.c line
85
- in /usr/src/new/notes/src/cursor.c line
156
- in /usr/src/new/rcs/src/ci.c line
320,
826,
889,
903,
917,
927,
938
- in /usr/src/new/rcs/src/rcsgen.c line
261-266(2),
278-288(3),
299
- in /usr/src/ucb/Mail/main.c line
72
- in /usr/src/ucb/PORT/pascal/pdx/main.h line
20
- in /usr/src/ucb/compress/compress.c line
640
- in /usr/src/ucb/ex/ex.c line
293
- in /usr/src/ucb/ex/ex_cmds.c line
858
- in /usr/src/ucb/ex/ex_get.c line
152
- in /usr/src/ucb/ex/ex_io.c line
343,
560,
782
- in /usr/src/ucb/ftp/main.c line
102
- in /usr/src/ucb/man/man.c line
105
- in /usr/src/ucb/more/more.c line
1344
- in /usr/src/ucb/msgs/msgs.c line
317,
356
- in /usr/src/ucb/talk/get_names.c line
38
- in /usr/src/ucb/ul.c line
64
- in /usr/src/usr.bin/at/at.c line
366
- in /usr/src/usr.bin/patch/dist/util.c line
191,
199-204(2),
210
- in /usr/src/usr.bin/patch/util.c line
195,
203-208(2),
214
- in /usr/src/usr.bin/refer/lookbib.c line
30,
49
- in /usr/src/usr.bin/tip/tip.c line
62
- in /usr/src/usr.bin/tk.c line
210
- in /usr/src/usr.bin/uucp/cico.c line
224,
518,
811
- in /usr/src/usr.lib/libF77/s_paus.c line
27
- in /usr/src/usr.lib/libI77/open.c line
230
- in /usr/src/usr.lib/libU77/isatty_.c line
34
- in /usr/src/usr.lib/libcurses/initscr.c line
34
- in /usr/src/usr.lib/libplot/hp2648/open.c line
27
- in /usr/src/usr.sbin/lpr/lpc.c line
63
- in /usr/src/usr.sbin/lpr/printjob.c line
1132
- in /usr/src/usr.sbin/rxformat/rxformat.c line
43
- in /usr/src/usr.sbin/sysgen/sysgen.c line
38
- in /usr/src/usr.sbin/syslogd/syslogd.c line
1045
- in /usr/src/usr.sbin/timed/timedc.c line
67
Defined variables
sccsid
defined in line
2;
never used