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

Diff for /src/usr.bin/top/commands.c between version 1.2 and 1.3

version 1.2, 1997/08/22 07:16:26 version 1.3, 2001/11/19 19:02:17
Line 97 
Line 97 
   
 static char *next_field(str)  static char *next_field(str)
   
 register char *str;  char *str;
   
 {  {
     if ((str = strchr(str, ' ')) == NULL)      if ((str = strchr(str, ' ')) == NULL)
Line 118 
Line 118 
 int  *intp;  int  *intp;
   
 {  {
     register int val = 0;      int val = 0;
     register char ch;      char ch;
   
     /* if there is nothing left of the string, flag it as an error */      /* if there is nothing left of the string, flag it as an error */
     /* This fix is dedicated to Greg Earle */      /* This fix is dedicated to Greg Earle */
Line 194 
Line 194 
 static char *err_string()  static char *err_string()
   
 {  {
     register struct errs *errp;      struct errs *errp;
     register int  cnt = 0;      int  cnt = 0;
     register int  first = Yes;      int  first = Yes;
     register int  currerr = -1;      int  currerr = -1;
     int stringlen;              /* characters still available in "string" */      int stringlen;              /* characters still available in "string" */
     static char string[STRMAX];      static char string[STRMAX];
   
Line 258 
Line 258 
 int err;  int err;
   
 {  {
     register char *msg;      char *msg;
     register int  msglen;      int  msglen;
   
     msg = err == 0 ? "Not a number" : strerror(err);      msg = err == 0 ? "Not a number" : strerror(err);
     msglen = strlen(msg) + 2;      msglen = strlen(msg) + 2;
Line 286 
Line 286 
 int  first;  int  first;
   
 {  {
     register int arglen;      int arglen;
   
     arglen = strlen(arg);      arglen = strlen(arg);
     if (!first)      if (!first)
Line 315 
Line 315 
 const void *e1, *e2;  const void *e1, *e2;
   
 {  {
     register const struct errs *p1 = (struct errs *)e1;      const struct errs *p1 = (struct errs *)e1;
     register const struct errs *p2 = (struct errs *)e2;      const struct errs *p2 = (struct errs *)e2;
     register int result;      int result;
   
     if ((result = p1->errno - p2->errno) == 0)      if ((result = p1->errno - p2->errno) == 0)
     {      {
Line 343 
Line 343 
 void show_errors()  void show_errors()
   
 {  {
     register int cnt = 0;      int cnt = 0;
     register struct errs *errp = errs;      struct errs *errp = errs;
   
     printf("%d error%s:\n\n", errcnt, errcnt == 1 ? "" : "s");      printf("%d error%s:\n\n", errcnt, errcnt == 1 ? "" : "s");
     while (cnt++ < errcnt)      while (cnt++ < errcnt)
Line 365 
Line 365 
 char *str;  char *str;
   
 {  {
     register char *nptr;      char *nptr;
     int signum = SIGTERM;       /* default */      int signum = SIGTERM;       /* default */
     int procnum;      int procnum;
     struct sigdesc *sigp;      struct sigdesc *sigp;
Line 455 
Line 455 
 char *str;  char *str;
   
 {  {
     register char negate;      char negate;
     int prio;      int prio;
     int procnum;      int procnum;
     int uid;      int uid;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3