local version
[unix-history] / usr / src / usr.bin / who / who.c
index 5a0f0c7..cb097f2 100644 (file)
@@ -1,4 +1,4 @@
-static char *sccsid = "@(#)who.c       4.1 (Berkeley) %G%";
+static char *sccsid = "@(#)who.c       4.3 (Berkeley) %G%";
 /*
  * who
  */
 /*
  * who
  */
@@ -6,6 +6,8 @@ static char *sccsid = "@(#)who.c        4.1 (Berkeley) %G%";
 #include <stdio.h>
 #include <utmp.h>
 #include <pwd.h>
 #include <stdio.h>
 #include <utmp.h>
 #include <pwd.h>
+#include <whoami.h>
+#include <ctype.h>
 
 #define NMAX sizeof(utmp.ut_name)
 #define LMAX sizeof(utmp.ut_line)
 
 #define NMAX sizeof(utmp.ut_name)
 #define LMAX sizeof(utmp.ut_line)
@@ -45,11 +47,10 @@ char **argv;
        }
        while (fread((char *)&utmp, sizeof(utmp), 1, fi) == 1) {
                if(argc==3) {
        }
        while (fread((char *)&utmp, sizeof(utmp), 1, fi) == 1) {
                if(argc==3) {
+                       static char myname[]=sysname;
                        if (strcmp(utmp.ut_line, tp))
                                continue;
                        if (strcmp(utmp.ut_line, tp))
                                continue;
-#ifdef vax
-                       printf("(Vax) ");
-#endif
+                       printf("%s!",myname);
                        putline();
                        exit(0);
                }
                        putline();
                        exit(0);
                }