library: try to minimize the results types, <PIDS> api

This is just beginning an effort to minimize/normalize
the sheer variety of results types in use for our API.

In taking these first baby steps, a few anomalies were
found. There'll no doubt be many more yet to discover.

. the _FLT_ (fault) fields were already signed long in
the proc_t (even though their sscanf format used %lu).

. although strtoul will alway return an unsigned long,
all of the _VM_ fields were made signed long just like
other memory fields (& signed sorts more efficiently).

Reference(s):
http://www.freelists.org/post/procps/newlib-drip-drip,4

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2016-05-15 00:00:00 -05:00
committed by Craig Small
parent 56def1cbac
commit 540342620b
4 changed files with 76 additions and 76 deletions

View File

@@ -542,7 +542,7 @@ ENTER(0x160);
num = sscanf(S,
"%c "
"%d %d %d %d %d "
"%lu %lu %lu %lu %lu "
"%lu %ld %ld %ld %ld "
"%llu %llu %llu %llu " /* utime stime cutime cstime */
"%ld %ld "
"%d "