1: /* @(#)gets.c 2.1 SCCS id keyword */
2: #include <stdio.h>
3:
4: char *
5: gets(s)
6: char *s;
7: {
8: register c;
9: register char *cs;
10:
11: cs = s;
12: while ((c = getchar()) != '\n' && c >= 0)
13: *cs++ = c;
14: if (c<0 && cs==s)
15: return(NULL);
16: *cs++ = '\0';
17: return(s);
18: }
Defined functions
gets
defined in line
4; used 32 times
- in /usr/src/cmd/512restor.c line
212,
254,
340,
347
- in /usr/src/cmd/icheck.c line
110
- in /usr/src/cmd/learn/dounit.c line
38
- in /usr/src/cmd/learn/selsub.c line
37,
43,
54
- in /usr/src/cmd/learn/selunit.c line
19
- in /usr/src/cmd/mkfs.c line
92,
98-105(3)
- in /usr/src/cmd/refer/util/deliv1.c line
14
- in /usr/src/cmd/refer/util/kaiser.c line
13
- in /usr/src/cmd/restor.c line
185,
227,
313,
320
- in /usr/src/cmd/uucp/syskludge/testsys.c line
20-21(2)
- in /usr/src/games/banner.c line
1042
- in /usr/src/lib/libF77/mkvers.c line
51
- in /usr/src/lib/libI77/mkvers.c line
51
- in /usr/src/lib/libU77/mkvers.c line
51
- in /usr/src/sys/autoconfig/do_config.c line
28,
261
- in /usr/src/ucb/Mail/def.h line
269
- in /usr/src/ucb/fleece.c line
34
- in /usr/src/ucb/gets.c line
20
- in /usr/src/ucb/msgs/msgs.c line
660