diff --git a/proc/Makefile.am b/proc/Makefile.am index 0741c14f..7d6c24a3 100644 --- a/proc/Makefile.am +++ b/proc/Makefile.am @@ -4,7 +4,7 @@ lib_LTLIBRARIES = libproc.la libproc_la_SOURCES = alloc.c compare.c compare.h devname.c devname.h \ ksym.c output.c procps.h pwcache.c readproc.c \ readproc.h sig.c sig.h status.c status.h sysinfo.c \ - sysinfo.h tree.h version.c version.h whattime.c \ + sysinfo.h version.c version.h whattime.c \ whattime.h libproc_la_LDFLAGS = -version-info 3:0:0 diff --git a/proc/compare.c b/proc/compare.c index 46695ac5..7fd3ed0c 100644 --- a/proc/compare.c +++ b/proc/compare.c @@ -11,7 +11,6 @@ #include /* for parse error output */ #include "proc/readproc.h" /* for proc_t */ -#include "proc/tree.h" /* for struct tree_node */ #include "proc/compare.h" /* for this code */ @@ -67,16 +66,6 @@ int mult_lvl_cmp(void* a, void* b) { return 0; } -int node_mult_lvl_cmp(void* a, void* b) { - int i, cmp_val; - for(i = 0; i < sort_depth; i++) { - cmp_val = sort_direction[i] * (*sort_function[i])(&(((struct tree_node *)a)->proc),&(((struct tree_node *)b)->proc)); - if (cmp_val != 0) - return cmp_val; - } - return 0; -} - /* qsort(3) compliant comparison functions for all members of the ps_proc structure (in the same order in which they appear in the proc_t declaration) return is {-1,0,1} as {ab} diff --git a/proc/compare.h b/proc/compare.h index 153717a9..3056dc6a 100644 --- a/proc/compare.h +++ b/proc/compare.h @@ -3,7 +3,6 @@ typedef int (*cmp_t)(void*,void*); /* for function pointer casts */ extern void register_sort_function (int dir, cmp_t func); extern void reset_sort_options(void); extern int mult_lvl_cmp(void* a, void* b); -extern int node_mult_lvl_cmp(void* a, void* b); extern const char *parse_sort_opt(const char* opt); extern const char *parse_long_sort(const char* opt); diff --git a/proc/procps.h b/proc/procps.h index 43be33ab..bd9c6645 100644 --- a/proc/procps.h +++ b/proc/procps.h @@ -14,7 +14,6 @@ extern void *xmalloc(unsigned int size); extern void *xcalloc(void *pointer, int size); extern int mult_lvl_cmp(void* a, void* b); -extern int node_mult_lvl_cmp(void* a, void* b); extern char *user_from_uid(uid_t uid); extern char *group_from_gid(gid_t gid); diff --git a/proc/tree.h b/proc/tree.h deleted file mode 100644 index f834fa28..00000000 --- a/proc/tree.h +++ /dev/null @@ -1,15 +0,0 @@ -/* for oldps.c and proc/compare.c */ -struct tree_node { - proc_t *proc; - pid_t pid; - pid_t ppid; - char *line; - char *cmd; - char **cmdline; - char **environ; - int children; - int maxchildren; - int *child; - int have_parent; -}; - diff --git a/ps/output.c b/ps/output.c index c30d42a7..2fb7b6db 100644 --- a/ps/output.c +++ b/ps/output.c @@ -60,7 +60,6 @@ #include "../proc/readproc.h" #include "../proc/sysinfo.h" -#include "../proc/status.h" #include "../proc/procps.h" #include "../proc/devname.h" #include "common.h"