home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / A / PS / PROCPS-0.000 / PROCPS-0 / procps-0.97 / status.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-25  |  357 b   |  22 lines

  1. #include "ps.h"
  2.  
  3. char *
  4. status(struct ps_proc *task)
  5. {
  6.     static char buf[5] = "    ";
  7.  
  8.     buf[0] = task->state;
  9.     if (task->rss == 0 && task->state != 'Z')
  10.         buf[1] = 'W';
  11.     else
  12.         buf[1] = ' ';
  13.     if (task->priority > PZERO)
  14.     buf[2] = '<';
  15.     else if (task->priority < PZERO)
  16.     buf[2] = 'N';
  17.     else
  18.     buf[2] = ' ';
  19.  
  20.     return(buf);
  21. }
  22.