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
Bell 32V development
[unix-history]
/
usr
/
src
/
cmd
/
who.c
diff --git
a/usr/src/cmd/who.c
b/usr/src/cmd/who.c
index
194fe96
..
27e0b1d
100644
(file)
--- a/
usr/src/cmd/who.c
+++ b/
usr/src/cmd/who.c
@@
-9,7
+9,7
@@
struct utmp utmp;
struct passwd *pw;
struct passwd *getpwuid();
struct passwd *pw;
struct passwd *getpwuid();
-char *ttyname(), *rindex(), *ctime(), *strcpy()
, *index()
;
+char *ttyname(), *rindex(), *ctime(), *strcpy();
main(argc, argv)
char **argv;
{
main(argc, argv)
char **argv;
{
@@
-22,7
+22,7
@@
char **argv;
if (argc==3) {
tp = ttyname(0);
if (tp)
if (argc==3) {
tp = ttyname(0);
if (tp)
- tp =
index(tp+1
, '/') + 1;
+ tp =
rindex(tp
, '/') + 1;
else { /* no tty - use best guess from passwd file */
pw = getpwuid(getuid());
strcpy(utmp.ut_name, pw?pw->pw_name: "?");
else { /* no tty - use best guess from passwd file */
pw = getpwuid(getuid());
strcpy(utmp.ut_name, pw?pw->pw_name: "?");
@@
-40,8
+40,8
@@
char **argv;
if(argc==3) {
if (strcmp(utmp.ut_line, tp))
continue;
if(argc==3) {
if (strcmp(utmp.ut_line, tp))
continue;
-#ifdef
interdata
- printf("(
Interdata
) ");
+#ifdef
vax
+ printf("(
Vax
) ");
#endif
putline();
exit(0);
#endif
putline();
exit(0);