diff options
Diffstat (limited to 'contrib/top/commands.c')
-rw-r--r-- | contrib/top/commands.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/contrib/top/commands.c b/contrib/top/commands.c index a848231..a852a47 100644 --- a/contrib/top/commands.c +++ b/contrib/top/commands.c @@ -24,6 +24,7 @@ #include <sys/resource.h> #include "sigdesc.h" /* generated automatically */ +#include "top.h" #include "boolean.h" #include "utils.h" @@ -153,7 +154,7 @@ int *intp; struct errs /* structure for a system-call error */ { - int errno; /* value of errno (that is, the actual error) */ + int errnum; /* value of errno (that is, the actual error) */ char *arg; /* argument that caused the error */ }; @@ -172,7 +173,7 @@ static char *err_listem = else \ { \ errs[errcnt].arg = (p); \ - errs[errcnt++].errno = (e); \ + errs[errcnt++].errnum = (e); \ } /* @@ -212,7 +213,7 @@ char *err_string() while (cnt < errcnt) { errp = &(errs[cnt++]); - if (errp->errno != currerr) + if (errp->errnum != currerr) { if (currerr != -1) { @@ -222,7 +223,7 @@ char *err_string() } (void) strcat(string, "; "); /* we know there's more */ } - currerr = errp->errno; + currerr = errp->errnum; first = Yes; } if ((stringlen = str_addarg(string, stringlen, errp->arg, first)) ==0) @@ -310,7 +311,7 @@ register struct errs *p1, *p2; { register int result; - if ((result = p1->errno - p2->errno) == 0) + if ((result = p1->errnum - p2->errnum) == 0) { return(strcmp(p1->arg, p2->arg)); } @@ -341,7 +342,7 @@ show_errors() while (cnt++ < errcnt) { printf("%5s: %s\n", errp->arg, - errp->errno == 0 ? "Not a number" : errmsg(errp->errno)); + errp->errnum == 0 ? "Not a number" : errmsg(errp->errnum)); errp++; } } |