[BACK]Return to w.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / w

Diff for /src/usr.bin/w/w.c between version 1.33 and 1.34

version 1.33, 2001/05/30 20:57:58 version 1.34, 2001/07/12 05:17:31
Line 305 
Line 305 
                 }                  }
         }          }
   
         if (!nflag)          if (!nflag) {
                 if (gethostname(domain, sizeof(domain) - 1) < 0 ||                  if (gethostname(domain, sizeof(domain) - 1) < 0 ||
                     (p = strchr(domain, '.')) == 0)                      (p = strchr(domain, '.')) == 0)
                         domain[0] = '\0';                          domain[0] = '\0';
Line 313 
Line 313 
                         domain[sizeof(domain) - 1] = '\0';                          domain[sizeof(domain) - 1] = '\0';
                         memmove(domain, p, strlen(p) + 1);                          memmove(domain, p, strlen(p) + 1);
                 }                  }
           }
   
         for (ep = ehead; ep != NULL; ep = ep->next) {          for (ep = ehead; ep != NULL; ep = ep->next) {
                 p = *ep->utmp.ut_host ? ep->utmp.ut_host : "-";                  p = *ep->utmp.ut_host ? ep->utmp.ut_host : "-";
Line 336 
Line 337 
                 }                  }
                 if (x) {                  if (x) {
                         (void)snprintf(buf, sizeof(buf), "%s:%.*s", p,                          (void)snprintf(buf, sizeof(buf), "%s:%.*s", p,
                             ep->utmp.ut_host + UT_HOSTSIZE - x, x);                              (int)(ep->utmp.ut_host + UT_HOSTSIZE - x), x);
                         p = buf;                          p = buf;
                 }                  }
                 (void)printf("%-*.*s %-2.2s %-*.*s ",                  (void)printf("%-*.*s %-2.2s %-*.*s ",

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34