[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.43 and 1.44

version 1.43, 2004/09/14 22:24:24 version 1.44, 2005/04/11 07:04:47
Line 264 
Line 264 
                 }                  }
         }          }
         if ((ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) == -1 &&          if ((ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) == -1 &&
              ioctl(STDERR_FILENO, TIOCGWINSZ, &ws) == -1 &&              ioctl(STDERR_FILENO, TIOCGWINSZ, &ws) == -1 &&
              ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) == -1) || ws.ws_col == 0)              ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) == -1) || ws.ws_col == 0)
                ttywidth = 79;                  ttywidth = 79;
         else          else
                ttywidth = ws.ws_col - 1;                  ttywidth = ws.ws_col - 1;
         argwidth = ttywidth - WUSED;          argwidth = ttywidth - WUSED;
         if (argwidth < 4)          if (argwidth < 4)
                 argwidth = 8;                  argwidth = 8;
         /* sort by idle time */          /* sort by idle time */
         if (sortidle && ehead != NULL) {          if (sortidle && ehead != NULL) {
                 struct entry *from = ehead, *save;                  struct entry *from = ehead, *save;
   
                 ehead = NULL;                  ehead = NULL;
                 while (from != NULL) {                  while (from != NULL) {
                         for (nextp = &ehead;                          for (nextp = &ehead;
Line 288 
Line 288 
                         *nextp = save;                          *nextp = save;
                 }                  }
         }          }
   
         if (!nflag) {          if (!nflag) {
                 if (gethostname(domain, sizeof(domain)) < 0 ||                  if (gethostname(domain, sizeof(domain)) < 0 ||
                     (p = strchr(domain, '.')) == 0)                      (p = strchr(domain, '.')) == 0)

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44