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

Diff for /src/usr.bin/top/top.c between version 1.20 and 1.21

version 1.20, 2003/06/13 21:52:25 version 1.21, 2003/06/15 16:24:44
Line 155 
Line 155 
                         break;                          break;
   
                 case 'U':       /* display only username's processes */                  case 'U':       /* display only username's processes */
                         if ((ps.uid = userid(optarg)) == -1) {                          if ((ps.uid = userid(optarg)) == (uid_t)-1) {
                                 fprintf(stderr, "%s: unknown user\n", optarg);                                  fprintf(stderr, "%s: unknown user\n", optarg);
                                 exit(1);                                  exit(1);
                         }                          }
Line 266 
Line 266 
         /* initialize some selection options */          /* initialize some selection options */
         ps.idle = Yes;          ps.idle = Yes;
         ps.system = No;          ps.system = No;
         ps.uid = -1;          ps.uid = (uid_t)-1;
         ps.command = NULL;          ps.command = NULL;
   
         /* get preset options from the environment */          /* get preset options from the environment */
Line 512 
Line 512 
         sigset_t mask;          sigset_t mask;
         char ch, *iptr;          char ch, *iptr;
         int change, i;          int change, i;
           uid_t uid;
         static char command_chars[] = "\f qh?en#sdkriIuSo";          static char command_chars[] = "\f qh?en#sdkriIuSo";
   
         /*          /*
Line 757 
Line 758 
                         if (readline(tempbuf2, sizeof(tempbuf2), No) > 0) {                          if (readline(tempbuf2, sizeof(tempbuf2), No) > 0) {
                                 if (tempbuf2[0] == '+' &&                                  if (tempbuf2[0] == '+' &&
                                     tempbuf2[1] == '\0') {                                      tempbuf2[1] == '\0') {
                                         ps.uid = -1;                                          ps.uid = (uid_t)-1;
                                 } else if ((i = userid(tempbuf2)) == -1) {                                  } else if ((uid = userid(tempbuf2)) == (uid_t)-1) {
                                         new_message(MT_standout,                                          new_message(MT_standout,
                                             " %s: unknown user", tempbuf2);                                              " %s: unknown user", tempbuf2);
                                         no_command = Yes;                                          no_command = Yes;
                                 } else                                  } else
                                         ps.uid = i;                                          ps.uid = uid;
                                 if (putchar('\r') == EOF)                                  if (putchar('\r') == EOF)
                                         exit(1);                                          exit(1);
                         } else                          } else

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21