[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.8 and 1.9

version 1.8, 2001/07/17 02:23:58 version 1.9, 2001/07/27 17:13:42
Line 536 
Line 536 
             }              }
             else              else
             {              {
                 putchar('\n');                  if (putchar('\n') == EOF)
                       exit(1);
             }              }
             dostates = Yes;              dostates = Yes;
         }          }
Line 687 
Line 688 
                     {                      {
                         /* illegal command */                          /* illegal command */
                         new_message(MT_standout, " Command not understood");                          new_message(MT_standout, " Command not understood");
                         putchar('\r');                          if (putchar('\r') == EOF)
                               exit(1);
                         no_command = Yes;                          no_command = Yes;
                     }                      }
                     else                      else
Line 698 
Line 700 
                             /* error */                              /* error */
                             new_message(MT_standout,                              new_message(MT_standout,
                             " Command cannot be handled by this terminal");                              " Command cannot be handled by this terminal");
                             putchar('\r');                              if (putchar('\r') == EOF)
                                   exit(1);
                             no_command = Yes;                              no_command = Yes;
                         }                          }
                         else switch(change)                          else switch(change)
Line 737 
Line 740 
                                 {                                  {
                                     new_message(MT_standout,                                      new_message(MT_standout,
                                         " Currently no errors to report.");                                          " Currently no errors to report.");
                                     putchar('\r');                                      if (putchar('\r') == EOF)
                                           exit(1);
                                     no_command = Yes;                                      no_command = Yes;
                                 }                                  }
                                 else                                  else
Line 763 
Line 767 
                                         new_message(MT_standout | MT_delayed,                                          new_message(MT_standout | MT_delayed,
                                           " This terminal can only display %d processes.",                                            " This terminal can only display %d processes.",
                                           max_topn);                                            max_topn);
                                         putchar('\r');                                          if (putchar('\r') == EOF)
                                               exit(1);
                                     }                                      }
   
                                     if (newval == 0)                                      if (newval == 0)
Line 813 
Line 818 
                                     if ((errmsg = kill_procs(tempbuf2)) != NULL)                                      if ((errmsg = kill_procs(tempbuf2)) != NULL)
                                     {                                      {
                                         new_message(MT_standout, "%s", errmsg);                                          new_message(MT_standout, "%s", errmsg);
                                         putchar('\r');                                          if (putchar('\r') == EOF)
                                               exit(1);
                                         no_command = Yes;                                          no_command = Yes;
                                     }                                      }
                                 }                                  }
Line 830 
Line 836 
                                     if ((errmsg = renice_procs(tempbuf2)) != NULL)                                      if ((errmsg = renice_procs(tempbuf2)) != NULL)
                                     {                                      {
                                         new_message(MT_standout, "%s", errmsg);                                          new_message(MT_standout, "%s", errmsg);
                                         putchar('\r');                                          if (putchar('\r') == EOF)
                                               exit(1);
                                         no_command = Yes;                                          no_command = Yes;
                                     }                                      }
                                 }                                  }
Line 846 
Line 853 
                                 new_message(MT_standout | MT_delayed,                                  new_message(MT_standout | MT_delayed,
                                     " %sisplaying idle processes.",                                      " %sisplaying idle processes.",
                                     ps.idle ? "D" : "Not d");                                      ps.idle ? "D" : "Not d");
                                 putchar('\r');                                  if (putchar('\r') == EOF)
                                       exit(1);
                                 break;                                  break;
   
                             case CMD_user:                              case CMD_user:
Line 869 
Line 877 
                                     {                                      {
                                         ps.uid = i;                                          ps.uid = i;
                                     }                                      }
                                     putchar('\r');                                      if (putchar('\r') == EOF)
                                           exit(1);
                                 }                                  }
                                 else                                  else
                                 {                                  {
Line 893 
Line 902 
                                     {                                      {
                                         order_index = i;                                          order_index = i;
                                     }                                      }
                                     putchar('\r');                                      if (putchar('\r') == EOF)
                                           exit(1);
                                 }                                  }
                                 else                                  else
                                 {                                  {
Line 904 
Line 914 
   
                             default:                              default:
                                 new_message(MT_standout, " BAD CASE IN SWITCH!");                                  new_message(MT_standout, " BAD CASE IN SWITCH!");
                                 putchar('\r');                                  if (putchar('\r') == EOF)
                                       exit(1);
                         }                          }
                     }                      }
   

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9