projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add include files to get prototype declarations, and fix bugs found.
[unix-history]
/
usr
/
src
/
lib
/
libc
/
gen
/
ttyslot.c
diff --git
a/usr/src/lib/libc/gen/ttyslot.c
b/usr/src/lib/libc/gen/ttyslot.c
index
57cecb4
..
dcfbc43
100644
(file)
--- a/
usr/src/lib/libc/gen/ttyslot.c
+++ b/
usr/src/lib/libc/gen/ttyslot.c
@@
-6,19
+6,22
@@
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ttyslot.c 5.
5
(Berkeley) %G%";
+static char sccsid[] = "@(#)ttyslot.c 5.
6
(Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <ttyent.h>
#include <stdio.h>
#endif /* LIBC_SCCS and not lint */
#include <ttyent.h>
#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+int
ttyslot()
{
register struct ttyent *ttyp;
register int slot;
register char *p;
int cnt;
ttyslot()
{
register struct ttyent *ttyp;
register int slot;
register char *p;
int cnt;
- char *name
, *rindex(), *ttyname()
;
+ char *name;
setttyent();
for (cnt = 0; cnt < 3; ++cnt)
setttyent();
for (cnt = 0; cnt < 3; ++cnt)