Indent to 4 spaces.

This commit is contained in:
Martin Baulig
1999-12-25 19:04:22 +00:00
parent bbb539ef56
commit e7b42a66b1

View File

@@ -73,10 +73,8 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
/* Check if the user wanted only one process */
if(which == GLIBTOP_KERN_PROC_PID)
{
if(mask)
{
if(which == GLIBTOP_KERN_PROC_PID) {
if(mask) {
#ifdef HAVE_PROCFS_H
struct psinfo psinfo;
#else
@@ -90,9 +88,7 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
return NULL;
if(mask & GLIBTOP_EXCLUDE_NOTTY && psinfo.pr_ttydev == PRNODEV)
return NULL;
}
else
{
} else {
sprintf(buffer, "/proc/%d", arg);
if(s_stat(buffer, &statb) < 0)
return NULL;
@@ -138,8 +134,7 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
like this for LP64 process, because stat() will fail.
XXX Unimplemented for now */
if(!mask && which == GLIBTOP_KERN_PROC_RUID)
{
if(!mask && which == GLIBTOP_KERN_PROC_RUID) {
sprintf (buffer, "/proc/%d", pid);
if (s_stat (buffer, &statb)) continue;
@@ -148,14 +143,12 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
if(statb.st_uid != arg) continue;
}
if(mask || which != GLIBTOP_KERN_PROC_ALL)
{
if(mask || which != GLIBTOP_KERN_PROC_ALL) {
struct psinfo psinfo;
if(glibtop_get_proc_data_psinfo_s(server, &psinfo, pid))
continue;
if(mask)
{
if(mask) {
if(mask & GLIBTOP_EXCLUDE_IDLE && !psinfo.pr_pctcpu)
continue;
if(mask & GLIBTOP_EXCLUDE_SYSTEM && psinfo.pr_flag & SSYS)
@@ -164,24 +157,29 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
&& psinfo.pr_ttydev == PRNODEV)
continue;
}
switch(which)
{
case GLIBTOP_KERN_PROC_PGRP: if(psinfo.pr_pgid != arg)
switch(which) {
case GLIBTOP_KERN_PROC_PGRP:
if(psinfo.pr_pgid != arg)
continue;
break;
case GLIBTOP_KERN_PROC_SESSION: if(psinfo.pr_sid != arg)
case GLIBTOP_KERN_PROC_SESSION:
if(psinfo.pr_sid != arg)
continue;
break;
case GLIBTOP_KERN_PROC_TTY: if(psinfo.pr_ttydev != arg)
case GLIBTOP_KERN_PROC_TTY:
if(psinfo.pr_ttydev != arg)
continue;
break;
case GLIBTOP_KERN_PROC_UID: if(psinfo.pr_euid != arg)
case GLIBTOP_KERN_PROC_UID:
if(psinfo.pr_euid != arg)
continue;
break;
case GLIBTOP_KERN_PROC_RUID: if(psinfo.pr_uid != arg)
case GLIBTOP_KERN_PROC_RUID:
if(psinfo.pr_uid != arg)
continue;
break;
default: break;
default:
break;
}
}
#endif