]> git.pld-linux.org Git - packages/ncps.git/blob - ncps-procps.patch
9515f28f4143330b9aa76ffd3ca0137ac8f36eb8
[packages/ncps.git] / ncps-procps.patch
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
3 @@ -16,6 +16,7 @@
4  #include <pwd.h>
5  #include <asm/param.h>
6  #include <term.h>
7 +#undef tab
8  
9  #if HAVE_LIBPROC
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
13 @@ -27,7 +27,7 @@
14             branch->children = (tree **) realloc(branch->children, family_size * sizeof(tree*));
15           }
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;
19           j++;
20         }
21        }
22 @@ -40,7 +40,7 @@
23           }
24           
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;
28           j++;     
29         }
30        }
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
33 @@ -103,7 +103,7 @@
34      //ptp = openproc(PROC_FILLCOM | PROC_FILLENV | PROC_FILLUSR | PROC_FILLBUG);
35      if (uidlist)
36        {
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]);
40        }
41      else
42 @@ -138,7 +138,7 @@
43      
44  #if DEBUG
45      for (i = 0; i < chow->count; i++) {
46 -       printf("%i\n", tmp[i].proc->pid);
47 +       printf("%i\n", tmp[i].proc->tid);
48      }
49  #endif
50  
51 @@ -160,7 +160,7 @@
52    for(i = 0; i < count; i++) {
53  
54  #if DEBUG
55 -    printf("as pid: %i\n", tmp[i].proc->pid);
56 +    printf("as pid: %i\n", tmp[i].proc->tid);
57  #endif   
58  
59      tmp[0].proc->euser[15] = '\0';
60 @@ -171,12 +171,12 @@
61  
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);
66      
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;
70      
71 -    tmp[i].is_selected = check_selection(tmp[i].proc->pid);
72 +    tmp[i].is_selected = check_selection(tmp[i].proc->tid);
73      
74      fill_pcpu(tmp[i].proc);
75      get_lc(&(tmp[i]));
76 @@ -307,7 +307,7 @@
77  
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;
83         }
84      }
85 @@ -393,7 +393,7 @@
86                 template_size += PT_SIZE;
87                 selection_template = realloc(selection_template, template_size * sizeof(int));
88             }
89 -           selection_template[j] = mother->pidlist[i].proc->pid;
90 +           selection_template[j] = mother->pidlist[i].proc->tid;
91             j++;
92         }
93        }
94 @@ -436,7 +436,7 @@
95                 else if (tag == FTTY)
96                     diff = alpha(pidlist[i].ttyc, pidlist[i + gap].ttyc);
97                 else if (tag == FPID)
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)
103 @@ -484,7 +484,7 @@
104      i = 0;
105  
106      while(check && i < count) {        
107 -       if (pidlist[i].proc->pid == pid)
108 +       if (pidlist[i].proc->tid == pid)
109             check = 0;
110         else
111             i++;
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
114 @@ -44,7 +44,7 @@
115  
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... */
121             };
122             group = 1;
123 @@ -52,7 +52,7 @@
124      }
125  
126      if (!group)
127 -       kill(list[selected].proc->pid, sig);
128 +       kill(list[selected].proc->tid, sig);
129         
130      sleep(1);
131  }
132 @@ -85,7 +85,7 @@
133  
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);
138  
139    for(i = 0; i < PID; i++) {
140      if (tmp[i] && (tmp[i] != '\0'))
141 @@ -282,7 +282,7 @@
142                     attrset(COLOR_PAIR(NORMAL_COLOR) | A_NORMAL);
143  
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;
147                   l = strlen(pname);
148                   
149                   if(COLS < l) {
150 @@ -825,7 +825,7 @@
151       
152      case '\n':
153        if (t_view) {
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;
157         e_view = 0;
158         clear_all_screen();
159 @@ -890,7 +890,7 @@
160  
161      case 'c':
162        if (chow->count) {
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') {
167           def_prog_mode();
168 @@ -909,7 +909,7 @@
169      case ' ':
170        if (count) {
171         sub = chow;
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;
175        }
176        move_down(1, &selected_row, &selected, count);
177 @@ -919,7 +919,7 @@
178      case 'a':
179        for (i = 0; i < count; i++) {
180         sub = chow;
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;
184        }
185        tmp = NORMAL;
186 @@ -936,7 +936,7 @@
187        for (i = 0; i < count; i++) {
188         int pmt;
189         sub = chow;
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;
194        }
This page took 0.060963 seconds and 2 git commands to generate.