1 --- ncps-0.55/src/base.h.orig 2002-03-15 04:16:46.000000000 +0100
2 +++ ncps-0.55/src/base.h 2004-04-02 01:36:47.745982672 +0200
10 #include <proc/readproc.h>
11 --- ncps-0.55/src/tree.c.orig 2002-03-18 01:17:47.000000000 +0100
12 +++ ncps-0.55/src/tree.c 2004-04-02 01:39:20.298791120 +0200
14 branch->children = (tree **) realloc(branch->children, family_size * sizeof(tree*));
16 branch->children[j] = (tree *) malloc(sizeof(tree));
17 - branch->children[j]->pid = pidlist[i].proc->pid;
18 + branch->children[j]->pid = pidlist[i].proc->tid;
25 branch->children[j] = (tree *) malloc(sizeof(tree));
26 - branch->children[j]->pid = pidlist[i].proc->pid;
27 + branch->children[j]->pid = pidlist[i].proc->tid;
31 --- ncps-0.55/src/proc.c.orig 2003-01-09 14:38:03.000000000 +0100
32 +++ ncps-0.55/src/proc.c 2004-04-02 01:41:59.475592568 +0200
34 //ptp = openproc(PROC_FILLCOM | PROC_FILLENV | PROC_FILLUSR | PROC_FILLBUG);
37 - ptp = openproc (PROC_FILLANY | PROC_FILLMEM | PROC_FILLCOM | PROC_FILLENV | PROC_FILLSTAT | PROC_FILLSTATUS | PROC_FILLUSR | PROC_UID,
38 + ptp = openproc (PROC_FILLMEM | PROC_FILLCOM | PROC_FILLENV | PROC_FILLSTAT | PROC_FILLSTATUS | PROC_FILLUSR | PROC_UID,
39 uidlist + 1, uidlist[0]);
45 for (i = 0; i < chow->count; i++) {
46 - printf("%i\n", tmp[i].proc->pid);
47 + printf("%i\n", tmp[i].proc->tid);
52 for(i = 0; i < count; i++) {
55 - printf("as pid: %i\n", tmp[i].proc->pid);
56 + printf("as pid: %i\n", tmp[i].proc->tid);
59 tmp[0].proc->euser[15] = '\0';
62 tmp[i].pmem = tmp[i].proc->rss * 1000 / PAGEDIV;
63 dev_to_tty(tmp[i].ttyc, TTYC, tmp[i].proc->tty,
64 - tmp[i].proc->pid, ABBREV_DEV);
65 + tmp[i].proc->tid, ABBREV_DEV);
67 /* in tree view, PID 1 is automatically expanded */
68 - tmp[i].expand = (tmp[i].proc->pid == 1) ? 1 : 0;
69 + tmp[i].expand = (tmp[i].proc->tid == 1) ? 1 : 0;
71 - tmp[i].is_selected = check_selection(tmp[i].proc->pid);
72 + tmp[i].is_selected = check_selection(tmp[i].proc->tid);
74 fill_pcpu(tmp[i].proc);
78 for (i = 0; i < count; i++) {
79 if (regexec(&preg, list[i].pname, 0, NULL, 0) == 0) {
80 - pos = pid_pos(list[i].proc->pid, mother->pidlist, mother->count);
81 + pos = pid_pos(list[i].proc->tid, mother->pidlist, mother->count);
82 mother->pidlist[pos].is_selected = 1;
86 template_size += PT_SIZE;
87 selection_template = realloc(selection_template, template_size * sizeof(int));
89 - selection_template[j] = mother->pidlist[i].proc->pid;
90 + selection_template[j] = mother->pidlist[i].proc->tid;
96 diff = alpha(pidlist[i].ttyc, pidlist[i + gap].ttyc);
98 - diff = pidlist[i].proc->pid - pidlist[i + gap].proc->pid;
99 + diff = pidlist[i].proc->tid - pidlist[i + gap].proc->tid;
100 else if (tag == FCPU)
101 diff = pidlist[i].proc->pcpu - pidlist[i + gap].proc->pcpu;
102 else if (tag == FMEM)
106 while(check && i < count) {
107 - if (pidlist[i].proc->pid == pid)
108 + if (pidlist[i].proc->tid == pid)
112 --- ncps-0.55/src/gui.c.orig 2003-01-07 13:45:10.000000000 +0100
113 +++ ncps-0.55/src/gui.c 2004-04-02 01:42:30.700845608 +0200
116 for (i=0; i<count; ++i) {
117 if (list[i].is_selected) {
118 - if (kill(list[i].proc->pid, sig) == -1) {
119 + if (kill(list[i].proc->tid, sig) == -1) {
120 /* XXX we should do something about... */
127 - kill(list[selected].proc->pid, sig);
128 + kill(list[selected].proc->tid, sig);
134 if(field_op_[FPID]) {
135 tmp = (char *) malloc(PID * sizeof(char));
136 - sprintf(tmp, "%i", procinfo.proc->pid);
137 + sprintf(tmp, "%i", procinfo.proc->tid);
139 for(i = 0; i < PID; i++) {
140 if (tmp[i] && (tmp[i] != '\0'))
142 attrset(COLOR_PAIR(NORMAL_COLOR) | A_NORMAL);
144 if (current_row == current_highlight) {
145 - pname = chow->pidlist[pid_pos(options[pos].proc->pid, chow->pidlist, chow->count)].pname;
146 + pname = chow->pidlist[pid_pos(options[pos].proc->tid, chow->pidlist, chow->count)].pname;
154 - pos = pid_pos(list[selected].proc->pid, chow->pidlist, chow->count);
155 + pos = pid_pos(list[selected].proc->tid, chow->pidlist, chow->count);
156 chow->pidlist[pos].expand = (chow->pidlist[pos].expand + 1) % 2;
163 - sprintf(input, "%i", list[selected].proc->pid);
164 + sprintf(input, "%i", list[selected].proc->tid);
165 input_dlg(input, "command:");
166 if (input[0] != '\0') {
172 - pos = pid_pos(list[selected].proc->pid, sub->pidlist, sub->count);
173 + pos = pid_pos(list[selected].proc->tid, sub->pidlist, sub->count);
174 sub->pidlist[pos].is_selected = (sub->pidlist[pos].is_selected + 1) % 2;
176 move_down(1, &selected_row, &selected, count);
179 for (i = 0; i < count; i++) {
181 - pos = pid_pos(list[i].proc->pid, sub->pidlist, sub->count);
182 + pos = pid_pos(list[i].proc->tid, sub->pidlist, sub->count);
183 sub->pidlist[pos].is_selected = 1;
187 for (i = 0; i < count; i++) {
190 - pos = pid_pos(list[i].proc->pid, sub->pidlist, sub->count);
191 + pos = pid_pos(list[i].proc->tid, sub->pidlist, sub->count);
192 pmt = sub->pidlist[pos].is_selected;
193 sub->pidlist[pos].is_selected = !pmt;