whitespace clean up.

* *.{c,h} : whitespace clean up.
This commit is contained in:
Benoît Dejean
2004-06-09 18:52:22 +00:00
parent b0edf88ff7
commit 70b0925a82
190 changed files with 739 additions and 735 deletions

View File

@@ -85,9 +85,9 @@ glibtop_get_procdata_s (glibtop *server, glibtop_procdata *buf, pid_t pid)
struct stat statb;
int nread;
FILE *f;
glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_procdata));
if (pid == 0) {
@@ -97,27 +97,27 @@ glibtop_get_procdata_s (glibtop *server, glibtop_procdata *buf, pid_t pid)
return;
}
sprintf (input, "/proc/%d/stat", pid);
if (stat (input, &statb)) return;
buf->uid = statb.st_uid;
f = fopen (input, "r");
if (!f) return;
nread = fread (input, 1, BUFSIZ, f);
if (nread < 0) {
fclose (f);
return;
}
input [nread] = 0;
/* This is from guile-utils/gtop/proc/readproc.c */
/* split into "PID (cmd" and "<rest>" */
tmp = strrchr (input, ')');
*tmp = '\0'; /* replace trailing ')' with NUL */
@@ -142,7 +142,7 @@ glibtop_get_procdata_s (glibtop *server, glibtop_procdata *buf, pid_t pid)
if (buf->tty == 0)
/* the old notty val, update elsewhere bef. moving to 0 */
buf->tty = -1;
fclose (f);
sprintf (input, "/proc/%d/statm", pid);