[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.67 and 1.68

version 1.67, 2009/07/18 06:12:41 version 1.68, 2009/12/10 13:16:02
Line 83 
Line 83 
 int old_threads = No;  int old_threads = No;
 int show_args = No;  int show_args = No;
 pid_t hlpid = -1;  pid_t hlpid = -1;
   int combine_cpus = 0;
   
 #if Default_TOPN == Infinity  #if Default_TOPN == Infinity
 char topn_specified = No;  char topn_specified = No;
Line 116 
Line 117 
 #define CMD_grep        20  #define CMD_grep        20
 #define CMD_add         21  #define CMD_add         21
 #define CMD_hl          22  #define CMD_hl          22
   #define CMD_cpus        23
   
 static void  static void
 usage(void)  usage(void)
Line 123 
Line 125 
         extern char *__progname;          extern char *__progname;
   
         fprintf(stderr,          fprintf(stderr,
             "usage: %s [-bCIinqSTu] [-d count] [-g string] [-o field] "              "usage: %s [-1bCIinqSTu] [-d count] [-g string] [-o field] "
             "[-p pid] [-s time]\n\t[-U user] [number]\n",              "[-p pid] [-s time]\n\t[-U user] [number]\n",
             __progname);              __progname);
 }  }
Line 134 
Line 136 
         char *endp;          char *endp;
         int i;          int i;
   
         while ((i = getopt(ac, av, "STICbinqus:d:p:U:o:g:")) != -1) {          while ((i = getopt(ac, av, "1STICbinqus:d:p:U:o:g:")) != -1) {
                 switch (i) {                  switch (i) {
                   case '1':
                           combine_cpus = 1;
                           break;
                 case 'C':                  case 'C':
                         show_args = Yes;                          show_args = Yes;
                         break;                          break;
   
                 case 'u':       /* toggle uid/username display */                  case 'u':       /* toggle uid/username display */
                         do_unames = !do_unames;                          do_unames = !do_unames;
                         break;                          break;
Line 516 
Line 520 
         int change, i;          int change, i;
         struct pollfd pfd[1];          struct pollfd pfd[1];
         uid_t uid;          uid_t uid;
         static char command_chars[] = "\f qh?en#sdkriIuSopCTg+P";          static char command_chars[] = "\f qh?en#sdkriIuSopCTg+P1";
   
         /*          /*
          * assume valid command unless told           * assume valid command unless told
Line 899 
Line 903 
                         ps.command = NULL;      /* grep */                          ps.command = NULL;      /* grep */
                         hlpid = -1;                          hlpid = -1;
                         break;                          break;
                   case CMD_cpus:
                           combine_cpus = !combine_cpus;
                           max_topn = display_resize();
                           reset_display();
                           break;
                 default:                  default:
                         new_message(MT_standout, " BAD CASE IN SWITCH!");                          new_message(MT_standout, " BAD CASE IN SWITCH!");
                         putr();                          putr();

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.68