This commit is contained in:
albert 2002-12-08 18:56:05 +00:00
parent ab8b5f314d
commit c7cb0983b4
2 changed files with 4 additions and 2 deletions

View File

@ -11,14 +11,16 @@
#include "readproc.h"
#include "status.h"
char * status(proc_t* task) {
const char * status(const proc_t *restrict task) {
static char buf[4] = " ";
buf[0] = task->state;
if (task->rss == 0 && task->state != 'Z')
buf[1] = 'W';
else
buf[1] = ' ';
if (task->nice < 0)
buf[2] = '<';
else if (task->nice > 0)

View File

@ -1,4 +1,4 @@
#ifndef __PROC_STATUS_H
#define __PROC_STATUS_H
extern char *status(proc_t* task);
extern const char * status(const proc_t *restrict task);
#endif